Errors on building CFDEM

Submitted by colin_bannister on Thu, 05/02/2013 - 17:10

Having problems at the last stage of building CFDEM.

The cfdemSysTest works fine, and cfdemCompLIG seems to work ok.

However when I run cfdemCompCFDEM, I hit problems. Initially I had a problem which indicated a missing library, namely:

liblagrangianCFDEM-PUBLIC-2.1.1

However I spotted a liblagrangian.so in one of the lib directories it was scanning, i.e. $HOME/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/lib

so I put a symlink in
lrwxrwxrwx 1 cczcb cczcb 18 May 2 15:52 liblagrangianCFDEM-PUBLIC-2.1.1.so -> ./liblagrangian.so

Now I get missing symbols, as below,so I guess that library isn't sufficient.

Can anyone suggest why things are going wrong ?

thanks,
Colin

g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/turbulenceModel -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/CFDEM/CFDEMcoupling-PUBLIC-2.1.1/src/lagrangian/cfdemParticle/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -IlnInclude -I. -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/cfdemPostproc.o -L/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib \
-L/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/cczcb-2.1.1/platforms/linux64GccDPOpt/lib -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -llagrangianCFDEM-PUBLIC-2.1.1 -lOpenFOAM -ldl -lm -o /panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/cczcb-2.1.1/platforms/linux64GccDPOpt/bin/cfdemPostproc
Make/linux64GccDPOpt/cfdemPostproc.o: In function `main':
cfdemPostproc.C:(.text.startup+0xa4d): undefined reference to `Foam::cfdemCloud::cfdemCloud(Foam::fvMesh const&)'
cfdemPostproc.C:(.text.startup+0xa81): undefined reference to `Foam::cfdemCloud::reAllocArrays() const'
cfdemPostproc.C:(.text.startup+0xddd): undefined reference to `Foam::averagingModel::resetVectorAverage(Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>&, bool) const'
cfdemPostproc.C:(.text.startup+0xdf3): undefined reference to `Foam::voidFractionModel::resetVoidFractions() const'
cfdemPostproc.C:(.text.startup+0xe02): undefined reference to `Foam::cfdemCloud::forceM(int)'
cfdemPostproc.C:(.text.startup+0xe15): undefined reference to `Foam::cfdemCloud::forceM(int)'
cfdemPostproc.C:(.text.startup+0xe3a): undefined reference to `Foam::averagingModel::resetVectorAverage(Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>&, bool) const'
cfdemPostproc.C:(.text.startup+0xe49): undefined reference to `Foam::cfdemCloud::forceM(int)'
cfdemPostproc.C:(.text.startup+0xe5f): undefined reference to `Foam::cfdemCloud::forceM(int)'
cfdemPostproc.C:(.text.startup+0xe87): undefined reference to `Foam::averagingModel::resetVectorAverage(Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField, Foam::fvPatchField, Foam::volMesh>&, bool) const'
cfdemPostproc.C:(.text.startup+0xe9d): undefined reference to `Foam::averagingModel::resetWeightFields() const'
cfdemPostproc.C:(.text.startup+0x113c): undefined reference to `Foam::cfdemCloud::setPos(double**&)'
cfdemPostproc.C:(.text.startup+0x11a0): undefined reference to `Foam::voidFractionModel::voidFractionInterp() const'
cfdemPostproc.C:(.text.startup+0x1827): undefined reference to `Foam::cfdemCloud::~cfdemCloud()'
cfdemPostproc.C:(.text.startup+0x19f0): undefined reference to `Foam::cfdemCloud::~cfdemCloud()'
collect2: error: ld returned 1 exit status
make: *** [/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/cczcb-2.1.1/platforms/linux64GccDPOpt/bin/cfdemPostproc] Error 1
Note: the list of utilities compiled might be incomplete.
please check /panfs/panasas01.panfs.cluster/cczcb/CFDEM/CFDEMcoupling-PUBLIC-2.1.1/applications/utilities for more utilities available

cgoniva's picture

cgoniva | Mon, 05/06/2013 - 11:01

Hi ,

creating a symlink should not be necessary.

if the settings in the ~/.bashrc are set correctly then the src library is compiled with the same name as as it is used when compiling the solvers.

Cheers,
Chris

colin_bannister | Fri, 05/10/2013 - 17:03

I've checked settings, but can't see anything amiss. Is it possible for me to send you log files of build, in case you can see what the issue is ? As I said, the cfdemSysTest passes everything, and the cfdemCompLIG has no errors.
In cfdemCompCFDEM I get this early on:

could not open file RASModel.H for source file cfdemCloud/cfdemCloud.C
then later, error below, which explains why liblagrangian isn't built, but I don't see where it expects to find libmpi_cxx ?

SOURCE=subModels/liggghtsCommandModel/readLiggghtsData/readLiggghtsData.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/ThirdParty-2.1.1/platforms/linux64Gcc/openmpi-1.5.3/include -I ./cfdemParticle -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/turbulenceModel -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/lagrangian/basic/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/containers/HashTables/labelHashSet -I/panfs/panasas01.panfs.cluster/cczcb/LIGGGHTS/LIGGGHTS-PUBLIC/src -IlnInclude -I. -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/readLiggghtsData.o
/usr/bin/ld: cannot find -lmpi_cxx
collect2: error: ld returned 1 exit status
make: *** [/panfs/panasas01.panfs.cluster/cczcb/OpenFOAM/cczcb-2.1.1/platforms/linux64GccDPOpt/lib/liblagrangianCFDEM-PUBLIC-2.1.1.so] Error 1

Colin Bannister
The University of Nottingham
UK

cgoniva's picture

cgoniva | Tue, 05/28/2013 - 08:29

hi,

please try removing "-lmpi_cxx" in Make/options.

Cheers,
Chris

maysmech | Fri, 06/14/2013 - 20:34

Dear Chris,
I've compiled LIGGGHTS by cfdemCompLIG command without problem. but have problem in comilation of CFDEMcoupling by cfdemCompCFDEM. What should i do for RASModel.H, -llagrangianCFDEM-PUBLIC-2.2.0 and -lmpi_cxx?

Errors are:


could not open file RASModel.H for source file subModels/clockModel/clockModel/clockModel.C

...
/usr/bin/ld: cannot find -lmpi_cxx
collect2: ld returned 1 exit status
make: *** [/home/PC/OpenFOAM/PC-2.2.0/platforms/linuxGccDPOpt/lib/liblagrangianCFDEM-PUBLIC-2.2.0.so] Error 1
...
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-2.2.0
collect2: ld returned 1 exit status
make: *** [/home/PC/OpenFOAM/PC-2.2.0/platforms/linuxGccDPOpt/bin/cfdemSolverPiso] Error 1
...
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-2.2.0
collect2: ld returned 1 exit status
make: *** [/home/PC/OpenFOAM/PC-2.2.0/platforms/linuxGccDPOpt/bin/cfdemSolverIB] Error 1
...
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-2.2.0
collect2: ld returned 1 exit status
make: *** [/home/PC/OpenFOAM/PC-2.2.0/platforms/linuxGccDPOpt/bin/cfdemSolverPisoScalar] Error 1
...
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-2.2.0
collect2: ld returned 1 exit status
make: *** [/home/PC/OpenFOAM/PC-2.2.0/platforms/linuxGccDPOpt/bin/cfdemPostproc] Error 1
Note: the list of utilities compiled might be incomplete.
please check /home/PC/CFDEM/CFDEMcoupling-PUBLIC-2.2.0/applications/utilities for more utilities available