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

Incorrect installation path saved in install/lib/cmake/libint2/libint2-targets.cmake on Summit #158

Closed
victor-anisimov opened this issue Jan 26, 2020 · 6 comments

Comments

@victor-anisimov
Copy link

I install libint2 as a prerequisite for MPQC4 on Summit.
After completing the installation, line 57 in install/lib/cmake/libint2/libint2-targets.cmake points to a nonexistent directory. In my case it is INTERFACE_INCLUDE_DIRECTORIES "/ccs/home/anisimov/include/eigen3". The correct path is supposed to be "/ccs/home/anisimov/mpqc4/install/include/eigen3"

I install Libint2 according to the following steps:
export ROOT=$HOME/mpqc4
cd $ROOT
tar jxvf libint-2.7.0-beta.2.tar.bz2
cd $ROOT/libint-2.7.0-beta.2; mkdir build; cd build
cmake -D CMAKE_INSTALL_PREFIX=$ROOT/install -D CMAKE_CXX_FLAGS='-I/ccs/home/anisimov/mpqc4/install/include -L/ccs/home/anisimov/mpqc4/install/lib' -DCMAKE_CXX_COMPILER=g++ ..
make -j 20
make install

@evaleev evaleev closed this as completed Jan 27, 2020
@evaleev evaleev reopened this Jan 27, 2020
@evaleev
Copy link
Owner

evaleev commented Jan 27, 2020

@victor-anisimov my guess the FindEigen3.cmake module messes up or your cache needs to be wiped out. Please attach CMakeCache.txt . Also: in libint's CMakeLists.txt would you mind adding message(STATUS "EIGEN3_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR}") following find_package(Eigen) and report what is printed?

@victor-anisimov
Copy link
Author

victor-anisimov commented Jan 27, 2020

This is what gets printed
-- EIGEN3_INCLUDE_DIR=/ccs/home/anisimov/include/eigen3
which is apparently wrong / non-existing directory
The correct path is /ccs/home/anisimov/libint/install/include/eigen3

cmake is executed in empty build directory. Following is the cache file created after completing cmake configuration.
CMakeCache.txt

@evaleev
Copy link
Owner

evaleev commented Jan 28, 2020

@victor-anisimov would you please report the contents of /ccs/home/anisimov/mpqc4/install/include? What happens if you remove -I and -L entries from CMAKE_CXX_FLAGS? It's a bad idea to add them there anyway. In any case, my best guess is that the FindEigen3.cmake module (distributed as part of cmake) mistakenly detects Eigen3 in a directory it's trying first due to the presence of the -I flag. Please attach CMakeFiles/CMake{Output,Error} also.

@victor-anisimov
Copy link
Author

[[email protected] libint]$ ls -l /ccs/home/anisimov/libint/install/include
total 212
drwxrwxr-x 4 anisimov anisimov 4096 Jan 27 14:45 eigen3
-rw-r--r-- 1 anisimov anisimov 83660 Jan 27 14:49 gmp.h
-rw-r--r-- 1 anisimov anisimov 116607 Jan 27 14:49 gmpxx.h

export ROOT=$HOME/libint
cd /ccs/home/anisimov/libint/libint-2.7.0-beta.2/build/
cmake -D CMAKE_INSTALL_PREFIX=$ROOT/install
-D CMAKE_CXX_COMPILER=g++ ..

-- The CXX compiler identification is GNU 9.1.0
-- The C compiler identification is GNU 9.1.0
-- Check for working CXX compiler: /sw/summit/gcc/9.1.0-alpha+20190716/bin/g++
-- Check for working CXX compiler: /sw/summit/gcc/9.1.0-alpha+20190716/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /sw/summit/gcc/9.1.0-alpha+20190716/bin/gcc
-- Check for working C compiler: /sw/summit/gcc/9.1.0-alpha+20190716/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- EIGEN3_INCLUDE_DIR=/ccs/home/anisimov/include/eigen3
-- Found Boost: /autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-9.1.0/boost-1.66.0-xvbddq43c3vnf56tpp5v56gex2mffmlh/include (found suitable version "1.66.0", minimum required is "1.29")
-- Performing Test LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS
-- Performing Test LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS - Success
-- Found PythonInterp: /usr/bin/python (found version "2.7.5")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- === Libint2 Package/Feature Info ===
-- The following OPTIONAL packages have been found:

  • Eigen3
  • Boost (required version >= 1.29)
  • PythonInterp
  • Threads

-- Configuring done
-- Generating done
-- Build files have been written to: /ccs/home/anisimov/libint/libint-2.7.0-beta.2/build

CMake log files are attached:
CMakeOutput.log
CMakeError.log

@victor-anisimov
Copy link
Author

victor-anisimov commented Jan 29, 2020

These are my environment settings:

module unload xl
module load DefApps
module load cuda/10.1.168
module load essl/6.2.0-20190419
module load gcc/9.1.0
module load cmake/3.15.2
module load lsf-tools/2.0
module load netlib-lapack/3.8.0
module load spectrum-mpi/10.3.0.1-20190611
module load boost/1.66.0
module unload xalt darshan-runtime

export ROOT=$HOME/libint
export CUDA_GCC_DIR=/sw/summit/gcc/7.4.0

Besides that, my all terminal settings are at their default values on Summit.

@evaleev
Copy link
Owner

evaleev commented Jan 29, 2020

@victor-anisimov your cmake user package registry is polluted with corrupted build artifact (see ${HOME}/.cmake). I made the eigen search more robust, will be part of 2.7.0-beta.3 . For now clear out the user package registry, install Eigen properly, and provide its location via CMAKE_PREFIX_PATH.

@evaleev evaleev mentioned this issue Jan 14, 2022
16 tasks
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