Running LAMMPS without it printing anything besides warnings and errors

I’d like to run LAMMPS and make it not print anything besides the warnings and errors if it encounters. Hence I I read these docs: 4.2. Command-line options — LAMMPS documentation and I can’t get it working for me. I run LAMPPS as following:

mpirun lmp -nocite -echo none -log <file1>.lmp.log -in <file2>.lammps

But I still see lot’s of messages such as:

Created 1 atoms.
  create_atoms CPU = 0.000 seconds

And many more information, as is already present in the log. What am I missing? Why isn’t -echo none doing what it promises to do?

There is no such option available. Only errors will be printed to stderr.
For the rest you have either output to “screen” or “log”.

From the manual:

-echo style

Set the style of command echoing. The style can be none or screen or log or both. Depending on the style, each command read from the input script will be echoed to the screen and/or logfile. This can be useful to figure out which line of your script is causing an input error. The default value is log. The echo style can also be set by using the echo command in the input script itself.

So the “-echo” flag controls whether “each command read from the input script will be echoed to the screen and/or logfile”. This means normal output is unaffected.

To turn off output to the screen, you need to use “-screen none”.

1 Like

Thanks for the help. So are you saying that “command echoing” doesn’t include prints such as:

Created 1 atoms.
  create_atoms CPU = 0.000 seconds

Perhaps the docs for -echo could mention -screen none, saying it will really disable all printings?

Of course. Those are not commands.

Echoing input commands is a completely different thing than redirecting or turning off output to the screen.