OpenMPI support

Hi folks,

I’d like to run OpenMC with multiple threads, so I built OpenMC with MPI support like so:

cd src

mkdir build

cd build

FC=mpif90 cmake -DCMAKE_INSTALL_PREFIX=$HOME/.virtualenv/cnerg …

make install

It all builds and installs without complaint. But when I try to run

openmc -s 3

It warns me about ignoring the number of threads passed in on the command line, and says it’s running one MPI process. If I set the environment variable OMP_NUM_THREADS to 3, it doesn’t give any warnings but also only runs one MPI process. There is no threads element in settings.xml.

What do I need to do next?

John

Appendix - I’m on the develop branch. Here’s the relevant part of stdout:

Version: 0.6.1
Git SHA1: fa775430133cc9915b2c3431cf96aec2d6e57c6f
Date/Time: 2015-02-08 12:58:32
MPI Processes: 1

Hi John,

You just need to add -Dopenmp=on to the cmake line. Let me know if you’re still having issues after that!

Paul

Thanks Paul, that worked great!