Skip to content

Switch to PBS_NP for determining OMP threads#517

Merged
hyschive merged 1 commit intogamer-project:mainfrom
hyschive:pr-omp-threads
Apr 6, 2026
Merged

Switch to PBS_NP for determining OMP threads#517
hyschive merged 1 commit intogamer-project:mainfrom
hyschive:pr-omp-threads

Conversation

@hyschive
Copy link
Copy Markdown
Contributor

@hyschive hyschive commented Apr 5, 2026

Issue

When specifying node names via qsub (e.g., -lnodes=spock26:ppn=32), the PBS environment variables PBS_NUM_NODES and PBS_NUM_PPN incorrectly return 0 and 1, respectively, rather than the expected values 1 and 32. This behavior then leads to an incorrect automatic determination of the number of OpenMP threads in Init_ResetParameter().

This is likely a bug in TORQUE.

Solution

Switching PBS_NP, which returns the total number of requested CPU cores, resolves the issue.

@hyschive hyschive added bugfix Fix bugs parallel Parallelization issues and optimization labels Apr 5, 2026
Copy link
Copy Markdown
Contributor

@hfhsieh hfhsieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@hyschive hyschive merged commit f6c428a into gamer-project:main Apr 6, 2026
@hyschive hyschive deleted the pr-omp-threads branch April 6, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix bugs parallel Parallelization issues and optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants