Skip to content

mpicc wrapper issues in interface mode with GNU compiler #27

@nhanford

Description

@nhanford

Hello,

I am using the WI4MPI 3.6.0 release built with the GCC 10.2.1 compiler and OpenMPI 4.1.0.
When using the mpicc compiler wrapper in interface mode, I am running into errors such as:

/usr/tce/packages/gcc/gcc-10.2.1/rh/usr/bin/../libexec/gcc/x86_64-redhat-linux/10/ld: /collab/usr/global/tools/mpi/gcc/10.2.1/opt/wi4mpi-3.5.1/lib/libmpi.a(interface_c.c.o): in function `wrapper_interface':
interface_c.c:(.text.startup+0x1a91): undefined reference to `INTERF_2_INTEL_CCMPI_Errhandler_c2f'

and

/usr/tce/packages/gcc/gcc-10.2.1/rh/usr/bin/../libexec/gcc/x86_64-redhat-linux/10/ld: /collab/usr/global/tools/mpi/gcc/10.2.1/opt/wi4mpi-3.5.1/lib/libmpi.a(engine.c.o): in function `INTERF_2_OMPI_communicator_translation_update_alloc_f':
engine.c:(.text+0xdd8): undefined reference to `pthread_spin_unlock'

which are fixed by manually specifying:

mpicc -pthread -fPIC osu_hello.c -o osu_hello

However, when those flags are specified, the resulting executable encounters a segmentation fault when run.
We have built WI4MPI with the following options:

-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_Fortran_COMPILER=gfortran \
-DMPI_Fortran_COMPILER=mpifort \
-DWI4MPI_COMPILER=GNU

and OpenMPI was compiled with the following options:

'--disable-silent-rules' '--disable-new-dtags'
'--enable-mpi-cxx' '--enable-cxx-exceptions'
'--with-pmi'

Our module prepends the WI4MPI /lib to $LD_LIBRARY_PATH and also sets WI4MPI_ROOT, WI4MPI_CC, WI4MPI_CXX, and WI4MPI_FC accordingly. Perhaps there is something we are missing?
Any help would be appreciated. Please let us know if any more info would be useful.

Thanks,
Nate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions