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

CMake fails with ParMetis 4 #15

Closed
platipodium opened this issue May 12, 2020 · 9 comments
Closed

CMake fails with ParMetis 4 #15

platipodium opened this issue May 12, 2020 · 9 comments

Comments

@platipodium
Copy link
Member

Something's still awkward with the build system, notably the inclusion of the new ParMetis4. Prior to this change, my build succeeded with

cmake ../schism/src -DCMAKE_Fortran_COMPILER=mpifort -DCMAKE_CXX_COMPILER=mpicc -DCMAKE_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicc -DNetCDF_C_DIR=/opt/local -DNetCDF_FORTRAN_DIR=/opt/local

This yields an error in ParMetis, which I tracked down to

cmake ../schism/src/ParMetis-4.0.3/metis -DCMAKE_Fortran_COMPILER=mpifort -DCMAKE_CXX_COMPILER=mpicc -DCMAKE_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicc -DNetCDF_C_DIR=/opt/local -DNetCDF_FORTRAN_DIR=/opt/local

Which gives the error


CMake Error at /Volumes/Kea/devel/schism/build/CMakeFiles/CMakeTmp/CMakeLists.txt:13 (add_executable):
  Cannot find source file:

    GKlib/conf/check_thread_storage.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at /Volumes/Kea/devel/schism/build/CMakeFiles/CMakeTmp/CMakeLists.txt:13 (add_executable):
  No SOURCES given to target: cmTC_05be2


CMake Error at GKlib/GKlibSystem.cmake:110 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:20 (include)


-- Configuring incomplete, errors occurred!
@platipodium
Copy link
Member Author

For completeness: when trying to compile SCHISM (as before), I get a similar error

cmake ../schism/src -DCMAKE_Fortran_COMPILER=mpifort -DCMAKE_CXX_COMPILER=mpicc -DCMAKE_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicc -DNetCDF_C_DIR=/opt/local -DNetCDF_FORTRAN_DIR=/opt/local


### Adding enabled libraries to project
CMake Error at ParMetis-4.0.3/CMakeLists.txt:28 (include):
  include could not find load file:

    /metis/GKlib/GKlibSystem.cmake


CMake Error at ParMetis-4.0.3/CMakeLists.txt:38 (add_subdirectory):
  add_subdirectory given source "/metis/libmetis" which is not an existing
  directory.

All with today's version (11 May) 6f15b0d

@platipodium
Copy link
Member Author

Solved by adding the ParMetis CMake flags to the global build. So now you can build ParMetis and SCHISM in one step again (note my locally specific location of build and netcdf dirs and adjust accordingly ):

cmake -DCMAKE_Fortran_COMPILER=mpifort -DCMAKE_CXX_COMPILER=mpicc -DCMAKE_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicc -DNetCDF_C_DIR=/opt/local -DNetCDF_FORTRAN_DIR=/opt/local -DGKLIB_PATH=../schism/src/ParMetis-4.0.3/metis/GKlib -DMETIS_PATH=../schism/src/ParMetis-4.0.3/metis ../schism/src && make pschism

@josephzhang8
Copy link
Member

josephzhang8 commented May 12, 2020 via email

@jreniel
Copy link
Member

jreniel commented May 12, 2020 via email

@josephzhang8
Copy link
Member

josephzhang8 commented May 12, 2020 via email

@jreniel
Copy link
Member

jreniel commented May 12, 2020 via email

@platipodium
Copy link
Member Author

platipodium commented May 12, 2020 via email

@josephzhang8
Copy link
Member

josephzhang8 commented May 12, 2020 via email

@jreniel
Copy link
Member

jreniel commented May 12, 2020 via email

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

3 participants