Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ld error during compilation #105

Open
FouchJe opened this issue May 9, 2023 · 2 comments
Open

Ld error during compilation #105

FouchJe opened this issue May 9, 2023 · 2 comments

Comments

@FouchJe
Copy link

FouchJe commented May 9, 2023

Hi,

I am having trouble to compile RapidCFD on WSL2 with Ubuntu 22.04 (tested on 20.04 also).

Configuration :

  • Windows 11
  • WSL2
  • Ubuntu 22.04 and Ubuntu 20.04
  • Cuda 11.4
  • RTX5000 (sm_75)

The compilation start well but stop with the error (full log in attachment) :

nvcc -Xptxas -dlcm=cg -std=c++11 -m64 -arch=sm_75 -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 -IincompressibleTwoPhaseInteractingMixture -ImixtureViscosityModels/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/finiteVolume/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/meshTools/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/sampling/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/fvOptions/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/transportModels -I/opt/RapidCFD/RapidCFD-dev/src/transportModels/twoPhaseMixture/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/transportModels/incompressible/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/transportModels/interfaceProperties/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/TurbulenceModels/compressible/lnInclude -I./relativeVelocityModels/lnInclude -IlnInclude -I. -I/opt/RapidCFD/RapidCFD-dev/src/OpenFOAM/lnInclude -I/opt/RapidCFD/RapidCFD-dev/src/OSspecific/POSIX/lnInclude -Xcompiler -fPIC -cudart shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64NvccDPOpt/incompressibleTwoPhaseInteractingMixture.o Make/linux64NvccDPOpt/compressibleTurbulenceModels.o Make/linux64NvccDPOpt/driftFluxFoam.o -L/opt/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib \ -ldriftFluxTransportModels -ldriftFluxRelativeVelocityModels -lfiniteVolume -lmeshTools -lsampling -lfvOptions -lincompressibleTransportModels -lturbulenceModels -lcompressibleTurbulenceModels -lOpenFOAM -ldl -lm -o /opt/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/driftFluxFoam /usr/bin/ld: cannot find -ldriftFluxTransportModels /usr/bin/ld: cannot find -ldriftFluxRelativeVelocityModels /usr/bin/ld: cannot find -lfiniteVolume /usr/bin/ld: cannot find -lmeshTools /usr/bin/ld: cannot find -lsampling /usr/bin/ld: cannot find -lfvOptions /usr/bin/ld: cannot find -lincompressibleTransportModels /usr/bin/ld: cannot find -lturbulenceModels /usr/bin/ld: cannot find -lcompressibleTurbulenceModels collect2: error: ld returned 1 exit status make: *** [/opt/RapidCFD/RapidCFD-dev/wmake/Makefile:150: /opt/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/driftFluxFoam] Error 1

log.zip

Could you help me to understand what is going wrong ?

Thank you.

@FouchJe FouchJe changed the title ld error Ld error during compilation May 9, 2023
@TonkomoLLC
Copy link
Contributor

Hello,
I looked at your log.zip file and started did a search on the word error. The first errors are related to missing mpi headers but I think these can be ignored for now. The first error that cascades to all the other errors is:

/opt/RapidCFD/RapidCFD-dev/src/OpenFOAM/lnInclude/PointHit.H(89): error: identifier "Foam::Vector<double> ::zero" is undefined in device code

Please see #92. In PointHit.H (PointHit.H is located in the src/OpenFOAM directory), replace:

hitPoint_(vector::zero),

with

hitPoint_(vector(0,0,0)),

Then recompile and hopefully your errors are solved. The failure to compile libOpenFOAM cascades into every other library and solver. So, fixing this line should (I hope) fix the other errors.

Best regards,
Eric

@FouchJe
Copy link
Author

FouchJe commented May 9, 2023

Hello,

It works perfectly.

Thank you very much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants