pkgconfig and compiler wrappers
When using pkgconfig to configure progress with bml there is a "clash" with the compiler wrappers used in the machine environment.
It seems that pkgconfig is not able to identify the wrapper that was used to compile, or, at least cmake complains about the compilers been broken when pkgconfig path is set.
A way to make it work is to comment out line 75 in CMakeList.txt (#include(FindPkgConfig)) and line 77 (#pkg_check_modules(BML bml REQUIRED)) and add the following extra fc and link flags to the configuration script:
export EXTRA_FCFLAGS=${DEXTRA_FCFLAGS:="-I$BML_LIB/../include"} export EXTRA_LINK_FLAGS=${DEXTRA_LINK_FLAGS:="-L$BML_LIB/ -lbml_fortran -lbml"}
Is there any more elegant way of avoiding this problem?
@cnegre What OS are you running this on? If it's not a Mac I can try to reproduce this which would help for proposing a fix.
Its the front end of Cori at nersc: Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30GHz Linux cori02 4.4.103-92.56-default #1 SMP Wed Dec 27 16:24:31 UTC 2017 (2fd2155) x86_64 GNU/Linux
On Thu, Apr 26, 2018 at 2:09 PM, Nicolas Bock [email protected] wrote:
@cnegre https://github.com/cnegre What OS are you running this on? If it's not a Mac I can try to reproduce this which would help for proposing a fix.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lanl/qmd-progress/issues/113#issuecomment-384773332, or mute the thread https://github.com/notifications/unsubscribe-auth/APQltcvS79t_yx1Zl3DAWC9PVE8WrvhIks5tsimDgaJpZM4TnQrm .
-- Dr. Christian F. A . Negre
LOS ALAMOS NATIONAL LABORATORY T-1 Division, Mail Stop B221 Los Alamos, NM 87545
They are running SUSE SLES? :smile: I can help with that :wink: Could you check what version?
cat /etc/issue
Thanks!
SUSE Linux Enterprise Server 12 SP2 (x86_64) - Kernel \r (\l).
On Thu, Apr 26, 2018 at 2:26 PM, Nicolas Bock [email protected] wrote:
They are running SUSE SLES? :smile: I can help with that :wink: Could you check what version?
cat /etc/issueThanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lanl/qmd-progress/issues/113#issuecomment-384778037, or mute the thread https://github.com/notifications/unsubscribe-auth/APQltZhvIV57oViUjiS-vjepSPFbMg5Mks5tsi2HgaJpZM4TnQrm .
-- Dr. Christian F. A . Negre
LOS ALAMOS NATIONAL LABORATORY T-1 Division, Mail Stop B221 Los Alamos, NM 87545
Thanks. Can you tell me how you set this up? Like clone bml and qmd-progress into ${HOME} and then install the bml library somewhere? Where? How are you calling the build script for the bml and for qmd-progress?
At nersc cori:
module swap PrgEnv-intel/6.0.4 PrgEnv-gnu
Config for bml:
FC=ftn CC=cc CXX=CC BML_MPI=no CMAKE_BUILD_TYPE=Release
INSTALL_DIR=$HOME/bml/install BLAS_VENDOR=Auto
BML_OPENMP=yes BML_TESTING=yes ./build.sh configure
Config for qmd-progress:
METIS_LIB="$HOME/metis-5.1.0/build/Linux-x86_64/libmetis" BML_LIB="$HOME/bml/install/lib64"
MY_PATH=pwd
export CC=${CC:=cc} export FC=${FC:=ftn} export CXX=${CXX:=CC} export BLAS_VENDOR=${BLAS_VENDOR:="Auto"} export PROGRESS_OPENMP=${PROGRESS_OPENMP:=yes} export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"} export PROGRESS_GRAPHLIB=${PROGRESS_GRAPHLIB:=no} export PROGRESS_TESTING=${PROGRESS_TESTING:=yes} export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release} export PROGRESS_EXAMPLES=${PROGRESS_EXAMPLES:=yes} export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:=$BML_LIB} export EXTRA_FCFLAGS=${DEXTRA_FCFLAGS:="-I$BML_LIB/../include"} export EXTRA_LINK_FLAGS=${DEXTRA_LINK_FLAGS:="-L$BML_LIB/ -lbml_fortran -lbml"} #export PKG_CONFIG_PATH=$BML_LIB/pkgconfig ./build.sh configure
I used the master branches of both bml and progress.
On Thu, Apr 26, 2018 at 2:35 PM, Nicolas Bock [email protected] wrote:
Thanks. Can you tell me how you set this up? Like clone bml and qmd-progress into ${HOME} and then install the bml library somewhere? Where? How are you calling the build script for the bml and for qmd-progress?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lanl/qmd-progress/issues/113#issuecomment-384780342, or mute the thread https://github.com/notifications/unsubscribe-auth/APQltcD35Ftd7T9R1ivGlLLBy_FBms5jks5tsi-GgaJpZM4TnQrm .
-- Dr. Christian F. A . Negre
LOS ALAMOS NATIONAL LABORATORY T-1 Division, Mail Stop B221 Los Alamos, NM 87545
When I run
PROGRESS_OPENMP=yes \
PROGRESS_GRAPHLIB=no \
PROGRESS_TESTING=yes \
CMAKE_BUILD_TYPE=Release \
PROGRESS_EXAMPLES=yes \
CMAKE_PREFIX_PATH=${HOME}/bml/install \
./build.sh configure
it works. The CMAKE_PREFIX_PATH should not include lib. CMake will descend into the prefix path into lib and include as it needs to.
I did this on a SLES12-SP2 system by the way. The only difference in setup was that I used BLAS_VENDOR= since I used SUSE BLAS/LAPACK and I used GCC as the compiler.
Perfect!
I will try that.
On Mon, Apr 30, 2018 at 2:01 PM, Nicolas Bock [email protected] wrote:
I did this on a SLES12-SP2 system by the way. The only difference in setup was that I used BLAS_VENDOR= since I used SUSE BLAS/LAPACK and I used GCC as the compiler.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lanl/qmd-progress/issues/113#issuecomment-385511801, or mute the thread https://github.com/notifications/unsubscribe-auth/APQltbk1PulyoprBFKB0MJasb2yb3VZOks5tt22pgaJpZM4TnQrm .
-- Dr. Christian F. A . Negre
LOS ALAMOS NATIONAL LABORATORY T-1 Division, Mail Stop B221 Los Alamos, NM 87545