Closed danielegaggero closed 2 years ago
export HERMES_NUM_THREADS=1
before cmake to run HERMES on a single thread.Yes, as @carmeloevoli wrote, export HERMES_NUM_THREADS=1
will run HERMES on a single thread.
I think this issue has been settled, I close it.
Hi, very quick dummy questions:
1) how do I disable multi-threading, or set a different number of threads? I noticed this line *env_num_threads = getenv("HERMES_NUM_THREADS”) but I have no such environment variable set in my system... still, the code is parallelized!
2) In alternative, for debugging purpose: how do I set a line of code (e.g. a std::cout) so that it is executed on one thread at a time? I mean, the equivalent of "#pragma omp critical" in openMP
Thanks! Daniele