I have some troubles to compile and run my code with nvhpc/24.1 and OpenMPI.
with the provided OpenMPI version nvhpc-openmpi3/24.1 my code compiles but is not compatible with the slurm setup of the cluster (slurm is 20.11.7-1)
The application appears to have been direct launched using "srun",
but OMPI was not built with SLURM's PMI support and therefore cannot
execute. There are several options for building PMI support under
SLURM, depending upon the SLURM version you are using:
I must launch with srun in the batch file as using mpirun do not set some Slurm variables required for accessing the GPUs.
As with Gnu compiler we use OpenMPI 4.1.4 I’ve built this version using nvhpc-nompi/24.1 and the same setup used for GNU:
These options do not seams really different from the one returned by ompi_info from nvhpc-openmpi3/24.1
But we are using wrappers in front of MPI calls as showed in the small test case and with nvhpc-nompi/24.1 + OpenMPI 4.1.4 I cannot compile successfully:
bash-4.4$ mpifort --show
nvfortran -I/opt/nvidia/openmpi-legi/4.1.4/include -I/opt/nvidia/openmpi-legi/4.1.4/lib -L/opt/nvidia/openmpi-legi/4.1.4/lib -rpath /opt/nvidia/openmpi-legi/4.1.4/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
bash-4.4$ mpifort -c comm.f90
NVFORTRAN-S-0155-Could not resolve generic procedure mpi_bcast (comm.f90: 22)
0 inform, 0 warnings, 1 severes, 0 fatal for my_bcast_character
NVFORTRAN-S-0155-Could not resolve generic procedure mpi_bcast (comm.f90: 44)
0 inform, 0 warnings, 1 severes, 0 fatal for my_bcast_logical_scalar
This code compiles successfully with:
nvhpc-openmpi3/24.1
OpenMPI 4.1.4 and GNU OG13 branch
May be there are special things to do when building OpenMPI with Nvidia SDK ?
and it works!
(Now I’ve to check if GPU to GPU communications works too but they should as they did with using include "mpif.h" as a workaround with the previous OpenMPI build)
Hi,
I have some additional question about this setup of OpenMPI with Nvidia GPU. I’me running some tests on a node with 2 PCI4 A100 GPU. I’m using osu-micro-benchmarks-3.8 tests (unable to compile the latest version with nvhpc).
I slightly modified osu_bw.c to take account of slurm resources (to be sure the 2 processes are offloaded on a distinct GPU). The maximum bandwith reached is 16GB/s for osu_bw, so this is half a PCI4-16x bandwith.
I’ve read about GPUDirect (Benchmark Tests - NVIDIA Docs) but it seams to be related to “GPU-Node-Node-GPU” communications. Should I use it too for intranode communications ? And modify my OpenMPI setup ?
Yes, CUDA Aware MPI, which uses GPU Direct communication, can be used between GPUs on the same node,.
And modify my OpenMPI setup?
CUDA Aware MPI works by passing in device pointers to the MPI calls, so it’s more a program issue assuming your OpenMPI was built with CUDA Aware MPI enabled (which it looks like yours was).
I haven’t used the OSU benchmarks for quite awhile myself but assume they’ve been updated to use CUDA Aware MPI, in which case you shouldn’t need to do anything extra.