CFDEM Compilation error

Submitted by yesaswi92 on Sat, 05/13/2017 - 15:41

Hi,

I'm getting an error when compiling CFDEM. The following solvers are failing to compile (Pulled from log_compile_results_fail"):
cfdemSolverPiso
cfdemSolverIB
cfdemSolverPisoScalar
cfdemSolverPisoSTM

The following is the info of the error from "log_compileCFDEMcoupling_cfdemSolverPiso"
removing all .dep files ...
find: ‘./Make/linux64GccDPInt64Opt’: No such file or directory
Making dependency list for source file cfdemSolverPiso.C
could not open file fvOptions.H for source file cfdemSolverPiso.C due to No such file or directory
could not open file omp.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pmpicxx.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pop_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pgroup_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pstatus_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/prequest_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file cfdemCloudRotation.H for source file cfdemSolverPiso.C due to No such file or directory
could not open file cfdemCloudRotationSuperquadric.H for source file cfdemSolverPiso.C due to No such file or directory
could not open file readPISOControls.H for source file cfdemSolverPiso.C due to No such file or directory
g++ <......................................>
g++ <.......................................>
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-3.0.1
collect2: error: ld returned 1 exit status
/home/yesaswi/OpenFOAM/OpenFOAM-3.0.1/wmake/Makefile:138: recipe for target '/home/yesaswi/OpenFOAM/yesaswi-3.0.1/platforms/linux64GccDPInt64Opt/bin/cfdemSolverPiso' failed
make: *** [/home/yesaswi/OpenFOAM/yesaswi-3.0.1/platforms/linux64GccDPInt64Opt/bin/cfdemSolverPiso] Error 1

Similar errors are present for the other solvers too. I've attached them with the post.

I'm currently using OpenFOAM-3.0.1. I installed is as per the directions given in the link: https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-3.0.1/Ubuntu#Ubuntu_16.04 . The reason I didn't resort to OpenFOAM-3.0.x is because I couldn't find a detailed description of installing it in my Ubuntu 16.04. Could this be the reason??

I'm following the directions given in the link https://cfdem.com/system/files/githubaccess_public.pdf to install both LIGGGHTS and CFDEM. It seems to appear that my cfdemSysTest is giving a good results I've also attached with the post. But I'm still lost at how to install CFDEM. I'm planning to use it for a critical work and I sincerely request for a help.

Thank You
Yesaswi

yesaswi92 | Sat, 05/13/2017 - 23:49

Out of desperation, I formatted my Ubuntu, installed the latest commit of OpenFOAM-3.0.x and tried compiling CFDEM. But I get the same error. All four solvers failed to compile.

The following is the info of the error from log_compileCFDEMcoupling_cfdemSolverPiso:


removing all .dep files ...
find: ‘./Make/linux64GccDPInt32Opt’: No such file or directory
Making dependency list for source file cfdemSolverPiso.C
could not open file fvOptions.H for source file cfdemSolverPiso.C due to No such file or directory
could not open file omp.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pmpicxx.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pop_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pgroup_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/pstatus_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file ompi/mpi/cxx/prequest_inln.h for source file cfdemSolverPiso.C due to No such file or directory
could not open file cfdemCloudRotation.H for source file cfdemSolverPiso.C due to No such file or directory
could not open file cfdemCloudRotationSuperquadric.H for source file cfdemSolverPiso.C due to No such file or directory
could not open file readPISOControls.H for source file cfdemSolverPiso.C due to No such file or directory
g++ <.............................................>
g++ <.............................................>
/usr/bin/ld: cannot find -lturbulenceModels
/usr/bin/ld: cannot find -lincompressibleTurbulenceModels
/usr/bin/ld: cannot find -lfvOptions
/usr/bin/ld: cannot find -lincompressibleTransportModels
/usr/bin/ld: cannot find -lfiniteVolume
/usr/bin/ld: cannot find -lmeshTools
/usr/bin/ld: cannot find -lfvOptions
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-3.0.x
/usr/bin/ld: cannot find -lOpenFOAM
collect2: error: ld returned 1 exit status
/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/wmake/Makefile:138: recipe for target '/home/yesaswi/OpenFOAM/yesaswi-3.0.x/platforms/linux64GccDPInt32Opt/bin/cfdemSolverPiso' failed
make: *** [/home/yesaswi/OpenFOAM/yesaswi-3.0.x/platforms/linux64GccDPInt32Opt/bin/cfdemSolverPiso] Error 1

alice's picture

alice | Mon, 05/15/2017 - 07:48

Hello Yesaswi,
the error messages indicate, that the required OpenFOAM libraries could not be found. Did your check you OpenFOAM installation - are you able to run a case? Did you add the required lines to your bashrc? Do all the $WM_... environment variables work for you?
Cheers,
Alice

