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 open source file "filesystem" and "experimental/filesystem" #103

Closed
wolfram-schmidt opened this issue Mar 6, 2024 · 5 comments
Closed
Labels
question Further information is requested

Comments

@wolfram-schmidt
Copy link

CMake fails with

CMake Error at external/parthenon/cmake/FindFilesystem.cmake:254 (message):
Cannot Compile simple program using std::filesystem

using Intel compilers/mpi 2021.2 with the config file

message(STATUS "Loading machine configuration for HLRN-IV supercomputer using Intel modules.")

# Kokkos settings
set(Kokkos_ARCH_SKX ON CACHE BOOL "Target Skylake")

# Intel compiler
set(CMAKE_CXX_COMPILER mpiicpc CACHE STRING "")
set(CMAKE_C_COMPILER mpiicc CACHE STRING "")

Complete output in build directory is attached.

build-mpi.tar.gz

@pgrete pgrete added the question Further information is requested label Mar 7, 2024
@pgrete
Copy link
Contributor

pgrete commented Mar 7, 2024

Not sure why this fails. Following https://github.com/vector-of-bool/CMakeCM/blob/master/modules/FindFilesystem.cmake maybe adding a -lstdc++fs parameter, i.e., -DCMAKE_CXX_FLAGS=-lstdc++fs might help.
Alternatively, it may be worth to try the new Intel stack, i.e., icpx as compiler.

@wolfram-schmidt
Copy link
Author

Seems that there is no stdc++fs library:

/sw/tools/oneapi/2022.2/mpi/2021.6.0/bin/mpiicpc  -qopenmp-simd -lstdc++fs  CMakeFiles/cmTC_7e8e2.dir/testCXXCompiler.cxx.o -o cmTC_7e8e2 
    ld: cannot find -lstdc++fs
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Something to request from the software admins?

Also tried icp and icpx, but that doesn't change anything.

@forrestglines
Copy link
Contributor

forrestglines commented Mar 8, 2024

Probably something to ask from the admins?

You could try looking for that library in the directory where you find your intel compiler.

find /usr/lib/ -name "*c++fs*"

Some ancient documentation suggests that library used to be called just c++fs for llvm8.0 (see https://releases.llvm.org/8.0.0/projects/libcxx/docs/UsingLibcxx.html), so you could see if linking to that works

ld -lc++fs

@wolfram-schmidt
Copy link
Author

Turned out that stdc++fs is only available in a separate module (gcc on top of intel, which seems counter-intuitive). So the issue is solved.

@pgrete
Copy link
Contributor

pgrete commented Mar 12, 2024

Great. I'm happy to hear this is resolved.

@pgrete pgrete closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants