SimFlowCFD / RapidCFD-dev

RapidCFD is an OpenFOAM fork running fully on CUDA platform. Brought to you by
https://sim-flow.com
Other
325 stars 94 forks source link

Compilation error #32

Closed benoitpaillard closed 4 years ago

benoitpaillard commented 7 years ago

Hi all,

I'm getting an error when reaching the solver compilation phase :

make[1]: Entering directory '/home/jony/RapidCFD/RapidCFD-dev/applications/solvers/basic/laplacianFoam' nvcc -Xptxas -dlcm=cg -m64 -arch=sm_30 -Dlinux64 -DWM_DP -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wno-unused-parameter -Xcompiler -Wno-vla -Xcudafe "--diag_suppress=null_reference" -Xcudafe "--diag_suppress=subscript_out_of_range" -Xcudafe "--diag_suppress=extra_semicolon" -Xcudafe "--diag_suppress=partial_override" -Xcudafe "--diag_suppress=implicit_return_from_non_void_function" -Xcudafe "--diag_suppress=virtual_function_decl_hidden" -O3 -DNoRepository -D__RESTRICT__='__restrict__' -I/home/jony/RapidCFD/RapidCFD-dev/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/jony/RapidCFD/RapidCFD-dev/src/OpenFOAM/lnInclude -I/home/jony/RapidCFD/RapidCFD-dev/src/OSspecific/POSIX/lnInclude -Xcompiler -fPIC -cudart shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64NvccDPOpt/laplacianFoam.o -L/home/jony/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib \ -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/jony/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/laplacianFoam /home/jony/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libtriSurface.so: undefined reference toyyFlexLexer::yywrap()' collect2: error: ld returned 1 exit status /home/jony/RapidCFD/RapidCFD-dev/wmake/Makefile:149: recipe for target '/home/jony/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/laplacianFoam' failed ` And the same error then occurs for all solvers.

my gcc version is gcc 5.4.0, my CUDA version is 8.0

Thank you for your help !

Zymorui commented 7 years ago

Dear all, I'm getting the same error with the same version of gcc and CUDA. @benoitpaillard Did you solve this issue?

Zymorui commented 7 years ago

For anyone interested: The error is produced by the readSTLASCII.L file where the IF path instead of the ELSE path of the yyFlexLexer::yywrap() dummy variable is wrongly executed. By deleting the IF-ELSE and only using: int yyFlexLexer::yywrap() the problem is solved.