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

Incompatibility with Intel Module in UMich Great Lakes cluster #373

Closed
david-montiel-t opened this issue Dec 24, 2024 · 7 comments
Closed

Comments

@david-montiel-t
Copy link
Contributor

When loading the Intel module in the University of Michigan Great Lakes cluster, compiling of the core library with "cmake ." defaults to GNU 8.5.0 instead. This leads to multiple errors of the type:

c++: error: unrecognized command line option ''

@david-montiel-t
Copy link
Contributor Author

david-montiel-t commented Dec 24, 2024

The following steps seem to fix the compilation error:

  1. Running CMake as:

$ cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx .

  1. Including support for C++17, by adding the following lines within CMakeLists.txt

# =========================================================
# Some basic bookkeeping
# =========================================================

# Ensure C++17 is used universally
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

  1. Adding a link to the Filesystem Library in the app CMakeLists.txt

target_link_libraries(main_debug ${CMAKE_SOURCE_DIR}/../../libprisms-pf-debug.a stdc++fs)
target_link_libraries(main_release ${CMAKE_SOURCE_DIR}/../../libprisms-pf-release.a stdc++fs)

@david-montiel-t
Copy link
Contributor Author

We need to make sure that the changes to CMakeLists.txt do not affect the compilation with GNU or Clang compilers.

@fractalsbyx
Copy link
Contributor

I had a similar issue on my laptop that I could hotfix by using
$ cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx .
I was able to permanently fix it by changing using USE_DEAL_II_CMAKE_MPI_COMPILER=ON when compiling dealii (using candi).

@landinjm
Copy link
Contributor

This loosely relates to an issue I had when building PRISMS-PF on Ubuntu 24.04. I had to specify mpi compilers in ~/.bashrc with

# mpi compilers
export CC=mpicc
export CXX=mpic++

@landinjm
Copy link
Contributor

landinjm commented Jan 2, 2025

@david-montiel-t Can you post the CMakeCache from the compilation when you add those flags.

@david-montiel-t
Copy link
Contributor Author

@landinjm, see attached. It is the CMakeCache.txt file generated when compiling the code library.

CMakeCache.txt

@landinjm
Copy link
Contributor

New versions of intel compilers that adhere to C++17 should include std::filesystem (std++fs) like intel-oneapi 2025.0.4.

I'm not a fan of adding that to the library linker. I think the user could just specify to include that library or use a newer version of the intel compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants