Hide all screen output

Submitted by mschramm on
mschramm

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)

Sat, 18 Aug 2018 - 02:17 Permalink
paul

In reply to by mschramm

This doesn't look like valid python to me.

https://www.cfdem.com/media/DEM/docu/Section_python.html?highlight=scre…
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-op…
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

Sat, 18 Aug 2018 - 20:20 Permalink
mschramm

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....

Sat, 18 Aug 2018 - 21:12 Permalink

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.