Problems with compilation

Submitted by APerez on Wed, 10/29/2014 - 20:04

Hello everybody,

I'm not an experienced user with Ubuntu nor any related OS. Even though, I've been able to successfully install OpenFOAM 2.3.x with ThirdParty 2.3.x in my laptop (OS Ubuntu 14.04 LTS) and I've been trying to install LIGGGHTS & CFDEM, unsucessfully. I've been following the guide that's available in this website.

I'm quite sure that the OF installation process went fine because any error has been displayed so far and I was able to do a tutorial. The problem appears when I try to compile both programs (LIGGGHTS & CFDEM).

This it what appears when I type cfdemSysTest:


*******************
system settings:
*******************
CFDEM_VERSION=PUBLIC
couple to OF_VERSION=2.3.x
compile option=Opt

check if paths are set correctly
valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-
valid:yes critical:no - $CFDEM_PROJECT_USER_DIR = /home/agustin/CFDEM/agustin-PUBLIC-
valid:yes critical:yes - $CFDEM_SRC_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-/src
valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-/applications/solvers
valid:yes critical:yes - $CFDEM_TUT_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-/tutorials
valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/agustin/LIGGGHTS/LIGGGHTS-PUBLIC/src
valid:yes critical:yes - $CFDEM_LPP_DIR = /home/agustin/LIGGGHTS/mylpp/src
valid:NO critical:no - $CFDEM_PIZZA_DIR = /home/agustin/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src does not exist
valid:yes critical:no - $CFDEM_TEST_HARNESS_PATH = /home/agustin/CFDEM/agustin-PUBLIC-/log/logFilesCFDEM-PUBLIC-

library names
$CFDEM_LIGGGHTS_LIB_NAME = lmp_fedora_fpic
$CFDEM_LIB_NAME = lagrangianCFDEM-PUBLIC-
$LD_LIBRARY_PATH = /home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/lib:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/gperftools-svn/lib:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1:/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-system:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-system:/usr/lib/openmpi/lib:/home/agustin/OpenFOAM/agustin-2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/site/2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/dummy
$WM_NCOMPPROCS = 2
*******************
g++:
/usr/bin/g++
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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:
/home/agustin/OpenFOAM/OpenFOAM-2.3.x/bin/mpirun
mpirun (Open MPI) 1.6.5

_____________________________________________________________________________

