The rules for finding nvcc targets is only set for .cu. cudaSolver.C, cudaCG.C, and cudaBiCGStub.C all need to be compiled by nvcc.
I've tried fixing the rules to no avail thus far.
What happens if I move the .C files in cudaSolvers to .cu (and replace references in Make/files)? Would I need to run ./Allwmake.firstinstall again?
When I run Allwmake with these files moved, I get the following errors:
+./AllwmakeFoundnvcc--enablingCUDAsupport.wmakeLnInclude:linkingincludefilesto./lnIncludeMakingdependencylistforsourcefilecudaSolver/cudaSolver.cuMakingdependencylistforsourcefilecudaCG/cgAinv.cuMakingdependencylistforsourcefilecudaCG/cgDiag.cuMakingdependencylistforsourcefilecudaCG/cgAmg.cuMakingdependencylistforsourcefilecudaBiCGStab/bicgDiag.cuMakingdependencylistforsourcefilecudaBiCGStab/bicgAinv.cuMakingdependencylistforsourcefilecudaCG/cudaCG.cuMakingdependencylistforsourcefilecudaBiCGStab/cudaBiCGStab.cuSOURCE=cudaSolver/cudaSolver.cu;nvcc-m64-archsm_30-DNoRepository-Xcompiler-fPIC-I/opt/cuda/include-IlnInclude-I.-I/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude-I/opt/OpenFOAM/foam-extend-3.1/src/OSspecific/POSIX/lnInclude-Dlinux64-DWM_DP-O3-c$SOURCE-oMake/linux64GccDPOpt/cudaSolver.oSOURCE=cudaCG/cgAinv.cu;nvcc-m64-archsm_30-DNoRepository-Xcompiler-fPIC-I/opt/cuda/include-IlnInclude-I.-I/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude-I/opt/OpenFOAM/foam-extend-3.1/src/OSspecific/POSIX/lnInclude-Dlinux64-DWM_DP-O3-c$SOURCE-oMake/linux64GccDPOpt/cgAinv.oSOURCE=cudaCG/cgDiag.cu;nvcc-m64-archsm_30-DNoRepository-Xcompiler-fPIC-I/opt/cuda/include-IlnInclude-I.-I/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude-I/opt/OpenFOAM/foam-extend-3.1/src/OSspecific/POSIX/lnInclude-Dlinux64-DWM_DP-O3-c$SOURCE-oMake/linux64GccDPOpt/cgDiag.oSOURCE=cudaCG/cgAmg.cu;nvcc-m64-archsm_30-DNoRepository-Xcompiler-fPIC-I/opt/cuda/include-IlnInclude-I.-I/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude-I/opt/OpenFOAM/foam-extend-3.1/src/OSspecific/POSIX/lnInclude-Dlinux64-DWM_DP-O3-c$SOURCE-oMake/linux64GccDPOpt/cgAmg.oInfileincludedfromcudaCG/cgDiag.cu:55:0:/opt/cuda/include/cusp/blas.h:31:6:warning:#warning | WARNING: cusp/blas.h is deprecated as of 0.4.0; use cusp/blas/blas.h instead | [-Wcpp]# warning | WARNING: cusp/blas.h is deprecated as of 0.4.0; use cusp/blas/blas.h instead |^InfileincludedfromcudaCG/cgAmg.cu:54:0:/opt/cuda/include/cusp/blas.h:31:6:warning:#warning | WARNING: cusp/blas.h is deprecated as of 0.4.0; use cusp/blas/blas.h instead | [-Wcpp]# warning | WARNING: cusp/blas.h is deprecated as of 0.4.0; use cusp/blas/blas.h instead |^InfileincludedfromcudaCG/cgAinv.cu:54:0:/opt/cuda/include/cusp/blas.h:31:6:warning:#warning | WARNING: cusp/blas.h is deprecated as of 0.4.0; use cusp/blas/blas.h instead | [-Wcpp]# warning | WARNING: cusp/blas.h is deprecated as of 0.4.0; use cusp/blas/blas.h instead |^/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(36):error:allowingallexceptionsisincompatiblewithpreviousfunction"j0f"/opt/cuda/include/math_functions.h(5198):here/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(37):error:allowingallexceptionsisincompatiblewithpreviousfunction"j1f"/opt/cuda/include/math_functions.h(5320):here/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(38):error:allowingallexceptionsisincompatiblewithpreviousfunction"y0f"/opt/cuda/include/math_functions.h(5510):here/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(39):error:allowingallexceptionsisincompatiblewithpreviousfunction"y1f"/opt/cuda/include/math_functions.h(5614):here/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(40):error:allowingallexceptionsisincompatiblewithpreviousfunction"jnf"/opt/cuda/include/math_functions.h(5406):here/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(41):error:allowingallexceptionsisincompatiblewithpreviousfunction"ynf"/opt/cuda/include/math_functions.h(5720):here/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/OSstream.H(53):warning:overloadedvirtualfunction"Foam::Ostream::write"isonlypartiallyoverriddeninclass"Foam::OSstream"/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/prefixOSstream.H(52):warning:overloadedvirtualfunction"Foam::Ostream::write"isonlypartiallyoverriddeninclass"Foam::prefixOSstream"/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/primitiveEntry.H(63):warning:overloadedvirtualfunction"Foam::entry::clone"isonlypartiallyoverriddeninclass"Foam::primitiveEntry"/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/primitiveEntry.H(166):warning:overloadedfunction"Foam::Istream::read"ishiddenby"Foam::primitiveEntry::read"--virtualfunctionoverrideintended?/opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/OPstream.H(51):warning:overloadedvirtualfunction"Foam::Ostream::write"isonlypartiallyoverriddeninclass"Foam::OPstream"6errorsdetectedinthecompilationof"/tmp/tmpxft_00006eb8_00000000-7_cudaSolver.cpp1.ii".cudaSolver/cudaSolver.dep:201:recipefortarget'Make/linux64GccDPOpt/cudaSolver.o'failed
Last edit: Paul 2015-10-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What happens if I move the .C files in cudaSolvers to .cu (and replace references in Make/files)? Would I need to run ./Allwmake.firstinstall again?
When I run Allwmake with these files moved, I get the following errors:
Last edit: Paul 2015-10-20
I've found the problem here was actually with the new Cusp 0.5. library. I installed Cusp 0.4.0, which solved my issue.