yesaswi92 | Mon, 05/15/2017 - 16:31

Hi Alice,

Thank you for the quick reply. I installed OpenFOAM correctly and also ran a case. It is working good. To make sure that I'm not coming across compatibility issues, I even tried the specific commit id while pulling the OpenFOAM repository. I'm still coming across this error.

I don't see any error when I'm running cfdemSysTest. But when I'm compiling, these are the issues I'm facing. I'm trying to understand the compilation script and am trying to figure out where the error is being issues. Can you identify any error in specific?

yesaswi92 | Mon, 05/15/2017 - 17:51

Hi Alice,

To verify if I edited my bashrc file properly, I checked every environment variables and they all "echo"ed to legit paths. In fact, if you see the log_compilecfdemcoupling_cfdemsolverpiso.txt file, the -I flags for the g++ lines are converted to actual paths. I physically navigated to those locations too.

I also though that these libraries might be faulty. But when I checked the compilation files of OpenFOAM-3.0.x, similar -I flags and library calls are used.

That is what making me highly perplexed and I can't think of anything else.

j-kerbl's picture

j-kerbl | Tue, 05/16/2017 - 14:45

Hi Yesaswi,

I've seen this line within the cfdemSysTest:
$WM_LABEL_SIZE = 64 !!!! Warning: WM_LABEL_SIZE must be 32!!!!! (Please correct in /home/yesaswi/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc.)

Is this still the case for your current OF installation? CFDEM doesn't yet support the 64 bit labels.
I am currently not 100% sure if this will fix all of the problems, but it is necessary to change it.

Cheers,
Josef

yesaswi92 | Tue, 05/16/2017 - 15:16

Hi Joseph,

Thank you for the reply. I corrected it and tried once again. But I had no luck.

I was looking at the logfiles of all the compilation tasks. The first error occurs in when the compileCFDEMcoupling_src.sh shell script is run. There seems to be no problem with the wmakeLnInclude function. But problem arises in the function compileLib. The functions runs normally until the compiler comes across the flags -lfiniteVolume -lturbulenceModels -lincompressibleTurbulenceModels -lfvOptions -lmeshTools -llagrangian. It mentions that the libraries associated with the flags are not found. But the path to these libraries is included in the compilation statement properly, as below (Bold fonts are used for the path include statements of these libraries):

g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -DGITVERSION=\"3.6.1\" -DDEBUGFLAG=\"\" -DCFDEMWMPROJECTVERSION="30" -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread -I ./cfdemParticle
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/finiteVolume/lnInclude
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/transportModels
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/TurbulenceModels/turbulenceModels/lnInclude
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/TurbulenceModels/incompressible/lnInclude
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/fvOptions/lnInclude
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/meshTools/lnInclude
-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/lagrangian/basic/lnInclude

