From 4b8cb5145e9013a536c1be62377f1d7deb0356eb Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Tue, 9 May 2023 20:24:19 +0900 Subject: [PATCH 01/16] First commit --- nexus/lib/machines.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 5b4e2a16ee..84ef3d9dc5 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3566,7 +3566,29 @@ def specialized_bundle_commands(self,job,launcher,serial): #end def specialized_bundle_commands #end class Polaris +## Added 05/04/2023 by Tom Ichibha +class Kagayaki(Supercomputer): + name = 'kagayaki' + requires_account = False + batch_capable = True + special_bundling = False + + def process_job_options(self,job): + job.run_options.add(nodefile='-machinefile $PBS_NODEFILE', np='-np '+str(job.processes)) + def write_job_header(self,job): + ppn = 16 if ['Default', 'SINGLE', 'LONG', 'DEFAULT'].includes(job.queue) else 128 + c='' + c+='#!/bin/bash' + c+='#PBS -q ' + job.queue + '\n' + c+='#PBS -N ' + job.name + '\n' + c+='#PBS -l select=' + job.nodes + '\n' + c+='#PBS -l ncpus=' + ppn + '\n' + c+='#PBS -l mpiprocs=' + ppn + '\n' + c+='cd $PBS_O_WORKDIR\n' + return c + #end def write_job_header +#end class CadesMoab #Known machines @@ -3576,6 +3598,7 @@ def specialized_bundle_commands(self,job,launcher,serial): #end for # supercomputers and clusters # nodes sockets cores ram qslots qlaunch qsubmit qstatus qdelete +Kagayaki( 240, 2, 64, 512, 10, 'mpirun', 'qsub', 'qstat', 'qdel') Jaguar( 18688, 2, 8, 32, 100, 'aprun', 'qsub', 'qstat', 'qdel') Kraken( 9408, 2, 6, 16, 100, 'aprun', 'qsub', 'qstat', 'qdel') Golub( 512, 2, 6, 32, 1000, 'mpirun', 'qsub', 'qstat', 'qdel') From 5f04964b461b62539b9b13003b85a3bec1b0718f Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Tue, 9 May 2023 20:37:31 +0900 Subject: [PATCH 02/16] =?UTF-8?q?=E3=81=91=E3=81=84=E3=81=B3=E3=81=AA?= =?UTF-8?q?=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 84ef3d9dc5..9bfb495a9c 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3577,7 +3577,7 @@ def process_job_options(self,job): job.run_options.add(nodefile='-machinefile $PBS_NODEFILE', np='-np '+str(job.processes)) def write_job_header(self,job): - ppn = 16 if ['Default', 'SINGLE', 'LONG', 'DEFAULT'].includes(job.queue) else 128 + ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 c='' c+='#!/bin/bash' c+='#PBS -q ' + job.queue + '\n' From 29687e2ba25085a06f9e44aa252d87ec0da7bc7b Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Wed, 10 May 2023 12:26:16 +0900 Subject: [PATCH 03/16] Update machines.py --- nexus/lib/machines.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 9bfb495a9c..7a22dff7a2 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3579,12 +3579,12 @@ def process_job_options(self,job): def write_job_header(self,job): ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 c='' - c+='#!/bin/bash' + c+='#!/bin/bash\n' c+='#PBS -q ' + job.queue + '\n' - c+='#PBS -N ' + job.name + '\n' - c+='#PBS -l select=' + job.nodes + '\n' - c+='#PBS -l ncpus=' + ppn + '\n' - c+='#PBS -l mpiprocs=' + ppn + '\n' + c+='#PBS -N ' + job.name + '\n' + c+='#PBS -o ' + job.outfile +'\n' + c+='#PBS -e ' + job.errfile + '\n' + c+='#PBS -l select={0}:ncpus={1}:mpiprocs={1}\n'.format(job.nodes, ppn) c+='cd $PBS_O_WORKDIR\n' return c #end def write_job_header @@ -3598,7 +3598,6 @@ def write_job_header(self,job): #end for # supercomputers and clusters # nodes sockets cores ram qslots qlaunch qsubmit qstatus qdelete -Kagayaki( 240, 2, 64, 512, 10, 'mpirun', 'qsub', 'qstat', 'qdel') Jaguar( 18688, 2, 8, 32, 100, 'aprun', 'qsub', 'qstat', 'qdel') Kraken( 9408, 2, 6, 16, 100, 'aprun', 'qsub', 'qstat', 'qdel') Golub( 512, 2, 6, 32, 1000, 'mpirun', 'qsub', 'qstat', 'qdel') @@ -3635,6 +3634,7 @@ def write_job_header(self,job): Archer2( 5860, 2, 64, 512, 1000, 'srun', 'sbatch', 'squeue', 'scancel') Polaris( 560, 1, 32, 512, 8,'mpiexec', 'qsub', 'qstat', 'qdel') Perlmutter( 3072, 2, 128, 512, 5000, 'srun', 'sbatch', 'squeue', 'scancel') +Kagayaki( 240, 2, 64, 512, 20, 'mpirun', 'qsub', 'qstat', 'qdel') #machine accessor functions From ca9138862d6f7ad5eae9490d17b47ee3ca57c885 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:14:29 +0900 Subject: [PATCH 04/16] =?UTF-8?q?test=5Fmachine.py=E3=81=ABkagayaki?= =?UTF-8?q?=E3=81=AE=E6=83=85=E5=A0=B1=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/lib/machines.py | 2 +- nexus/tests/unit/test_machines.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 7a22dff7a2..9d03328699 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3598,6 +3598,7 @@ def write_job_header(self,job): #end for # supercomputers and clusters # nodes sockets cores ram qslots qlaunch qsubmit qstatus qdelete +Kagayaki( 240, 2, 64, 512, 20, 'mpirun', 'qsub', 'qstat', 'qdel') Jaguar( 18688, 2, 8, 32, 100, 'aprun', 'qsub', 'qstat', 'qdel') Kraken( 9408, 2, 6, 16, 100, 'aprun', 'qsub', 'qstat', 'qdel') Golub( 512, 2, 6, 32, 1000, 'mpirun', 'qsub', 'qstat', 'qdel') @@ -3634,7 +3635,6 @@ def write_job_header(self,job): Archer2( 5860, 2, 64, 512, 1000, 'srun', 'sbatch', 'squeue', 'scancel') Polaris( 560, 1, 32, 512, 8,'mpiexec', 'qsub', 'qstat', 'qdel') Perlmutter( 3072, 2, 128, 512, 5000, 'srun', 'sbatch', 'squeue', 'scancel') -Kagayaki( 240, 2, 64, 512, 20, 'mpirun', 'qsub', 'qstat', 'qdel') #machine accessor functions diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index 8d34c6b27e..dce4f9c0fa 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1239,6 +1239,7 @@ def job_commands_equal(c1,c2): ('vesta' , 'n2_t2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_e' ) : 'runjob --envs OMP_NUM_THREADS=2 ENV_VAR=1 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', + ('kagayaki' , 'n1' ) : 'mpirun -np 64 test.x', }) if testing.global_data['job_ref_table']: From c6e516f642c2a9ab7472cc46479af17a9d882d61 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:18:57 +0900 Subject: [PATCH 05/16] test_machines.py updated --- nexus/tests/unit/test_machines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index dce4f9c0fa..b25d5410d5 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1239,7 +1239,7 @@ def job_commands_equal(c1,c2): ('vesta' , 'n2_t2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_e' ) : 'runjob --envs OMP_NUM_THREADS=2 ENV_VAR=1 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', - ('kagayaki' , 'n1' ) : 'mpirun -np 64 test.x', + ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', }) if testing.global_data['job_ref_table']: From 193e8a39c276e6d393a1375217e63a513791fac7 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:20:30 +0900 Subject: [PATCH 06/16] =?UTF-8?q?test=5Fmachine.py=E3=81=AEkagayaki?= =?UTF-8?q?=E3=81=ABn1=5Fp1=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/tests/unit/test_machines.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index b25d5410d5..c1eccd13ee 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1240,6 +1240,7 @@ def job_commands_equal(c1,c2): ('vesta' , 'n2_t2_e' ) : 'runjob --envs OMP_NUM_THREADS=2 ENV_VAR=1 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', + ('kagayaki' , 'n1_p1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 1 test.x', }) if testing.global_data['job_ref_table']: From f3378ba03d4fe612624c4232fcf1069b1b020e23 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:23:34 +0900 Subject: [PATCH 07/16] =?UTF-8?q?=E3=81=95=E3=82=89=E3=81=ABn2=5Ft2=5Fp2?= =?UTF-8?q?=E3=81=AA=E3=81=A9=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/tests/unit/test_machines.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index c1eccd13ee..037adc261c 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1241,6 +1241,10 @@ def job_commands_equal(c1,c2): ('vesta' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', ('kagayaki' , 'n1_p1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 1 test.x', + ('kagayaki' , 'n2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 256 test.x', + ('kagayaki' , 'n2_t2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', + ('kagayaki' , 'n2_t2_e' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', + ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 8 test.x', }) if testing.global_data['job_ref_table']: From fc559735ef6aab1c7d5ae3cdd3992b4e590d6201 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:24:53 +0900 Subject: [PATCH 08/16] =?UTF-8?q?n2=5Ft2=5Fp2=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/tests/unit/test_machines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index 037adc261c..4845149f1d 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1244,7 +1244,7 @@ def job_commands_equal(c1,c2): ('kagayaki' , 'n2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 256 test.x', ('kagayaki' , 'n2_t2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', ('kagayaki' , 'n2_t2_e' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', - ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 8 test.x', + ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 4 test.x', }) if testing.global_data['job_ref_table']: From f5453ada263b05801303ad55ab0f53b42f42ae6c Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:52:01 +0900 Subject: [PATCH 09/16] Added kagayaki to test_write_job --- nexus/lib/machines.py | 3 ++- nexus/tests/unit/test_machines.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 9d03328699..5d7cc3e8ac 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3580,7 +3580,8 @@ def write_job_header(self,job): ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 c='' c+='#!/bin/bash\n' - c+='#PBS -q ' + job.queue + '\n' + if (job.queue is not None): + c+='#PBS -q ' + job.queue + '\n' c+='#PBS -N ' + job.name + '\n' c+='#PBS -o ' + job.outfile +'\n' c+='#PBS -e ' + job.errfile + '\n' diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index 4845149f1d..ba795942be 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1922,6 +1922,16 @@ def test_write_job(): runjob --np 32 -p 16 $LOCARGS --verbose=INFO --envs OMP_NUM_THREADS=1 ENV_VAR=1 : test.x''', + kagayaki = '''#!/bin/bash +#PBS -N jobname +#PBS -o test.out +#PBS -e test.err +#PBS -l select=2:ncpus=128:mpiprocs=128 +cd $PBS_O_WORKDIR + +export OMP_NUM_THREADS=1 +export ENV_VAR=1 +mpirun -machinefile $PBS_NODEFILE -np 256 test.x''', ) def process_job_file(jf): From 13af8a1c03c5c3d045defd32f4704011a87e417f Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:24:45 +0900 Subject: [PATCH 10/16] =?UTF-8?q?mpirun=E3=81=ABomp=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/lib/machines.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 5d7cc3e8ac..0c59a67b98 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3574,7 +3574,12 @@ class Kagayaki(Supercomputer): special_bundling = False def process_job_options(self,job): - job.run_options.add(nodefile='-machinefile $PBS_NODEFILE', np='-np '+str(job.processes)) + # job.run_options.add(nodefile='-machinefile $PBS_NODEFILE', np='-np '+str(job.processes)) + opt = obj( + nodefile='-machinefile $PBS_NODEFILE', + np='-np {}'.format(job.processes), + omp='-x OMP_NUM_THREAD' + ) def write_job_header(self,job): ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 @@ -3587,6 +3592,7 @@ def write_job_header(self,job): c+='#PBS -e ' + job.errfile + '\n' c+='#PBS -l select={0}:ncpus={1}:mpiprocs={1}\n'.format(job.nodes, ppn) c+='cd $PBS_O_WORKDIR\n' + c+='export OMP_NUM_THREADS=' + str(job.threads) + '\n' return c #end def write_job_header #end class CadesMoab From 707ae61c1564641d9f52a8c682aeda2fa8011930 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:34:58 +0900 Subject: [PATCH 11/16] =?UTF-8?q?run.options.opt=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/lib/machines.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 0c59a67b98..01559224eb 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3577,9 +3577,10 @@ def process_job_options(self,job): # job.run_options.add(nodefile='-machinefile $PBS_NODEFILE', np='-np '+str(job.processes)) opt = obj( nodefile='-machinefile $PBS_NODEFILE', + omp='-x OMP_NUM_THREAD', np='-np {}'.format(job.processes), - omp='-x OMP_NUM_THREAD' ) + job.run.options.add(opt) def write_job_header(self,job): ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 From 03fa6ca7ee90c8ac52d40406441e771c85c6bf13 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:36:19 +0900 Subject: [PATCH 12/16] =?UTF-8?q?=E3=81=91=E3=81=84=E3=81=B3=E3=81=AA?= =?UTF-8?q?=E3=83=9F=E3=82=B9=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 01559224eb..9b26f5b381 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3580,7 +3580,7 @@ def process_job_options(self,job): omp='-x OMP_NUM_THREAD', np='-np {}'.format(job.processes), ) - job.run.options.add(opt) + job.run_options.add(opt) def write_job_header(self,job): ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 From a9a1f7460d4805102c3a063844bbafdf7810f721 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:37:28 +0900 Subject: [PATCH 13/16] =?UTF-8?q?=E3=81=91=E3=81=84=E3=81=B3=E3=81=AA?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 9b26f5b381..423e4acbcc 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3580,7 +3580,7 @@ def process_job_options(self,job): omp='-x OMP_NUM_THREAD', np='-np {}'.format(job.processes), ) - job.run_options.add(opt) + job.run_options.add(**opt) def write_job_header(self,job): ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 From 763bfee6a5313a7c57c1a5321aa56ab71e549b1a Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:43:17 +0900 Subject: [PATCH 14/16] All nxs-test passed except for 61. --- nexus/tests/unit/test_machines.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index ba795942be..93bc361058 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1239,12 +1239,12 @@ def job_commands_equal(c1,c2): ('vesta' , 'n2_t2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_e' ) : 'runjob --envs OMP_NUM_THREADS=2 ENV_VAR=1 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', - ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', - ('kagayaki' , 'n1_p1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 1 test.x', - ('kagayaki' , 'n2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 256 test.x', - ('kagayaki' , 'n2_t2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', - ('kagayaki' , 'n2_t2_e' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 test.x', - ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 4 test.x', + ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREAD test.x', + ('kagayaki' , 'n1_p1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 1 -x OMP_NUM_THREAD test.x', + ('kagayaki' , 'n2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 256 -x OMP_NUM_THREAD test.x', + ('kagayaki' , 'n2_t2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREAD test.x', + ('kagayaki' , 'n2_t2_e' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREAD test.x', + ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 4 -x OMP_NUM_THREAD test.x', }) if testing.global_data['job_ref_table']: @@ -1931,7 +1931,7 @@ def test_write_job(): export OMP_NUM_THREADS=1 export ENV_VAR=1 -mpirun -machinefile $PBS_NODEFILE -np 256 test.x''', +mpirun -machinefile $PBS_NODEFILE -np 256 -x OMP_NUM_THREAD test.x''', ) def process_job_file(jf): From ed588a21d5919d9b3044a9ee9d652e6effedd56b Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:56:41 +0900 Subject: [PATCH 15/16] =?UTF-8?q?OMP=5FNUM=5FTHREAD=E3=82=92OMP=5FNUM=5FTH?= =?UTF-8?q?READS=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nexus/tests/unit/test_machines.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index 93bc361058..01dfd9dcb4 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1239,12 +1239,12 @@ def job_commands_equal(c1,c2): ('vesta' , 'n2_t2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_e' ) : 'runjob --envs OMP_NUM_THREADS=2 ENV_VAR=1 --np 16 -p 8 --verbose=INFO $LOCARGS : test.x', ('vesta' , 'n2_t2_p2' ) : 'runjob --envs OMP_NUM_THREADS=2 --np 4 -p 2 --verbose=INFO $LOCARGS : test.x', - ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREAD test.x', - ('kagayaki' , 'n1_p1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 1 -x OMP_NUM_THREAD test.x', - ('kagayaki' , 'n2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 256 -x OMP_NUM_THREAD test.x', - ('kagayaki' , 'n2_t2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREAD test.x', - ('kagayaki' , 'n2_t2_e' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREAD test.x', - ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 4 -x OMP_NUM_THREAD test.x', + ('kagayaki' , 'n1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREADS test.x', + ('kagayaki' , 'n1_p1' ) : 'mpirun -machinefile $PBS_NODEFILE -np 1 -x OMP_NUM_THREADS test.x', + ('kagayaki' , 'n2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 256 -x OMP_NUM_THREADS test.x', + ('kagayaki' , 'n2_t2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREADS test.x', + ('kagayaki' , 'n2_t2_e' ) : 'mpirun -machinefile $PBS_NODEFILE -np 128 -x OMP_NUM_THREADS test.x', + ('kagayaki' , 'n2_t2_p2' ) : 'mpirun -machinefile $PBS_NODEFILE -np 4 -x OMP_NUM_THREADS test.x', }) if testing.global_data['job_ref_table']: @@ -1931,7 +1931,7 @@ def test_write_job(): export OMP_NUM_THREADS=1 export ENV_VAR=1 -mpirun -machinefile $PBS_NODEFILE -np 256 -x OMP_NUM_THREAD test.x''', +mpirun -machinefile $PBS_NODEFILE -np 256 -x OMP_NUM_THREADS test.x''', ) def process_job_file(jf): From a58c2f7ddda6b391da6e81e2e98285ad03649712 Mon Sep 17 00:00:00 2001 From: ichibha <41054969+ichibha@users.noreply.github.com> Date: Mon, 26 Jun 2023 13:58:42 +0900 Subject: [PATCH 16/16] =?UTF-8?q?machine.py=E3=82=82=E5=90=8C=E6=A7=98?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 423e4acbcc..4983d47a77 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3577,7 +3577,7 @@ def process_job_options(self,job): # job.run_options.add(nodefile='-machinefile $PBS_NODEFILE', np='-np '+str(job.processes)) opt = obj( nodefile='-machinefile $PBS_NODEFILE', - omp='-x OMP_NUM_THREAD', + omp='-x OMP_NUM_THREADS', np='-np {}'.format(job.processes), ) job.run_options.add(**opt)