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 Controller GoldSim executable connect to a number of Client GoldSim executables. Each Client executable runs as a separate process to complete one or more realizations in a Monte Carlo simulation. The Client processes can be on a single computer or on multiple computers which are connected via a network. The Controller combines all of the individual realization results (from the Clients) into a single GoldSim file and enters result mode, just as if the simulation had been completed entirely on the Controller’s machine.
Figure 1: Use "Run on Network" to start a DP simulation
A DP simulation is controlled by a single Controller GoldSim executable. The Controller executable is simply a version of GoldSim running on one machine which has the DP module enabled. From within GoldSim on the Controller, 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 “Controller Settings” dialog shown in Figure 2. The “Controller Settings” dialog allows the Controller to create connections with multiple Clients GoldSim processes. One way to create Client processes is to use the GoldSim Client Manger.
Figure 2: "Controller Settings" dialog
GoldSim Client Manager
The GoldSim Client 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 Client Manager needs to be installed on each computer which will have Clients automatically launched from the “Controller Settings” dialog. As part of the installation package, the GoldSim Client 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 Client Manager service will automatically launch the GoldSim Client Manager process during system startup. When active, the process can be seen in Task Manager as shown in Figure 4. By default, the GoldSim Client Manager process runs under the System account (or User name) as shown in Figure 3 and Figure 4.
Figure 3: GoldSim Client Manager service properties
Figure 3 shows that the default Log on for the GoldSim Client 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 Client 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 Client Manager process
The GoldSim Client Manager works by automatically launching Client processes on the computers which are specified in the “Controller Settings” dialog (see Figure 2). The GoldSim Client Manager process then needs to be running on the specified external computers in order for communication between the Client Manager process (on each external computer) and the Controller 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 Client Processes” section of the GoldSim Distributed Processing Module User’s Guide.
When the GoldSim Client Manager process automatically starts a Client at the request of a Controller , it starts GoldSim Player (GSPlayer.exe) Clients rather than full GoldSim (GoldSim.exe) Clients. The Clients started by GoldSim Client 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 Client Manager and running under the SYSTEM user name (LSA), is shown in Task Manager in Figure 5. If the GoldSim Client Manager cannot find a GoldSim Player executable to use to launch the Client process, then it will use a GoldSim executable (GoldSim.exe) to launch the Client process. Additionally, the Client process will launch Microsoft Excel if required by the model/simulation using the same “User name” or account which owns the Client 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 Client Manager
Starting a Client Process with GoldSim Client Manager
The GoldSim Client Manager will only start a Client process when prompted by the Controller. As mentioned earlier, the GoldSim Client Manager needs to be running on the target computer and the firewall on the target computer needs to be correctly configured so that the Controller and the Client Manager can communicate. Once the configuration on the target computer is complete, Clients can be launched automatically using the following steps.
- Use the “Add…” button as shown in Figure 6 to specify the external computer for each Client. When external computers are successfully added, the “Controller Settings” dialog will update as shown in Figure 7.
Figure 6: Add external Client connection
Figure 7: "Controller Settings" dialog after adding external Clients
- Select the “Update Status” button which will prompt the Controller to connect to the GoldSim Client Manager on the specified Client machines. Then, the GoldSim Client Manager will start the Client process on the Client machine. Once the status is successfully updated and the Clients are started and ready, the “Controller Settings” dialog will appear as shown in Figure 8.
Figure 8: External Clients successfully started and ready
- At this point the DP simulation is ready for execution using the “Run Simulation” button.