Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIPS-NLP: Linking libparpipsnlp.so fails due to libmetis.a #67

Open
tso-martin opened this issue Nov 7, 2023 · 5 comments
Open

PIPS-NLP: Linking libparpipsnlp.so fails due to libmetis.a #67

tso-martin opened this issue Nov 7, 2023 · 5 comments

Comments

@tso-martin
Copy link

Building PIPS-NLP does not succeed completely in my case:

[ 79%] Linking CXX shared library libparpipsnlp.so
../../ThirdPartyLibs/MA57/src/lib/libhsl_ma57.a: member ../../ThirdPartyLibs/MA57/src/lib/libhsl_ma57.a(libmetis.a) in archive is not an object

There seems to be a problem with METIS. I built and installed it using ThirdPartyLibs/METIS/wgetMETIS.sh and ran ThirdPartyLibs/MA57/installMa57.sh. During building MA57 there occurs a an error in install-includeHEADERS:

make install-includeHEADERS
 /usr/bin/mkdir -p '/xx/PIPS/ThirdPartyLibs/MA57/src/include'
 /usr/bin/install -c -m 644 include/hsl_ma57s.h include/hsl_ma57d.h '/xx/PIPS/ThirdPartyLibs/MA57/src/include'
/usr/bin/install: ‘include/hsl_ma57s.h’ and ‘/xx/PIPS/ThirdPartyLibs/MA57/src/include/hsl_ma57s.h’ are the same file
/usr/bin/install: ‘include/hsl_ma57d.h’ and ‘/xx/PIPS/ThirdPartyLibs/MA57/src/include/hsl_ma57d.h’ are the same file
make: *** [install-includeHEADERS] Error 1

I am not sure if this error matters for building PIPS-NLP. Your help is appreciated.

@nychiang
Copy link
Collaborator

nychiang commented Nov 7, 2023

It seems that you have multiple metis installed in your system, and both are provided to pips.
You can try to use your default one in installMa57.sh

@tso-martin
Copy link
Author

Hi @nychiang, I checked that there is no other METIS-library on the system.
I changed a line in installMa57.sh into an absolute path:

 ./configure FFLAGS=-fPIC --with-metis=/xx/PIPS/ThirdPartyLibs/METIS/Lib/libmetis.a --prefix=`pwd`

When using the relative path ../../METIS/Lib/libmetis.a the configure script confirms that it finds libmetis.a, but during building gfortran does not find it:

gfortran: error: ../../METIS/Lib/libmetis.a: No such file or directory

Anyway, by using the absolute METIS path MA57 could be built. I investigated the static library libhsl_ma57.a using nm:

nm: libmetis.a: File format not recognized

Do you have any idea, what could be wrong?

@nychiang
Copy link
Collaborator

nychiang commented Nov 8, 2023

Seems like you have different fortran compilers on you machine, but it is hard to tell what is wrong with the limited information.
Have you tried to build metis, ma57 and pips by adding F77=gfortran in front of your command, e.g., F77=gfortran ./installMa57.sh and F77=gfortran ./wgetMETIS.sh ?

@tso-martin
Copy link
Author

Add F77=gfortran did not solve the problem, but conflicting Fortran versions could be a reason. I get warning during building PIPS-NLP:

Linking CXX executable ../pipsnlp_parallel
/usr/bin/ld: warning: libgfortran.so.3, needed by /usr/local/lib/openblas/0.3.9/mt/int64/libopenblas.so, may conflict with libgfortran.so.5

I am not sure if this an issue.

@nychiang
Copy link
Collaborator

nychiang commented Nov 8, 2023

It seems to me that you are using different compilers for openblas, metis and pips.
see her for example
Maybe you can try to compile ma57 without metis, by removing -with-metis=... in installMa57.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants