Please try using CUDA 12.3 (as Dario indicated). Does that resolve the issue? --Radu
From: [email protected] <[email protected]> On Behalf Of MDP Sent: Tuesday, June 18, 2024 10:30 AM To: ProjectChrono <[email protected]> Subject: Re: [chrono] Re: Problem compiling ProjectChrono on Linux with CUDA 12.5 Hi. I tried with the upstream version, with "git submodule init" and "git submodule update" command, and the build process goes on but it stopped with an "ld" error: /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::ChSystemFsi_impl::GetParticleVelocities(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<int, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<int> > const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::ChUtilsDevice::FillVector(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> >&, chrono::fsi::Real4 const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::ChSystemFsi_impl::GetParticleAccelerations(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<int, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<int> > const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real3> > thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::copy<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::tag, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real3> >, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real3> > >(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::execution_policy<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::tag>&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real3> >, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real3> >, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real3> >)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::utils::PrintParticleToFile(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real3, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real3> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<int4, std::allocator<int4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<int4, std::allocator<int4> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<chrono::fsi::SimParams> const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::utils::WriteCsvParticlesToFile(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> >&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real3, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real3> >&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> >&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<int4, std::allocator<int4> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::utils::WriteChPFParticlesToFile(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> >&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<int4, std::allocator<int4> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::utils::PrintFsiInfoToFile(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real3, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real3> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real4, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real4> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real3, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real3> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<chrono::fsi::Real3, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<chrono::fsi::Real3> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<chrono::fsi::Real3, std::allocator<chrono::fsi::Real3> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<chrono::fsi::Real3, std::allocator<chrono::fsi::Real3> > const&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::host_vector<chrono::fsi::Real3, std::allocator<chrono::fsi::Real3> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real4> > thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::copy<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::tag, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real4> >, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real4> > >(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::execution_policy<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::cuda_cub::tag>&, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real4> >, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real4> >, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::detail::normal_iterator<thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_ptr<chrono::fsi::Real4> >)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::ChSystemFsi_impl::GetParticlePositions(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<int, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<int> > const&)' /usr/bin/ld: ../../../lib/libChronoEngine_fsi.so: undefined reference to `chrono::fsi::ChSystemFsi_impl::GetParticleForces(thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_vector<int, thrust::THRUST_200301___CUDA_ARCH_LIST___NS::device_allocator<int> > const&)' collect2: error: ld returned 1 exit status With make debug enabled, this is the command that fails: /usr/bin/c++ -fopenmp -fopenmp -march=native -O3 -DNDEBUG -fopenmp -march=native -DNDEBUG CMakeFiles/demo_ROBOT_Curiosity_SCM.dir/demo_ROBOT_Curiosity_SCM.cpp.o -o ../../../bin/demo_ROBOT_Curiosity_SCM -Wl,-rpath,/home/operator1/chrono-build/lib:/usr/local/cuda/lib64: ../../../lib/libChronoModels_robot.so ../../../lib/libChronoEngine_vehicle_irrlicht.so ../../../lib/libChronoEngine_vehicle.so ../../../lib/libChronoEngine_irrlicht.so /usr/lib/x86_64-linux-gnu/libIrrlicht.so -lXxf86vm -lglut -lX11 -lGL ../../../lib/libChronoEngine_postprocess.so ../../../lib/libChronoEngine_fsi.so ../../../lib/libChronoEngine_opengl.so ../../../lib/libChronoEngine_multicore.so ../../../lib/libChronoEngine.so -lpthread /usr/lib/gcc/x86_64-linux-gnu/11/libgomp.so /usr/lib/x86_64-linux-gnu/libpthread.a /usr/lib/x86_64-linux-gnu/libOpenGL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLEW.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/local/cuda/lib64/libcudart_static.a -ldl /usr/lib/x86_64-linux-gnu/librt.a /usr/local/cuda/lib64/libcudadevrt.a /usr/local/cuda/lib64/libcudart.so /usr/local/cuda/lib64/libcusparse.so /usr/local/cuda/lib64/libcublas.so Looking inside "libChronoEngine_fsi.so" file (with "strings" command) I found those symbols. What is wrong with my steps? Thanks again for your help. MDP Il giorno venerdì 14 giugno 2024 alle 16:59:10 UTC+2 MDP ha scritto: Hi Radu, Thanks for your reply. I need to use version 9.0.0, so I took the tar.gz release from GitHub. Do you know how I can enable the submodule in a release src directory? Thanks in advance, MDP P.S. Sorry for the multiple replies, I was confused about using my email client or the web interface because the one sent with the client didn't show up here. Il giorno venerdì 14 giugno 2024 alle 16:38:25 UTC+2 Radu Serban ha scritto: The ‘chpf’ package is used as a git submodule. You need to initialize and update the git submodules in your clone of the Chrono repository. --Radu From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of MDP Sent: Thursday, June 13, 2024 10:19 AM To: ProjectChrono <[email protected]<mailto:[email protected]>> Subject: [chrono] Re: Problem compiling ProjectChrono on Linux with CUDA 12.5 Hi Dario, Thanks for your help, got it. I tried then with version 12.3.x of CUDA but it seems there's a bug with Ubuntu 22.04 related to the DKMS build of the driver (https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-545/+bug/2065139<https://urldefense.com/v3/__https:/bugs.launchpad.net/ubuntu/*source/nvidia-graphics-drivers-545/*bug/2065139__;Kys!!Mak6IKo!OkKC5QcVUfLkcJBRD5-gKQJZqUDxyX4J-S9o8O9wEAYXWg6ebGvAUX9eS4gt5TFynOAq3H-PVh6-eJU-UmUJ$>) so I finally used version 12.4.0 and the compilation goes on but now it stops with this error: [ 35%] Building NVCC (Device) object src/chrono_fsi/CMakeFiles/ChronoEngine_fsi.dir/utils/ChronoEngine_fsi_generated_ChUtilsPrintSph.cu.o In file included from /home/operator1/chrono-9.0.0/src/chrono_fsi/utils/ChUtilsPrintSph.cu:23: /home/operator1/chrono-9.0.0/src/chrono_fsi/utils/ChUtilsPrintSph.cuh:26:10: fatal error: chrono_thirdparty/chpf/particle_writer.hpp: No such file or directory 26 | #include "chrono_thirdparty/chpf/particle_writer.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMake Error at ChronoEngine_fsi_generated_ChUtilsPrintSph.cu.o.Release.cmake:216 (message): Error generating /home/operator1/chrono-9.0.0-build/src/chrono_fsi/CMakeFiles/ChronoEngine_fsi.dir/utils/./ChronoEngine_fsi_generated_ChUtilsPrintSph.cu.o make[2]: *** [src/chrono_fsi/CMakeFiles/ChronoEngine_fsi.dir/build.make:140: src/chrono_fsi/CMakeFiles/ChronoEngine_fsi.dir/utils/ChronoEngine_fsi_generated_ChUtilsPrintSph.cu.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1582: src/chrono_fsi/CMakeFiles/ChronoEngine_fsi.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 This seems related to Chrono to me, this time. That file is not in the source dir. Any ideas? I used the same configuration options of the previous tries, with a clean directory. Thanks again. Have a nice day. MDP Il giorno mercoledì 12 giugno 2024 alle 14:54:24 UTC+2 [email protected]<mailto:[email protected]> ha scritto: Hi MDP, Chrono is not currently compatible with CUDA 12.5. We recommend sticking with 12.3 until the fix will come! Dario Il giorno mercoledì 12 giugno 2024 alle 12:46:57 UTC+2 MDP ha scritto: Dear all, I'm writing here to ask your help with my installation of ProjectChrono, that fails independently of the version. Here the system: a Dell workstation with two NVIDIA RTX A4000, Ubuntu 22.04 LTS x64 (server) with CUDA 12.5 (installed with .deb method). I want to run ProjectChrono 9.0.0 with lot of modules and, after installing CUDA (please see the attached file "dpkg_CUDA12.5_ProjectChrono9.0.0.txt"), I followed this procedure: # Installing common required packages sudo apt install git cmake make automake g++ gcc mpich libeigen3-dev libirrlicht-dev swig python3-dev occt-misc libocct-data-exchange-dev libocct-draw-dev libocct-foundation-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libgl-dev libglew-dev libglfw3-dev libglm-dev # Compiling Blaze for the MULTICORE module sudo apt install libblas-dev liblapack-dev libboost-all-dev wget https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.8.2.tar.gz<https://urldefense.com/v3/__https:/bitbucket.org/blaze-lib/blaze/downloads/blaze-3.8.2.tar.gz__;!!Mak6IKo!OkKC5QcVUfLkcJBRD5-gKQJZqUDxyX4J-S9o8O9wEAYXWg6ebGvAUX9eS4gt5TFynOAq3H-PVh6-eKnZ1EbF$> tar xvf blaze-3.8.2.tar.gz mkdir blaze-3.8.2-build && cd blaze-3.8.2-build cmake ../blaze-3.8.2 -DCMAKE_INSTALL_PREFIX=/usr/local/blaze-3.8.2 make && sudo make install # Compiling DEM-Engine git clone https://github.com/projectchrono/DEM-Engine.git<https://urldefense.com/v3/__https:/github.com/projectchrono/DEM-Engine.git__;!!Mak6IKo!OkKC5QcVUfLkcJBRD5-gKQJZqUDxyX4J-S9o8O9wEAYXWg6ebGvAUX9eS4gt5TFynOAq3H-PVh6-eDM4lshY$> git submodule init git submodule update mkdir build && cd build # Append in "/etc/profile" # # export CPATH=/usr/local/cuda/targets/x86_64-linux/include${CPATH:+:${CPATH}} # export PATH=/usr/local/cuda/bin${PATH:+:${PATH}} # export PATH=/usr/local/cuda/lib64/cmake${PATH:+:${PATH}} # export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} # export CUDA_HOME=/usr/local/cuda cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/DEM-Engine \ .. make && sudo make install # ProjectChrono itself wget https://github.com/projectchrono/chrono/archive/refs/tags/9.0.0.tar.gz<https://urldefense.com/v3/__https:/github.com/projectchrono/chrono/archive/refs/tags/9.0.0.tar.gz__;!!Mak6IKo!OkKC5QcVUfLkcJBRD5-gKQJZqUDxyX4J-S9o8O9wEAYXWg6ebGvAUX9eS4gt5TFynOAq3H-PVh6-eHJNpTKS$> tar xvf 9.0.0.tar.gz mkdir chrono-9.0.0-build && cd chrono-9.0.0-build cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/chrono-9.0.0 \ -DENABLE_MODULE_FSI=1 \ -DENABLE_MODULE_IRRLICHT=1 \ -DENABLE_MODULE_MATLAB=1 \ -DMATLAB_SDK_ROOT=/usr/local/MATLAB/R2023b/extern \ -DENABLE_MODULE_CASCADE=1 \ -DENABLE_MODULE_OPENGL=1 \ -DENABLE_MODULE_POSTPROCESS=1 \ -DENABLE_MODULE_PYTHON=1 \ -DPYTHON_INCLUDE_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))") \ -DPYTHON_LIBRARY=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ -DENABLE_MODULE_VEHICLE=1 \ -DENABLE_MODULE_MULTICORE=1 \ -DBLAZE_INSTALL_DIR=/usr/local/blaze-3.8.2/include/ \ ../chrono-9.0.0 Attached you can find the output of the last "cmake" command, in file "cmake_command_output.txt", and also "CPackConfig.cmake", "Makefile" and "CMakeCache.txt". I get an error with some include of CUDA .cuh files, as you can see in file "make_command_output.txt". Same error with versions 8.0.0 and upstream (just a git clone), and I cannot understand if I miss some cmake/make options or if is related to some CUDA missing package. Many thanks in advance for your help! Have a nice day. MDP -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/abf7b55d-4e3f-4f39-bff1-2e409aa90f65n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/abf7b55d-4e3f-4f39-bff1-2e409aa90f65n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!OkKC5QcVUfLkcJBRD5-gKQJZqUDxyX4J-S9o8O9wEAYXWg6ebGvAUX9eS4gt5TFynOAq3H-PVh6-eGN9wO22$>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/4e23eafa-21b7-44f7-bcfb-537c853d85acn%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/4e23eafa-21b7-44f7-bcfb-537c853d85acn*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!PjdP2qx8yEB3ji42nasg4Ps3sq-72AKPtw33YULoAMzA82-EJbnUUcASO94ZJI3cNvCHYqEniuUP1gTy1MJs$>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/CH3PPF46CDC2185FBE4DC8F53F3575C311DA7CE2%40CH3PPF46CDC2185.namprd06.prod.outlook.com.
