I did as you suggested but with no succes. At the top of my python scripct I have now
fromngsolveimport*SetNumThreads(2)
but still when I run the code I get
Using Lapack
Including sparse direct solver Pardiso
Running parallel using 8 thread(s)
(number of threads can be changed by setting OMP_NUM_THREADS)
python init file = /opt/netgen/bin/init.py
thanks,
Sander
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
when you check (e.g. using top) how many threads you are actually using you should see two. This applies to the ngsolve parallelization using TaskManager. External solvers (like pardiso) do use the OMP_NUM_THREADS variable.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to set OMP_NUM_THREADS, but it seems ngsolve overwrites what I'm setting. From the command line I do for example
export OMP_NUM_THREADS=2
which then gets set (echo $OMP_NUM_THREADS gives me 2), but when I run a simulation I get a message:
Running parallel using 8 thread(s)
(number of threads can be changed by setting OMP_NUM_THREADS)
How do I set OMP_NUM_THREADS such that ngsolve doesn't overwrite it?
thanks,
Sander
I just removed this relict from openmp. Use
in your python script.
I did as you suggested but with no succes. At the top of my python scripct I have now
but still when I run the code I get
Using Lapack
Including sparse direct solver Pardiso
Running parallel using 8 thread(s)
(number of threads can be changed by setting OMP_NUM_THREADS)
python init file = /opt/netgen/bin/init.py
thanks,
Sander
when you check (e.g. using top) how many threads you are actually using you should see two. This applies to the ngsolve parallelization using TaskManager. External solvers (like pardiso) do use the OMP_NUM_THREADS variable.
thanks - I think it's doing now as expected.
Sander