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

Nexus: Set workstation thread binding to none #5240

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nexus/lib/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ def process_job(self,job):


def process_job_options(self,job):
job.run_options.add(np='-np '+str(job.processes))
job.run_options.add(np='--bind-to none -np '+str(job.processes))
#end def process_job_options


Expand Down
6 changes: 3 additions & 3 deletions nexus/tests/unit/test_machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,18 +533,18 @@ def test_workstation_scheduling():
assert(j.threads==2)
assert(j.local)
assert(j.processes==2)
assert(j.run_options.np=='-np 2')
assert(j.run_options.np=='--bind-to none -np 2')
assert(j.batch_mode==False)
init_job(j,dir=tpath) # imitate interaction w/ simulation object
assert(ws.write_job(j)=='export OMP_NUM_THREADS=2\nmpirun -np 2 echo run')
assert(ws.write_job(j)=='export OMP_NUM_THREADS=2\nmpirun --bind-to none -np 2 echo run')

j = job(machine=ws.name,serial=True)
assert(j.machine==ws.name)
assert(j.cores==1)
assert(j.threads==1)
assert(j.serial)
assert(j.processes==1)
assert(j.run_options.np=='-np 1')
assert(j.run_options.np=='--bind-to none -np 1')
assert(j.batch_mode==False)
init_job(j,dir=tpath) # imitate interaction w/ simulation object
assert(ws.write_job(j)=='export OMP_NUM_THREADS=1\necho run')
Expand Down
Loading