how to run input script given in Tutorial

Submitted by rashid minhas on Sat, 07/15/2017 - 00:18

Hi every one,
please help me i am new user of liggghts, and using ubuntu 16.04 LTS operating system.
i used the procedure given in the link : "https://www.cfdem.com/media/DEM/docu/Section_start.html"
after completing step 0 (2.2.2. Steps to build a LIGGGHTS(R)-PUBLIC executable) i got lmp_auto in src directory.
than i went directly on "2.6. Running LIGGGHTS(R)-PUBLIC"
and tried to run tutorial example chute wear input script by using following command in terminal:
":~/LIGGGHTS-PUBLIC/examples/LIGGGHTS/Tutorials_public/chute_wear$ mpirun -np 4 lmp_auto

AttachmentSize
File complete question is in file14.75 KB

rashid minhas | Sat, 07/15/2017 - 00:33

and tried to run tutorial example chute wear input script by using following command in terminal:
":~/LIGGGHTS-PUBLIC/examples/LIGGGHTS/Tutorials_public/chute_wear$ mpirun -np 4 lmp_auto

rashid minhas | Sat, 07/15/2017 - 12:02

Hi mschramm,
I have followed your instruction but the link is not established. I have written following command in ubuntu terminal
ln -s /$HOME/LIGGGHTS-PUBLIC/src/lmp_auto /usr/bin/liggghts
and the following message is appear
ln: failed to create symbolic link '/usr/bin/liggghts': File exists
I have also tried this command too
sudo ln -s lmp_ubuntuVTK /usr/bin/liggghts
and the following message is appear
ln: failed to create symbolic link '/usr/bin/liggghts': File exists
can you help me why the symbolic link is not created
thanks

rashid minhas | Mon, 07/17/2017 - 00:53

mpirun -np 4 /$HOME/LIGGGHTS_PUBLIC/src/lmp_auto -in in.chute_wear
--------------------------------------------------------------------------
mpirun was unable to launch the specified application as it could not access
or execute an executable:

Executable: //home/mahid/LIGGGHTS_PUBLIC/src/lmp_auto
Node: mahid-7G-Series

while attempting to start process rank 0.

j-kerbl's picture

j-kerbl | Mon, 07/17/2017 - 15:12

Hi Rashid,

the symbolic link isn't created, since there is already a liggghts link there. See the output:
failed to create symbolic link '/usr/bin/liggghts': File exists

To rewrite the link, you can use the -f option and to write into /usr/bin you should probably run this as sudo:

sudo ln -sf /home/mahid/LIGGGHTS-PUBLIC/src/lmp_auto /usr/bin/liggghts
liggghts

Also please try to copy this line, since if you make any mistake it won't work. I just saw some inconsistencies with "LIGGGHTS-PUBLIC" and "LIGGGHTS_PUBLIC".

Cheers,
Josef

z3490628 | Tue, 08/22/2017 - 09:49

Hi Josef,

I have a similar problem. I have tried to type 1. sudo ln -s /$HOME/LIGGGHTS-PUBLIC/src/lmp_serial /usr/bin/liggghts before
2. gedit ~/.bashrc
3. Added to end -> alias "liggghts=$HOME/LIGGGHTS-PUBLIC/src/lmp_serial"

I would like to change it to "sudo ln -s /$HOME/LIGGGHTS-PUBLIC/src/lmp_auto /usr/bin/liggghts". However, it displayed ln: failed to create symbolic link ' /usr/bin/liggghts': File exists even tho I have tried to replace it as sudo ln -sf and modify the gedit.

Can you please help? thanks

Regards,
Josh

z3490628 | Tue, 08/22/2017 - 10:03

Hi Josef,

In addition, when I typed the command "liggghts", it returns as bash: /home/z3490628/LIGGGHTS-PUBLIC/src/lmp_serial: No such file or directory. I am confused that even tho I have changed the new path as lmp_auto, it still appears as bash.......lmp_serial.

Regards,
Josh

Jmass | Thu, 02/06/2020 - 16:01

When I use the same command as Rashid, I am warned not to run as root. How do I run this an non-root/ fix the issue?

:~/LIGGGHTS-PUBLIC/examples/LIGGGHTS/Tutorials_public/chute_wear# mpirun -np 4 lmp_auto