4.4. GNU Compilers and OpenMPI¶
GCC 11.5.0 is available by default. In addition, you can use the following OpenMPI by configuring the environment. For more details, see each manual.
Version |
Module file |
|---|---|
Open MPI 4.1.8 |
openmpi/4.1.8_cpu |
Open MPI 4.1.8 CUDA 12.8 aware |
openmpi/4.1.8_gpu |
・Example
$ gcc --version
gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ module avail openmpi
------------------------------------------------ /work/app/modulefiles/openmpi -------------------------------------------------
openmpi/4.1.8_cpu openmpi/4.1.8_gpu
Key:
modulepath
$
・to use OpenMPI on the super
$ module load openmpi/4.1.8_cpu
$ mpirun --version
mpirun (Open MPI) 4.1.8
Report bugs to http://www.open-mpi.org/community/help/
$
・to use OpenMPI on the gpu (cuda/12.8 module will be loaded automatically.)
$ module load openmpi/4.1.8_gpu
Loading openmpi/4.1.8_gpu
Loading requirement: cuda/12.8
$ mpirun --version
mpirun (Open MPI) 4.1.8
Report bugs to http://www.open-mpi.org/community/help/
$
Attention
Specify “#PBS -l mpiprocs=[number of parallel processes]” in the PBS resource settings.
eg.
#!/bin/sh #PBS -l select=1:ncpus=4:mpiprocs=4:mem=10gb #PBS CP_001 #PBS -N mpi_job mpirun -np 4 -N 4 -hostfile $PBS_NODEFILE ./a.out