Format of an execution script =================================== This section describes the format of execution script files to run programs on the supercomputer. To execute the application that requires an execution script file, create the file in advance. Execute a non MPI program ---------------------------------------- .. code-block :: none #!/bin/sh #PBS -l select=1 #PBS -q queue name #PBS -N job name cd $PBS_O_WORKDIR program > output file 2> error file ・Example: To execute a program ‘a.out’. .. code-block :: none #!/bin/sh #PBS -l select=1 #PBS -q CP_001 #PBS -N sample cd $PBS_O_WORKDIR ./a.out > result.out 2> result.err Execute a MPI program ------------------------------------ .. code-block :: none #!/bin/sh #PBS -l select=nodes:ncpus=cores:mem=XXgb #PBS -l walltime=HH:MM:SS #PBS -q queue #PBS -N jobname cd $PBS_O_WORKDIR mpirun [ -np MPI total tasks | -ppn MPI tasks per node ] program > output file 2> error file ・Example: To run a program on shared node using Intel MPI, with 8 MPI processes, 32GB memory, and walltime of 1 hour. .. code-block :: none #!/bin/sh #PBS -l select=1:ncpus=8:mem=32gb #PBS -l walltime=01:00:00 #PBS -q CP_001 #PBS -N mpi module load oneapi cd $PBS_O_WORKDIR mpirun -np 8 ./a.out > result.out 2> result.err ・Example: To run a program on 2 node using Intel MPI, with 112 MPI processes each nodes. .. code-block :: none #!/bin/sh #PBS -l select=2 #PBS -q P_030 #PBS -N mpi module load oneapi cd $PBS_O_WORKDIR mpirun -np 224 -ppn 112 ./a.out > result.out 2> result.err Execute a GPU program ------------------------------------ .. code-block :: none #!/bin/sh #PBS -l select=nodes:ncpus=cores:mem=XXgb #PBS -l walltime=HH:MM:SS #PBS -q queue #PBS -N jobname cd $PBS_O_WORKDIR mpirun [ -np MPI total tasks | -ppn MPI tasks per node ] program > output file 2> error file ・Example: To run a program on shared node using NVIDIA HPC SDK, with 2 MPI processes, 2GPUs, 64GB memory, and walltime of 30 minutes. .. code-block :: none #!/bin/sh #PBS -l select=1:ncpus=4:ngpus=4:mem=64gb #PBS -l walltime=00:30:00 #PBS -q CA_001 #PBS -N mpi module load nvhpc cd $PBS_O_WORKDIR mpirun -np 4 -hostfile $PBS_NODEFILE -x LD_LIBRARY_PATH -x HCOLL_MAIN_IB=all ./a.out > result.out 2> result.err