Spec:Multirun mode

--Dchassin 16:29, 9 October 2011 (UTC)

This document describes the specifications for implementation of multirun mode.

Theory of operation
Multirun mode operates by creating and coordinating multiple instances of GridLAB-D. The originating instance is called the master and the dependent instances are called the slaves.

The overall process is as follows:

GLM syntax
An instance is defined in the master file using the instance directive syntax:

instance (optional string)hostname:(optional int16)portnum { (required)model (string)slave_model_filename.glm; (optional)cacheid (int64)''cacheid' (multiple)master_object:property -> slave_object:property; (multiple)master_object:property <- slave_object:property; }

Command line
The command line for master runs is unchanged. However, the --port command option can be used to change the default port number for socket-based connections.

The command line for slave runs shall use the following syntax:

host% gridlabd --slave connection_string

where the connection_string is platform specific and differs depending on whether the multirun is on the local host or uses multiple machines.

General specifications

 * No changes to slave model files shall be required to link a slave with a master.
 * When the hostname is not specified, the default hostname shall be localhost.
 * When the portnum is not specified, the default port number shall be 6267.
 * The cacheid is to be used for debugging purposes only and shall not be documented for normal usage.
 * If the slave model cannot be loaded, the problem shall be detected and handled by the slave instance.
 * If a master object or property cannot be found the master shall notify output an error message identify the file and line on which the offending linkage occurred.
 * If a slave object or property cannot be found, the problem shall be detected and handled by the slave instance.
 * If the slave cannot find a linkage object or property, the slave shall output an invalid linkage error, notify the master that it cannot initialize, and terminate in the normal manner.
 * Output streams shall have a prefix indicating the source of the message. The master message prefix shall be formatted as "Mcpu(pid)" and slave message prefix shall be formatted as "Scpu(pid)", where cpu is the CPU to which the instance is assigned (see pstatus) and pid is its process id.