make cuda errors

100 views
Skip to first unread message

Charlie

unread,
Sep 24, 2024, 8:41:21 AM9/24/24
to Vampire Users
Hi all,  I am trying to get make cuda to work. I am using the develop branch at the moment and so far have to issues. When i run with no changes i get the error.

nvcc fatal   : Unsupported gpu architecture 'compute_35'
make: *** [src/cuda/makefile:58: obj/cuda/config.o] Error 1

which i believe i can just remove compute_35  in the cuda makefile.

After doing this I then get the error:

src/cuda/exchange_fields.cu(275): error: identifier "CUSPARSE_CSRMV_ALG1" is undefined
                                      CUSPARSE_CSRMV_ALG1,
                                      ^

src/cuda/exchange_fields.cu(398): error: identifier "CUSPARSE_CSRMV_ALG1" is undefined
                                          CUSPARSE_CSRMV_ALG1,
                                          ^

2 errors detected in the compilation of "src/cuda/exchange_fields.cu".
make: *** [src/cuda/makefile:57: obj/cuda/exchange_fields.o] Error 2


ANy help on how to get the cuda implementation to work would be appreciated,

Charlie

gabo...@gmail.com

unread,
Sep 24, 2024, 10:30:05 AM9/24/24
to Vampire Users
What NVIDIA graphics card and what CUDA version do you have on your computer system?

From the error message, it cannot find CUSPARSE_CSRMV_ALG1 in the cuSPARSE library [1].

It looks like CUSPARSE_CSRMV_ALG1 was removed from CUDA version 12.0 according to [2].


Kind Regards,
Gavin
VAMPIRE user

Charlie

unread,
Sep 24, 2024, 10:44:15 AM9/24/24
to Vampire Users
I have and RTX 3060 and I have CUDA version 12.6 so that sounds like it would be the issues thank you. I was struggling to find much about cuSPARSE so that is very helpful thank you. I will try install an older version if there is not a better work around ? 

Charlie 

gabo...@gmail.com

unread,
Sep 24, 2024, 11:28:51 AM9/24/24
to Vampire Users
According to the CUDA-Enabled GeForce and TITAN Products list at [1], the GeForce RTX 3060 has Compute Capability 8.6.

In the VAMPIRE develop makefile [2], I'm only seeing it support NVIDIA graphics cards right now up to compute_75 for Compute Capability 7.5:

CUDA_ARCH=\
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_50,code=compute_50 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61 \
-gencode arch=compute_70,code=compute_70 \
-gencode arch=compute_75,code=compute_75

You could maybe try adding:

-gencode arch=compute_86,code=compute_86

Yeah, based on [3], it looks like you could try to fall back on CUDA 11.x for the RTX 3060.

Unfortunately, I don't have a NVIDIA graphics cards with Compute Capability 8.6 that could be used to develop a better solution for CUDA 12.x.


Kind Regards,
Gavin
VAMPIRE user

Charlie

unread,
Sep 24, 2024, 1:32:09 PM9/24/24
to Vampire Users
Thanks for your help. I can finally make and run with cuda -  however I have to do|" make cuda" in the cuda branch then switch back to develop. When using "make cuda" in the develop branch I get the error:

src/cuda/statistics.cu(74): error: namespace "vcuda::stats" has no member "material_standard_deviation"

src/cuda/statistics.cu(74): error: namespace "vcuda::stats" has no member "system_magnetization"

src/cuda/statistics.cu(77): error: namespace "vcuda::stats" has no member "system_susceptibility"

src/cuda/statistics.cu(77): error: namespace "vcuda::stats" has no member "system_magnetization"

src/cuda/statistics.cu(78): error: namespace "vcuda::stats" has no member "grain_susceptibility"

src/cuda/statistics.cu(78): error: namespace "vcuda::stats" has no member "grain_magnetization"

src/cuda/statistics.cu(79): error: namespace "vcuda::stats" has no member "material_susceptibility"

src/cuda/statistics.cu(79): error: namespace "vcuda::stats" has no member "material_magnetization"

src/cuda/statistics.cu(108): error: namespace "vcuda::stats" has no member "system_magnetization"

src/cuda/statistics.cu(109): error: namespace "vcuda::stats" has no member "grain_magnetization"

src/cuda/statistics.cu(110): error: namespace "vcuda::stats" has no member "material_magnetization"

src/cuda/statistics.cu(111): error: namespace "vcuda::stats" has no member "material_grain_magnetization"

src/cuda/statistics.cu(112): error: namespace "vcuda::stats" has no member "height_magnetization"

src/cuda/statistics.cu(113): error: namespace "vcuda::stats" has no member "material_height_magnetization"

src/cuda/statistics.cu(114): error: namespace "vcuda::stats" has no member "material_grain_height_magnetization"

src/cuda/statistics.cu(122): error: namespace "vcuda::stats" has no member "material_standard_deviation"
src/cuda/statistics.cu(130): error: namespace "vcuda::stats" has no member "system_susceptibility"

src/cuda/statistics.cu(131): error: namespace "vcuda::stats" has no member "grain_susceptibility"

src/cuda/statistics.cu(132): error: namespace "vcuda::stats" has no member "material_susceptibility".

This feels like maybe not the best way to do things so if you have any thoughts please let me know :)

Charlie 

gabo...@gmail.com

unread,
Sep 25, 2024, 12:11:42 PM9/25/24
to Vampire Users
For the cuda branch, it looks like the last commit for the cuda folder was on Aug 29, 2021.

If you have a look at the Oct 2, 2023 commit of the cuda folder for the develop branch, it looks like it added material_standard_deviation, grain_magnetization, and so on like in your error messages.  For example, one added line in src/cuda/statistics.cu is:

line 109 - if(::stats::calculate_grain_magnetization)           stats::grain_magnetization.reset_magnetization_averages();

Thus, maybe you could try falling back on the previous March 8 2022 commit seen with hash e39e02f.

The post at [1] shows a command for checkout of a commit by hash.

cuda_branch.png
develop_branch.png


Kind Regards,
Gavin
VAMPIRE user

Reply all
Reply to author
Forward
0 new messages