Command options

The command-line argument processing module processes arguments as they are encountered.

Note: some modules can process command arguments as well. Those options are not listed here.

= Command-line options =


 * -W|--workdir path : Sets the working directory for the remainder of the run.


 * --quiet | -q : Toggles display all messages except error and fatal messages.


 * --verbose | -v : Toggles display of verbose messages. Verbose messages can be useful in understanding why certain error or warning occur.


 * --warn | -w : Toggles display of warning messages. Warning messages relate to problems that might affect results.


 * --debug : Toggles display of debug messages.  Debugging messages are highly detailed messages about the internal state of the simulation.


 * --debugger : Enables the debugger and turns on debug messages.


 * --dumpall : Enables a complete model dump when the simulation exits.


 * --output file | -o file : Directs model output to the specified file.


 * --profile</tt> : Enables performance profiling of the model and displays profile output when the simulation exits.


 * --check</tt> : Enables calls to module check functions before the simulation starts. This can be used to detect models errors, but not all modules support such check functions. See --libinfo</tt> for details on module functions.

= Global and module control =


 * --define name=value | -D name=value</tt> : Defines a global variable


 * --globals</tt> : Displays the global variables and their values


 * --libinfo module | -L module</tt> : Displays information about a module, including API version, classes defined, functions implemented and global variables.

= Information =


 * --version | -V</tt> : Displays the full version/build number.


 * --license</tt> : Displays the software license.


 * --copyright</tt> : Displays the copyright.

= Test processes =


 * --dsttest</tt> : Performs a daylight saving time definitions in tzinfo.txt


 * --endusetest</tt> : Performs a test of the end-use pseudo-objects


 * --globaldump</tt> : Perform a global dump of the system and immediately exits.


 * --loadshapetest</tt> : Performs a test of the loadshape pseudo-objects


 * --locktest</tt> : Performs memory locking test


 * --modtest module</tt> : Performs the module self-test for the specified module


 * --randtest</tt> : Performs a test of the random number generators


 * <tt>--scheduletest</tt> : Performs a test of the schedule pseudo-objects


 * <tt>--test</tt> : Perform all the internal core self-test routines


 * <tt>--testall file</tt> : Performs module selftests of modules those listed in a file.


 * <tt>--unitstest</tt> : Performs a test of the units in unitfile.txt


 * <tt>--validate</tt> : Perform model validation check

= File and I/O Formatting =


 * <tt>--xmlencoding num</tt> : Sets the XML encoding (8, 16, or 32)


 * <tt>--xmlstrict</tt> : Toggles XML to be strict, which is needed for compliance with certain XML loaders.


 * <tt>--stream</tt> : Enables streaming I/O (binary I/O instead of GLM/XML)


 * <tt>--xsd module[:object]</tt> : Prints the XSD of a module or object.


 * <tt>--xsl modulelist</tt> : Creates the XSL for the modules listed.


 * <tt>--kml=file</tt> : Output the KML (Google Earth) file of model (only supported by some modules).

= Help =


 * <tt>--example module:class</tt> : Output an example of GLM code that will create a object of class given from the module given (as of ).


 * <tt>--help | -h</tt> : Command line help.


 * <tt>--info keyword</tt> : Open a browser and searches these Wiki docs for the keyword given.  Spaces may be entered as underscores in keywords (as of ).


 * <tt>--modhelp module[:class]</tt> : Output the GLM definition of class from module. All the classes from the specified module will be listed in alphabetical order if no class is given.

= Process control =


 * <tt>--threadcount n| -T n</tt>
 * Changes the number of threads to use during simulation (0 means as many as useful, default is 1)


 * <tt>--clearmap</tt>
 * <tt>--pclear</tt>
 * Clears the processor map of defunct processes (as of )


 * <tt>--pcontrol</tt>
 * Enter interactive process control (as of )


 * <tt>--pkill n</tt>
 * Kills job n in the process map (as of )


 * <tt>--pstatus</tt>
 * Displays the processor status (as of )

= System options =


 * <tt>--checkversion</tt> : Perform online version check to see if any updates are available (as of 3.0).


 * <tt>--compile</tt> : Enables compile-only mode (the GLM file is loaded but the simulation does not start)


 * <tt>--relax</tt> : Allows implicit variable definition when assignments made


 * <tt>--pause</tt> : Enable pause at exit (waits for user input before exiting)


 * <tt>--bothstdout</tt> : Sends all output to stdout


 * <tt>--check | -c</tt> : Run global checks of models (only supported by some modules)


 * <tt>--avlbalance</tt> : Controls automatic balancing of object index


 * <tt>--output file | -o file</tt> : Saves dump output to file (default is gridlabd.glm)


 * <tt>--environment app | -e app</tt> : Starts the app as the processing environment (default is batch). Recognized environments are matlab, html, gui, and X11.  All but batch are experimental or under development.

= Server mode =


 * <tt>--pidfile[=filename]</tt> : Creates a process id file while GridLAB-D is running (default is gridlabd.pid). Note: this is only supported in POSIX platforms.


 * <tt>--redirect stream[:file]</tt> : Redirects output stream to file (or null). Valid streams are output, error, warning, debug, verbose, profile, progress, none and all.


 * <tt>--server</tt> : Runs in server mode (uses pidfile and redirects all output)


 * <tt>--server_portnum n | -P n</tt> : Sets the server port number (default is 6267)

= Job control =


 * <tt>--job</tt> : Runs all the GLM files found in the current folder as a single job (as of ).