Running cryosparc with GCC>8

Hello,

I’ll preface this by noting that this may be an NVIDIA issue and not a cryosparc issue. That said, I’m looking for any possible solution.

I’m trying to run a Patch Motion on a newly installed cryosparc instance on a freshly installed Linux Mint 20 (Ulyana). CUDA version is 10.2 and I run into the following error

>     [CPU: 883.3 MB]  Traceback (most recent call last):
>   File "cryosparc2_compute/jobs/runcommon.py", line 1685, in run_with_except_hook
>     run_old(*args, **kw)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/threading.py", line 754, in run
>     self.__target(*self.__args, **self.__kwargs)
>   File "cryosparc2_compute/jobs/pipeline.py", line 165, in thread_work
>     work = processor.process(item)
>   File "cryosparc2_worker/cryosparc2_compute/jobs/motioncorrection/run_patch.py", line 157, in cryosparc2_compute.jobs.motioncorrection.run_patch.run_patch_motion_correction_multi.motionworker.process
>   File "cryosparc2_worker/cryosparc2_compute/jobs/motioncorrection/run_patch.py", line 160, in cryosparc2_compute.jobs.motioncorrection.run_patch.run_patch_motion_correction_multi.motionworker.process
>   File "cryosparc2_worker/cryosparc2_compute/jobs/motioncorrection/run_patch.py", line 161, in cryosparc2_compute.jobs.motioncorrection.run_patch.run_patch_motion_correction_multi.motionworker.process
>   File "cryosparc2_worker/cryosparc2_compute/jobs/motioncorrection/patchmotion.py", line 77, in cryosparc2_compute.jobs.motioncorrection.patchmotion.unbend_motion_correction
>   File "cryosparc2_worker/cryosparc2_compute/jobs/motioncorrection/patchmotion.py", line 103, in cryosparc2_compute.jobs.motioncorrection.patchmotion.unbend_motion_correction
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/gpuarray.py", line 549, in fill
>     func = elementwise.get_fill_kernel(self.dtype)
>   File "<decorator-gen-124>", line 2, in get_fill_kernel
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/tools.py", line 432, in context_dependent_memoize
>     result = func(*args)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/elementwise.py", line 496, in get_fill_kernel
>     "fill")
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/elementwise.py", line 161, in get_elwise_kernel
>     arguments, operation, name, keep, options, **kwargs)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/elementwise.py", line 147, in get_elwise_kernel_and_types
>     keep, options, **kwargs)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/elementwise.py", line 75, in get_elwise_module
>     options=options, keep=keep)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/compiler.py", line 291, in __init__
>     arch, code, cache_dir, include_dirs)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/compiler.py", line 254, in compile
>     return compile_plain(source, options, keep, nvcc, cache_dir, target)
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/compiler.py", line 78, in compile_plain
>     checksum.update(preprocess_source(source, options, nvcc).encode("utf-8"))
>   File "/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/compiler.py", line 55, in preprocess_source
>     cmdline, stderr=stderr)
> CompileError: nvcc preprocessing of /tmp/tmpZ5hkbR.cu failed
> [command: nvcc --preprocess -arch sm_75 -I/home/vamsee/software/cryosparc/cryosparc2_worker/deps/anaconda/lib/python2.7/site-packages/pycuda/cuda /tmp/tmpZ5hkbR.cu --compiler-options -P]
> [stderr:
> In file included from /usr/local/cuda-10.2/bin/../targets/x86_64-linux/include/cuda_runtime.h:83,
>                  from <command-line>:
> /usr/local/cuda-10.2/bin/../targets/x86_64-linux/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
>   138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
>       |  ^~~~~
> ]

This error clearly states that the CUDA version doesn’t support GCC versions > 8. The default GCC version in LM20 is 9.3. Anyway, I could force cryosparc/CUDA to look for an older version and run the Patch Motion? or do I need to go all the way back to reinstalling an older LM version?

Thanks,

Vamsee

So after much uninstallating and reinstalling and messing up, I figured out that the cuda driver was not properly installed even though nvidia-smi was showing me the driver version. Not sure how it got corrupted. Re-installing the cuda driver (10.2) and installing gcc-8 and g++-8 fixed the issue. I am able to run cryosparc the way it was supposed to run.

3 Likes