I have wall time limitations and thus I use a “timer timeout” command.
This time I need to perform two simulations within one input script;
this can be done with “clear” command. The “clear” command destroys
everything except “the working directory, log file status, echo status,
and input script variables except for atomfile style variables”.
Timer is not in this list, thus “clear” should destroy it. But this behavior
seems strange. The question is: does “clear” indeed destroy timer?
Yes, it “has to”. The Timer class is a member of the LAMMPS class and thus is created and destroyed with all of LAMMPS. Only the few settings that are set outside the LAMMPS class (e.g. from the command line) are retained on a clear command.
Here is proof. When I run this input:
timer
timer timeout 0
timer
clear
timer
I get this output:
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-405-gaa1cde3665-modified)
using 1 OpenMP thread(s) per MPI task
New timer settings: style=normal mode=nosync timeout=off
New timer settings: style=normal mode=nosync timeout=00:00:00
New timer settings: style=normal mode=nosync timeout=00:00:00
using 1 OpenMP thread(s) per MPI task
New timer settings: style=normal mode=nosync timeout=off
Total wall time: 0:00:00