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

determine the number of cores from the scheduler and not from the node #240

Closed
vdejager opened this issue Jan 17, 2023 · 4 comments
Closed

Comments

@vdejager
Copy link

Is your feature request related to a problem? Please describe.
When submitting a PGAP singularity job using SLURM to a node slice, PGAP grabs all cores, which leads to problems for the other jobs running on that node

(our nodes have 128 cores /256 GB and a slice is 32 cores / 64GB, more than enough for our average PGAP job)

Describe the solution you'd like
determine the number of cores from the scheduler info, see additional context

Describe alternatives you've considered
provide the --cpus option similar to the node job settings. The PGAP logs still show 128 cores.

Additional context
https://stackoverflow.com/questions/56267313/determine-number-of-processors-assigned-to-job

import os
#for SGE:
nslots = int(os.environ['NSLOTS']))

# for SLURM:
nslots = int(os.environ['SLURM_CPUS_PER_TASK']))

@vdejager vdejager changed the title determine the number of cores from the scheduler and not form the node determine the number of cores from the scheduler and not from the node Jan 17, 2023
@azat-badretdin
Copy link
Contributor

Thank you for your user request, Vic! I have opened an internal ticket to fulfill this request.

@ericjove
Copy link
Contributor

ericjove commented Mar 8, 2023

@vdejager we have implemented the feature you requested, and it will be available in the next release of PGAP. In the interim, it would be very helpful to us if you could test it by running pgap.py from the dev branch (which can be found here: https://github.com/ncbi/pgap/blob/dev/scripts/pgap.py).

Please note that you'll need to provide the --no-self-update option.

Let us know if you have any questions.

@vdejager
Copy link
Author

Thanks,
I will try to test it this week.

Best Victor

@vdejager
Copy link
Author

vdejager commented Aug 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants