|
[Sponsors] |
[foam-extend.org] OF-extend 4.0: compiling with CUDA |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 15, 2018, 08:08 |
OF-extend 4.0: compiling with CUDA
|
#1 | |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 |
Hi,
I am trying to link my already installed version of OF-extend 4.0 with the CUDA solvers. I have followed the installation guide of CUDA correctly, and it is working just fine for the examples (i.e. deviceQuery, etc) provided in the build. Therefore, it must have something to do with the way OF-extend and CUDA are linked. I have followed the advice from a forum post of a similar, but slightly different issue: HTML Code:
https://www.cfd-online.com/Forums/openfoam-installation/128834-extend-3-0-cuda-installation.html Quote:
Code:
#!/bin/bash cd ${0%/*} || exit 1 # run from this directory if [ -f $CUDA_BIN_DIR/nvcc ] then if [ -z $CUDA_IGNORE ] then echo "Found nvcc -- enabling CUDA support." wmake libso else echo "Found nvcc but \$CUDA_IGNORE set -- not enabling CUDA support." fi else echo "No nvcc - CUDA not available." fi Code:
export CUDA_DIR=/usr/local/cuda-9.1 export CUDA_BIN_DIR=$CUDA_DIR/bin Code:
which nvcc Code:
/usr/local/cuda-9.1/bin/nvcc Code:
cudaSolver/cudaTypes.H:57:29: fatal error: cusp/coo_matrix.h: No such file or directory compilation terminated. In file included from cudaCG/cudaCG.C:26:0: cudaCG/cudaCG.H:43:24: fatal error: cudaSolver.H: No such file or directory compilation terminated. cudaSolver/cudaSolver.dep:268: recipe for target 'Make/linux64GccDPOpt/cudaSolver.o' failed make: *** [Make/linux64GccDPOpt/cudaSolver.o] Error 1 make: *** Waiting for unfinished jobs.... cudaCG/cudaCG.dep:269: recipe for target 'Make/linux64GccDPOpt/cudaCG.o' failed make: *** [Make/linux64GccDPOpt/cudaCG.o] Error 1 In file included from cudaBiCGStab/cudaBiCGStab.C:34:0: cudaBiCGStab/cudaBiCGStab.H:43:24: fatal error: cudaSolver.H: No such file or directory compilation terminated. cudaBiCGStab/cudaBiCGStab.dep:269: recipe for target 'Make/linux64GccDPOpt/cudaBiCGStab.o' failed make: *** [Make/linux64GccDPOpt/cudaBiCGStab.o] Error 1 cudaCG/cgAmg.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaCG/cgAmg.dep:8: recipe for target 'Make/linux64GccDPOpt/cgAmg.o' failed make: *** [Make/linux64GccDPOpt/cgAmg.o] Error 1 cudaCG/cgDiag.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaBiCGStab/bicgDiag.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaCG/cgAinv.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaCG/cgDiag.dep:8: recipe for target 'Make/linux64GccDPOpt/cgDiag.o' failed make: *** [Make/linux64GccDPOpt/cgDiag.o] Error 1 cudaBiCGStab/bicgAinv.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaBiCGStab/bicgDiag.dep:7: recipe for target 'Make/linux64GccDPOpt/bicgDiag.o' failed make: *** [Make/linux64GccDPOpt/bicgDiag.o] Error 1 cudaCG/cgAinv.dep:8: recipe for target 'Make/linux64GccDPOpt/cgAinv.o' failed make: *** [Make/linux64GccDPOpt/cgAinv.o] Error 1 cudaBiCGStab/bicgAinv.dep:7: recipe for target 'Make/linux64GccDPOpt/bicgAinv.o' failed make: *** [Make/linux64GccDPOpt/bicgAinv.o] Error 1 Does anyone have any suggestions as to how to get the Allwmake to run correctly? Thank you in advance. J |
||
March 18, 2018, 15:44 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings jgross,
Run the following command: Code:
ls -l $FOAM_SRC/cudaSolvers/lnInclude Either way, try running the following commands, to try and see if it solves the issue: Code:
cd $FOAM_SRC/cudaSolvers wclean libso wmake libso ls -l $FOAM_SRC/cudaSolvers/lnInclude Best regards, Bruno
__________________
|
|
March 19, 2018, 07:44 |
|
#3 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 |
Hi Bruno,
Thank you for your response. Your assistance is greatly appreciated. I checked the contents of the lnInlcude directory, and received all the necessary symbolic links: Code:
total 0 lrwxrwxrwx 1 jg847 jg847 28 Mar 18 19:34 buildNormFactor.H -> ../include/buildNormFactor.H lrwxrwxrwx 1 jg847 jg847 30 Mar 18 19:34 cudaBiCGStab.C -> ../cudaBiCGStab/cudaBiCGStab.C lrwxrwxrwx 1 jg847 jg847 30 Mar 18 19:34 cudaBiCGStab.H -> ../cudaBiCGStab/cudaBiCGStab.H lrwxrwxrwx 1 jg847 jg847 18 Mar 18 19:34 cudaCG.C -> ../cudaCG/cudaCG.C lrwxrwxrwx 1 jg847 jg847 18 Mar 18 19:34 cudaCG.H -> ../cudaCG/cudaCG.H lrwxrwxrwx 1 jg847 jg847 26 Mar 18 19:34 cudaSolver.C -> ../cudaSolver/cudaSolver.C lrwxrwxrwx 1 jg847 jg847 26 Mar 18 19:34 cudaSolver.H -> ../cudaSolver/cudaSolver.H lrwxrwxrwx 1 jg847 jg847 25 Mar 18 19:34 cudaTypes.H -> ../cudaSolver/cudaTypes.H lrwxrwxrwx 1 jg847 jg847 26 Mar 18 19:34 fillCOOMatrix.H -> ../include/fillCOOMatrix.H -rw-rw-r-- 1 jg847 jg847 0 Mar 18 19:34 uptodate Code:
In file included from cudaCG/cudaCG.C:26:0: cudaCG/cudaCG.H:43:24: fatal error: cudaSolver.H: No such file or directory compilation terminated. cudaCG/cudaCG.dep:269: recipe for target 'Make/linux64GccDPOpt/cudaCG.o' failed make: *** [Make/linux64GccDPOpt/cudaCG.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from cudaSolver/cudaSolver.H:42:0, from cudaSolver/cudaSolver.C:26: cudaSolver/cudaTypes.H:57:29: fatal error: cusp/coo_matrix.h: No such file or directory compilation terminated. In file included from cudaBiCGStab/cudaBiCGStab.C:34:0: cudaBiCGStab/cudaBiCGStab.H:43:24: fatal error: cudaSolver.H: No such file or directory compilation terminated. cudaSolver/cudaSolver.dep:268: recipe for target 'Make/linux64GccDPOpt/cudaSolver.o' failed make: *** [Make/linux64GccDPOpt/cudaSolver.o] Error 1 cudaBiCGStab/cudaBiCGStab.dep:269: recipe for target 'Make/linux64GccDPOpt/cudaBiCGStab.o' failed make: *** [Make/linux64GccDPOpt/cudaBiCGStab.o] Error 1 cudaCG/cgDiag.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaBiCGStab/bicgAinv.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaCG/cgDiag.dep:8: recipe for target 'Make/linux64GccDPOpt/cgDiag.o' failed make: *** [Make/linux64GccDPOpt/cgDiag.o] Error 1 cudaBiCGStab/bicgAinv.dep:7: recipe for target 'Make/linux64GccDPOpt/bicgAinv.o' failed make: *** [Make/linux64GccDPOpt/bicgAinv.o] Error 1 cudaCG/cgAmg.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaCG/cgAmg.dep:8: recipe for target 'Make/linux64GccDPOpt/cgAmg.o' failed make: *** [Make/linux64GccDPOpt/cgAmg.o] Error 1 cudaCG/cgAinv.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaBiCGStab/bicgDiag.cu:47:23: fatal error: cudaTypes.H: No such file or directory compilation terminated. cudaCG/cgAinv.dep:8: recipe for target 'Make/linux64GccDPOpt/cgAinv.o' failed make: *** [Make/linux64GccDPOpt/cgAinv.o] Error 1 cudaBiCGStab/bicgDiag.dep:7: recipe for target 'Make/linux64GccDPOpt/bicgDiag.o' failed make: *** [Make/linux64GccDPOpt/bicgDiag.o] Error 1 James |
|
March 19, 2018, 10:51 |
|
#4 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 |
Hi Bruno,
It turns out I didn't link the Cusp library correctly as it needed to be in the directory: Code:
$WM_THIRD_PARTY_DIR/LocalDev Code:
wmake libso Code:
"libcudaSolvers.so" My guess is that although it is recognising those files now, it still encountered some fatal errors during installation, even though I didn't find any fatal error messages in the log file. Any advice on how to proceed further with this? James |
|
November 5, 2020, 01:39 |
Hi Jgross,have you solved this problem?
|
#5 |
New Member
Thomas Shi
Join Date: Jan 2018
Posts: 20
Rep Power: 8 |
I am facing the same problem now. I have just finished the installation of CUDA-11.1 on Ubuntu 18.04 of WSL2 and it works well for the examples. Then the compilation of Foam-extend 4.0 has no problems. But when I run ./Allwmake in $FOAM_SRC/cudaSolvers directory , I recieve the same message "No nvcc - CUDA not available." as you. I want to know if you have any sollution to this problem.
|
|
December 8, 2022, 09:35 |
|
#6 | |
New Member
Tom
Join Date: Mar 2021
Posts: 4
Rep Power: 5 |
Quote:
I am getting the same error while compiling foam-extend 5.0. Can you please share how you linked the Cusp library correctly? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem using turbulent modelling with rhoCentralFoam in foam extend 4.0 | quarkz | OpenFOAM Running, Solving & CFD | 1 | May 8, 2023 14:27 |
probe Locations error in the dynamicMesh foam extend 4.0 | vahidreza lotfi | OpenFOAM Post-Processing | 2 | August 22, 2018 11:30 |
MRFSimpleFoam for a centrifugal pump (OF Extend 4.0): slow and no convergence | jgross | OpenFOAM Running, Solving & CFD | 6 | February 17, 2018 10:37 |
[foam-extend.org] Foam Extend 4.0 on MAC | simone.rowing | OpenFOAM Installation | 1 | July 2, 2017 16:23 |
Paraview 4.1.0 cmake compiling error CUDA Convolution Driver | Juan Carlos | OpenFOAM Installation | 3 | April 17, 2014 14:37 |