Compilling LIGGGHTS on OpenSuse.

Submitted by Guesnet Etienne on Tue, 10/13/2015 - 08:44

Hello. I recently install LIGGGHTS on an Opensuse Linux computer. There is some distribution specific facts, so I send an how-to.

First, you need some packages. So, as root, type:

zypper install gcc-c++ openmpi openmpi-devel git

The main trouble is mpi's files are not in standard path; e.g. the command "mpirun" is not found. So you need add the following line in ~/.bashrc file. Beware if you are in a 32bits computer, write "lib" instead of "lib64".

export PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin

It indicates to the shell he must search also on this directory. There is a similar trouble with lib. And the same solution: add on .bashrc

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/mpi/gcc/openmpi/lib64

Good news, the OpenSuse specific part is ended. So, you just need to download LIGGGHTS's source:

git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git

You has now a "LIGGGHTS-PUBLIC" repository. Go to LIGGGHTS-PUBLIC/src/ and type

make fedora

It will compiles without errors and produce a "lmp_fedora" file.
It will be practice to make a link to this file, so, as root

ln -s "absolute path to lmp_fedora" /usr/bin/liggghts

You can try an example. Go to the example directory, choose one and type

liggghts -in in.example_name

To use "N" processors, type

mpirun -np N liggghts -in in.example_name

It will be OK.

navid450 | Thu, 05/12/2016 - 22:41

Hi, thanks a lot for the step by step process. However, even following all the steps, I couldn't execute the example file....at the last step where I write ''/LIGGGHTS-PUBLIC/examples/LIGGGHTS> liggghts

Guesnet Etienne | Wed, 05/18/2016 - 14:49

Hi,

I think your message was truncated. What is the command which fail?

You can try e.g.
cd LIGGGHTS-PUBLIC/examples/LIGGGHTS/Tutorials_public/packing/
"absolute path to lmp_fedora" -in in.packing

Best.