Problem with compile root6.26.00 with cuda

Dear experts,
I met a problem when I compile root with -Dcuda=on.
My platform is centos7
gcc version is 8.3
cuda version is 11.0

The problem is shown below:

[100%] Building CUDA object roofit/batchcompute/CMakeFiles/RooBatchCompute_CUDA.dir/src/RooBatchCompute.cu.o
/home/shenzh/workdir/software/root_new/root/roofit/batchcompute/src/RooBatchCompute.cu(146): error: too few arguments in function call

1 error detected in the compilation of "/home/shenzh/workdir/software/root_new/root/roofit/batchcompute/src/RooBatchCompute.cu".
make[2]: *** [roofit/batchcompute/CMakeFiles/RooBatchCompute_CUDA.dir/build.make:83: roofit/batchcompute/CMakeFiles/RooBatchCompute_CUDA.dir/src/RooBatchCompute.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:36801: roofit/batchcompute/CMakeFiles/RooBatchCompute_CUDA.dir/all] Error 2
make: *** [Makefile:172: all] Error 2

Could anyone give me some suggestions?
Thanks in advance.

Zhihong Shen

Hi,
The error is very strange, try maybe to change the line 146 in roofit/batchcompute/src/RooBatchCompute.cu

ERRCHECK(::cudaStreamWaitEvent(*stream, *event));

with

ERRCHECK(::cudaStreamWaitEvent(*stream, *event, 0));

It could be the default argument of the function is not defined in that CUDA version.
For me I am using CUDA 11.5 and it is fine

Lorenzo

Hi @Zhihong_Shen and @moneta,

yes I have checked that it’s an API incompatibility, I have opened a PR to fix this:

Please, @Zhihong_Shen, when you try to compile ROOT with this change, can you please let us know if you encounter further errors? Maybe we need to make further changes also upstream.

Which CUDA version are you using by the way?

Cheers,
Jonas

@jonas @moneta
It works.
Thanks.
My cuda version is 11.0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.