Liggghts installation issue on Ubuntu 14.04 LTS

Submitted by Luton on Sat, 09/06/2014 - 15:55

Hello all,

I was trying to install liggghts source code following the steps provided on the web. The first steps run as in the tutorial but I had problem with "Set symbolic link for LIGGGHTS" command.

Here is some commands I used and their outcomes :

which mpirun
/usr/bin/mpirun

which mpic++
/usr/bin/mpic++

mpic++ -v
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

cd /home/"user"/LIGGGHTS-PUBLIC/src
sudo make clean-all
sudo make make fedora

.
.
..o write_dump.o write_restart.o -lstdc++ -o ../lmp_fedora
size ../lmp_fedora
text data bss dec hex filename
6450074 11944 17488 6479506 62de92 ../lmp_fedora
make[1]: Leaving directory `/home/hasan/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora'

Here were my problem occurs

sudo ln -s /path1/src/lmp_fedora /usr/bin/liggghts

ln: failed to create symbolic link ‘/usr/bin/liggghts’: File exists

Could someone please help me or give me some hints with this regard.

Thanks,

Luton

j-kerbl's picture

j-kerbl | Mon, 09/08/2014 - 12:21

Hi Luton,

looks like there is already a link there with the name liggghts.
If the command liggghts does not work, you can remove the link with 'sudo rm /usr/bin/liggghts' and generate the link again with the ln command.

Cheers
Josef

Luton | Mon, 09/08/2014 - 23:42

Hi Josef,

Thank you for your reply.

I did as you advised I removed the first link and I generate a new link using the ln command. Up to here everything is ok and I did not receive the failed message again .

but when I print 'liggghts' in the terminal I get:

"The program 'liggghts' is currently not installed. You can install it by typing:
sudo apt-get install liggghts"

which related to a pre-installed package.Is there any way in which I could distinguish one from another or should I follow different steps.

Many Thanks,

Luton

j-kerbl's picture

j-kerbl | Tue, 09/09/2014 - 09:49

Hi Luton,

To check if liggghts compiled correctly you can go to $HOME/LIGGGHTS/LIGGGHTS-PUBLIC/examples/LIGGGHTS/meshGran and run
$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src/lmp_fedora < in.meshGran

If that works, it is the link that is not working.
Did your ln command look like this?
sudo ln -s /home/hasan/LIGGGHTS/LIGGGHTS-PUBLIC/src/lmp_fedora /usr/bin/liggghts
In this case absolute paths are a little bit safer to use.

Cheers
Josef