-
|
Greetings! Can I somehow control the number of threads when running PICMI input file on my PC? As far as I understand, it uses half of the available threads by default. Thank you for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi @Aratopn, There are two ways to do this. Either you set the environment variable OMP_NUM_THREADS to the number of threads you prefer, For the latter, I just checked, and I think we forgot to add a import amrex.space3d as amr
verbose = True
# add before the simulation setup
pp_prof = amr.ParmParse("tiny_profiler")
pp_prof.add("enabled", int(verbose))
omp_threads = 4 # set this
if not amr.initialized():
if verbose:
amr.initialize([f'amrex.omp_threads={omp_threads}', f'amrex.verbose={int(verbose_debug)}'])
else:
eval('amr.initialize([f"amrex.omp_threads={omp_threads}", "amrex.verbose=0"])')But that's a bit of a hack and can by accident overwrite changed AMReX defaults that we use. |
Beta Was this translation helpful? Give feedback.
Adding PICMI Control in #6314