[outdated] Setup LIGGGHTS 3.0.0 on Ubuntu, Mint...

PaulWinkler's picture
Submitted by PaulWinkler on Tue, 03/04/2014 - 11:14

Hi,

an updated tutorial for Ubuntu, Mint and other Debian based distributions. Since MPI support didn't work the old way and I don't need it at the moment, I left it, maybe someone can post the solution. I integrate jpg and png support for image dump, since I do animations in ParaView. I updated the Syntax-Highlighting for gedit by Philippe Seil for LIGGGHTS 3.0. The file is detached, his original post not longer on-line anymore.
It would be fine, if you give feedback and recommendations.

Regards,
Paul


## Liggghts 3.x, LPP, Syntax-Highlighting, Paraview 4.0.x, GNUplot 4.6.x, on Mint 16 amd64 (2014-03-04)

## 1 Install Liggghts 3.x by compiling
## 1.1 Install Packages
sudo apt-get install git libvtk5-dev libeigen2-dev libopenmpi-dev
which mpirun
- /usr/bin/mpirun comes up?
which mpic++
- /usr/bin/mpic++ comes up?
## 1.2 Get Liggghts via Git
cd ~
git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC
## 1.3 Compiling Liggghts with jpg and png support
cd $HOME/LIGGGHTS-PUBLIC/src
gedit /$HOME/LIGGGHTS-PUBLIC/src/MAKE/Makefile.serial
- add in line 31:"-DLAMMPS_JPEG -DLAMMPS_PNG"
- add in line 62:"-I/usr/include"
- add in line 64:"-ljpeg -lpng"
- save and close gedit
make clean-all
make stubs
make serial
sudo ln -s /$HOME/LIGGGHTS-PUBLIC/src/lmp_serial /usr/bin/liggghts
liggghts
- Liggghts comes up, telling version, compiling date etc.
Ctr+d

## 2. Install LPP for postprocessing
cd ~
sudo apt-get install python-numpy
sudo git clone https://github.com/CFDEMproject/LPP.git $HOME/LPP
gedit ~/.bashrc
- add: "alias lpp="python $HOME/LPP/src/lpp.py""
- open new Terminal: lpp dump.examplefilename

## 3. Install Syntax Highlighting for gedit
cd ~
wget http://www.cfdem.com/system/files/liggghts3.lang_.tar_.gz
tar -zxvf liggghts3.lang_.tar_.gz
sudo mv $HOME/liggghts3.lang /usr/share/gtksourceview-3.0/language-specs

## 4. Install ParaView 4.0.1
sudo apt-get install paraview

## 5. Install GNUplot 4.6.3
sudo apt-get install gnuplot-x11
gnuplot
plot sin(x)
- window with sin graph comes up?
Ctr+d

AttachmentSize
Binary Data Syntax-Highlighting-LIGGGHTS31.55 KB

AGl | Tue, 03/04/2014 - 13:29

One more alternative way to install LIGGGHTS-3.0.0 using cmake.
1) Take source code from here https://github.com/gladk/LIGGGHTS-PUBLIC/tree/3test
The only difference from original 3.0.0 version is an updated cmake-files.
2) Create build-directory, go to it
3) Type cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/liggghts /path/to/liggghts-source
4) make
5) make install
Then you can start liggghts. using /path/to/install/liggghts/bin/liggghts
I hope, updated Cmake-files will be accepted soon in the official public-version.

Be sure to have dependencies, listed in above message (libvtk5-dev etc.)

Nafets | Fri, 04/04/2014 - 10:15

I've got some problems with the compiling.
At first when i write "wich mpirun" - /usr/bin/mpirun comes not up.

Second:
I followed the instruction and then i got that message
gedit /$HOME/LIGGGHTS-PUBLIC/src/MAKE/Makefile.serial
(gedit:2369): GtkSourceView-WARNING **: Unsupported language spec version '3.0' in file '/usr/share/gtksourceview-3.0/language-specs/liggghts3.lang'
(gedit:2369): GtkSourceView-WARNING **: Error reading language specification file '/usr/share/gtksourceview-3.0/language-specs/liggghts3.lang'

Third:
This is what a I get from the Terminal after that:
/bin/sh: 1: g++: not found
g++ -O -DLAMMPS_GZIP -DLAMMPS_JPEG -DLAMMPS_PNG -I../../lib/meam -I../STUBS -I/usr/include -I/usr/local/include/voro++ -M ../angle_charmm.cpp > angle_charmm.d
/bin/sh: 1: g++: not found
make[1]: *** Keine Regel, um »../../lib/meam/Makefile.lammps« zu erstellen. Schluss.
make[1]: Verlasse Verzeichnis '/home/stefan/LIGGGHTS-PUBLIC/src/Obj_serial'
make: *** [serial] Fehler 2

can you help me?

Nafets | Fri, 04/04/2014 - 12:30

I solved it.
But there is only one thing i need to ask you. I need the molecule package but when i compile lights on your way it is not compiled with liggghts.
When i write in the terminal liggghts -h i get
* Atom styles:

atomic body charge ellipsoid hybrid
line sphere granular sph sph/var
tri

So my question is how can i compile lights with the atom style molecule?

franciscohgt | Tue, 05/13/2014 - 22:49

i have this error:
../compute_voronoi_atom.h:24:21: fatal error: voro++.hh: No existe el archivo o el directorio
#include "voro++.hh"
^
compilation terminated.
make[1]: *** [compute_voronoi_atom.o] Error 1
make[1]: se sale del directorio «/home/francisco/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_serial»
make: *** [serial] Error 2

aaigner's picture

aaigner | Thu, 05/15/2014 - 14:11

Hello franciscohgt,

you are trying to compile LIGGGHTS together with the package VORONOI. I do not know this package exactly but obviously it requires the software voro++. You have to install it first and you must ensure that your compiler knows the voro++ header-files.

Bests
Andreas