[Ipopt] missing -lmpi pkg-config with mumps

Stefan Vigerske stefan at math.hu-berlin.de
Sat Feb 25 16:39:37 EST 2012


> I compiled ipopt release version 3.10.2 on linux (ubuntu) with MUMPS. MUMPS
> was downloaded using get.mumps in ThirdParty directory. It compiles well, but
> pkg-config for libcoinmumps doesn't show -lmpi, even though it was compiled
> with it.
> [mahajan at mahajan-desktop lib]$ nm libcoinmumps.a  | grep -i mpi_init
>                   U mpi_initialized_
> 0000000000000110 T mpi_init_
> 0000000000000120 T mpi_initialized_
> 0000000000000000 T MPI_Init
> but pkg-config doesn't show -lmpi,

The Mumps that is build in ThirdParty/Mumps does not depend on mpi.
It only builds a serial version. To do so, one still need to resolve 
some mpi symbols (e.g., mpi_initialized), but these are defined in 
libcoinmumps (from the source in MUMPS/libseq).
The output of nm tells you, that these symbols are defined in 
libcoinmumps.a, but are not unresolved.
Thus, no need to link against the mpi library (actually, it wouldn't 
work due to now duplicate symbols).

> [mahajan at mahajan-desktop lib]$ pkg-config --libs-only-l coinmumps
> -lcoinmumps -lpthread -lblas -lgfortranbegin -lgfortran -lm -lgcc_s
> [mahajan at mahajan-desktop lib]$ pkg-config --libs-only-l ipopt
> -lipopt -llapack -ldl -lcoinmumps -lpthread -lblas -lgfortranbegin -lgfortran -lm -lgcc_s
> Is it a bug?  I'm new to pkg-config, so I might be wrong. We are planning to
> release some software that links to ipopt. So it is important for us to detect
> the right libraries to link with.

Hope the above explains that it's not a bug.


> Thanks.
> --
> regards
> Ashutosh Mahajan
> http://coral.ie.lehigh.edu/~asm4
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

More information about the Ipopt mailing list