installation issue

Submitted by stefanb on Wed, 04/13/2011 - 11:39

Hi,

first of all I want to thank you for the real great work which makes my life somehow easier. I already worked with the first release of the coupling without any problems but with the current version I ran into some.

Well, if I install openfoam and paraview like described they are located in the /opt folde. Hence, I changed the owner and work in the /opt folder. Downloading LIGGGHTS and CFDEM was no problem, compiling LIGGGHTS was easy, too. But when I try to compile the CFDEM I receive the following error after a couple of files were compiled succesfully:

In file included from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:30:
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:45:17: error: mpi.h: Datei oder Verzeichnis nicht gefunden
In file included from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:46,
from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:30:
/opt/liggghts/src/lammps.h:41: error: 'MPI_Comm' does not name a type
/opt/liggghts/src/lammps.h:46: error: 'MPI_Comm' has not been declared
In file included from /opt/liggghts/src/input.h:18,
from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:47,
from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:30:
/opt/liggghts/src/pointers.h:71: error: ISO C++ forbids declaration of 'MPI_Comm' with no type
/opt/liggghts/src/pointers.h:71: error: expected ';' before '&' token
/opt/liggghts/src/pointers.h: In constructor 'LAMMPS_NS::Pointers::Pointers(LAMMPS_NS::LAMMPS*)':
/opt/liggghts/src/pointers.h:47: error: class 'LAMMPS_NS::Pointers' does not
...

So, I don't know whats wrong and hope that you could help me. I tried to get the solution in different installation problem topics but didn't get anything so far. The mpi.h is definitly on my pc. Do you have an idea?

Kind regards,
Stefan

P.S.: Is there a possibility to identify the release version of LIGGGHTS? If not: maybe you could add a txt-file with the version number to the archive which might be easy up somebodys life?

P.P.S.: I am doing my phd on the coupling of CFD and DEM within (hopefully) the next 3/4 years. So, what's the best way to contribute?

tshan | Wed, 04/13/2011 - 11:50

Hi Stefan,

It is because that in the OpenFoam 1.7.1 environment, no openmpi could be found. So reinstall OpenFoam 1.7.1 and Third-Party software in your home directory following this page:
http://www.openfoam.com/download/source.php

Then in this OpenFoam 1.7.1 environment, compile liggghts and liggghts lib, CFDEM lib and piso solver step by step.

Thanks!

Best,
Tong

stefanb | Thu, 04/28/2011 - 14:00

So, here I am again. After compiling openfoam I ran into another error. If I start compiling the cfdemParticle source I got following error after a couple of correct compiled files:

SOURCE=subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C ;
...
-fPIC -c $SOURCE -o Make/linuxGccDPOpt/twoWayMPI.o
In file included from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:30:
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:46:62: error: lammps.h: Datei oder Verzeichnis nicht gefunden
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:47:19: error: input.h: Datei oder Verzeichnis nicht gefunden
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:48:18: error: atom.h: Datei oder Verzeichnis nicht gefunden
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:49:21: error: library.h: Datei oder Verzeichnis nicht gefunden
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:51:34: error: library_cfd_coupling.h: Datei oder Verzeichnis nicht gefunden
In file included from subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:30:
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:81: error: ‘LAMMPS_NS’ has not been declared
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:81: error: ISO C++ forbids declaration of ‘LAMMPS’ with no type
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H:81: error: expected ‘;’ before ‘*’ token
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C: In constructor ‘Foam::twoWayMPI::twoWayMPI(const Foam::dictionary&, Foam::cfdemCloud&)’:
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:69: warning: use of old-style cast
...
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:200: error: ‘lmp’ was not declared in this scope
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:205: error: ‘lmp’ was not declared in this scope
subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C:205: error: ‘lammps_get_natoms’ was not declared in this scope
make: *** [Make/linuxGccDPOpt/twoWayMPI.o] Fehler 1

I still have no idea whats wrong. So, if anybody has an idea, please help. Furthermore, did anybody else occur problems compiling paraview from the source files? That's another problem I have to solve but I don't know why it went wrong because I used a fresh, clean ubuntu for the whole thing.

Kind regards,
Stefan

ckloss's picture

ckloss | Fri, 04/29/2011 - 07:52

