Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus support for Kagayaki cluster at JAIST #4598

Merged
merged 17 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions nexus/lib/machines.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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