Problem in running openmc with openmp threads

I have installed OpenMC 0.10.0 on Ubuntu 18.04 from source code using the following parameters:

FC=mpif90 CC=mpicc CXX=mpicxx cmake -Dopenmp=on -DCMAKE_INSTALL_PREFIX=$HOME/openmc …

make

sudo make install

when I attempt to run a problem using “-s 2” in command line, the problem runs in only one thread.

Any idea about this problem?

OpenMP threads will not appear as separate processes when you run ‘top’. Notice that in your output, the CPU usage is actually > 100%, which is a pretty good indication that you have multiple threads running inside a single process. If you want to run multiple MPI processes, you would have to invoke OpenMC using mpiexec:

mpiexec -n N openmc

where N is the number of processes you want. Generally speaking, you’ll want to ensure that the number of processes times the number of threads/process equals the number of cores on your machine. So for example, if your machine has 8 cores, you might run with 2 MPI processes and 4 threads/process:

mpiexec -n 2 openmc -s 4

It’s a good idea to play around with the number of processes/threads to see what combination gives you optimal performance.

Best,
Paul

Thank you for the clarification.