Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set OMP_NUM_THREADS in batch script #1437

Merged
merged 3 commits into from Oct 11, 2021
Merged

Set OMP_NUM_THREADS in batch script #1437

merged 3 commits into from Oct 11, 2021

Conversation

marcelo-alvarez
Copy link
Contributor

Modification to ensure that the line export OMP_NUM_THREADS=threads_per_core is added to automatically generated batch scripts, where threads_per_core is the argument to the -c flag in the srun command.

Currently, this is not the case, and consequently the number of threads being used in #pragma omp parallel regions of compiled C++ code is currently being set to whatever the value of OMP_NUM_THREADS is when the batch script is submitted in (e.g., OMP_NUM_THREADS=1 after running source /global/common/software/desi/desi_environment.sh master on cori).

Please verify that this change results in the appropriate SLURM file (with the correct export OMP_NUM_THREADS line) as part pipeline workflow and, if so, merge this change into master.

@coveralls
Copy link

coveralls commented Oct 8, 2021

Coverage Status

Coverage decreased (-0.0008%) to 26.591% when pulling fe05a36 on openmp-slurm into ee26999 on master.

@sbailey
Copy link
Contributor

sbailey commented Oct 9, 2021

Looks good, thanks. While testing this I also fixed a pre-existing help string bug in desi_run_night --dry-run-level (which I thought we had previously fixed but maybe in a PR that was abandoned).

This PR works as expected/advertised for desi_proc and desi_run_night for arc, flat, and science exposures. Let's wait to Monday to merge to not have too many moving parts over the weekend, even if it seems obvious that this should be ok.

@sbailey sbailey merged commit c0ce233 into master Oct 11, 2021
@sbailey sbailey deleted the openmp-slurm branch October 11, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OMP_NUM_THREADS not set in batch scripts
3 participants