LIGGGHTS lib name

Submitted by tshan on
cgoniva

Hi Tong,

This name should refer to the name of the LIGGGHTS library and varies with the make options you use for compiling LIGGGHTS.
(I used make fedora which builds lmp_fedora)

Cheers,
Chris

Thu, 7 Apr 2011 - 13:07 Permalink
tshan

In reply to by anonymous_stub (not verified)

Hi Chris,

Thanks for your reply!

I had an error during compiling...saying:

...Make/linux64GccDPOpt/dense.o
/usr/bin/ld: /home/tong/Software/liggghts_1p2p8/src/liblmp_ubuntu.a(input.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/home/tong/Software/liggghts_1p2p8/src/liblmp_ubuntu.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

An:
Recompile liblmp with -fPIC...
Add -fPIC to CCFLAGS in Makefile.ubuntu before making liggghts...

Many thanks!

Best,
Tong

Thu, 7 Apr 2011 - 14:16 Permalink
cgoniva

In reply to by anonymous_stub (not verified)

Hi Tong!

We have encountered that problem on some computers.

For me it was ok to use the following setting in LIGGGHTS/SRC/MAKE/Makefile.xy and re-compile LIGGGHTS

CC = mpic++
CCFLAGS = -g -O3 -fPIC
DEPFLAGS = -M
LINK = mpic++
LINKFLAGS = -g -O3 -fPIC
LIB =
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

Hope that helps?

Cheers,
Chris

Thu, 7 Apr 2011 - 14:34 Permalink
tshan

In reply to by anonymous_stub (not verified)

Hi Chris!

Your solution indeed worked! Thanks a lot!

However, now I encountered another issue during compiling the piso solver...And I did not find any specific error but collect2: ld returned 1 exit status..

The whole compiling message:
Making dependency list for source file cfdemSolverPiso.C
could not open file RASModel.H for source file cfdemSolverPiso.C
SOURCE=cfdemSolverPiso.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/transportModels -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/transportModels/incompressible/singlePhaseTransportModel -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/tong/Software/mycfdem2/src/cfdemParticle//lnInclude -IlnInclude -I. -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/cfdemSolverPiso.o
/home/tong/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/home/tong/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’
/home/tong/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/transportModels -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/transportModels/incompressible/singlePhaseTransportModel -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/tong/Software/mycfdem2/src/cfdemParticle//lnInclude -IlnInclude -I. -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/tong/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/cfdemSolverPiso.o -L/home/tong/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt \
-L/home/tong/OpenFOAM/tong-1.6/lib/linux64GccDPOpt -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -llagrangianCFDEM_shared -lOpenFOAM -liberty -ldl -lm -o /home/tong/OpenFOAM/tong-1.6/applications/bin/linux64GccDPOpt/cfdemSolverPiso_shared
/home/tong/OpenFOAM/tong-1.6/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `LAMMPS_NS::LAMMPS::LAMMPS(int, char**, ompi_communicator_t*)'
collect2: ld returned 1 exit status
make: *** [/home/tong/OpenFOAM/tong-1.6/applications/bin/linux64GccDPOpt/cfdemSolverPiso_shared] Error 1

I am trying to solve this, and I will let know if I get some solutions.

Best,
Tong

Thu, 7 Apr 2011 - 15:03 Permalink
rqwang

In reply to by anonymous_stub (not verified)

Hi Tong,

I dont remember I have this problem or not.

I suggest you adjust your options file in the directory of Make.

Good luck.

rq

Thu, 7 Apr 2011 - 17:34 Permalink
cgoniva

In reply to by anonymous_stub (not verified)

Hi Tong,

please make sure that Liggghts and the coupling are compiled with the same compiler.
(I am not sure whether this is the reason?)

Cheers,
Chris

Thu, 7 Apr 2011 - 17:59 Permalink
Anjo

In reply to by anonymous_stub (not verified)

Hi Tong,

i also have the same error as urs can you plz tell me what was the modification you made in your options file

Wed, 20 Jul 2011 - 20:50 Permalink
rqwang

Hi Tong,

I encountered this problem, too. Then, I found the issue can be solved by re-compiling liggghts as a library.

Specifically, compile liggghts following

make makelib
make -f Makefile.lib fedora

Thanks,

rq

Thu, 7 Apr 2011 - 17:23 Permalink
tshan

In reply to by anonymous_stub (not verified)

Hi Wang,

Thanks for your reply!

I have solved this, but I encountered another issue when I compiled piso solver, which is shown at last. Do you know how to deal with that?

Best,
Tong

Thu, 7 Apr 2011 - 17:24 Permalink

Hi Chris,

Thanks for releasing this wonderful CFDEM 2.0!

I just want to know the LIGGGHTS lib name, and I use:
CFDEM_LIGGGHTS_LIB_NAME=lmp_ubuntu

It seems to be not right, because I got:
/usr/bin/ld: cannot find -llmp_ubuntu

when I wmake libso.

Thanks a lot!!

Best,
Tong