How to setup LIGGGHTS 2.3.4 on Ubuntu 13.04

PaulWinkler's picture
Submitted by PaulWinkler on Sun, 05/19/2013 - 13:11

Hi folks,

I'm trying to install LIGGGHTS with CFD coupling for geotechnical simulations. Getting LIGGGHTS 2.3.4 from the git hub on a clean Ubuntu 12.04 LTS (Because of non released AMD Catalyst Driver for kernel 3.5 and newer.) I installed git and copied the repository successfully. Then I installed paraview (but will use binaries of version 3.98 out of a tarball), mpic++ and g++ (for c++). Running make ubuntuVTK in the src dir it stopps after a while:

mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DLAMMPS_VTK -I/usr/include/vtk-5.2 -I/usr/include/eigen2 -c displace_atoms.cpp
mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DLAMMPS_VTK -I/usr/include/vtk-5.2 -I/usr/include/eigen2 -c domain.cpp
In file included from domain.cpp:39:0:
fix.h:103:16: Warnung: unbenutzter Parameter »xlo« [-Wunused-parameter]
fix.h:103:16: Warnung: unbenutzter Parameter »xhi« [-Wunused-parameter]
fix.h:103:16: Warnung: unbenutzter Parameter »ylo« [-Wunused-parameter]
fix.h:103:16: Warnung: unbenutzter Parameter »yhi« [-Wunused-parameter]
fix.h:103:16: Warnung: unbenutzter Parameter »zlo« [-Wunused-parameter]
fix.h:103:16: Warnung: unbenutzter Parameter »zhi« [-Wunused-parameter]
fix.h:180:16: Warnung: unbenutzter Parameter »args« [-Wunused-parameter]
domain.cpp: In Elementfunktion »void LAMMPS_NS::Domain::image_flip(int, int, int)«:
domain.cpp:1070:31: Warnung: Klammern um »+« in Operand von »&« empfohlen [-Wparentheses]
domain.cpp:1071:22: Warnung: Klammern um »+« in Operand von »&« empfohlen [-Wparentheses]
domain.cpp:1071:51: Warnung: Klammern um »+« in Operand von »&« empfohlen [-Wparentheses]
mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DLAMMPS_VTK -I/usr/include/vtk-5.2 -I/usr/include/eigen2 -c dump_atom.cpp
mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DLAMMPS_VTK -I/usr/include/vtk-5.2 -I/usr/include/eigen2 -c dump_atom_vtk.cpp
In file included from dump_atom_vtk.cpp:29:0:
dump_atom_vtk.h:42:25: schwerwiegender Fehler: vtkCellArray.h: Datei oder Verzeichnis nicht gefunden
Kompilierung beendet.
make[1]: *** [dump_atom_vtk.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/paul/LIGGGHTS-PUBLIC/src/Obj_ubuntuVTK'
make: *** [ubuntuVTK] Fehler 2
paul@Wittke:~/LIGGGHTS-PUBLIC/src$

Seams there is an error in the script? Have no clue what to do. is make ubuntuVTK the right way to go? Surfing the directories this make file sounds to be the one I need. I worked with LIGGGHTS 1.5.3 in my last project, after a lot of trying installed from repository, but for my new task I want to benefit from the turning wheel... It would be a great help for all 'just users' to update the distributed package, because the provided 2.2 is rather old, I'd like to use the new fix mesh/surface/stress/servo command. Or is there a newer package then liggghts-dev from the repository ppa:liggghts-dev/ppa available? Maybe the ParaView version 3.14 in that package could be updated to 3.98 too? ;-)

Thanks for your help.

Regards
Paul

richti83's picture

richti83 | Sun, 05/19/2013 - 23:10

you need to adapt the file MAKE/Makefile.ubuntuVTK for ubuntu 12.04 (which uses newer vtk version)
apt-get install libvtk5-dev
in the makefile search for -I/usr/include/vtk-5.2 and change it to -I/usr/include/vtk-5.8 (or whatever vtk version is provided with 12.04)
OR
use "make fedora" instead (this don't needs vtk but you will not be able to dump particle positions to vtk files (but you will be able to dump mesh and meshinformations to vtk), you can use my paraview reader plugins to read particle files directly or use LPP for postprocessing.
In my experience the dump binary is faster than dump text is faster than dump vtk.
best,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

PaulWinkler's picture

PaulWinkler | Sun, 05/26/2013 - 23:09

Hi Christian,

many thanks for your advice. In between I changed to Ubuntu 13.04 and got Liggghts running by 'make fedora'.
Now I tried changing make.ubuntuVTK to VTK version 5.8 (which is used on Ubuntu 13.04 also) and installed libvtk5-dev. But when I run make ubuntuVTK (just after running make clean-all) after a while I got this message:

mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DLAMMPS_VTK -I/usr/include/vtk-5.8 -I/usr/include/eigen2 -c dump_atom_vtk.cpp
In file included from /usr/include/c++/4.7/backward/strstream:52:0,
from /usr/include/vtk-5.8/vtkIOStream.h:112,
from /usr/include/vtk-5.8/vtkSystemIncludes.h:40,
from /usr/include/vtk-5.8/vtkIndent.h:24,
from /usr/include/vtk-5.8/vtkObjectBase.h:43,
from /usr/include/vtk-5.8/vtkObject.h:41,
from /usr/include/vtk-5.8/vtkCellArray.h:35,
from dump_atom_vtk.h:42,
from dump_atom_vtk.cpp:29:
/usr/include/c++/4.7/backward/backward_warning.h:33:2: Warnung: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
In file included from dump_atom_vtk.cpp:29:0:
dump_atom_vtk.h:59:22: Schwerwiegender Fehler: Eigen/Core: Datei oder Verzeichnis nicht gefunden
Kompilierung beendet.
make[1]: *** [dump_atom_vtk.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/user/LIGGGHTS-PUBLIC/src/Obj_ubuntuVTK'
make: *** [ubuntuVTK] Fehler 2

There seams to be a conflict in dump_atom_vtk.h linking to a missing directory. Is there a way to get it working with vtk-5.8?

Many thanks in advance,

Paul

AGl | Mon, 05/27/2013 - 08:44

You need Eigen3 for that.

sudo apt-get install libeigen3-dev

I will update in the evening also Launchpad's PPA for the latest 2.3.4 version and include there Raring-distribution.

PaulWinkler's picture

PaulWinkler | Mon, 05/27/2013 - 13:13

Hi,

thanks for your help. Finaly I got Liggghts 2.3.4 working with make ubuntuVTK on Ubuntu 13.04. But I use libeigen2-dev instead of eigen3.

Here my Step by Step tutorial, just missing the CFDEM coupling. Maybe anyone can help complement that?

## CDFDEM OpenFOAM 2.2.0, Liggghts 2.3.4, CFDEM 2.5.4, Paraview 3.98 on Ubuntu 13.04 amd64 (2013-05-27)
## - using OpenFOAM for quantal instead of raring

## Install OpenFOAM 2.2.0
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu quantal main > /etc/apt/sources.list.d/openfoam.list"
sudo apt-get update
sudo apt-get install openfoam220
gedit ~/.bashrc
add at the bottom -> source /opt/openfoam220/etc/bashrc
open new Terminal -> icoFoam -help

## Install ParaView 3.98
sudo apt-get install paraview

## Install missing packages for Liggghts 2.3.4
sudo apt-get install libvtk5-dev
sudo apt-get install libeigen2-dev
sudo apt-get install libopenmpi-dev
sudo apt-get install g++
which mpirun
/usr/bin/mpirun comes up?
which mpic++
/usr/bin/mpic++ comes up?
mpic++ -v
gcc-Version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) come sup at the last line?

## Get Liggghts 2.3.4 via Git
sudo apt-get install git-core
sudo git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git
cd /home/user/LIGGGHTS-PUBLIC
sudo git pull

## Compile Liggghts 2.3.4
cd /home/user/LIGGGHTS-PUBLIC/src
sudo make clean-all
sudo make ubuntuVTK
sudo ln -s /home/user/LIGGGHTS-PUBLIC/src/lmp_ubuntuVTK /usr/bin/liggghts
open new Terminal -> liggghts

## Get CFDEM 2.5.4 via Git
sudo git clone https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git
cd /home/user/CFDEMcoupling-PUBLIC
sudo git pull

## Compile CFDEM 2.5.4
??

Regards

Paul

gen_balls | Mon, 06/10/2013 - 15:44

Hi Paul,
I thank you for your advice, I installed all the recommendations step by step, but ligggths does not works, in addition in the top of the terminal I have a message "bash: source/opt/openfoam220/etc/bashrc: No such file or directory".
how I can resolve this problem.
Thanks

PaulWinkler's picture

PaulWinkler | Mon, 05/27/2013 - 13:34

Hi,

changed to user independent path names, added the changes in make file for Ubuntu 13.04.

## CDFDEM OpenFOAM 2.2.0, Liggghts 2.3.4, CFDEM 2.5.4, Paraview 3.98 on Ubuntu 13.04 amd64 (2013-05-27)
## - using OpenFOAM for quantal instead of raring

## Install OpenFOAM 2.2.0
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu quantal main > /etc/apt/sources.list.d/openfoam.list"
sudo apt-get update
sudo apt-get install openfoam220
gedit ~/.bashrc
- add at the bottom -> source /opt/openfoam220/etc/bashrc
- open new Terminal -> icoFoam -help

## Install ParaView 3.98
sudo apt-get install paraview

## Install Packages for Liggghts 2.3.4
sudo apt-get install libvtk5-dev
sudo apt-get install libeigen2-dev
sudo apt-get install libopenmpi-dev
sudo apt-get install g++
which mpirun
- /usr/bin/mpirun comes up?
which mpic++
- /usr/bin/mpic++ comes up?
mpic++ -v
- gcc-Version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) comes up at the last line?

## Get Liggghts 2.3.4 via Git
sudo apt-get install git-core
sudo git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git
cd /$HOME/LIGGGHTS-PUBLIC
sudo git pull

## Edit make file
sudo gedit /$HOME/LIGGGHTS-PUBLIC/src/MAKE/Makefile.ubuntuVTK
- in line 68 replace vtk-5.2 with vtk-5.8 and save file

## Compile Liggghts 2.3.4
cd /home/user/LIGGGHTS-PUBLIC/src
sudo make clean-all
sudo make ubuntuVTK
sudo ln -s /$HOME/LIGGGHTS-PUBLIC/src/lmp_ubuntuVTK /usr/bin/liggghts
- open new Terminal -> liggghts

## Get CFDEM 2.5.4 via Git
sudo git clone https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git
cd /$HOME/CFDEMcoupling-PUBLIC
sudo git pull

## Compile CFDEM 2.5.4
??

Regards

Paul

liping_he | Mon, 06/10/2013 - 04:50

when i run liggghts, it will show the following error message
---------------------------------------------------------------------------------------------
A requested component was not found, or was unable to be opened. This
means that this component is either not installed or is unable to be
used on your system (e.g., sometimes this means that shared libraries
that the component requires are unable to be found/loaded). Note that
Open MPI stopped checking at the first component that it did not find.

Host: he-ThinkPad-T420
Framework: crs
Component: none
--------------------------------------------------------------------------
[he-ThinkPad-T420:15430] *** Process received signal ***
[he-ThinkPad-T420:15430] Signal: Segmentation fault (11)
[he-ThinkPad-T420:15430] Signal code: Address not mapped (1)
[he-ThinkPad-T420:15430] Failing at address: 0x28
[he-ThinkPad-T420:15430] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f88d42f24a0]
[he-ThinkPad-T420:15430] [ 1] /usr/lib/libopen-pal.so.0(mca_base_select+0x108) [0x7f88d3c1c518]
[he-ThinkPad-T420:15430] [ 2] /usr/lib/libopen-pal.so.0(opal_crs_base_select+0x7e) [0x7f88d3c2e90e]
[he-ThinkPad-T420:15430] [ 3] /usr/lib/libopen-pal.so.0(opal_cr_init+0x31e) [0x7f88d3c0d0ee]
[he-ThinkPad-T420:15430] [ 4] /usr/lib/libopen-pal.so.0(opal_init+0x159) [0x7f88d3c0ca59]
[he-ThinkPad-T420:15430] [ 5] /usr/lib/libopen-rte.so.0(orte_init+0x4d) [0x7f88d407ba0d]
[he-ThinkPad-T420:15430] [ 6] /usr/lib/libmpi.so.0(+0x362e1) [0x7f88d4ec32e1]
[he-ThinkPad-T420:15430] [ 7] /usr/lib/libmpi.so.0(MPI_Init+0x16b) [0x7f88d4ee43fb]
[he-ThinkPad-T420:15430] [ 8] liggghts(main+0x1b) [0x582d17]
[he-ThinkPad-T420:15430] [ 9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f88d42dd76d]
[he-ThinkPad-T420:15430] [10] liggghts() [0x473999]
[he-ThinkPad-T420:15430] *** End of error message ***
-------------------------------------------------------------------------------------------------------------------------------------

