lisflood-code icon indicating copy to clipboard operation
lisflood-code copied to clipboard

How to compile lisflood-fp 8.1

Open canhongluori opened this issue 3 months ago • 1 comments

When I try to compile lisflood-fp 8.1 on my computer, the CMake reported the following error to me CMake Error at /usr/local/share/cmake-3.24/Modules/CMakeTestCUDACompiler.cmake:102 (message): The CUDA compiler

"/usr/local/cuda-12.0/bin/nvcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /mnt/d/Cpp_project/wsl/LISFLOOD-FP-trunk/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_45572/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_45572.dir/build.make CMakeFiles/cmTC_45572.dir/build
gmake[1]: Entering directory '/mnt/d/Cpp_project/wsl/LISFLOOD-FP-trunk/CMakeFiles/CMakeTmp'
Building CUDA object CMakeFiles/cmTC_45572.dir/main.cu.o
/usr/local/cuda-12.0/bin/nvcc -forward-unknown-to-host-compiler   -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_37,code=compute_37  -MD -MT CMakeFiles/cmTC_45572.dir/main.cu.o -MF CMakeFiles/cmTC_45572.dir/main.cu.o.d -x cu -c /mnt/d/Cpp_project/wsl/LISFLOOD-FP-trunk/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_45572.dir/main.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_37'
gmake[1]: *** [CMakeFiles/cmTC_45572.dir/build.make:79: CMakeFiles/cmTC_45572.dir/main.cu.o] Error 1
gmake[1]: Leaving directory '/mnt/d/Cpp_project/wsl/LISFLOOD-FP-trunk/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_45572/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:68 (enable_language)

My cmake version is 3.24.3, and my cuda version is cuda_12.0.r12.0, My system is Ubuntu-2204

canhongluori avatar Mar 22 '24 00:03 canhongluori

Dear @canhongluori, this is the repository of OS LISFLOOD hydrological model. Your question is related to a different model: LISFLOOD-FP (floodplain) hydrodynamic model. For this reason, we are not able to help. Kind regards, Stefania

StefaniaGrimaldi avatar Mar 22 '24 05:03 StefaniaGrimaldi