-I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/containers/HashTables/labelHashSet -I/home/yesaswi/LIGGGHTS/LIGGGHTS-PUBLIC/src -I/home/yesaswi/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/src/cfdTools -IlnInclude -I. -I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude -I/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/cfdemCloud/cfdemCloud.o Make/linux64GccDPInt32Opt/derived/cfdemCloudIB/cfdemCloudIB.o Make/linux64GccDPInt32Opt/cfdTools/IOtools/json/json.o Make/linux64GccDPInt32Opt/cfdTools/global.o Make/linux64GccDPInt32Opt/cfdTools/newGlobal.o Make/linux64GccDPInt32Opt/subModels/forceModel/forceModel/forceModel.o Make/linux64GccDPInt32Opt/subModels/forceModel/forceModel/newForceModel.o Make/linux64GccDPInt32Opt/subModels/forceModel/noDrag/noDrag.o Make/linux64GccDPInt32Opt/subModels/forceModel/checkCouplingInterval/checkCouplingInterval.o Make/linux64GccDPInt32Opt/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.o Make/linux64GccDPInt32Opt/subModels/forceModel/fieldStore/fieldStore.o Make/linux64GccDPInt32Opt/subModels/forceModel/GidaspowDrag/GidaspowDrag.o Make/linux64GccDPInt32Opt/subModels/forceModel/SchillerNaumannDrag/SchillerNaumannDrag.o Make/linux64GccDPInt32Opt/subModels/forceModel/Archimedes/Archimedes.o Make/linux64GccDPInt32Opt/subModels/forceModel/ArchimedesIB/ArchimedesIB.o Make/linux64GccDPInt32Opt/subModels/forceModel/interface/interface.o Make/linux64GccDPInt32Opt/subModels/forceModel/ShirgaonkarIB/ShirgaonkarIB.o Make/linux64GccDPInt32Opt/subModels/forceModel/KochHillDrag/KochHillDrag.o Make/linux64GccDPInt32Opt/subModels/forceModel/LaEuScalarTemp/LaEuScalarTemp.o Make/linux64GccDPInt32Opt/subModels/forceModel/virtualMassForce/virtualMassForce.o Make/linux64GccDPInt32Opt/subModels/forceModel/gradPForce/gradPForce.o Make/linux64GccDPInt32Opt/subModels/forceModel/viscForce/viscForce.o Make/linux64GccDPInt32Opt/subModels/forceModel/MeiLift/MeiLift.o Make/linux64GccDPInt32Opt/subModels/forceModel/particleCellVolume/particleCellVolume.o Make/linux64GccDPInt32Opt/subModels/forceModel/particleVolume/particleVolume.o Make/linux64GccDPInt32Opt/subModels/forceModel/scalarGeneralExchange/scalarGeneralExchange.o Make/linux64GccDPInt32Opt/subModels/forceModel/fieldTimeAverage/fieldTimeAverage.o Make/linux64GccDPInt32Opt/subModels/forceModel/volWeightedAverage/volWeightedAverage.o Make/linux64GccDPInt32Opt/subModels/forceModel/forceSubModels/forceSubModel/newForceSubModel.o Make/linux64GccDPInt32Opt/subModels/forceModel/forceSubModels/forceSubModel/forceSubModel.o Make/linux64GccDPInt32Opt/subModels/forceModel/forceSubModels/ImEx/ImEx.o Make/linux64GccDPInt32Opt/subModels/probeModel/probeModel/probeModel.o Make/linux64GccDPInt32Opt/subModels/probeModel/probeModel/newProbeModel.o Make/linux64GccDPInt32Opt/subModels/probeModel/noProbe/noProbe.o Make/linux64GccDPInt32Opt/subModels/probeModel/particleProbe/particleProbe.o Make/linux64GccDPInt32Opt/subModels/IOModel/IOModel/IOModel.o Make/linux64GccDPInt32Opt/subModels/IOModel/IOModel/newIOModel.o Make/linux64GccDPInt32Opt/subModels/IOModel/noIO/noIO.o Make/linux64GccDPInt32Opt/subModels/IOModel/basicIO/basicIO.o Make/linux64GccDPInt32Opt/subModels/IOModel/trackIO/trackIO.o Make/linux64GccDPInt32Opt/subModels/IOModel/sophIO/sophIO.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/voidFractionModel/voidFractionModel.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/voidFractionModel/newVoidFractionModel.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/centreVoidFraction/centreVoidFraction.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/dividedVoidFraction/dividedVoidFraction.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/bigParticleVoidFraction/bigParticleVoidFraction.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/GaussVoidFraction/GaussVoidFraction.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/IBVoidFraction/IBVoidFraction.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/trilinearVoidFraction/trilinearVoidFraction.o Make/linux64GccDPInt32Opt/subModels/voidFractionModel/noVoidFraction/noVoidFraction.o Make/linux64GccDPInt32Opt/subModels/locateModel/locateModel/locateModel.o Make/linux64GccDPInt32Opt/subModels/locateModel/locateModel/newLocateModel.o Make/linux64GccDPInt32Opt/subModels/locateModel/standardSearch/standardSearch.o Make/linux64GccDPInt32Opt/subModels/locateModel/engineSearch/engineSearch.o Make/linux64GccDPInt32Opt/subModels/locateModel/engineSearchIB/engineSearchIB.o Make/linux64GccDPInt32Opt/subModels/meshMotionModel/meshMotionModel/meshMotionModel.o Make/linux64GccDPInt32Opt/subModels/meshMotionModel/meshMotionModel/newMeshMotionModel.o Make/linux64GccDPInt32Opt/subModels/meshMotionModel/noMeshMotion/noMeshMotion.o Make/linux64GccDPInt32Opt/subModels/momCoupleModel/momCoupleModel/momCoupleModel.o Make/linux64GccDPInt32Opt/subModels/momCoupleModel/momCoupleModel/newMomCoupleModel.o Make/linux64GccDPInt32Opt/subModels/momCoupleModel/explicitCouple/explicitCouple.o Make/linux64GccDPInt32Opt/subModels/momCoupleModel/implicitCouple/implicitCouple.o Make/linux64GccDPInt32Opt/subModels/momCoupleModel/noCouple/noCouple.o Make/linux64GccDPInt32Opt/subModels/regionModel/regionModel/regionModel.o Make/linux64GccDPInt32Opt/subModels/regionModel/regionModel/newRegionModel.o Make/linux64GccDPInt32Opt/subModels/regionModel/allRegion/allRegion.o Make/linux64GccDPInt32Opt/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.o Make/linux64GccDPInt32Opt/subModels/dataExchangeModel/dataExchangeModel/newDataExchangeModel.o Make/linux64GccDPInt32Opt/subModels/dataExchangeModel/oneWayVTK/oneWayVTK.o Make/linux64GccDPInt32Opt/subModels/dataExchangeModel/twoWayFiles/twoWayFiles.o Make/linux64GccDPInt32Opt/subModels/dataExchangeModel/noDataExchange/noDataExchange.o Make/linux64GccDPInt32Opt/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.o Make/linux64GccDPInt32Opt/subModels/averagingModel/averagingModel/averagingModel.o Make/linux64GccDPInt32Opt/subModels/averagingModel/averagingModel/newAveragingModel.o Make/linux64GccDPInt32Opt/subModels/averagingModel/dilute/dilute.o Make/linux64GccDPInt32Opt/subModels/averagingModel/dense/dense.o Make/linux64GccDPInt32Opt/subModels/clockModel/clockModel/clockModel.o Make/linux64GccDPInt32Opt/subModels/clockModel/clockModel/newClockModel.o Make/linux64GccDPInt32Opt/subModels/clockModel/standardClock/standardClock.o Make/linux64GccDPInt32Opt/subModels/clockModel/noClock/noClock.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/liggghtsCommandModel/liggghtsCommandModel.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/liggghtsCommandModel/newLiggghtsCommandModel.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/execute/execute.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/runLiggghts/runLiggghts.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/setDEMGravity/setDEMGravity.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/writeLiggghts/writeLiggghts.o Make/linux64GccDPInt32Opt/subModels/liggghtsCommandModel/readLiggghtsData/readLiggghtsData.o Make/linux64GccDPInt32Opt/subModels/smoothingModel/smoothingModel/smoothingModel.o Make/linux64GccDPInt32Opt/subModels/smoothingModel/smoothingModel/newSmoothingModel.o Make/linux64GccDPInt32Opt/subModels/smoothingModel/noSmoothing/noSmoothing.o Make/linux64GccDPInt32Opt/subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.o -L/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/lib \
-pthread -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib/openmpi/lib -lmpi -L/home/yesaswi/OpenFOAM/yesaswi-3.0.x/platforms/linux64GccDPInt32Opt/lib
-lfiniteVolume -lturbulenceModels -lincompressibleTurbulenceModels -lfvOptions -lmeshTools -llagrangian -L/home/yesaswi/LIGGGHTS/LIGGGHTS-PUBLIC/src -Wl,--whole-archive -llmp_fedora_fpic -Wl,--no-whole-archive -L/usr/lib/ -lmpi_cxx -o /home/yesaswi/OpenFOAM/yesaswi-3.0.x/platforms/linux64GccDPInt32Opt/lib/liblagrangianCFDEM-PUBLIC-3.0.x.so

