Output script

Hi all,

Just putting a general tip out there for those who have not had as
much luck upgrading from the serial to parallel codes, and on a stupid
mistake that isn't so obvious. I have found it common practice in
scientific computing to send the printed information my generic runs
throw out into a file I can look at later for debugging purposes using
the command " > somefile &". While using this command in trying to
commit parallel lammps jobs this caused me a lot of frustration trying
to get a code to compile and run simple examples. Until a helpful
lammps user on the same cluster pointed out that the scripts seem to
work fine on her compiled code if you don't direct the output to
another file. Indeed this seemed to be the problem. I will note that
this practice works fine using the serial code.

I would like to know if this problem is in using lammps or is just
specific to our cluster.

Hi all,

Just putting a general tip out there for those who have not had as
much luck upgrading from the serial to parallel codes, and on a stupid
mistake that isn't so obvious. I have found it common practice in
scientific computing to send the printed information my generic runs
throw out into a file I can look at later for debugging purposes using
the command " > somefile &". While using this command in trying to
commit parallel lammps jobs this caused me a lot of frustration trying
to get a code to compile and run simple examples. Until a helpful

this still works fine, but you have to know what it does exactly.

the ">" will redirect the standard output to a file.

the "&" has nothing to do with that, but will put
the current command into the background. this
is really only needed in interactive environments
and when you need to recover your console.

backgrounding may be a problem with some MPI
implementations, that require access to a console
and will stall unless you reconnect it to your
console terminal with "fg".
MPI implementations that "suffer" from this, often
have a special flag to mpirun to deal with this, or
you can redirect input from /dev/null instead.

that all being said. i/o redirection (both for input
and output) is not really needed for lammps.
you can control output with the flags -log and
-screen and in addition the -echo flag in case
you need to debug your script.

lammps user on the same cluster pointed out that the scripts seem to
work fine on her compiled code if you don't direct the output to
another file. Indeed this seemed to be the problem. I will note that
this practice works fine using the serial code.

I would like to know if this problem is in using lammps or is just
specific to our cluster.

neither. again, it has nothing to do with redirection
but backgrounding and is MPI library specific.
most likely you have a version of MPICH or one
of its derivatives installed.

axel.

p.s.: it may be helpful to google for a "unix/linux basics" tutorial
and check out all these shell "special characters". good stuff.