Error when compile CFDEMcoupiling src

Submitted by yichen tao on Sat, 12/07/2019 - 09:52

Hi,everyone
I have several problems compiling CFDEM. I have tried my best but I can not deal with it...

Backgroud:
1. Because of some reason, I have to compile CFDEM with old version. (CFDEMcoupling 3.0.1, LIGGGHTS 3.5.0 and OpenFoam 3.0.1)
2. I think LIGGGHTS and OpenFoam have been already compiled correctly.
3. The error occured in the step "cfdemCompCFDEMall"

Problem:
At first, I found error in the logfile "log_complog_compileCFDEMcoupling_cfdemSolverPiso". The detail is shown below:

// log_compileCFDEMcoupling_cfdemSolverPiso_cfdemSolverPiso-2019-12-06-21:38 //
/home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/applications/solvers/cfdemSolverPiso
removing all .dep files ...
Making dependency list for source file cfdemSolverPiso.C
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++ -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 -DCFDEMWMPROJECTVERSION="30" -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/TurbulenceModels/incompressible/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/fvOptions/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/transportModels -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude -I/home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/lnInclude -I/home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/cfdTools -I/home/wang/LIGGGHTS/LIGGGHTS-PUBLIC/src -IlnInclude -I. -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c cfdemSolverPiso.C -o Make/linux64GccDPInt32Opt/cfdemSolverPiso.o
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 -DCFDEMWMPROJECTVERSION="30" -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/TurbulenceModels/incompressible/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/fvOptions/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/transportModels -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude -I/home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/lnInclude -I/home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/cfdTools -I/home/wang/LIGGGHTS/LIGGGHTS-PUBLIC/src -IlnInclude -I. -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude -I/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/cfdemSolverPiso.o -L/home/wang/OpenFOAM/OpenFOAM-3.0.1/platforms/linux64GccDPInt32Opt/lib \
-L/home/wang/OpenFOAM/wang-3.0.1/platforms/linux64GccDPInt32Opt/lib -lturbulenceModels -lincompressibleTurbulenceModels -lfvOptions -lincompressibleTransportModels -lfiniteVolume -lmeshTools -llagrangianCFDEM-PUBLIC-3.0.1 -lOpenFOAM -ldl \
-lm -o /home/wang/OpenFOAM/wang-3.0.1/platforms/linux64GccDPInt32Opt/bin/cfdemSolverPiso
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-3.0.1
collect2: error: ld returned 1 exit status
/home/wang/OpenFOAM/OpenFOAM-3.0.1/wmake/Makefile:138: recipe for target '/home/wang/OpenFOAM/wang-3.0.1/platforms/linux64GccDPInt32Opt/bin/cfdemSolverPiso' failed
make: *** [/home/wang/OpenFOAM/wang-3.0.1/platforms/linux64GccDPInt32Opt/bin/cfdemSolverPiso] Error 1

Then, I found the error began at the step of "cfdemCompCFDEMsrc". A part of logfile is below:

// log_compileCFDEMcoupling_cfdemParticle-2019-12-06-21:37 //
/home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle
removing all .dep files ...
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
wmakeLnInclude: linking include files to ./lnInclude
fatal: Not a git repository (or any of the parent directories): .git
Making dependency list for source file subModels/smoothingModel/constDiffSmoothing/constDiffSmoothing.C
.................
.................
subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C: In member function ‘virtual void Foam::DiFeliceDrag::setForce() const’:
subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C:260:51: error: no matching function for call to ‘Foam::OFstream::OFstream(const char [7], const openmode&)’
OFstream outf2("Ur.txt",std::ios::app);
^
In file included from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude/indexedOctree.C:28:0,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude/indexedOctree.H:700,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude/AMIMethod.H:41,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude/AMIInterpolation.C:27,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude/AMIInterpolation.H:566,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude/AMIPatchToPatchInterpolation.H:29,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude/cyclicAMILduInterface.H:39,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/ddtScheme.C:30,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/ddtScheme.H:337,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/fvcDdt.C:28,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/fvcDdt.H:199,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/fvc.H:44,
from /home/wang/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/fvCFD.H:8,
from lnInclude/forceModel.H:42,
from subModels/forceModel/DiFeliceDrag/DiFeliceDrag.H:44,
from subModels/forceModel/DiFeliceDrag/DiFeliceDrag.C:34:
/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude/OFstream.H:101:9: note: candidate: Foam::OFstream::OFstream(const Foam::fileName&, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType)
OFstream
^
/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude/OFstream.H:101:9: note: no known conversion for argument 2 from ‘const openmode {aka const std::_Ios_Openmode}’ to ‘Foam::IOstream::streamFormat’
/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude/OFstream.H:82:7: note: candidate: Foam::OFstream::OFstream(const Foam::OFstream&)
class OFstream
^
/home/wang/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude/OFstream.H:82:7: note: candidate expects 1 argument, 2 provided
/home/wang/OpenFOAM/OpenFOAM-3.0.1/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.o' failed
make: *** [Make/linux64GccDPInt32Opt/subModels/forceModel/DiFeliceDrag/DiFeliceDrag.o] Error 1