This is my major concern. All the paths seems to work fine, but it says the libraries can't be found.

yesaswi92 | Tue, 05/16/2017 - 15:22

Hi again,

I'm kind of desperate in rectifying this problem as I need to work on a high priority task using CFDEM coupling. Hence, I'm wondering if I can discuss this issue with anyone directly to help me with this issue.

Thank you very much

j-kerbl's picture

j-kerbl | Tue, 05/16/2017 - 17:53

Hi Yesawi,

one quick question: Have you cleaned and recompiled OpenFOAM??
You should go to the OF dir $WM_PROJECT_DIR and run wcleanAll and afterwards ./Allwmake

Cheers,
Josef
 

yesaswi92 | Tue, 05/16/2017 - 17:58

Yes. I have actually formatted my harddisk and reinstalled openFOAM right from scratch and then tried CFDEM

j-kerbl's picture

j-kerbl | Tue, 05/16/2017 - 18:59

Hi,

from what I've read, the libs are supposed to be in
-L/home/yesaswi/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/lib
which is included during the compilation. And I think you checked this location for the libraries.

Can you double check if this path is also still within your $LD_LIBRARY_PATH ?
Please also check the following:
echo $WM_COMPILER
which ld
ld --version
ld -L $FOAM_LIBBIN/ -l finiteVolume

Cheers

AndresMM | Fri, 05/26/2017 - 11:51

Try:

cfdemCleanCFDEM
cfdemCompCFDEMall

yesaswi92 | Wed, 05/31/2017 - 22:29

Hi,

Thank you very much for the responses. I cleared everything and re-installed it again and it worked perfectly. It was getting error because the paths to libraries were not right.

Thanks a lot for the help!!
Yesaswi

kaashi | Thu, 04/29/2021 - 14:43

Hey could you please help in sorting out the issue in the complilation by cfdemCompCFDEMall. The error that i am getting is the following---

.../OpenFOAM/OpenFOAM-5.x/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt64Opt/../cfdemParticle/subModels/dataExchangeModel/oneWayVTK/oneWayVTK.o' failed