Open denisbertini opened 12 months ago
I confirm that with
Could you please delete the folder .build
and run pic-build
again and send the full output?
I tried pic-build -b serial
with GCC 13.1.0 and all works fine. For me, it looks like your gcc is using the wrong standard library.
redoing the full build procedure ( using rm .build
as suggested) gives the following output:
n file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/main.cpp:23:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../picongpu/simulation_defines.hpp:42:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../picongpu/_defaultParam.loader:36:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../picongpu/param/random.param:31:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../pmacc/random/methods/methods.hpp:27:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../pmacc/random/methods/XorMin.hpp:30:
/opt/rocm-5.7.1/include/hiprand_kernel.h:22:2: warning: "This file is deprecated. Use the header file from /opt/rocm-5.7.1/include/hiprand/hiprand_kernel.h by using #include <hiprand/hiprand_kernel.h>" [-W#warnings]
#warning "This file is deprecated. Use the header file from /opt/rocm-5.7.1/include/hiprand/hiprand_kernel.h by using #include <hiprand/hiprand_kernel.h>"
^
1 warning generated when compiling for gfx908.
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/main.cpp:23:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../picongpu/simulation_defines.hpp:42:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../picongpu/_defaultParam.loader:36:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../picongpu/param/random.param:31:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../pmacc/random/methods/methods.hpp:27:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu/../pmacc/random/methods/XorMin.hpp:30:
/opt/rocm-5.7.1/include/hiprand_kernel.h:22:2: warning: "This file is deprecated. Use the header file from /opt/rocm-5.7.1/include/hiprand/hiprand_kernel.h by using #include <hiprand/hiprand_kernel.h>" [-W#warnings]
#warning "This file is deprecated. Use the header file from /opt/rocm-5.7.1/include/hiprand/hiprand_kernel.h by using #include <hiprand/hiprand_kernel.h>"
^
1 warning generated when compiling for host.
[100%] Linking CXX executable picongpu
ld.lld: error: undefined symbol: std::filesystem::__cxx11::path::has_root_path() const
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(picongpu::openPMD::ThreadParams::initFromConfig(picongpu::openPMD::Help&, unsigned long, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>))
ld.lld: error: undefined symbol: std::filesystem::status(std::filesystem::__cxx11::path const&)
>>> referenced by toml.cpp
>>> toml.cpp.o:(std::vector<picongpu::toml::Periodicity, std::allocator<picongpu::toml::Periodicity>> (anonymous namespace)::waitForAndParseTomlFile<std::chrono::duration<long, std::ratio<1l, 1l>>>(picongpu::toml::DataSources&, std::vector<picongpu::toml::TomlParameter, std::allocator<picongpu::toml::TomlParameter>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::chrono::duration<long, std::ratio<1l, 1l>> const&, std::chrono::duration<long, std::ratio<1l, 1l>> const&, ompi_communicator_t*)) in archive libpicongpu-hostonly.a
>>> referenced by SimulationHelper.cpp
>>> SimulationHelper.cpp.o:(pmacc::SimulationHelper<2u>::readCheckpointMasterFile()) in archive libpmacc.a
>>> referenced by SimulationHelper.cpp
>>> SimulationHelper.cpp.o:(pmacc::SimulationHelper<3u>::readCheckpointMasterFile()) in archive libpmacc.a
>>> referenced 6 more times
ld.lld: error: undefined symbol: std::filesystem::create_directories(std::filesystem::__cxx11::path const&)
>>> referenced by Filesystem.cpp
>>> Filesystem.cpp.o:(pmacc::Filesystem<2u>::createDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const) in archive libpmacc.a
>>> referenced by Filesystem.cpp
>>> Filesystem.cpp.o:(pmacc::Filesystem<3u>::createDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const) in archive libpmacc.a
ld.lld: error: undefined symbol: std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options)
>>> referenced by Filesystem.cpp
>>> Filesystem.cpp.o:(pmacc::Filesystem<2u>::setDirectoryPermissions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const) in archive libpmacc.a
>>> referenced by Filesystem.cpp
>>> Filesystem.cpp.o:(pmacc::Filesystem<3u>::setDirectoryPermissions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const) in archive libpmacc.a
ld.lld: error: undefined symbol: std::filesystem::__cxx11::path::_M_split_cmpts()
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::filesystem::__cxx11::path::format))
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(picongpu::EnergyFields::checkpoint(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(picongpu::EnergyFields::restart(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced 10 more times
ld.lld: error: undefined symbol: std::filesystem::copy_file(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&, std::filesystem::copy_options)
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(picongpu::EnergyFields::checkpoint(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(picongpu::EnergyFields::restart(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by main.cpp
>>> CMakeFiles/picongpu.dir/main.cpp.o:(picongpu::ChargeConservation::checkpoint(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced 9 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/picongpu.dir/build.make:132: picongpu] Error 1
make[1]: *** [CMakeFiles/Makefile2:288: CMakeFiles/picongpu.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
ERROR: Could not successfully run make install in build directory:
.build
the compiler used is the one from Rocky Linux 8.9 gcctoolset
i.e
dbertini@lxbk1131 /lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa]$ g++ --version
g++ (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
trying with serial option
does not help either:
[dbertini@lxbk1131 /lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa]$ pic-build -b serial -c '-DBOOST_ROOT=/usr -DMPI_CXX_WORKS=ON -DMPI_CXX_VERSION=0'
build directory: .build
cmake command: cmake -DCMAKE_INSTALL_PREFIX=/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa -DPIC_EXTENSION_PATH=/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa -DBOOST_ROOT=/usr -DMPI_CXX_WORKS=ON -DMPI_CXX_VERSION=0 -Dalpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE=ON -DCUPLA_STREAM_ASYNC_ENABLE=OFF /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu
-- The C compiler identification is Clang 17.0.0
-- The CXX compiler identification is Clang 17.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rocm/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rocm/bin/hipcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
CMake Warning (dev) at /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/thirdParty/cupla/alpaka/cmake/alpakaCommon.cmake:208 (find_package):
Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT
variables. Run "cmake --help-policy CMP0144" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
CMake variable BOOST_ROOT is set to:
/usr
For compatibility, find_package is ignoring the variable, but code in a
.cmake module might still use it.
Call Stack (most recent call first):
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/thirdParty/cupla/alpaka/CMakeLists.txt:94 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Boost: /usr/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.74.0") found components: atomic
-- boost::atomic_ref<T> found
-- C++20 math constants not found. Falling back to non-standard constants.
-- alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLED
List of compiler flags added by alpaka
host compiler:
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:-Og>;$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CUDA>>:-Xcompiler;-Og>;$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang,AppleClang,IntelLLVM>>:-O0>;$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:MSVC>>:/Od>
device compiler:
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:-Og>;$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CUDA>>:-Xcompiler;-Og>;$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang,AppleClang,IntelLLVM>>:-O0>;$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:MSVC>>:/Od>
-- Looking for std::filesystem::path::preferred_separator
-- Looking for std::filesystem::path::preferred_separator - found
-- Found MPI_C: /usr/local/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /opt/rocm/bin/hipcc (found version "0")
-- Found MPI: TRUE (found version "3.1")
CMake Warning (dev) at /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/PMaccConfig.cmake:304 (find_package):
Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT
variables. Run "cmake --help-policy CMP0144" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
CMake variable BOOST_ROOT is set to:
/usr
For compatibility, find_package is ignoring the variable, but code in a
.cmake module might still use it.
Call Stack (most recent call first):
CMakeLists.txt:150 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Boost: /usr/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.74") found components: program_options
-- Boost: deactivate std::auto_ptr
-- Boost: Do not use C++11 smart pointers from standard library
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- 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 Boost: /usr/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.74.0") found components: program_options
-- Disable 'cuda_memtest' build: not supported by clang or non CUDA/HIP alpaka backends
-- Found HDF5: /usr/local/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/libdl.so;/usr/lib64/libm.so (found version "1.14.2")
-- Found ADIOS2: /usr/local/lib64/cmake/adios2/adios2-config.cmake (found version "2.9.2") found components: C CXX MPI
-- Found openPMD: /usr/local/lib64/cmake/openPMD
CMake Deprecation Warning at /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/thirdParty/nlohmann_json/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Using the single-header code from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/thirdParty/nlohmann_json/single_include/
-- Implicit conversions are disabled
CMake Deprecation Warning at /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/thirdParty/toml11/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.34")
-- Found PNGwriter: /usr/lib/cmake/PNGwriter
-- Could NOT find ISAAC - set ISAAC_DIR or check your CMAKE_PREFIX_PATH
Optional Dependencies:
openPMD: ON
PNGwriter: ON
ISAAC: OFF
-- Configuring done (39.0s)
-- Generating done (8.7s)
-- Build files have been written to: /lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa/.build
[ 4%] Building CXX object cupla/CMakeFiles/cupla.dir/src/manager/Driver.cpp.o
[ 4%] Building CXX object cupla/CMakeFiles/cupla.dir/src/common.cpp.o
[ 14%] Building CXX object cupla/CMakeFiles/cupla.dir/src/device.cpp.o
[ 26%] Building CXX object CMakeFiles/picongpu-hostonly.dir/ArgsParser.cpp.o
[ 26%] Building CXX object cupla/CMakeFiles/cupla.dir/src/stream.cpp.o
[ 26%] Building CXX object CMakeFiles/picongpu-hostonly.dir/initialization/ParserGridDistribution.cpp.o
[ 39%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/misc/splitString.cpp.o
[ 39%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/openPMD/Json.cpp.o
[ 39%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/misc/removeSpaces.cpp.o
[ 41%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/openPMD/toml.cpp.o
[ 41%] Building CXX object cupla/CMakeFiles/cupla.dir/src/memory.cpp.o
[ 41%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/openPMD/openPMDWriter.cpp.o
[ 41%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/common/MPIHelpers.cpp.o
[ 41%] Building CXX object CMakeFiles/picongpu-hostonly.dir/random/seed/Seed.cpp.o
[ 41%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/misc/ComponentNames.cpp.o
[ 41%] Building CXX object cupla/CMakeFiles/cupla.dir/src/event.cpp.o
[ 41%] Building CXX object CMakeFiles/picongpu-hostonly.dir/plugins/common/stringHelpers.cpp.o
[ 43%] Linking CXX static library libcupla.a
[ 43%] Built target cupla
[ 48%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/communication/CommunicatorMPI.cpp.o
[ 48%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/dataManagement/DataConnector.cpp.o
[ 65%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/CudaEvent.cpp.o
[ 73%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/tasks/StreamTask.cpp.o
[ 73%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/EventTask.cpp.o
[ 73%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/streams/EventStream.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/misc/splitString.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/transactions/Transaction.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/simulationControl/signal.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/simulationControl/SimulationHelper.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/CudaEventHandle.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/Manager.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/eventSystem.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/transactions/TransactionManager.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/tasks/TaskKernel.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/pluginSystem/PluginConnector.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/mappings/simulation/Filesystem.cpp.o
[ 87%] Building CXX object CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/EventNotify.cpp.o
In file included from In file included from In file included from In file included from In file included from In file included from In file included from In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/EventNotify.cppIn file included from In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/EventTask.cpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/tasks/TaskKernel.cpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/transactions/Transaction.cppIn file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/CudaEvent.cpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/mappings/simulation/Filesystem.cpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/tasks/StreamTask.cpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/Manager.cpp:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/streams/EventStream.cpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/simulationControl/SimulationHelper.cpp:In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/eventSystem.cppIn file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/communication/CommunicatorMPI.cpp::::23In file included from :
::/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/dataManagement/DataConnector.cpp::2322222223:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/transactions/TransactionManager.cpp:In file included from 2322:2323:
:
:
:
:
26:23/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventNotify.hpp:
:
23:
:
In file included from In file included from In file included from In file included from In file included from :
23:
:In file included from In file included from :
In file included from In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/tasks/StreamTask.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/Transaction.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/Manager.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/simulationControl/SimulationHelper.hppIn file included from :
In file included from 25/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/Manager.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/streams/EventStream.hppIn file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/communication/CommunicatorMPI.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEvent.hpp:::::/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/mappings/simulation/Filesystem.hppIn file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/tasks/TaskKernel.hpp:
::In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/dataManagement/DataConnector.hpp::2425242526:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/TransactionManager.hpp:In file included from 2524/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/CudaEventHandle.cpp:2525:
:
:
:
:
24:26/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/IEvent.hpp:
:
:24:
:
In file included from In file included from In file included from In file included from :
24:
:In file included from In file included from 22:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEventHandle.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/Environment.def/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/simulationControl/TimeInterval.hppIn file included from :
In file included from 25/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/Environment.def/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEventHandle.hpp:
In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/communication/ICommunicator.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:::::/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/Environment.defIn file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/streams/EventStream.hpp:
::In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/Environment.def::2624402424:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp:2426/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEventHandle.hpp:2440:
:
::
:
24:24/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:
:
:24:
:In file included from 14In file included from :
24:
:In file included from 26In file included from :
14In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEvent.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/TransactionManager.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hppIn file included from :
In file included from 40/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/TransactionManager.hpp:
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEvent.hppIn file included from :/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/dimensions/DataSpace.hpp:: ::/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/TransactionManager.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEventHandle.hpp::In file included from :/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/TransactionManager.hpp :25402440:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:1424/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEvent.hpp25:25:
::
:24:26::
::
24:
14fatal error: In file included from 14:
40:
In file included from 25:
fatal error: In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp:In file included from In file included from :In file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp:
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hppIn file included from /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/math/Vector.hpp: : /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/pluginSystem/PluginConnector.cpp14/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/CudaEvent.hpp::/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp:40'mallocMC/mallocMC.hpp' file not found24::::fatal error: 24/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp40:'mallocMC/mallocMC.hpp' file not found24::
2423 25:
::24:
14fatal error:
fatal error: :
:
:
4014:
In file included from :/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp# include <mallocMC/mallocMC.hpp>In file included from 'mallocMC/mallocMC.hpp' file not found/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp::/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/math/ConstVector.hpp# include <mallocMC/mallocMC.hpp> :
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/pluginSystem/PluginConnector.hppfatal error: /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:14 /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp:
'mallocMC/mallocMC.hpp' file not found40'mallocMC/mallocMC.hpp' file not found:::14:
40::24 ^~~~~~~~~~~~~~~~~~~~~~~4025:40fatal error: : # include <mallocMC/mallocMC.hpp>40:
^~~~~~~~~~~~~~~~~~~~~~~
:# include <mallocMC/mallocMC.hpp>:
'mallocMC/mallocMC.hpp' file not found :14fatal error:
:In file included from
# include <mallocMC/mallocMC.hpp>14
In file included from 14:14/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/math/vector/Vector.hpp
:/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/Environment.def
:'mallocMC/mallocMC.hpp' file not found fatal error: ^~~~~~~~~~~~~~~~~~~~~~~:: ^~~~~~~~~~~~~~~~~~~~~~~:fatal error: # include <mallocMC/mallocMC.hpp>'mallocMC/mallocMC.hpp' file not found
25 ^~~~~~~~~~~~~~~~~~~~~~~
24
:
:
fatal error: # include <mallocMC/mallocMC.hpp>'mallocMC/mallocMC.hpp' file not found
In file included from fatal error: In file included from 'mallocMC/mallocMC.hpp' file not foundfatal error: ^~~~~~~~~~~~~~~~~~~~~~~
fatal error: /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/algorithms/math.hpp# include <mallocMC/mallocMC.hpp>/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/transactions/TransactionManager.hpp
:
:
'mallocMC/mallocMC.hpp' file not found ^~~~~~~~~~~~~~~~~~~~~~~24# include <mallocMC/mallocMC.hpp>'mallocMC/mallocMC.hpp' file not found24'mallocMC/mallocMC.hpp' file not found# include <mallocMC/mallocMC.hpp>
'mallocMC/mallocMC.hpp' file not found:
^~~~~~~~~~~~~~~~~~~~~~~:
In file included from
In file included from
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/algorithms/math/PowerFunction.hpp# include <mallocMC/mallocMC.hpp> ^~~~~~~~~~~~~~~~~~~~~~~/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/eventSystem/events/EventTask.hpp ^~~~~~~~~~~~~~~~~~~~~~~# include <mallocMC/mallocMC.hpp># include <mallocMC/mallocMC.hpp>:
# include <mallocMC/mallocMC.hpp>:
25
24:
^~~~~~~~~~~~~~~~~~~~~~~:
^~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
^~~~~~~~~~~~~~~~~~~~~~~
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp
/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/../pmacc/types.hpp::4040::1414: : fatal error: fatal error: 'mallocMC/mallocMC.hpp' file not found'mallocMC/mallocMC.hpp' file not found
# include <mallocMC/mallocMC.hpp>
^~~~~~~~~~~~~~~~~~~~~~~
# include <mallocMC/mallocMC.hpp>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
make[2]: *** [CMakeFiles/pmacc.dir/build.make:146: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/CudaEventHandle.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/pmacc.dir/build.make:244: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/transactions/TransactionManager.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:118: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/eventSystem.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:90: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/dataManagement/DataConnector.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:188: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/streams/EventStream.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:104: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/Manager.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:160: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/EventNotify.cpp.o] Error 1
1 error generated when compiling for gfx906.
make[2]: *** [CMakeFiles/pmacc.dir/build.make:76: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/communication/CommunicatorMPI.cpp.o] Error 1
1 error generated when compiling for gfx906.
make[2]: *** [CMakeFiles/pmacc.dir/build.make:286: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/pluginSystem/PluginConnector.cpp.o] Error 1
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
1 error generated when compiling for gfx906.
make[2]: *** [CMakeFiles/pmacc.dir/build.make:174: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/EventTask.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:216: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/tasks/TaskKernel.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:202: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/tasks/StreamTask.cpp.o] Error 1
1 error generated when compiling for gfx906.
make[2]: *** [CMakeFiles/pmacc.dir/build.make:132: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/events/CudaEvent.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:230: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/eventSystem/transactions/Transaction.cpp.o] Error 1
make[2]: *** [CMakeFiles/pmacc.dir/build.make:258: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/mappings/simulation/Filesystem.cpp.o] Error 1
1 error generated when compiling for gfx906.
make[2]: *** [CMakeFiles/pmacc.dir/build.make:300: CMakeFiles/pmacc.dir/lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/pmacc/simulationControl/SimulationHelper.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/pmacc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 90%] Linking CXX static library libpicongpu-hostonly.a
[ 90%] Built target picongpu-hostonly
make: *** [Makefile:136: all] Error 2
ERROR: Could not successfully run make install in build directory:
.build
I am confused. I thought you like to build for CPu because you talked about g++ problems. I see that you build with hipcc
as C++ compiler. IN that case you should build for AMD HIP with pic-build -b hip:gfx906
We never tested using hipcc for a CPU only.
@denisbertini Do you like to build for AMD devices or CPU?
No no this was just a tst with the serial option, i want to use HIP and to run on AMD GPU
In case you use -b serial
you should use g++
or clang
as C++ compiler.
There is a high possibility that your OS is shipped with a very old C++ compiler and the standard library does not support C++17 therefore std::filesystem
is missing.
YOu could try with HIP if changing the stdlib helps
pic-build -c "-DCMAKE_CXX_FLAGS=-stdlib=libc++" -b hip
Strange this is not even configuring properly now:
[dbertini@lxbk1131 /lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa]$ pic-build -b hip:gfx908 -c '-DBOOST_ROOT=/usr -DMPI_CXX_WORKS=ON -DMPI_CXX_VERSION=0 -DCMAKE_CXX_FLAGS=-stdlib=libc++'
build directory: .build
cmake command: cmake -DCMAKE_INSTALL_PREFIX=/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa -DPIC_EXTENSION_PATH=/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa -DBOOST_ROOT=/usr -DMPI_CXX_WORKS=ON -DMPI_CXX_VERSION=0 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -Dalpaka_ACC_GPU_HIP_ENABLE=ON -Dalpaka_ACC_GPU_HIP_ONLY_MODE=ON -DGPU_TARGETS="gfx908" /lustre/rz/dbertini/gpu/picongpu_v0.7.0/picongpu/include/picongpu
-- The C compiler identification is Clang 17.0.0
-- The CXX compiler identification is Clang 17.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rocm/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/rocm/bin/hipcc
-- Check for working CXX compiler: /opt/rocm/bin/hipcc - broken
CMake Error at /usr/local/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/opt/rocm/bin/hipcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa/.build/CMakeFiles/CMakeScratch/TryCompile-6kUtrr'
Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_a691f/fast
/usr/bin/gmake -f CMakeFiles/cmTC_a691f.dir/build.make CMakeFiles/cmTC_a691f.dir/build
gmake[1]: Entering directory '/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa/.build/CMakeFiles/CMakeScratch/TryCompile-6kUtrr'
Building CXX object CMakeFiles/cmTC_a691f.dir/testCXXCompiler.cxx.o
/opt/rocm/bin/hipcc -stdlib=libc++ -MD -MT CMakeFiles/cmTC_a691f.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_a691f.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_a691f.dir/testCXXCompiler.cxx.o -c /lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa/.build/CMakeFiles/CMakeScratch/TryCompile-6kUtrr/testCXXCompiler.cxx
In file included from <built-in>:1:
In file included from /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/__clang_hip_runtime_wrapper.h:50:
/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/cuda_wrappers/cmath:27:15: fatal error: 'cmath' file not found
#include_next <cmath>
^~~~~~~
1 error generated when compiling for gfx906.
gmake[1]: *** [CMakeFiles/cmTC_a691f.dir/build.make:79: CMakeFiles/cmTC_a691f.dir/testCXXCompiler.cxx.o] Error 1
gmake[1]: Leaving directory '/lustre/rz/dbertini/gpu/picongpu_v0.7.0/sim/lwfa/.build/CMakeFiles/CMakeScratch/TryCompile-6kUtrr'
gmake: *** [Makefile:127: cmTC_a691f/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:33 (project)
-- Configuring incomplete, errors occurred!
Something looks wrong with your HIP installation.
/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/cuda_wrappers/cmath:27:15: fatal error: 'cmath' f...
Could you try to compile a HIP hello world and include cmath
in the file.
Container setup:
[dbertini@lxbk1131 ~]$ hipcc --version
HIP version: 5.7.31921-1949b1621
AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm-5.7.1/llvm/bin
[dbertini@lxbk1131 ~]$ gcc --version
gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
test.cpp program
#include <cmath>
int main() { return 0; }
It compiles with both hipcc and gcc, for hipcc the verbose dump is :
[dbertini@lxbk1131 ~]$ hipcc -v test.cpp -o test
AMD clang version 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.7.1 23382 f3e174a1d286158c06e4cc8276366b1d4bc0c914)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm-5.7.1/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found HIP installation: /opt/rocm-5.7.1, version 5.7.31921
"/opt/rocm-5.7.1/llvm/bin/clang-17" -cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fno-rounding-math -mconstructor-aliases -aux-target-cpu x86-64 -fcuda-is-device -mllvm -amdgpu-internalize-symbols -fcuda-allow-variadic-functions -fvisibility=hidden -fapply-global-visibility-to-externs -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/hip.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/ocml.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/ockl.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_daz_opt_off.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_unsafe_math_off.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_finite_only_off.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_wavefrontsize64_on.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_isa_version_906.bc -mlink-builtin-bitcode /opt/rocm-5.7.1/amdgcn/bitcode/oclc_abi_version_500.bc -target-cpu gfx906 -debugger-tuning=gdb -v -resource-dir /opt/rocm-5.7.1/llvm/lib/clang/17.0.0 -internal-isystem /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/cuda_wrappers -idirafter /opt/rocm-5.7.1/include -include __clang_hip_runtime_wrapper.h -c-isystem /opt/rocm-5.7.1/llvm/include/gpu-none-llvm -isystem /opt/rocm-5.7.1/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward -internal-isystem /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -fdeprecated-macro -fno-autolink -fdebug-compilation-dir=/u/dbertini -ferror-limit 19 -fhip-new-launch-api -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false -cuid=50113ce6209d3ed -fcuda-allow-variadic-functions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/test-gfx906-ae5bfa.o -x hip test.cpp
clang -cc1 version 17.0.0 based upon LLVM 17.0.0git default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/opt/rocm-5.7.1/llvm/include/gpu-none-llvm"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8"
ignoring duplicate directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux"
ignoring duplicate directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward"
ignoring duplicate directory "/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include"
ignoring duplicate directory "/usr/include"
ignoring duplicate directory "/opt/rocm-5.7.1/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/rocm-5.7.1/include
/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/cuda_wrappers
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward
/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include
/usr/local/include
/usr/include
End of search list.
"/opt/rocm-5.7.1/llvm/bin/lld" -flavor gnu -m elf64_amdgpu --no-undefined -shared -plugin-opt=-amdgpu-internalize-symbols -plugin-opt=mcpu=gfx906 -plugin-opt=O3 --lto-CGO3 -plugin-opt=-amdgpu-early-inline-all=true -plugin-opt=-amdgpu-function-calls=false --whole-archive -o /tmp/test-gfx906-90b736.out /tmp/test-gfx906-ae5bfa.o --no-whole-archive
"/opt/rocm-5.7.1/llvm/bin/clang-offload-bundler" -type=o -bundle-align=4096 -targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx906 -input=/dev/null -input=/tmp/test-gfx906-90b736.out -output=/tmp/test-87becf.hipfb
"/opt/rocm-5.7.1/llvm/bin/clang-17" -cc1 -triple x86_64-unknown-linux-gnu -aux-triple amdgcn-amd-amdhsa -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model static -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/u/dbertini -resource-dir /opt/rocm-5.7.1/llvm/lib/clang/17.0.0 -internal-isystem /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/cuda_wrappers -idirafter /opt/rocm-5.7.1/include -include __clang_hip_runtime_wrapper.h -isystem /opt/rocm-5.7.1/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward -internal-isystem /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -fdeprecated-macro -fdebug-compilation-dir=/u/dbertini -ferror-limit 19 -fhip-new-launch-api -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false -fcuda-include-gpubinary /tmp/test-87becf.hipfb -cuid=50113ce6209d3ed -fcuda-allow-variadic-functions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/test-ae5cf3.o -x hip test.cpp
clang -cc1 version 17.0.0 based upon LLVM 17.0.0git default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8"
ignoring duplicate directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux"
ignoring duplicate directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward"
ignoring duplicate directory "/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include"
ignoring duplicate directory "/opt/rocm-5.7.1/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/rocm-5.7.1/include
/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include/cuda_wrappers
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward
/opt/rocm-5.7.1/llvm/lib/clang/17.0.0/include
/usr/local/include
/usr/include
End of search list.
"/opt/rocm-5.7.1/llvm/bin/ld.lld" --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/lib/linux/clang_rt.crtbegin-x86_64.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib /tmp/test-ae5cf3.o -L/opt/rocm-5.7.1/lib -rpath /opt/rocm-5.7.1/lib -lamdhip64 -lstdc++ -lm /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/lib/linux/libclang_rt.builtins-x86_64.a -lgcc_s -lc /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/lib/linux/libclang_rt.builtins-x86_64.a -lgcc_s /opt/rocm-5.7.1/llvm/lib/clang/17.0.0/lib/linux/clang_rt.crtend-x86_64.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o
Is it also compiling if you add -stdlib=libc++
?
The initial problems of this issues was that you saw problems with std filesystem. Your last post showed
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward
There is a high possibility that the lagecy C++ host stdlib (GNU8) is producing the problems. We require C++17 and std filesystem was in gnu not available before g++10 and in g++9 only under experimental. C++9 should work because we ship a workaround for std filesystem to support experimental versions too.
@denisbertini since you use containers, is it possible to use a ROCm container with a more modern C++ base compiler?
Maybe you can try pic-build -b hip
where export
CXX=hipccwas executed before again. I am not sure if your initial post was using
clang++or
hipcc` as C++ compiler.
@denisbertini what is the status of this issue?
nothing new on that unfortunately
I got linking errors (undefined filesystem symbols ) when trying to link
picongpu
executable usinggcc-13.1
:Any ideas ?