-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
building examples with CUDA on RTX 4070 #280
Comments
There is a configuration option for target GPU architechure: https://github.com/ddemidov/amgcl/blob/master/CMakeLists.txt#L161 It has some outdated arhcs there, try to set it to just the one you need. |
Thanks for the reply. changing the following line enables circumventing the architecture problem, but generates the other errors I've pointed out. I've changed the CUDA_TARGET_ARCH for the architectures supported by the CPU as follows
and again, It enables to circumvent the architecture problem, but the compiling problem shows again, in another module though:
Those errors was generated with Pascal architecture which is the older one that RTX 4070 supports. |
sorry, i've just noticed that you tried with "Auto". I guess I'll need to do some digging, as I don't have a device to test this. |
Thank you. I've also used a recompiled version of GCC as part of a CFD software environment. Hence my interest in AMGCL. I'm updating my environment and Nvidia CUDA toolkit as well to verify if the problem is related to GCC as this is a possibility (avx512fp16intrin.h is a header from GCC not NVCC). For now, I've disabled the CUDA part in CMakeLists to test the CPU part of the library. |
I've managed to solve this problem here. I was using the CUDA from Ubuntu repo and that was the source of the problem regarding the headers. Using the CUDA install from NVIDIA HPC repo solved the problem and I was finally able to compile and run amgcl on CUDA 12.x on RTX 4070. It's necessary to make this change on CMakeLists.txt to ensure a compatible architecture will be used:
I've tested the Poisson problem in the tutorials (https://amgcl.readthedocs.io/en/latest/tutorial/poisson3Db.html) on CUDA/GPU and CPU and found the results interesting. But, the problem is rather small and the CUDA version ends up being slower thanks to the overhead generated by the CPU-GPU communication. I've changed the Stokes tutorial (https://amgcl.readthedocs.io/en/latest/tutorial/Stokes.html) to use the GPU by using the Poisson CUDA code as an example, but, I'm having problems converting the Bin matrices used on Stokes to MatrixMarket used on Poisson. Is there any tool to make this conversion or a tutorial on how to use the Bin matrices/vectors to use with amgcl on CUDA? |
That's great, thanks for letting me know! There is ./examples/mm2bin and ./examples/bin2mm utilities: ./bin2mm --help
Options:
-h [ --help ] Show this help.
-d [ --dense ] Matrix is dense (use it with the RHS file).
-i [ --input ] arg Input binary file.
-o [ --output ] arg Ouput matrix in the MatrixMarket format. Also, if you just want to test a 3D Poisson problem, you could run |
Hi,
I'm trying to compile the lib examples with CUDA 12 over an RTX 4070 GPU, but I'm having this error:
The GPU supported architectures are:
If I change the CMakeLists.txt to choose the architecture from the GPU itself by modifying
to
It will select a supported architecture, and compile the solver_cuda module (with some warnings) but the overall compiling will fail thanks to a series of compilation errors like:
How can I fix this to compile amgcl examples with CUDA 12?
My system settings:
The text was updated successfully, but these errors were encountered: