diff --git a/nexus/lib/machines.py b/nexus/lib/machines.py index 5b4e2a16ee..4983d47a77 100644 --- a/nexus/lib/machines.py +++ b/nexus/lib/machines.py @@ -3566,7 +3566,37 @@ 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)) + opt = obj( + nodefile='-machinefile $PBS_NODEFILE', + omp='-x OMP_NUM_THREADS', + np='-np {}'.format(job.processes), + ) + job.run_options.add(**opt) + def write_job_header(self,job): + ppn = 16 if job.queue in ['Default', 'SINGLE', 'LONG', 'DEFAULT'] else 128 + c='' + c+='#!/bin/bash\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' + 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 #Known machines @@ -3576,6 +3606,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, 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') diff --git a/nexus/tests/unit/test_machines.py b/nexus/tests/unit/test_machines.py index 8d34c6b27e..01dfd9dcb4 100644 --- a/nexus/tests/unit/test_machines.py +++ b/nexus/tests/unit/test_machines.py @@ -1239,6 +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_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']: @@ -1916,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 -x OMP_NUM_THREADS test.x''', ) def process_job_file(jf):