Thanks for your help.

Regards

liping

AGl | Mon, 06/10/2013 - 07:52

How did you install liggghts: using compilation or packages on PPA?

AGl | Mon, 06/17/2013 - 09:36

liggghts-dev on PPA is syncing with git automatically. So, it is the latest one.

PaulWinkler's picture

PaulWinkler | Thu, 06/20/2013 - 17:48

The packages are not avaiable on Ubuntu 13.04 (raring), so you have to force to quantal. By editing the package list with:
sudo gedit /etc/apt/sources.list
you have to add the last two lines, or edit the existing ones to:
deb http://ppa.launchpad.net/liggghts-dev/ppa/ubuntu quantal main
# deb-src http://ppa.launchpad.net/liggghts-dev/ppa/ubuntu quantal main

Manual editing the package entrees in the software configuration is not successfully, but you can add a new one and use 'deb http://ppa.launchpad.net/liggghts-dev/ppa/ubuntu quantal main' in the dialog.

Regards

Paul

AGl | Fri, 06/21/2013 - 08:24

Please, don't do it! It can lead to many unexpected problems!

I have just requested package builds for Raring and coming Saucy. They should appear shortly in the repo.

AGl | Fri, 07/12/2013 - 13:29

All Ubuntu versions have the newest git version of LIGGGHTS (liggghts-dev). Just start it and see, what is in output. The version in "changelog" is really 2.3.4, but that does not matter.