Nvfortran in nvhpc 23.11 fails to compile MPI codes

I have multiple clients reporting errors from fortran MPI codes like:
NVFORTRAN-S-0155-Could not resolve generic procedure mpi_bcast
NVFORTRAN-S-0155-Could not resolve generic procedure mpi_allreduce

The same codes compile fine with Nvidia 22.11. What gives? Also gcc 11.x is fine compiling these codes (OpenMPI 4.1.5 and 4.1.6 versions for all )

Is there a flag to relax some check in the new 23.11 to allow MPI codes to compile. Note these are compile time errors and not link time.

trivial reproducer:

[arnoldg@dt-login02 fortran]$ mpif90 hi.f
NVFORTRAN-S-0155-Could not resolve generic procedure mpi_bcast (hi.f: 10)
  0 inform,   0 warnings,   1 severes, 0 fatal for hello_world_mpi
[arnoldg@dt-login02 fortran]$ cat hi.f
       PROGRAM hello_world_mpi
c      include 'mpif.h'
       use mpi

       integer process_Rank, size_Of_Cluster, ierror, tag

       call MPI_INIT(ierror)
       call MPI_COMM_SIZE(MPI_COMM_WORLD, size_Of_Cluster, ierror)
       call MPI_COMM_RANK(MPI_COMM_WORLD, process_Rank, ierror)
       call MPI_Bcast (0,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)

       print *, 'Hello World from process: ', process_Rank, 'of ', size_Of_Cluster

       call MPI_FINALIZE(ierror)
       END PROGRAM
[arnoldg@dt-login02 fortran]$ 
[arnoldg@dt-login02 fortran]$ module load nvhpc/22.11

Due to MODULEPATH changes, the following have been reloaded:
  1) openmpi/4.1.5+cuda

The following have been reloaded with a version change:
  1) nvhpc/23.11 => nvhpc/22.11

[arnoldg@dt-login02 fortran]$ mpif90 hi.f
[arnoldg@dt-login02 fortran]$ 

1 Like

Hi arnoldg,

I tried your code with the MPI versions we ship with 23.11, HPCX and OpenMP4, but didn’t see any issues compiling.

What MPI are you using? One that we include with the NVHPC SDK or one that’s built locally?

If a local build, could it have been built with the 22.11 compiler and not updated for use with 23.11?

% which mpif90
/opt/nvhpc/Linux_x86_64/23.11/comm_libs/openmpi4/bin//mpif90
% mpif90 -V

nvfortran 23.11-0 64-bit target on x86-64 Linux -tp znver3
NVIDIA Compilers and Tools
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.
% mpif90 hi.f
%
  • Mat