gdb debugger

Hello,

I was attempting to debug lammps running on a single process using gdb but the usual method of input redirection “run < inputfile” triggers an error warning in the base lammps class about incorrect input arguments. Is there any way around this?

Hello,

I was attempting to debug lammps running on a single process using gdb but
the usual method of input redirection "run < inputfile" triggers an error
warning in the base lammps class about incorrect input arguments. Is there
any way around this?

the "usual" method of input redirection is actually a bad idea. it is
a relic from the fortran version of LAMMPS as fortran at that time
didn't have any portable standardized facility for passing command
line arguments. in my personal opinion redirection support should be
abolished. it would simplify several pieces of rather ugly code in
LAMMPS.

you can just flag your input file with -in or -input and using gdb is a breeze.

i also strongly recommend studying the use of the -x and --args flags
of gdb. it will make your life much easier.

axel.

worked like a charm, thanks.

Does Lammps go through the process of computing the compute’s result every timestep if you just state the compute in your input file? or does it have to be used by an output routine or fix for the relevant routine to be called?

Does Lammps go through the process of computing the compute’s result every timestep if you just state the compute in your input file? or does it have to be used by an output routine or fix for the relevant routine to be called?

A compute has to be used to be executed.

Axel.