diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index ca2cafb516..3ada3fcc5c 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -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 diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index cf92ea8b4d..b19cb64af4 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -533,10 +533,10 @@ 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) @@ -544,7 +544,7 @@ def test_workstation_scheduling(): 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')