When I tried to compile just LIGGHTS (through cfdemCompLIG) the following warning displayed (not sure if it's normal):


...
a - write_data.o
a - write_dump.o
a - write_restart.o
make[1]: se sale del directorio «/home/agustin/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora_fpic» #it says "make[1]: it's out of the directory"

Compiling sub-libraries of LIGGGHTS now...
Please provide the libraries to be compiled in the //home/agustin/CFDEM/CFDEMcoupling-PUBLIC-/src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt file
Libraries must be in the /home/agustin/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib directory.

________________________________________________

Even though I get some errors while installing, I can run the tutorials through cfdemTestTUT. When I do it, a gedit window opens which says something that could be translated to:

"The document file:///home/agustin/CFDEM/CFDEMcoupling-PUBLIC-/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/octave/cfdemSolverPiso_settlingTestMPI.eps» couldn't be opened
Error when opening the file: The file or the directory doesn't exist"

_______________________________________________

I attach the folder with log files that show a few errors that I've been receiving. They seem to be related with the different solvers included in CFDEM.

Any insight would be greatly appreciated. I've run out of ideas.

Best regards,

Agustin

j-kerbl's picture

j-kerbl | Mon, 11/03/2014 - 14:38

Hi Agustin,

it looks like LIGGGHTS compiled just fine, but there are problems in the log_compileCFDEMcoupling_cfdemParticle, which provides the libraries for the cfdemSolvers.

That is the error:
mkdir: no se puede crear el directorio «»: No existe el archivo o el directorio

How did you install OpenFOAM? Did you compile it yourself?

Cheers
Josef

aaigner's picture

aaigner | Wed, 11/05/2014 - 17:26

Hello Agustin,

the compilation fails by creating a directory. Unfortunately, I don't know which one... but maybe I found another hint.

The file 'log_compileCFDEMcoupling_cfdemParticle' has the line
/home/agustin/CFDEM/CFDEMcoupling-PUBLIC-/src/lagrangian/cfdemParticle
at the beginning. The version number is missing (CFDEMcoupling-PUBLIC-2.3.x or so). So... is $WM_PROJECT_VERSION set? That is an environmental variable of your OpenFOAM installation.

If this one is missing, maybe others, which are required for CFDEMcoupling, are missing too.
Can you please check them?

Hopefully, this will help to find the error.

Best regards
Andreas

APerez | Thu, 11/06/2014 - 03:14

Hi Andreas,

I checked what you told me and it results that I hadn't included the bashrc from OpenFOAM correctly to my .bashrc so I fixed it and recompiled everything. Then again, I found the same problems

I notice that when I'm compiling LIGGGHTS, the following message appears frequently referring to the "fix_rigid.h" file.

mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DFFT_FFTW3 -M ../compute_erotate_sphere.cpp > compute_erotate_sphere.d
In file included from ../fix_multisphere.h:1:0,
from ../compute_erotate_sphere.cpp:32:
../fix_dummy.h:4:23: fatal error: fix_rigid.h: No existe el archivo o el directorio (this means: "The file or the directory doesn't exist)
#include "fix_rigid.h"
^
compilation terminated.
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DFFT_FFTW3 -M ../compute_erotate_sphere_atom.cpp > compute_erotate_sphere_atom.d
In file included from ../fix_multisphere.h:1:0,
from ../compute_erotate_sphere_atom.cpp:32:
../fix_dummy.h:4:23: fatal error: fix_rigid.h: No existe el archivo o el directorio (this means: "The file or the directory doesn't exist)
#include "fix_rigid.h"
^
compilation terminated.
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DFFT_FFTW3 -M ../compute_displace_atom.cpp > compute_displace_atom.d

Then, when I'm compiling CFDEM (through cfdemCompCFDEM) the following line appears frequently at the beginning

could not open file RASModel.H for source file subModels/clockModel/clockModel/newClockModel.C due to No such file or directory

It finishes again with problems in cfdemPostproc.

g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/turbulenceModel -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/singlePhaseTransportModel -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/home/agustin/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/src/lagrangian/cfdemParticle/lnInclude -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/home/agustin/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/cfdemPostproc.o -L/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib \
-L/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -llagrangianCFDEM-PUBLIC-2.3.x -lOpenFOAM -ldl -lm -o /home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/cfdemPostproc
/usr/bin/ld: no se puede encontrar -llagrangianCFDEM-PUBLIC-2.3.x
collect2: error: ld returned 1 exit status
make: *** [/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/cfdemPostproc] Error 1

My current cfdemSysTest output it's the following

cfdemSysTest
*******************
system settings:
*******************
CFDEM_VERSION=PUBLIC
couple to OF_VERSION=2.3.x
compile option=Opt

check if paths are set correctly
valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-2.3.x
valid:yes critical:no - $CFDEM_PROJECT_USER_DIR = /home/agustin/CFDEM/agustin-PUBLIC-2.3.x
valid:yes critical:yes - $CFDEM_SRC_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/src
valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/applications/solvers
valid:yes critical:yes - $CFDEM_TUT_DIR = /home/agustin/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/tutorials
valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/agustin/LIGGGHTS/LIGGGHTS-PUBLIC/src
valid:yes critical:yes - $CFDEM_LPP_DIR = /home/agustin/LIGGGHTS/mylpp/src
valid:yes critical:no - $CFDEM_PIZZA_DIR = /home/agustin/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src
valid:NO critical:no - $CFDEM_TEST_HARNESS_PATH = /home/agustin/CFDEM/agustin-PUBLIC-2.3.x/log/logFilesCFDEM-PUBLIC-2.3.x does not exist

library names
$CFDEM_LIGGGHTS_LIB_NAME = lmp_openmpi
$CFDEM_LIB_NAME = lagrangianCFDEM-PUBLIC-2.3.x
$LD_LIBRARY_PATH = /home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/lib:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/gperftools-svn/lib:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1:/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-system:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-system:/usr/lib/openmpi/lib:/home/agustin/OpenFOAM/agustin-2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/site/2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib:/home/agustin/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/dummy
$WM_NCOMPPROCS =
*******************
g++:
/usr/bin/g++
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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:
/home/agustin/OpenFOAM/OpenFOAM-2.3.x/bin/mpirun
mpirun (Open MPI) 1.6.5

I'd appreciate any ideas to fix this. Thank you for the help so far!

Best regards,

Agustin

aaigner's picture

aaigner | Thu, 11/06/2014 - 10:50

Hi Agustin,

First off all... please check if fix_rigid.h exists in [YOUR_LIGGGHTS_DIR]/src/. Maybe you make a git pull to be sure that you have the latest version of LIGGGHTS.

It is not exactly the same error... that's good.
The problem is this error /usr/bin/ld: no se puede encontrar -llagrangianCFDEM-PUBLIC-2.3.x. So he can not find the library lagrangianCFDEM-PUBLIC-2.3.x (for that my spanish skills are sufficient :-) ), which is generated by the cfdemParticle compilation. Can you update the log files? Especially the file log_compileCFDEMcoupling_cfdemParticle.

And you can try to compile LIGGGHTS without CFDEMcoupling. Just go to [YOUR_LIGGGHTS_DIR]/src and execute make clean-all and make fedora.

Best regards
Andreas

APerez | Fri, 11/07/2014 - 03:57

It seems that it finally worked!

In my log file appead a new file log_compile_results_success that never appeared before and now, when I type cfdemTestTUT I finally get some results instead of warnings.

If anyone happens to have my same problems, what I did was delete both folders with CFDEM and LIGGGHTS and started everything once again. While I was experimenting trying to make the compilation work, I changed a few thing that might've produced some errors, I fooled around changing export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic in the bash to openmpi, UbuntuVTK or whatever.

When I recompiled everything I kept that in fedora_fpic and compiled directly from the LIGGGHTS ' src. Then I found that no warnings appeared so I moved to the cfdemCompLIG . I did a make clear-all and when I recompiled, the problem with the missing files appeared again. I removed the folder once again and recompiled and it was fixed. I then compiled again through the coupling and everything's been working so far. So..I'm not quite sure what happened, but that's what triggered the succesful compilation and fixed the 'missing files'

Still a few odd warnings appear as the tutorial works but since I'm getting results, it seems that they're not important.

Thanks for the help guys!

NTT1508 | Thu, 11/13/2014 - 07:29

Hi mates,

I seem to get the same problems as you got. thank for your sharing, I am trying to install again following your tips. Please keep contact might I need further assistant. Thanks.

ural | Tue, 03/03/2015 - 12:52

Hello! it seems that i have the same problem but manual compillaition of liggghts haven't made my day... can you share your bashsrc file maybe it might be helpful in my situation, or maybe you can give me some man or somothing... thanks for your help guys

heliana60 | Fri, 09/18/2015 - 13:58

Hi there,

I have been struggling this compiling process my self. My lagrangian library is not found either though when I compile cfdemParticle it says:

'/home/heliana/OpenFOAM/heliana-2.3.x/platforms/linux64GccDPOpt/lib/liblagrangianCFDEM-PUBLIC-2.3.x.so' is up to date.

Whenever I try to compile the solvers or postprocessing I get the same error:

heliana@mp-oldroyd:~/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/applications/utilities/cfdemPostproc$ wmake
Making dependency list for source file cfdemPostproc.C
could not open file incompressible/turbulenceModel/turbulenceModel.H for source file cfdemPostproc.C due to No such file or directory
SOURCE=cfdemPostproc.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/turbulenceModel -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/RASModel -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/singlePhaseTransportModel -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/home/heliana/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/src/lagrangian/cfdemParticle/lnInclude -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/cfdemPostproc.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/turbulenceModel -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/RASModel -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/singlePhaseTransportModel -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/home/heliana/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/src/lagrangian/cfdemParticle/lnInclude -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/home/heliana/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/cfdemPostproc.o -L/home/heliana/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib \
-L/home/heliana/OpenFOAM/heliana-2.3.x/platforms/linux64GccDPOpt/lib-lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -lmeshTools -llagrangianCFDEM-PUBLIC-2.3.x -lOpenFOAM -ldl -lm -o /home/heliana/OpenFOAM/heliana-2.3.x/platforms/linux64GccDPOpt/bin/cfdemPostproc
/usr/bin/ld: cannot find -llagrangianCFDEM-PUBLIC-2.3.x
collect2: error: ld returned 1 exit status
/home/heliana/OpenFOAM/OpenFOAM-2.3.x/wmake/Makefile:149: recipe for target '/home/heliana/OpenFOAM/heliana-2.3.x/platforms/linux64GccDPOpt/bin/cfdemPostproc' failed
make: *** [/home/heliana/OpenFOAM/heliana-2.3.x/platforms/linux64GccDPOpt/bin/cfdemPostproc] Error 1

What am I doing wrong? This is driving me a bit crazy :)

Thank you!

heliana60 | Fri, 09/18/2015 - 15:31

I recompiled again the cfdemParticle with compileCFDEMcoupling_src.sh and actually the error comes from there:
/usr/bin/ld: cannot find -llmp_fedora_fpic
collect2: error: ld returned 1 exit status

Apparently the compiler doesnt not find lmp_fedora_fpic

I check this forum http://www.cfdem.com/forums/error-compiling-cfdem-usrbinld-cannot-find-l... and I rechecked the bash file where the variables are defined to find this library and they are fine, but I always get the error, so in the end cfdemParticle is not compiled, hence the rest is not compiled :(

aaigner's picture

aaigner | Wed, 10/07/2015 - 14:07

Hi Heliana,

please try to compile LIGGGHTS itself:
cd $CFDEM_LIGGGHTS_SRC_DIR
make clean-all
make -j 4 fedora_fpic

Please use for the -j 4 option the number of processors of your system.

Bests
Andreas