lanl / qmd-progress

PROGRESS: Parallel, Rapid O(N) and Graph-based Recursive Electronic Structure Solver.
https://qmd-progress.readthedocs.io/
Other
20 stars 13 forks source link

Installing with BML and Scalapack #217

Closed jeanlucf22 closed 2 years ago

jeanlucf22 commented 2 years ago

After installing BML, bml.pc in install/lib64/pkgconfig looks like:

prefix=/home/q8j/GIT/jeanlucf22/bml/install
includedir=/home/q8j/GIT/jeanlucf22/bml/install/include
libdir=/home/q8j/GIT/jeanlucf22/bml/install/lib64

Name: bml
Description: The basic matrix library
URL: https://lanl.github.io/bml/
Version: 2.2.0
Cflags: -I/home/q8j/GIT/jeanlucf22/bml/install/include
Libs: -L/home/q8j/GIT/jeanlucf22/bml/install/lib64 -lbml_fortran -lbml /software/dev_tools/swtree/cs400_centos7.2_pe2016-08/scalapack/2.0.2/centos7.5_gnu8.1.0/lib/libscalapack.a /usr/lib64/liblapack.so /software/dev_tools/swtree/cs400_centos7.2_pe2016-08/openBLAS/0.2.20/centos7.5_gnu8.1.0/lib/libopenblas.a -lgfortran -lm /software/dev_tools/swtree/cs400_centos7.2_pe2016-08/openBLAS/0.2.20/centos7.5_gnu8.1.0/lib/libopenblas.a -lgfortran -lm -lm

Now when I try to build qmd-progress using that installation of BML, cmake sets BML_LDFLAGS to:

/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/scalapack/2.0.2/centos7.5_gnu8.1.0/lib/libscalapack.a;/usr/lib64/liblapack.so;/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/openBLAS/0.2.20/centos7.5_gnu8.1.0/lib/libopenblas.a;-L/home/q8j/GIT/jeanlucf22/bml/install/lib64;-lbml_fortran;-lbml;-lgfortran;-lm

That is it re-ordered the library with the .a first and the '-l' last. The problem is that now I am getting some undefined functions at link time since bml comes after scalapack.

Any idea how to fix that, either on the qmd-progress side or when generating the .pc on the BML side?

mewall commented 2 years ago

I don't know, but I happened to be looking at something recently in cmake docs that might be helpful:

https://cmake.org/cmake/help/latest/command/list.html


From: Jean-Luc Fattebert @.***> Sent: Wednesday, February 16, 2022 1:58:34 PM To: lanl/qmd-progress Cc: Subscribed Subject: [EXTERNAL] [lanl/qmd-progress] Installing with BML and Scalapack (Issue #217)

Afetr installing BML, bml.pc in install/lib64/pkgconfig looks like:

prefix=/home/q8j/GIT/jeanlucf22/bml/install includedir=/home/q8j/GIT/jeanlucf22/bml/install/include libdir=/home/q8j/GIT/jeanlucf22/bml/install/lib64

Name: bml Description: The basic matrix library URL: https://lanl.github.io/bml/ Version: 2.2.0 Cflags: -I/home/q8j/GIT/jeanlucf22/bml/install/include Libs: -L/home/q8j/GIT/jeanlucf22/bml/install/lib64 -lbml_fortran -lbml /software/dev_tools/swtree/cs400_centos7.2_pe 2016-08/scalapack/2.0.2/centos7.5_gnu8.1.0/lib/libscalapack.a /usr/lib64/liblapack.so /software/dev_tools/swtree/cs4 00_centos7.2_pe2016-08/openBLAS/0.2.20/centos7.5_gnu8.1.0/lib/libopenblas.a -lgfortran -lm /software/dev_tools/swtre e/cs400_centos7.2_pe2016-08/openBLAS/0.2.20/centos7.5_gnu8.1.0/lib/libopenblas.a -lgfortran -lm -lm

Now when I try to build qmd-progress using that installation of BML, cmake sets BML_LDFLAGS to: /software/dev_tools/swtree/cs400_centos7.2_pe2016-08/scalapack/2.0.2/centos7.5_gnu8.1.0/lib/libscalapack.a;/usr/lib64/liblapack.so;/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/openBLAS/0.2.20/centos7.5_gnu8.1.0/lib/libopenblas.a;-L/home/q8j/GIT/jeanlucf22/bml/install/lib64;-lbml_fortran;-lbml;-lgfortran;-lm

That is it re-ordered the library with the .a first and the '-l' last. The problem is that now I am getting some undefined functions at link time since bml comes after scalapack.

Any idea how to fix that, either on the qmd-progress side or when generating the .pc on the BML side?

— Reply to this email directly, view it on GitHubhttps://github.com/lanl/qmd-progress/issues/217, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA67VELSMNEBNNZ3LRGPYVLU3QFXVANCNFSM5OSYGXXA. You are receiving this because you are subscribed to this thread.Message ID: @.***>