null

Message Boards

D-WAQ PART - Changing the number of threads

GG
gustavo gomes, modified 5 Years ago.

D-WAQ PART - Changing the number of threads

Youngling Posts: 2 Join Date: 12/18/12 Recent Posts
Dear,
I'm using the PART model in an oil spill project, running a large number of simulations (about 500) in serial mode for probabilistic results. Until now was using the version of 4:00:02 Delft3D and the PART used only one (1) thread. However, this version showns some instabilities to write files when the simulation ends, generating error and pausing the serial simulations. Therefore I installed the version of 4:01:00 Delft3D that corrected these bugs. However, by default, this latest version of D-WAQ PART uses all threads of processor and I wonder if you can change the number of threads for each simulation. Since I am simulating about 4-5 models in parallel and need to manage the number of threads to avoid calculation trouble.

Thanks for attention,
Gustavo
AM
Arjen Markus, modified 5 Years ago.

RE: D-WAQ PART - Changing the number of threads (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
You can control the number of threads by setting the environment variable OMP_NUM_THREADS to the required number. See for instance: https://www.dartmouth.edu/~rc/classes/intro_openmp/compile_run.html.

If you are using WIndows, then:

c:\> set OMP_NUM_THREADS=1
c:\> delpar

should do the trick.
GG
gustavo gomes, modified 5 Years ago.

RE: D-WAQ PART - Changing the number of threads

Youngling Posts: 2 Join Date: 12/18/12 Recent Posts
Thank you Arjen. It worked.