Closed bergolho closed 3 years ago
Hi Lucas. This is a problem with both your cuda version and your GPU. Older GPUs doesn't support double precision calculations and I changed de code to compile both the CPU and GPU versions of the models with the same precision and Bondarenko fails with single precision. Please send me your Cuda version so I can change the code to allow different precisions with old versions.
My current CUDA version is this one:
berg@localhost:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
@bergolho, Could you please try this new version.
@rsachetto I was able to build all the models, but now compilation stops with an error in the 'ten_tusscher':
[INFO] COMPILING OBJECT /home/berg/Github/MonoAlg3D_C/build_release/libten_tusscher_2006/objs/ten_tusscher_2006_RS_CPU.c.o
/usr/local/cuda/bin/gcc -DCELL_MODEL_REAL_DOUBLE -O3 -fopenmp -std=gnu99 -fno-strict-aliasing -Wall -Wno-stringop-truncation -Wno-unused-function -Wno-char-subscripts -Wno-unused-result -Wno-switch -Werror=implicit-function-declaration -DCOMPILE_CUDA -I/usr/local/cuda/include -DCOMPILE_GUI -fPIC -c /home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_CPU.c -o /home/berg/Github/MonoAlg3D_C/build_release/libten_tusscher_2006/objs/ten_tusscher_2006_RS_CPU.c.o
[INFO] COMPILING OBJECT /home/berg/Github/MonoAlg3D_C/build_release/libten_tusscher_2006/objs/ten_tusscher_2006_RS_GPU.cu.o
/opt/cuda/bin/nvcc /home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_GPU.cu -c -o /home/berg/Github/MonoAlg3D_C/build_release/libten_tusscher_2006/objs/ten_tusscher_2006_RS_GPU.cu.o -ccbin /usr/local/cuda/bin/gcc -m64 -Xcompiler \"-DCELL_MODEL_REAL_DOUBLE\",\"-O3\",\"-fopenmp\",\"-fno-strict-aliasing\",\"-Wall\",\"-Wno-stringop-truncation\",\"-Wno-unused-function\",\"-Wno-char-subscripts\",\"-Wno-unused-result\",\"-Wno-switch\",\"-DCOMPILE_CUDA\",\"-I/usr/local/cuda/include\",\"-DCOMPILE_GUI\",\"-fPIC\", -DNVCC -I/usr/local/cuda/include
/home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_GPU.cu(237): error: calling a __host__ function("std::pow<double, float> ") from a __device__ function("RHS_gpu") is not allowed
/home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_GPU.cu(237): error: identifier "std::pow<double, float> " is undefined in device code
/home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_GPU.cu(240): error: calling a __host__ function("std::pow<double, float> ") from a __device__ function("RHS_gpu") is not allowed
/home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_GPU.cu(240): error: identifier "std::pow<double, float> " is undefined in device code
/home/berg/Github/MonoAlg3D_C/src/models_library/ten_tusscher/ten_tusscher_2006_RS_GPU.cu(250): error: calling a __host__ function("std::pow<double, float> ") from a __device__ function("RHS_gpu") is not allowed
Some old models were not using the macros to configure the precision. Try with the last commit, please.
@rsachetto All models are compiled sucessfully and the 'purkinje_with_fibrosis.ini' example runs without errors.
Hello Sachetto,
When I tried to update my repository to the latest version with the GPU double precision I was not able to compile the Bondarenko model. I started to receive the following error:
In order to solve this issue, I checked the 'build.sh' file and commented the CFLAGS for the double precision. After this change, I was able to build everything. Although, when I tried to run the "purkinje_with_fibrosis.ini" example I received several warnings with the message:
Then after some iterations the solver returned NaN for the Purkinje solution.
I don't know if this is an error in my version of CUDA or if I need to include something new to the Purkinje cellular models, because I see that are some changes in the structure of the cellular models from now on. Can you help me with this problem ?