>>I still have no idea whats wrong
Obviously, the LIGGGHTS files are not found, you need to tell the library where to find it.
We had that question already a couple time, and it's a bit tedious to repeat the same answers all over :-)
Have a look at the discussions and the install tutorial setup_LIGGGHTS__OpenFoamR_CFDEM_2p0_on_Ubuntu1004.txt here - node/237
You probably have missed one of the steps

>>did anybody else occur problems compiling paraview from the source files
Yes, I did - but normally there is no need to do this

Christoph

stefanb | Fri, 04/29/2011 - 09:55

Hi Christoph,

don't worry I tried to use the installation guide and, of course, I changed the paths. But, there was a typing error - so, thanks for the hint where to look. It's working now. Thank to both of you for the great work.

Kind regards,
Stefan

ckloss's picture

ckloss | Wed, 04/13/2011 - 13:15

Hi Stefan,

welcome to the board.
Just to wrap up. Some of the most common problems are:

+ wrong LIGGGHTS version (1.2.8 or newer required)
+ compile LIGGGHTS with the same compiler as CFD
+ compile LIGGGHTS with -fPIC

>>Is there a possibility to identify the release version of LIGGGHTS
see src/version.h

>>P.P.S.: I am doing my phd on the coupling of CFD and DEM within (hopefully) the next 3/4 years.
>>So, what's the best way to contribute?
Well, the best option is to send a new model to us via email. We might consider using git for this in the future, but currently in our opinion email is the best way

Christoph

niqbal | Thu, 04/14/2011 - 16:16

Hi Christoph,
I have already used the CFDEM previous version successfully. Now when I am trying to compile the latest version, I am facing the problem related to your last mentioned point
+ compile LIGGGHTS with -fPIC
The compiling error is as below:
sr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: /tmp/naveed/OpenFOAM/niqbal-1.7.1/src/lagrangian/myliggghts_1.2.8/src/liblmp_fedora.a(input.o): relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC

I really do not know what means by compiling -fPIC. Whether I have to set any flag in Make file (I could not find any flag similar to this) or .....
Can you please elaborate this issue? i.e how to compile with -fPIC?

Thanks and Best Regards,
Naveed

alice's picture

alice | Thu, 04/14/2011 - 16:26

Hi!
Open the Makefile.fedora in the src/MAKE-directory of liggghts and add -fPIC to
CCFLAGS=-g -O.
(=> CCFLAGS=-g -O -fPIC)
Recompile, and everything should be fine.
Best,
Alice

niqbal | Thu, 04/14/2011 - 17:49

Hi,
Thanks for your quick response. With the way for flag, you have mentioned (CCFLAGS=-g -O -fPIC). It has generated only library file (liblmp_fedora.a) but not lmp_fedora executable. Is there someway to get both?
In this way, the library compiles the cfdemParticle perfectly and produces the "liblagrangianCFDEM_shared.so" share object file.

But when I compile the solver (cfdemSolverPiso_shared), it generates following error:

-L/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -llagrangianCFDEM_shared -lOpenFOAM -liberty -ldl -lm -o /tmp/naveed/OpenFOAM/niqbal-1.7.1/applications/bin/linux64GccDPOpt/cfdemSolverPiso_shared
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `__svml_exp2'
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `_intel_fast_memset'
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `__libm_sse2_sincos'
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `__intel_sse2_strlen'
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `__svml_pow2'
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `__builtin_isnan'
/tmp/naveed/OpenFOAM/niqbal-1.7.1/lib/linux64GccDPOpt/liblagrangianCFDEM_shared.so: undefined reference to `_intel_fast_memcpy'
collect2: ld returned 1 exit status
make: *** [/tmp/naveed/OpenFOAM/niqbal-1.7.1/applications/bin/linux64GccDPOpt/cfdemSolverPiso_shared] Error 1
Could you please give some further suggestions?

Best Regards,
Naveed

cgoniva's picture

cgoniva | Thu, 04/14/2011 - 17:57

Hi Naveed,

please make sure that both LIGGGHTS and the coupling are compiled with the same compiler.

see: node/294

Cheers,
Chris

niqbal | Fri, 04/15/2011 - 16:07

Hi Chris,
Thanks. It is working. I recompiled everything and it works. I think you are right problem was because of the problem. I activated my OF variable and then recompile the LIGGGHTS and make its library and it is fine now.

Thanks and Best Regards,
Naveed