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

Review documentation where it mentions NUMTHREADS #2123

Open
kinow opened this issue Feb 11, 2025 · 2 comments
Open

Review documentation where it mentions NUMTHREADS #2123

kinow opened this issue Feb 11, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Milestone

Comments

@kinow
Copy link
Member

kinow commented Feb 11, 2025

Today @orioltinto had a question about some job variables not being correctly translated as he expected them to be. I had a look, and checked our docs first. If a user searches by --cpus-per-task, they find two hits, one being this one.

Image

I tried the NUMTHREADS but it didn't work as expected. A quick debugging in the IDE, and found that I needed to use THREADS instead. It's not clear (or I don't remember) why we have threads/numthreads, but if one is deprecated or not used, then I guess it'd be better to remove it from the docs and warn the users to update their configs.

@kinow kinow added documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 11, 2025
@kinow kinow added this to the 4.1.13 milestone Feb 11, 2025
@VindeeR VindeeR self-assigned this Feb 14, 2025
@VindeeR
Copy link
Contributor

VindeeR commented Feb 14, 2025

From what I understood by checking the code, in the job.py file in the line 485 all the 3 call should do the same thing setting the value of threads as image bellow
Image

Around the line 1550, the NUMTHREADS will preserve all values inside the THREADS in case of a list or just 1 value in a scheduler process while THREADS only keeps its highest value
Image

When updating the parameters of a platform all values are set the same as THREADS
Imagenum

THREADS are used as well in Many different places both as .threads | ._threads to set the experiment and or wrapper
Image

Image

On the other hand NUMTHREADS is only used in the pjm_header, job and slurm_header which is a instance of the job class which makes it essentially the same as the THREAD
Image

So I believe that there´s a mismatch and/or a confusion regarding the use of this two arguments, which may at some point have been treated as interchangeable and they were supposed to represent different behaviors in the system leading to the situation we are currently facing, or they were always meant to be similar instruction and at some point they became different instructions.

I too believe their behavior should be always the same no matter if you're using NUMTHREADS, THREADS, or CPU_PER_TASK, I couldn't find instances where

@VindeeR
Copy link
Contributor

VindeeR commented Feb 18, 2025

To add a bit more of context @manuel-g-castro and I done a few test on the AS3.15 and the problem presented itself, I was analyzing the AS4, I still need to do a double check on the AS3 code to make sure there´s a difference between them or if I missed something during my investigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants