While building Ipopt with MUMPS and OpenMPI on Ubuntu 22.04, I'm encountering undefined references to various MPI functions during the make test phase. Despite ensuring that the correct MPI libraries and headers are installed and linked, the build fails with linker errors. Here's a detailed breakdown of the steps taken and the issues encountered.
The build process failed during the test phase, with the linker throwing undefined references to various MPI symbols (e.g., MPI_Abort, MPI_Comm_dup, etc.).
Troubleshooting Steps Taken
Verified MPI Installation:
Checked that the MPI headers exist at /usr/lib/x86_64-linux-gnu/openmpi/include, particularly mpi.h.
Verified that libmpi and libmpi_cxx are present via ldconfig.
Tried Linking MPI Libraries Manually:
Attempted to add LIBS="-lmpi" to the make test command:
make test LIBS="-lmpi"
The error persisted.
Reconfigured Ipopt:
Adjusted the original configure command to explicitly point to OpenMPI libraries and headers:
Description
While building Ipopt with MUMPS and OpenMPI on Ubuntu 22.04, I'm encountering undefined references to various MPI functions during the
make test
phase. Despite ensuring that the correct MPI libraries and headers are installed and linked, the build fails with linker errors. Here's a detailed breakdown of the steps taken and the issues encountered.Environment
OS: Ubuntu 22.04 (x86_64)
Compiler: GCC 8.4.0
MPI Version: OpenMPI 4.0.3 mpi_present.txt
MUMPS Version: 5.7.3 (Built from source)
Ipopt Version: 3.14.17
BLAS/LAPACK: System installed
libblas
,liblapack
Problem
During the
make test
phase of building Ipopt, the linker fails with the following errors:Steps to Reproduce
Installed MUMPS from source:
Built and installed Ipopt:
Ran the following configuration command for Ipopt:
The build process completed without errors.
Ran
make test
:MPI_Abort
,MPI_Comm_dup
, etc.).Troubleshooting Steps Taken
Verified MPI Installation:
/usr/lib/x86_64-linux-gnu/openmpi/include
, particularlympi.h
.libmpi
andlibmpi_cxx
are present vialdconfig
.Tried Linking MPI Libraries Manually:
LIBS="-lmpi"
to themake test
command:Reconfigured Ipopt:
configure
command to explicitly point to OpenMPI libraries and headers:Logs
Output of
ldconfig -p | grep mpi
:Full Error Log During
make test
:Please find the terminal outputs of the respective commands.
make_test_output.txt make_output.txt configure_output.txt