4. Command reference¶
4.1. Command line options¶
|Nmag| supports a number of command line options to configure its behaviour.
Suppose the simulation script is called X.py
, then these OPTIONS can be specified like this:
nsim X.py OPTIONS
X.py
needs to contain at least the line import nmag
as this will process the command line options.
The available options are:
–clean: | to override any existing Example: nsim X.py --clean
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
–loglevel: | this switch determines the amount of information that is being send
to stdout (usually the screen) and also to the file The available levels are in increasing order of detail:
Example: nsim X.py --loglevel info2
or: nsim X.py --loglevel debug
|
||||||||||
–slavelog: | Log message from slave nodes (when running under MPI) are usually supressed. This switch activates them. Printing these messages will reduce the MPI performance somewhat as the messages are printed to stdout on each slave, and then have to be transferred through the network to the master process. Note that any log-messages from the nodes will only go to stdout (whereas log messages from the master will also go into the log file, see File names for log files.) Messages from slave nodes are preceeded by Example: nsim X.py --slavelog
|
||||||||||
–restart: | If a calculation of a hysteresis loop is interrupted (power cut, computer crash, exceeding allocated run time on cluster, etc), then the calculation can be carried out starting from the moment when the last restart file was saved (see Restart example). This continuation is activated with the Example: nsim X.py --restart
Note that this functionality is only available for the hysteresis loop. |
The command line options can be combined, for example:
nsim X.py --clean --loglevel debug
There are a few other switches (mostly for debugging) which can be seen using:
nsim X.py --help