Currently, after allocating GPU memory with openACC, I use MPI communication right away without copying it to the host (CPU).
I would like to change from openMPI to MVAPICH.
I tried to opened “mpifort” file with vi and edited it.
Original mvapich_gdr mpifort
36 # Set the default values of all variables.
37 #
38 # Directory locations: Fixed for any MPI implementation.
39 # Set from the directory arguments to configure (e.g., --prefix=/usr/local)
40 prefix=/opt/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0
41 exec_prefix=/opt/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0
42 sysconfdir=/opt/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/etc
43 includedir=/opt/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/include
44 libdir=/opt/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/lib64
45 modincdir=/opt/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/include
46
47 # Default settings for compiler, flags, and libraries
48 # Determined by a combination of environment variables and tests within
49 # configure (e.g., determining whehter -lsocket is needee)
50 FC="gfortran"
51 FCCPP=""
modified mpifort using nvfortran, set path
38 # Directory locations: Fixed for any MPI implementation.
39 # Set from the directory arguments to configure (e.g., --prefix=/usr/local)
40 prefix=/home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0
41 exec_prefix=/home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0
42 sysconfdir=/home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/etc
43 includedir=/home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/include
44 libdir=/home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/lib64
45 modincdir=/home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/include
46
47 # Default settings for compiler, flags, and libraries
48 # Determined by a combination of environment variables and tests within
49 # configure (e.g., determining whehter -lsocket is needee)
50 FC="nvfortran"
51 FCCPP=""
52 #
53 # Fortran 90 Compiler characteristics
54 FCINC="-I"
55 # f90modinc specifies how to add a directory to the search path for modules.
56 # Some compilers (Intel ifc version 5) do not support this concept, and
57 # instead need
The following error occurs:
[jsera.lee@agpu1321 my_test]$ ./my_mpifort mpi_test.f90
NVFORTRAN-F-0004-Corrupt or Old Module file /home/sr7/jsera.lee/mpi_test/mvapich_gdr/mvapich2/gdr/2.3.7/no-mpittool/no-openacc/cuda11.3/mofed5.6/mpirun/gnu8.5.0/include/mpi.mod (cpu_test.f90: 6)
NVFORTRAN/x86-64 Linux 22.3-0: compilation aborted
Is it the only way that I have to rebuild mvapich with the FC=nvfortran compiler included in nvhpc and use it?
The mvapich I downloaded is a version with the gdr feature added. If you unzip?(install) it with rpm, the bin, lib64, and include dirs of mvapich2_gdr will come out right away without building.
https://mvapich.cse.ohio-state.edu/downloads/#mv2gdr-23
Only rpm is provided for mvapich-gdr, and normal mvapich seems to be the only tarball file that can be built.
https://mvapich.cse.ohio-state.edu/downloads/#mv2.3.7