From 42fcd6f1a51f9566b94e6b5c1ab8cece993b0a8f Mon Sep 17 00:00:00 2001 From: Cody Melton Date: Wed, 7 Feb 2024 12:45:59 -0700 Subject: [PATCH 1/2] fix bind-to for snl machines --- nexus/lib/machines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index cd7dbab354..814c297344 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -2775,7 +2775,7 @@ class SnlMachine(Supercomputer): #for mpiexec def post_process_job(self,job): - job.run_options.add(bindto="--bind-to core",npernode="--npernode {}".format(job.processes_per_node)) + job.run_options.add(bindto="--bind-to none",npernode="--npernode {}".format(job.processes_per_node)) def write_job_header(self,job): if job.queue is None: From 0e069e1d48777d5aeb41dd8a780b94e7b56d2d63 Mon Sep 17 00:00:00 2001 From: Cody Melton Date: Wed, 7 Feb 2024 12:52:49 -0700 Subject: [PATCH 2/2] fix unit test --- nexus/tests/unit/test_machines.py | 126 +++++++++++++++--------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index ef26fb2138..4bb7944918 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1021,12 +1021,12 @@ def job_commands_equal(c1,c2): #end def job_command_equal job_run_ref = obj({ - ('amber' , 'n1' ) : 'mpiexec --bind-to core -n 112 --npernode 112 test.x', - ('amber' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('amber' , 'n2' ) : 'mpiexec --bind-to core -n 224 --npernode 112 test.x', - ('amber' , 'n2_t2' ) : 'mpiexec --bind-to core -n 112 --npernode 56 test.x', - ('amber' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 112 --npernode 56 test.x', - ('amber' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('amber' , 'n1' ) : 'mpiexec --bind-to none -n 112 --npernode 112 test.x', + ('amber' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('amber' , 'n2' ) : 'mpiexec --bind-to none -n 224 --npernode 112 test.x', + ('amber' , 'n2_t2' ) : 'mpiexec --bind-to none -n 112 --npernode 56 test.x', + ('amber' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 112 --npernode 56 test.x', + ('amber' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('amos' , 'n1' ) : 'srun test.x', ('amos' , 'n1_p1' ) : 'srun test.x', ('amos' , 'n2' ) : 'srun test.x', @@ -1045,12 +1045,12 @@ def job_commands_equal(c1,c2): ('archer2' , 'n2_t2' ) : 'srun --distribution=block:block --hint=nomultithread -N 2 -c 2 -n 128 test.x', ('archer2' , 'n2_t2_e' ) : 'srun --distribution=block:block --hint=nomultithread -N 2 -c 2 -n 128 test.x', ('archer2' , 'n2_t2_p2' ) : 'srun --distribution=block:block --hint=nomultithread -N 2 -c 2 -n 4 test.x', - ('attaway' , 'n1' ) : 'mpiexec --bind-to core -n 36 --npernode 36 test.x', - ('attaway' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('attaway' , 'n2' ) : 'mpiexec --bind-to core -n 72 --npernode 36 test.x', - ('attaway' , 'n2_t2' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('attaway' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('attaway' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('attaway' , 'n1' ) : 'mpiexec --bind-to none -n 36 --npernode 36 test.x', + ('attaway' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('attaway' , 'n2' ) : 'mpiexec --bind-to none -n 72 --npernode 36 test.x', + ('attaway' , 'n2_t2' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('attaway' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('attaway' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('bluewaters_xe' , 'n1' ) : 'aprun -n 32 test.x', ('bluewaters_xe' , 'n1_p1' ) : 'aprun -n 1 test.x', ('bluewaters_xe' , 'n2' ) : 'aprun -n 64 test.x', @@ -1081,12 +1081,12 @@ def job_commands_equal(c1,c2): ('cetus' , 'n2_t2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('cetus' , 'n2_t2_e' ) : 'runjob --envs OMP_NUM_THREADS=2 ENV_VAR=1 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('cetus' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', - ('chama' , 'n1' ) : 'mpiexec --bind-to core -n 16 --npernode 16 test.x', - ('chama' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('chama' , 'n2' ) : 'mpiexec --bind-to core -n 32 --npernode 16 test.x', - ('chama' , 'n2_t2' ) : 'mpiexec --bind-to core -n 16 --npernode 8 test.x', - ('chama' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 16 --npernode 8 test.x', - ('chama' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('chama' , 'n1' ) : 'mpiexec --bind-to none -n 16 --npernode 16 test.x', + ('chama' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('chama' , 'n2' ) : 'mpiexec --bind-to none -n 32 --npernode 16 test.x', + ('chama' , 'n2_t2' ) : 'mpiexec --bind-to none -n 16 --npernode 8 test.x', + ('chama' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 16 --npernode 8 test.x', + ('chama' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('cooley' , 'n1' ) : 'mpirun -np 12 test.x', ('cooley' , 'n1_p1' ) : 'mpirun -np 1 test.x', ('cooley' , 'n2' ) : 'mpirun -np 24 test.x', @@ -1099,24 +1099,24 @@ def job_commands_equal(c1,c2): ('cori' , 'n2_t2' ) : 'srun test.x', ('cori' , 'n2_t2_e' ) : 'srun test.x', ('cori' , 'n2_t2_p2' ) : 'srun test.x', - ('eclipse' , 'n1' ) : 'mpiexec --bind-to core -n 36 --npernode 36 test.x', - ('eclipse' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('eclipse' , 'n2' ) : 'mpiexec --bind-to core -n 72 --npernode 36 test.x', - ('eclipse' , 'n2_t2' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('eclipse' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('eclipse' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('eclipse' , 'n1' ) : 'mpiexec --bind-to none -n 36 --npernode 36 test.x', + ('eclipse' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('eclipse' , 'n2' ) : 'mpiexec --bind-to none -n 72 --npernode 36 test.x', + ('eclipse' , 'n2_t2' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('eclipse' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('eclipse' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('eos' , 'n1' ) : 'aprun -n 16 test.x', ('eos' , 'n1_p1' ) : 'aprun -n 1 test.x', ('eos' , 'n2' ) : 'aprun -n 32 test.x', ('eos' , 'n2_t2' ) : 'aprun -ss -cc numa_node -d 2 -n 16 test.x', ('eos' , 'n2_t2_e' ) : 'aprun -ss -cc numa_node -d 2 -n 16 test.x', ('eos' , 'n2_t2_p2' ) : 'aprun -ss -cc numa_node -d 2 -n 4 test.x', - ('ghost' , 'n1' ) : 'mpiexec --bind-to core -n 36 --npernode 36 test.x', - ('ghost' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('ghost' , 'n2' ) : 'mpiexec --bind-to core -n 72 --npernode 36 test.x', - ('ghost' , 'n2_t2' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('ghost' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('ghost' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('ghost' , 'n1' ) : 'mpiexec --bind-to none -n 36 --npernode 36 test.x', + ('ghost' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('ghost' , 'n2' ) : 'mpiexec --bind-to none -n 72 --npernode 36 test.x', + ('ghost' , 'n2_t2' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('ghost' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('ghost' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('jaguar' , 'n1' ) : 'aprun -n 16 test.x', ('jaguar' , 'n1_p1' ) : 'aprun -n 1 test.x', ('jaguar' , 'n2' ) : 'aprun -n 32 test.x', @@ -1141,12 +1141,12 @@ def job_commands_equal(c1,c2): ('lonestar' , 'n2_t2' ) : 'ibrun -n 12 -o 0 test.x', ('lonestar' , 'n2_t2_e' ) : 'ibrun -n 12 -o 0 test.x', ('lonestar' , 'n2_t2_p2' ) : 'ibrun -n 4 -o 0 test.x', - ('manzano' , 'n1' ) : 'mpiexec --bind-to core -n 48 --npernode 48 test.x', - ('manzano' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('manzano' , 'n2' ) : 'mpiexec --bind-to core -n 96 --npernode 48 test.x', - ('manzano' , 'n2_t2' ) : 'mpiexec --bind-to core -n 48 --npernode 24 test.x', - ('manzano' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 48 --npernode 24 test.x', - ('manzano' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('manzano' , 'n1' ) : 'mpiexec --bind-to none -n 48 --npernode 48 test.x', + ('manzano' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('manzano' , 'n2' ) : 'mpiexec --bind-to none -n 96 --npernode 48 test.x', + ('manzano' , 'n2_t2' ) : 'mpiexec --bind-to none -n 48 --npernode 24 test.x', + ('manzano' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 48 --npernode 24 test.x', + ('manzano' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('matisse' , 'n1' ) : 'mpirun -np 16 test.x', ('matisse' , 'n1_p1' ) : 'mpirun -np 1 test.x', ('matisse' , 'n2' ) : 'mpirun -np 32 test.x', @@ -1183,18 +1183,18 @@ def job_commands_equal(c1,c2): ('rhea' , 'n2_t2' ) : 'srun -N 2 -n 16 -c 2 --cpu-bind=cores test.x', ('rhea' , 'n2_t2_e' ) : 'srun -N 2 -n 16 -c 2 --cpu-bind=cores test.x', ('rhea' , 'n2_t2_p2' ) : 'srun -N 2 -n 4 -c 2 --cpu-bind=cores test.x', - ('skybridge' , 'n1' ) : 'mpiexec --bind-to core -n 16 --npernode 16 test.x', - ('skybridge' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('skybridge' , 'n2' ) : 'mpiexec --bind-to core -n 32 --npernode 16 test.x', - ('skybridge' , 'n2_t2' ) : 'mpiexec --bind-to core -n 16 --npernode 8 test.x', - ('skybridge' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 16 --npernode 8 test.x', - ('skybridge' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', - ('solo' , 'n1' ) : 'mpiexec --bind-to core -n 36 --npernode 36 test.x', - ('solo' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('solo' , 'n2' ) : 'mpiexec --bind-to core -n 72 --npernode 36 test.x', - ('solo' , 'n2_t2' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('solo' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 36 --npernode 18 test.x', - ('solo' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('skybridge' , 'n1' ) : 'mpiexec --bind-to none -n 16 --npernode 16 test.x', + ('skybridge' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('skybridge' , 'n2' ) : 'mpiexec --bind-to none -n 32 --npernode 16 test.x', + ('skybridge' , 'n2_t2' ) : 'mpiexec --bind-to none -n 16 --npernode 8 test.x', + ('skybridge' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 16 --npernode 8 test.x', + ('skybridge' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', + ('solo' , 'n1' ) : 'mpiexec --bind-to none -n 36 --npernode 36 test.x', + ('solo' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('solo' , 'n2' ) : 'mpiexec --bind-to none -n 72 --npernode 36 test.x', + ('solo' , 'n2_t2' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('solo' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 36 --npernode 18 test.x', + ('solo' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('stampede2' , 'n1' ) : 'ibrun -n 68 -o 0 test.x', ('stampede2' , 'n1_p1' ) : 'ibrun -n 1 -o 0 test.x', ('stampede2' , 'n2' ) : 'ibrun -n 136 -o 0 test.x', @@ -1245,12 +1245,12 @@ def job_commands_equal(c1,c2): ('tomcat3' , 'n2_t2' ) : 'mpirun -np 64 test.x', ('tomcat3' , 'n2_t2_e' ) : 'mpirun -np 64 test.x', ('tomcat3' , 'n2_t2_p2' ) : 'mpirun -np 4 test.x', - ('uno' , 'n1' ) : 'mpiexec --bind-to core -n 16 --npernode 16 test.x', - ('uno' , 'n1_p1' ) : 'mpiexec --bind-to core -n 1 --npernode 1 test.x', - ('uno' , 'n2' ) : 'mpiexec --bind-to core -n 32 --npernode 16 test.x', - ('uno' , 'n2_t2' ) : 'mpiexec --bind-to core -n 16 --npernode 8 test.x', - ('uno' , 'n2_t2_e' ) : 'mpiexec --bind-to core -n 16 --npernode 8 test.x', - ('uno' , 'n2_t2_p2' ) : 'mpiexec --bind-to core -n 4 --npernode 2 test.x', + ('uno' , 'n1' ) : 'mpiexec --bind-to none -n 16 --npernode 16 test.x', + ('uno' , 'n1_p1' ) : 'mpiexec --bind-to none -n 1 --npernode 1 test.x', + ('uno' , 'n2' ) : 'mpiexec --bind-to none -n 32 --npernode 16 test.x', + ('uno' , 'n2_t2' ) : 'mpiexec --bind-to none -n 16 --npernode 8 test.x', + ('uno' , 'n2_t2_e' ) : 'mpiexec --bind-to none -n 16 --npernode 8 test.x', + ('uno' , 'n2_t2_p2' ) : 'mpiexec --bind-to none -n 4 --npernode 2 test.x', ('vesta' , 'n1' ) : 'runjob --envs OMP_NUM_THREADS=1 --np 16 -p 16 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n1_p1' ) : 'runjob --envs OMP_NUM_THREADS=1 --np 1 -p 1 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2' ) : 'runjob --envs OMP_NUM_THREADS=1 --np 32 -p 16 --verbose=INFO $LOCARGS : test.x', @@ -1398,7 +1398,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 224 --npernode 112 test.x''', +mpiexec --bind-to none -n 224 --npernode 112 test.x''', amos = '''#!/bin/bash -x #SBATCH --export=ALL #SBATCH -J None @@ -1463,7 +1463,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 72 --npernode 36 test.x''', +mpiexec --bind-to none -n 72 --npernode 36 test.x''', bluewaters_xe = '''#!/bin/bash #PBS -N jobname #PBS -l walltime=06:30:00 @@ -1550,7 +1550,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 32 --npernode 16 test.x''', +mpiexec --bind-to none -n 32 --npernode 16 test.x''', cooley = '''#!/bin/bash #COBALT -q default #COBALT -A ABC123 @@ -1591,7 +1591,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 72 --npernode 36 test.x''', +mpiexec --bind-to none -n 72 --npernode 36 test.x''', eos = '''#!/bin/bash #PBS -A ABC123 #PBS -q batch @@ -1621,7 +1621,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 72 --npernode 36 test.x''', +mpiexec --bind-to none -n 72 --npernode 36 test.x''', jaguar = '''#!/bin/bash #PBS -A ABC123 #PBS -q batch @@ -1702,7 +1702,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 96 --npernode 48 test.x''', +mpiexec --bind-to none -n 96 --npernode 48 test.x''', matisse = '''#!/bin/bash -x #SBATCH --export=ALL #SBATCH -J None @@ -1810,7 +1810,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 32 --npernode 16 test.x''', +mpiexec --bind-to none -n 32 --npernode 16 test.x''', solo = '''#!/bin/bash #SBATCH -p batch #SBATCH --job-name jobname @@ -1823,7 +1823,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 72 --npernode 36 test.x''', +mpiexec --bind-to none -n 72 --npernode 36 test.x''', stampede2 = '''#!/bin/bash #SBATCH --job-name jobname #SBATCH --account=ABC123 @@ -1960,7 +1960,7 @@ def test_write_job(): export ENV_VAR=1 export OMP_NUM_THREADS=1 -mpiexec --bind-to core -n 32 --npernode 16 test.x''', +mpiexec --bind-to none -n 32 --npernode 16 test.x''', vesta = '''#!/bin/bash #COBALT -q default #COBALT -A ABC123