In addition to MPI and HPF for internode parallelism,auto-parallelism and OpenMPI can be applied at the same time for intranode parallelism.
Please check the following article. Directives need to be inserted into MPI and HPF and compiled for auto-parallelism and OpenMP.
How to use MPI/SX How to use HPF/SX How to use auto-paralleism/OpenMP
Compile
On SX-ACE, SX cross-compiler is available.
MPI + auto-parallelism
$ sxmpif90 -P auto [options] source_file (Fortran)
$ sxmpic++ -P auto [options] source_file (C,C++)
MPI + OpenMP
$ sxmpif90 -P openmp [options] source_file (Fortran)
$ sxmpic++ -P openmp [options] source_file (C,C++)
HPF + auto-parallelism
$ sxhpf -P auto [options] source_file (Fortran)
executable script
Script examples are shown below.
MPI + auto-parallelism
Internode parallelism using 8 nodes(MPI) and intranode parallelism using 4 threads (auto-parallelism) for MPI job with elapsed time of 1 hour, memory 60GB.
1 2 3 4 5 6 7 8 9 |
#!/bin/csh #PBS -q ACE #PBS -l elapstim_req=1:00:00,memsz_job=60GB #PBS -T mpisx # mandatory SX/MPI #PBS -b 8 # number of nodes #PBS -v F_RSVTASK=4 # parallelization degree of intranode parallelism setenv MPIPROGINF DETAIL cd $PBS_O_WORKDIR mpirun -nn 8 -np 8 ./a.out # -nn(number of nodes) -np (number of MPI processes) |
MPI + OpenMP
Internode parallelism using 8 nodes(MPI) and intranode parallelism using 4 threads(auto-parallelism)
for MPI job with elapsed time 1hour,memory 60 GB.
1 2 3 4 5 6 7 8 9 10 |
#!/bin/csh #PBS -q ACE #PBS -l elapstim_req=1:00:00,memsz_job=60GB #PBS -T mpisx # mandatory for SX/MPI use #PBS -b 8 # number of nodes #PBS -v OMP_NUM_THREADS=4 # number of OpenMP threads per node setenv MPIPROGINF DETAIL cd $PBS_O_WORKDIR mpirun -nn 8 -np 8 ./a.out # -nn (number of nodes) -np (number of MPI processes) orocesses) |
HPF+auto-parallelism
Internode parallelism using 8 nodes(HPF) and intranode parallelism using 4 threads (auto-parallelism)
for HPF job with Elapsed time 1 hour, memory 60 GB
1 2 3 4 5 6 7 8 9 |
#!/bin/csh #PBS -q ACE #PBS -l elapstim_req=1:00:00,memsz_job=60GB #PBS -T mpisx # mandatory for SX/MPI use #PBS -b 8 # number of nodes #PBS -v F_RSVTASK=4 # number of auto-parallelism threads per node setenv MPIPROGINF DETAIL cd $PBS_O_WORKDIR mpirun -nn 8 -np 8 ./a.out # -nn(number of nodes) -np (number of MPI processes) |