Last Oxsii/Boxsi Run:
lastjob
The lastjob command reads through Oxs log files and identifies
the last simulation run, sorted by job start time. From information in
the log file, lastjob constructs a command equivalent to that used
to launch the last simulation, and then will either print or run that
command. If the last simulation is not recorded as complete in the log
file, and a restart is requested, then the simulation will be restarted
with the -restart 1 command line option. If a restart (checkpoint)
file exists for the simulation, then the command will restart the
simulation at the checkpoint state. If a restart file cannot be found,
then the job restart will fail. (By default, Oxsii and
Boxsi write checkpoint files to disk
every fifteen minutes. If a simulation is aborted, for example by a
system crash, then the checkpoint file can be used to restart the
simulation.) Refer also to the
logreview command line
tool.
Launching
The lastjob launch command is:
tclsh oommf.tcl lastjob [-logfile logname] [-unfinished] [-v] <show|restart> \
<oxsii|boxsi> [hostname] [username]
where
- -logfile logname
- The name of the file to look in to determine the last job. Optional.
The default is to look in the OOMMF root directory for either
oxsii.log or boxsi.log, corresponding to whether
Oxsii or Boxsi jobs are selected. Use “-” as the
logname to read from stdin. In particular, log files can be
filtered first through logreview for additional job selection
control.
- -unfinished
- Restrict search to unfinished jobs. Optional.
- -v
- Request verbose output. Optional.
- show|restart
- Selects whether to simply show the command or to attempt a restart.
Required.
- oxsii|boxsi
- Selects Oxsii or Boxsi jobs. Required.
- hostname
- The name of the host machine to look for jobs for. This is optional,
with the default being the name of the current machine. This option is
useful if the log file is on a shared drive used by multiple hosts.
This field is interpreted as a regular expression, so for example
“.*” can be used to find the last job for all hosts.
- username
- The name of the user to look for jobs for. This is optional,
with the default being the name of the current user. This option is
useful if the same log file is shared by multiple users.
This field is interpreted as a regular expression, so for example
“.*” can be used to find the last job by any user.
Note: If your command shell expands wildcards, as is common on Unix systems, then you may need to escape or quote regular expressions to
protect them from expansion by the shell.
OOMMF Documentation Team
November 12, 2026