The GoldSim Distributed Processing (DP) Module is an extension to GoldSim which allows the use of multiple computers connected over a network, or multiple cores on a single computer, to share the computational burden of a single Monte Carlo simulation (i.e. a simulation with multiple realizations). Distributed processing is accomplished by having a Master GoldSim executable connect to a number of Slave GoldSim executables. Each Slave executable runs as a separate process to complete one or more realizations in a Monte Carlo simulation. The Slave processes can be on a single computer or on multiple computers which are connected via a network. The Master combines all of the individual realization results (from the Slaves) into a single GoldSim file and enters result mode, just as if the simulation had been completed entirely on the Master’s machine.
Figure 1: Use "Run on Network" to start a DP simulation
A DP simulation is controlled by a single Master GoldSim executable. The Master executable is simply a version of GoldSim running on one machine which has the DP module enabled. From within GoldSim on the Master, a DP simulation is started using the “Run on Network” Run Menu item as shown in Figure 1. The “Run on Network” item brings up the “Master Settings” dialog shown in Figure 2. The “Master Settings” dialog allows the Master to create connections with multiple Slave GoldSim processes. One way to create Slave processes is to use the GoldSim Slave Manger.
Figure 2: "Master Settings" dialog
GoldSim Slave Manager
The GoldSim Slave Manager is a Windows Service that can be installed on a computer using an install package which is obtained from the utilities downloads page of the GoldSim web site. The GoldSim Slave Manager needs to be installed on each computer which will have Slaves automatically launched from the “Master Settings” dialog. As part of the installation package, the GoldSim Slave Manager service is installed and configured on the target computer. The properties of this service, as typically configured, are provided in Figure 3. The GoldSim Slave Manager service will automatically launch the GoldSim Slave Manager process during system startup. When active, the process can be seen in Task Manager as shown in Figure 4. By default, the GoldSim Slave Manager process runs under the System account (or User name) as shown in Figure 3 and Figure 4.
Figure 3: GoldSim Slave Manager service properties
Figure 3 shows that the default Log on for the GoldSim Slave Manager service is the Local System account (LSA) which corresponds to User name SYSTEM. The LSA should be set to “Allow service to interact with desktop” in the properties dialog as shown in Figure 3. It is possible to change the Log on account for the GoldSim Slave Manager service by using the “This account:” radio button; however, modifications to the default Log on behavior of services and the account which is used for the Log on should be changed with care as it is easy to break system functionality by changing the Log on credentials for services. As a result, changing the Log on account is not recommended.
Figure 4: GoldSim Slave Manager process
The GoldSim Slave Manager works by automatically launching Slave processes on the computers which are specified in the “Master Settings” dialog (see Figure 2). The GoldSim Slave Manager process then needs to be running on the specified external computers in order for communication between the Slave Manager process (on each external computer) and the Master to occur. If a Firewall is installed on the external computers, the Firewall will need to be configured to permit incoming communication on TCP ports 5562-5572. Firewall configuration is discussed in detail in the “Configuring Windows Firewall to Permit Connections to Slave Processes” section of the GoldSim Distributed Processing Module User’s Guide.
When the GoldSim Slave Manager process automatically starts a Slave at the request of a Master, it starts GoldSim Player (GSPlayer.exe) Slaves rather than full GoldSim (GoldSim.exe) Slaves. The Slaves started by GoldSim Slave Manager also are started under the SYSTEM user name (LSA) and are processes which show up in Task Manager. An example of the GoldSim Player executable, spawned by the GoldSim Slave Manager and running under the SYSTEM user name (LSA), is shown in Task Manager in Figure 5. If the GoldSim Slave Manager cannot find a GoldSim Player executable to use to launch the Slave process, then it will use a GoldSim executable (GoldSim.exe) to launch the Slave process. Additionally, the Slave process will launch Microsoft Excel if required by the model/simulation using the same “User name” or account which owns the Slave process (i.e. the same User name as listed for GSPlayer.exe in Figure 5).
Figure 5: GoldSim Player (GSPlayer.exe) process started by GoldSim Slave Manager
Starting a Slave Process with GoldSim Slave Manager
The GoldSim Slave Manager will only start a Slave process when prompted by the Master. As mentioned earlier, the GoldSim Slave Manager needs to be running on the target computer and the firewall on the target computer needs to be correctly configured so that the Master and the Slave Manager can communicate. Once the configuration on the target computer is complete, Slaves can be launched automatically using the following steps.
- Use the “Add…” button as shown in Figure 6 to specify the external computer for each Slave. When external computers are successfully added, the “Master Settings” dialog will update as shown in Figure 7.
Figure 6: Add external Slave connection
Figure 7: "Master Settings" dialog after adding external Slaves
- Select the “Update Status” button which will prompt the Master to connect to the GoldSim Slave Manager on the specified Slave machines. Then, the GoldSim Slave Manager will start the Slave process on the Slave machine. Once the status is successfully updated and the Slaves are started and ready, the “Master Settings” dialog will appear as shown in Figure 8.
Figure 8: External Slaves successfully started and ready
- At this point the DP simulation is ready for execution using the “Run Simulation” button.