New user of OpenLB here. I’ve successfully installed and ran some of the included examples that are included in the source code, compiled using OpenMPI and ran them in parallel. The problem I have is that I would like to choose how many threads to use when I compile and run it, but it always runs on all of the processors for my computer.
This is pretty obvious since the very first line of output after starting a simulation is:
[OmpManager] Sucessfully initialized, numThreads=32
Since I have a 32 core processor. However since I’m also running other simulations on the computer as well, I’d like to limit the number of threads to something smaller.
The problem is that I can’t find anywhere where I can do that. config.mk in the head directory of course has the lines where you choose serial, MPI, or OpenMPI:
#PARALLEL_MODE := OFF
#PARALLEL_MODE := MPI
PARALLEL_MODE := OMP
But I can’t find anything to set the number of threads to a number of my choosing or anything like that.