Cuda_runtime.h: No such file or directory

I’ve installed CryoSPARC 3.3.2 on RHEL 8.5 (really Springdale 8.5, but that’s derived from RHEL 8.5). I’m using cudatoolkit 11.1. When I run the Patch Motion Correction (multi) in the tutorial, I get this:

pycuda.driver.CompileError: nvcc preprocessing of /tmp/ failed
[command: nvcc --preprocess -arch sm_80 -I/projects/MOLBIO/local/cryosparc-della-test-2/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/pycuda/cuda /tmp/ --compiler-options -P]
b'cc1plus: fatal error: cuda_runtime.h: No such file or directory\ncompilation terminated.\n']

I tried adding several things to, one at a time, which did not help.

export CPLUS_INCLUDE_PATH="/usr/local/cuda-11.1/include"

export CPATH="/usr/local/cuda-11.1/include"

module load gcc-toolset/10

Finally I copied the contents of the cuda include directory to the location that nvcc is looking:

cp -r /usr/local/cuda-11.1/include/*  /projects/MOLBIO/local/cryosparc-della-test-2/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/pycuda/cuda

and that works, although it doesn’t seem like a good solution. How can one pursuade nvcc to look in the right place for the include files?

– Matthew Cahn

What is the output of the following commands, executed on a cryoSPARC worker node:

# salloc -t 00:10:00 -p cryoem --nodelist=della-l09g1
[cryoem@della-l09g1 cryosparc-della-test-2]$ eval $(cryosparc_worker/bin/cryosparcw env)
[cryoem@della-l09g1 cryosparc-della-test-2]$ ${CRYOSPARC_CUDA_PATH}/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Tue_Sep_15_19:10:02_PDT_2020
Cuda compilation tools, release 11.1, V11.1.74
Build cuda_11.1.TC455_06.29069683_0
[cryoem@della-l09g1 cryosparc-della-test-2]$ python -c "import pycuda.driver; print(pycuda.driver.get_version())"
(11, 1, 0)