Hello,
I am running some tests using the python wrapper and would like to hide ALL
screen output from liggghts.
Is there any way to do this?
I am using the flags pre no and post no on my runs to hide some of the output
and echo none to hide line reads but I still have some output.
I also do not want to redirect the screen output to a file as the file would grow
rather large.
Thank you.
richti83 | Fri, 08/17/2018 - 19:42
in linux/unix send it to /dev
in linux/unix send it to /dev/null :-)
liggghts > /dev/null 2>&1
/dev/null treated as black hole in Linux/Unix, so you can put any this into this but at the end you will not able to get this back from /dev/null
[https://askubuntu.com/questions/350208/what-does-2-dev-null-mean]
mschramm | Sat, 08/18/2018 - 02:17
Python command
Thanks for the hint but I only want to silence the liggghts' output and not the python output.
I will try adding the redirect in the liggghts call
lmp = liggghts("", > /dev/null)
paul | Sat, 08/18/2018 - 20:20
This doesn't look like valid
This doesn't look like valid python to me.
https://www.cfdem.com/media/DEM/docu/Section_python.html?highlight=screen
Says you can do
lig = liggghts("",list) # ditto, with command-line args, e.g. list = ["-echo","screen"]
If we combine this with
https://www.cfdem.com/media/DEM/docu/Section_start.html#command-line-opt...
that says you can use the flags
-screen none
We get
lmp = liggghts("", ["-screen", "none"])
You owe me a beer if this works, since literally the first google result for "lammps python screen" gave me this answer by Axel Kohlmeyer ;)
https://lammps.sandia.gov/threads/msg74585.html
mschramm | Sat, 08/18/2018 - 21:12
good new bad news
Bad News
The screen command was what I was looking for, thank you.
However, "none" led to a segmentation fault error.
I then checked "liggghts -screen none -in in.liggghts" and this worked just fine.
I was able to get it to work doing
lmp = liggghts("",["-screen","/dev/null"])
Good News
I think this is a bug....