Menu

#293 NVCC target rules do not catch cuda solver files

new
normal
block
Always
minor-fix
master
Bug
4.2.3-1-ARCH x86_64
linux
3.1
3.1
other
2015-10-21
2015-10-20
Paul
No

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.

Discussion

  • Paul

    Paul - 2015-10-20

    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:

    + ./Allwmake
    Found nvcc  --  enabling CUDA support.
    wmakeLnInclude: linking include files to ./lnInclude
    Making dependency list for source file cudaSolver/cudaSolver.cu
    Making dependency list for source file cudaCG/cgAinv.cu
    Making dependency list for source file cudaCG/cgDiag.cu
    Making dependency list for source file cudaCG/cgAmg.cu
    Making dependency list for source file cudaBiCGStab/bicgDiag.cu
    Making dependency list for source file cudaBiCGStab/bicgAinv.cu
    Making dependency list for source file cudaCG/cudaCG.cu
    Making dependency list for source file cudaBiCGStab/cudaBiCGStab.cu
    SOURCE=cudaSolver/cudaSolver.cu ;  nvcc -m64 -arch sm_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 $SO
    URCE -o Make/linux64GccDPOpt/cudaSolver.o
    SOURCE=cudaCG/cgAinv.cu ;  nvcc -m64 -arch sm_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 -o 
    Make/linux64GccDPOpt/cgAinv.o
    SOURCE=cudaCG/cgDiag.cu ;  nvcc -m64 -arch sm_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 -o 
    Make/linux64GccDPOpt/cgDiag.o
    SOURCE=cudaCG/cgAmg.cu ;  nvcc -m64 -arch sm_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 -o M
    ake/linux64GccDPOpt/cgAmg.o
    In file included from cudaCG/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 |
          ^
    In file included from cudaCG/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 |
          ^
    In file included from cudaCG/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: allowing all exceptions is incompatible with previous function "j0f"
    /opt/cuda/include/math_functions.h(5198): here
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(37): error: allowing all exceptions is incompatible with previous function "j1f"
    /opt/cuda/include/math_functions.h(5320): here
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(38): error: allowing all exceptions is incompatible with previous function "y0f"
    /opt/cuda/include/math_functions.h(5510): here
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(39): error: allowing all exceptions is incompatible with previous function "y1f"
    /opt/cuda/include/math_functions.h(5614): here
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(40): error: allowing all exceptions is incompatible with previous function "jnf"
    /opt/cuda/include/math_functions.h(5406): here
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/doubleFloat.H(41): error: allowing all exceptions is incompatible with previous function "ynf"
    /opt/cuda/include/math_functions.h(5720): here
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/OSstream.H(53): warning: overloaded virtual function "Foam::Ostream::write" is only partially overridden in class "Foam::OSstream"
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/prefixOSstream.H(52): warning: overloaded virtual function "Foam::Ostream::write" is only partially overridden in class "Foam::prefixOSstream"
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/primitiveEntry.H(63): warning: overloaded virtual function "Foam::entry::clone" is only partially overridden in class "Foam::primitiveEntry"
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/primitiveEntry.H(166): warning: overloaded function "Foam::Istream::read" is hidden by "Foam::primitiveEntry::read" -- virtual function override intended?
    
    /opt/OpenFOAM/foam-extend-3.1/src/foam/lnInclude/OPstream.H(51): warning: overloaded virtual function "Foam::Ostream::write" is only partially overridden in class "Foam::OPstream"
    
    6 errors detected in the compilation of "/tmp/tmpxft_00006eb8_00000000-7_cudaSolver.cpp1.ii".
    
    cudaSolver/cudaSolver.dep:201: recipe for target 'Make/linux64GccDPOpt/cudaSolver.o' failed
    
     

    Last edit: Paul 2015-10-20
  • Paul

    Paul - 2015-10-21

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.