GPU compilation for hybrid vortex/finite volume Method
Hello,
I am working on a hybrid vortex method/finite volume method. I already have a C++ implementation of the vortex method and I have decided to use OpenFOAM for the FVM part. In the vortex method, to solve the N-body problem we use a GPU function. To compile it we first compile the cuda part with nvcc and then we link using g++. The makefile is: Code:
INCLUDE = -I/opt/cuda/include -I. Thank you |
I've only worked with cuda solvers outside of OF but the latest foam-3.0 has a few nvcc compiled linear solvers coupled with it. You might be able to get a few hints on this here:
foam-extend-3.0/src/cudaSolvers/ And the respective Allwmake, Make/options, Make/files Cheers! Kyle |
Hi Kyle,
Thanks for your answer!! As you suggested I looked at the foam-extend-3.0 and decided to use it. The installation went well, however when I run the Allwmake.firstInstall I get: Code:
Cuda compiler detected at /opt/cuda/bin/nvcc; extend-3.0 cuda installation So I will try to look for a solution there. Thanks again, Pierre |
Hi Pierre,
Take a look at this file: /foam-extend-3.0/wmake/rules/linux64Gcc/nvcc There you can see how $CUDA_ARCH is actually added to the compiler flags. Maybe you know enough about nvcc compilers such that you know what the env variable is supposed to be set as. Cheers! Kyle |
Hi Kyle,
I am sorry for answering so late. In fact I had an issue with my swak4Foam, and, after reinstalling it, Allmake ran without problems. However when after I try to compile the a solver with cuda I got that kind of error : Code:
Found nvcc -- enabling CUDA support. |
All times are GMT -4. The time now is 06:09. |