In https://github.com/NCAR/WRFV3/blob/master/external/RSL_LITE/rsl_lite.h
#ifndef MPI2_SUPPORT typedef int MPI_Fint; # define MPI_Comm_c2f(comm) (MPI_Fint)(comm) # define MPI_Comm_f2c(comm) (MPI_Comm)(comm) #endif so I guess the MPI2_SUPPORT macro is not defined, and it makes Open MPI a sad panda. I do not know how WRF is supposed to be built, but I think you have to manually pass the -DMPI2_SUPPORT parameter when building RSL_LITE. Cheers, Gilles On Thu, Jul 23, 2020 at 7:32 PM Steve Brasier via users <users@lists.open-mpi.org> wrote: > > Giles, thank you for your answer on this - my reply seems to have got eaten > probably for being too long so I have put it up here: > > https://gist.github.com/sjpb/680f3781110025ade3dff34390d673c8#file-gnu9-ompi4-em_real-log-L903 > > it almost looks to me like it's using the wrong compiler or something but I > can't figure out what? > > many thanks > > Steve Brasier > > On Tue, 14 Jul 2020 at 11:18, Steve Brasier <ste...@stackhpc.com> wrote: >> >> I'm trying to compile WRF against openmpi4 installed using Spack, using gcc >> 7. It's hitting lots of errors of which the first appears to be in the mpi >> header: >> >> ranlib ../libio_grib1.a >> In file included from c_code.c:27:0: >> $HOME/spack/opt/spack/linux-centos7-broadwell/gcc-7.3.0/openmpi-4.0.3-ziwdzwh77wcddumuqk5akbmodploffo6/include/mpi.h:201:32: >> error: two or more data types in declaration specifiers >> #define ompi_fortran_integer_t int >> ^ >> I've managed to compile other codes using this same combination. Any >> suggestions as to what I'm doing wrong? >> >> many thanks >> Steve >> >> http://stackhpc.com/ >> Please note I work Tuesday to Friday.