OOMMF Home next up previous contents index
Next: Launching the OOMMF host Up: Command Line Utilities Previous: Killing OOMMF Processes: killoommf


Last Oxsii/Boxsi run: lastjob

The lastjob command reads through Oxs log files and identifies the last simulation run. From information in the log file, lastjob constructs a command equivalent to that used to launch the last simulation and prints that command to stdout. If that 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 comand 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.)

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.errors or boxsi.errors, corresponding to whether oxsii or boxsi jobs are selected.
-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 Home next up previous Contents index

OOMMF Documentation Team
September 29, 2017