Error running cmdStan on IBM Power9 System

As the title suggests, I’m attempting to run cmdStan on an IBM Power9 system (called Bede) but am running into some errors when compiling models. I am using cmdStan version 2.23.0 and compiling with gcc version 8.4.0. cmdStan itself successfully compiles, but the error below is displayed when compiling the Stan model described here

make ../src/models/deaths_and_111_calls

--- Translating Stan model to C++ code ---
bin/stanc  --o=../src/models/deaths_and_111_calls.hpp ../src/models/deaths_and_111_calls.stan
/bin/bash: bin/stanc: cannot execute binary file
make: *** No rule to make target `../src/models/deaths_and_111_calls.hpp', needed by `../src/models/deaths_and_111_calls'.  Stop.

Another user described similar issues on ARM (see here). As suggested in the comments, I tried to build stanc3 by hand but the system that I am working on does not have Dune or Nix installed which seems to rule out compiling things by hand.

I wondered if anyone has experience running cmdStan on a Power9 system and previously overcome these issues? Are there any other ways to compile stanc3 by hand which don’t require Nix/Dune?

Thank you

1 Like

Is there x86 virtualization available on Power9, like there is for ARM?

You would run stanc3 with virtualization to generate the .hpp file and then compile for Power9 like usually.

@StaffanBetner has used this on ARM before we added the pre-built the ARM Linux binary for stanc3.

See Problem compiling models with cmdstan on arm64 - #4 by StaffanBetner and QEMU emulation of stanc3 on architectures without provided binaries · Issue #956 · stan-dev/cmdstan · GitHub

If this isnt available you could generate it using the stanc3.js. For that you would need node install on the Power9 machine.


Rok, thank you for the suggestions and pointers to other posts.

I’m not sure if virtualisation is available on Power9, will have to have a deeper look. node is not available on the Power9 system AFAIK.