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

Cannot build thirdPartyLibs? #285

Open
lokitkhemka opened this issue Sep 27, 2024 · 1 comment
Open

Cannot build thirdPartyLibs? #285

lokitkhemka opened this issue Sep 27, 2024 · 1 comment

Comments

@lokitkhemka
Copy link

I cannot build this project as given in https://geosx-geosx.readthedocs-hosted.com/en/latest/docs/sphinx/QuickStart.html

I am getting an error:

CMake Error at host-config:32 (include):
  include could not find requested file:

    /home/loki/Desktop/GEOS/thirdPartyLibs/tpls.cmake


-- BLT Version: 0.6.2
CMake Error at cmake/blt/SetupBLT.cmake:26 (message):
  In-source builds are not supported.  Please remove the CMakeFiles directory
  and CMakeCache.txt from the 'src' dir and configure an out-of-source build
  in another directory.
Call Stack (most recent call first):
  CMakeLists.txt:38 (include)

My host-config file is as follows:

set( CONFIG_NAME "quick-start" ) 

# Set compilers path
set(CMAKE_C_COMPILER "/usr/bin/gcc" CACHE PATH "")   # This is typically something like /usr/bin/gcc ... or clang
set(CMAKE_CXX_COMPILER "/usr/bin/g++" CACHE PATH "") # This is typically something like /usr/bin/g++ ... or clang++
set(ENABLE_FORTRAN OFF CACHE BOOL "" FORCE)

# Set paths to mpi
set(ENABLE_MPI ON CACHE PATH "")
set(MPI_C_COMPILER "/opt/intel/oneapi/mpi/latest/bin/mpicc" CACHE PATH "")    # This is typically something like /usr/bin/mpicc
set(MPI_CXX_COMPILER "/opt/intel/oneapi/mpi/latest/bin/mpicxx" CACHE PATH "") # This is typically something like /usr/bin/mpicxx
set(MPIEXEC "/opt/intel/oneapi/mpi/latest/bin/mpirun" CACHE PATH "")          # This is typically something like /usr/bin/mpirun

# Set paths to blas and lapack
set( BLAS_LIBRARIES "/usr/lib/x86_64-linux-gnu/blas/libblas.so" CACHE PATH "" FORCE )     # This is typically something like /usr/lib64/libblas.so 
set( LAPACK_LIBRARIES "/usr/lib/x86_64-linux-gnu/lapack/liblapack.so" CACHE PATH "" FORCE ) # This is typically something like /usr/lib64/liblapack.so

# Cuda and openMP
set( ENABLE_CUDA ON CACHE PATH "" FORCE )
set( ENABLE_OPENMP OFF CACHE PATH "" FORCE )

# TPLs
set( ENABLE_TRILINOS ON CACHE PATH "" FORCE )
set( ENABLE_CALIPER OFF CACHE PATH "" FORCE )
set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE)
set( ENABLE_MATHPRESSO OFF CACHE BOOL "" FORCE )

if(NOT ( EXISTS "${GEOS_TPL_DIR}" AND IS_DIRECTORY "${GEOS_TPL_DIR}" ) )
   set(GEOS_TPL_DIR "${CMAKE_SOURCE_DIR}/../../thirdPartyLibs/install-${CONFIG_NAME}-release" CACHE PATH "" FORCE )
endif()

include(${CMAKE_CURRENT_LIST_DIR}/tpls.cmake)

I am on Pop-OS 22.04. I can add more details, if needed.

Thank you for your help.

@lokitkhemka
Copy link
Author

I made some progress, but still not enough.

Now, CMake cannot seem to find MPI Package:

CMake Error in /home/loki/Desktop/GEOS/thirdPartyLibs/build-host-config-debug/CMakeFiles/CMakeScratch/TryCompile-IqJlmE/CMakeLists.txt:
  Imported target "MPI::MPI_C" includes non-existent path

    "/home/loki/Desktop/GEOS/thirdPartyLibs/I_MPI_SUBSTITUTE_INSTALLDIR/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

But, I have MPI installed through Intel OneAPI package and locations of the compilers are as follows:

set(ENABLE_MPI ON CACHE PATH "")
set(MPI_C_COMPILER "/opt/intel/oneapi/mpi/latest/bin/mpicc" CACHE PATH "")
set(MPI_CXX_COMPILER "/opt/intel/oneapi/mpi/latest/bin/mpicxx" CACHE PATH "")
set(MPIEXEC "/opt/intel/oneapi/mpi/latest/bin/mpirun" CACHE PATH "") 

Do I need to add any more environment variables?

set(MPI_C_INCLUDE_PATH "/opt/intel/oneapi/mpi/latest/include/" CACHE PATH "")

I tried adding this, but it didn't work. Any help you can provide will be greatly appreciated. Thank you so much.

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

1 participant