I suppose this is some kind of environment variable problem. The output of cfdemSysTest shows no problems:

*********************************
CFDEM(R)coupling system settings:
*********************************
CFDEM_VERSION=PUBLIC
couple to OF_VERSION=3.0.1
compile option=Opt
.
check if paths are set correctly
valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1
valid:yes critical:no - $CFDEM_PROJECT_USER_DIR = /home/wang/CFDEM/wang-PUBLIC-3.0.1
valid:yes critical:yes - $CFDEM_SRC_DIR = /home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src
valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/applications/solvers
valid:yes critical:yes - $CFDEM_TUT_DIR = /home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/tutorials
valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/wang/LIGGGHTS/LIGGGHTS-PUBLIC/src
valid:yes critical:yes - $CFDEM_LPP_DIR = /home/wang/LIGGGHTS/mylpp/src
valid:yes critical:yes - $CFDEM_ADD_LIBS_DIR = /home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc
valid:NO critical:no - $CFDEM_PIZZA_DIR = /home/wang/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src does not exist
valid:yes critical:no - $CFDEM_TEST_HARNESS_PATH = /home/wang/CFDEM/wang-PUBLIC-3.0.1/log/logFilesCFDEM-PUBLIC-3.0.1
valid:NO critical:no - $C3PO_SRC_DIR = /home/wang/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/c3po does not exist
.
library names
$CFDEM_LIGGGHTS_LIB_NAME = lmp_fedora_fpic
$CFDEM_LIB_NAME = lagrangianCFDEM-PUBLIC-3.0.1
$LD_LIBRARY_PATH = /home/wang/OpenFOAM/ThirdParty-3.0.1/platforms/linux64Gcc/CGAL-4.7/lib:/home/wang/OpenFOAM/ThirdParty-3.0.1/platforms/linux64Gcc/gperftools-svn/lib:/home/wang/OpenFOAM/ThirdParty-3.0.1/platforms/linux64Gcc/ParaView-4.4.0/lib/paraview-4.4:/home/wang/OpenFOAM/OpenFOAM-3.0.1/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/home/wang/OpenFOAM/ThirdParty-3.0.1/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/usr/lib/openmpi/lib:/home/wang/OpenFOAM/wang-3.0.1/platforms/linux64GccDPInt32Opt/lib:/home/wang/OpenFOAM/site/3.0.1/platforms/linux64GccDPInt32Opt/lib:/home/wang/OpenFOAM/OpenFOAM-3.0.1/platforms/linux64GccDPInt32Opt/lib:/home/wang/OpenFOAM/ThirdParty-3.0.1/platforms/linux64GccDPInt32Opt/lib:/home/wang/OpenFOAM/OpenFOAM-3.0.1/platforms/linux64GccDPInt32Opt/lib/dummy
$WM_NCOMPPROCS =
$WM_LABEL_SIZE = 32
*******************
g++:
/usr/bin/g++
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
gcc:
/usr/bin/gcc
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
mpic++:
/usr/bin/mpic++
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
mpirun:
/usr/bin/mpirun
mpirun (Open MPI) 1.10.2
.
Report bugs to http://www.open-mpi.org/community/help/
**********************
additional packages...
c3po does not exist.

Please help me with this problems.

Kind regards
Tao