ompi icon indicating copy to clipboard operation
ompi copied to clipboard

Fortran configure warnings and build errors with nvidia fortran compiler

Open Akshay-Venkatesh opened this issue 3 years ago • 6 comments

Seeing the following compiler warnings with nvidia hpc sdk 22.2 available here https://developer.nvidia.com/nvidia-hpc-sdk-releases

Background information

What version of Open MPI are you using? (e.g., v3.0.5, v4.0.2, git branch name and hash, etc.)

v4.1.3

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

release tarball configured with:

pg_cc=`which nvcc`
pg_fc=`which nvfortran`
pg_cpp=`which nvc++`
cuda_comp=`which nvcc`

../configure \
        --prefix=$PWD \
        --enable-debug \
        --enable-mpirun-prefix-by-default \
        --with-ucx=$UCX_HOME \
        --with-cuda=$CUDA_HOME \
        --disable-man-pages \
        --enable-oshmem \
        --enable-mca-no-build=btl-uct \
        --enable-mpi-fortran \
        --enable-mpi1-compatibility \
        --enable-mpi-ext=cuda \
        --with-hwloc=internal \
        --with-pmix=internal \
        CC=$pg_cc CXX=$pg_cpp FC=$pg_fc FCFLAGS="-fPIC"

Please describe the system on which you are running

  • Operating system/version: ubuntu 20.04

Details of the problem

Configure warnings:

Unexpected size warnings

configure: WARNING: *** Fortran INTEGER*16 does not have expected size!
configure: WARNING: *** Expected 16, got 4
configure: WARNING: *** Disabling MPI support for Fortran INTEGER*16

configure: WARNING: *** Fortran COMPLEX*4 does not have expected size!
configure: WARNING: *** Expected 4, got 8
configure: WARNING: *** Disabling MPI support for Fortran COMPLEX*4

configure: WARNING: *** Fortran COMPLEX*32 does not have expected size!
configure: WARNING: *** Expected 32, got 8
configure: WARNING: *** Disabling MPI support for Fortran COMPLEX*32

configure: WARNING: *** Fortran REAL*16 does not have expected size!
configure: WARNING: *** Expected 16, got 4
configure: WARNING: *** Disabling MPI support for Fortran REAL*16

libevent warnings

configure: WARNING: sys/uio.h: present but cannot be compiled
configure: WARNING: sys/uio.h:     check for missing prerequisite headers?
configure: WARNING: sys/uio.h: see the Autoconf documentation
configure: WARNING: sys/uio.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/uio.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------- ##
configure: WARNING:     ## Report this to http://libevent.org ##
configure: WARNING:     ## ---------------------------------- ##
checking for sys/uio.h... no
checking arpa/inet.h usability... no
checking arpa/inet.h presence... yes
configure: WARNING: arpa/inet.h: present but cannot be compiled
configure: WARNING: arpa/inet.h:     check for missing prerequisite headers?
configure: WARNING: arpa/inet.h: see the Autoconf documentation
configure: WARNING: arpa/inet.h:     section "Present But Cannot Be Compiled"
configure: WARNING: arpa/inet.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------- ##
configure: WARNING:     ## Report this to http://libevent.org ##
configure: WARNING:     ## ---------------------------------- ##
checking for arpa/inet.h... no
checking sys/eventfd.h usability... no
checking sys/eventfd.h presence... yes
configure: WARNING: sys/eventfd.h: present but cannot be compiled
configure: WARNING: sys/eventfd.h:     check for missing prerequisite headers?
configure: WARNING: sys/eventfd.h: see the Autoconf documentation
configure: WARNING: sys/eventfd.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/eventfd.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------- ##
configure: WARNING:     ## Report this to http://libevent.org ##
configure: WARNING:     ## ---------------------------------- ##

Build errors:

  126 | #error "No way to define ev_uint64_t"
      |  ^~~~~
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:145:2: error: #error "No way to define ev_uint32_t"
  145 | #error "No way to define ev_uint32_t"
      |  ^~~~~
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:164:2: error: #error "No way to define ev_uint16_t"
  164 | #error "No way to define ev_uint16_t"
      |  ^~~~~
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:251:2: error: #error "No way to define SIZE_MAX"
  251 | #error "No way to define SIZE_MAX"
      |  ^~~~~
make[3]: *** [Makefile:2017: output.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/evutil.h:37,
                 from ../../../opal/mca/event/libevent2022/libevent/event.h:57,
                 from ../../../opal/mca/event/libevent2022/libevent2022.h:58,
                 from ../../../opal/mca/event/event.h:77,
                 from ../../../opal/mca/pmix/pmix.h:24,
                 from ../../../opal/util/proc.c:22:
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:126:2: error: #error "No way to define ev_uint64_t"
  126 | #error "No way to define ev_uint64_t"
      |  ^~~~~
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:145:2: error: #error "No way to define ev_uint32_t"
  145 | #error "No way to define ev_uint32_t"
      |  ^~~~~
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:164:2: error: #error "No way to define ev_uint16_t"
  164 | #error "No way to define ev_uint16_t"
      |  ^~~~~
/tmp/openmpi-4.1.3/opal/mca/event/libevent2022/libevent/include/event2/util.h:251:2: error: #error "No way to define SIZE_MAX"
  251 | #error "No way to define SIZE_MAX"
      |  ^~~~~

Akshay-Venkatesh avatar May 12 '22 20:05 Akshay-Venkatesh

cc @janjust

Akshay-Venkatesh avatar May 12 '22 20:05 Akshay-Venkatesh

@jladd-mlnx FYI

janjust avatar May 16 '22 14:05 janjust

I tried to compile the released 4.1.4 with nvcc and nvfortran 22.04 and the compilation failed.

I had to change the configure of the openmpi library as below, i.e. I did add nvfortran so that the compiler is recognised. After that it worked. This is probably more related to issue #8919

Without I got the error relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC

43702c43702
<   for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran nvfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor
---
>   for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor
43746c43746
<   for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran nvfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor
---
>   for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor
414137c414137
<       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
---
>       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
414780c414780
<       pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
---
>       pgf77* | pgf90* | pgf95* | pgfortran*)
421450c421450
<       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
---
>       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
422078c422078
<       pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
---
>       pgf77* | pgf90* | pgf95* | pgfortran*)

sangallidavide avatar Aug 19 '22 23:08 sangallidavide

@Akshay-Venkatesh @janjust Can you guys comment on this?

jsquyres avatar Aug 19 '22 23:08 jsquyres

I have the same problem reported above about libevent with nvidia compiler. If the configure does not find the external libevent, the compilation of the internal libevent fails.

On ubuntu the solution is to install libevent-dev After that the installation works fine with the above change to the configure

sangallidavide avatar Aug 28 '22 22:08 sangallidavide

I have seen similar warnings with AOCC 4.2

configure: WARNING: *** Fortran COMPLEX*4 does not have expected size! 
configure: WARNING: *** Expected 4, got 8 
configure: WARNING: *** Disabling MPI support for Fortran COMPLEX*4)

lcebaman avatar May 24 '24 09:05 lcebaman