Skip to content

Commit

Permalink
Merge pull request #4598 from ichibha/develop
Browse files Browse the repository at this point in the history
Nexus support for Kagayaki cluster at JAIST
  • Loading branch information
prckent committed Jun 26, 2023
2 parents a6a3275 + 95b86c1 commit a61a10f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
31 changes: 31 additions & 0 deletions nexus/lib/machines.py
Expand Up @@ -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
Expand All @@ -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')
Expand Down
16 changes: 16 additions & 0 deletions nexus/tests/unit/test_machines.py
Expand Up @@ -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']:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit a61a10f

Please sign in to comment.