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 Client GoldSim processes.
Figure 2: "Controller Settings" dialog
One way to create Client processes is to use the DP Client Manger. The DP Client Manager is a Windows Service that can be installed on a computer using a separate install package which can be obtained from the GoldSim web site. After the GoldSim Client Manager is installed and the corresponding Windows Service is started, Clients can be started by simply clicking the “Update Status” button in the “Controller Settings” dialog shown in Figure 2. There is a related Knowledge Base article which provides additional information on using the GoldSim DP Client Manager.
In many cases, the GoldSim Client Manager will not be installed for use in DP simulations because it requires the installation of an extra software package. The “Controller Settings” dialog (Figure 2) can still be used to connect to Clients and to control a DP simulation even when the DP Client Manager is not installed. When the DP Client Manager is not installed, the Client processes need to be started manually. Once the Client processes are started and the correct “Client Computer Address” is entered in the “Controller Settings” dialog (see Figure 2) using the “Add…” button, then the “Update Status” button will connect the Controller to the Clients.
Manually Starting Clients
A Client process is started by running a GoldSim executable with the “-s” option. Either the GoldSim Player (GSPlayer.exe) or GoldSim (GoldSim.exe) can be used to create Client processes by passing the “-s” option. Examples of running GoldSim and GoldSim Player with the “-s” option are given below.
- "C:\Program Files (x86)\GTG\GoldSim 11.1\GoldSim.exe" –s
- GoldSim Player
- "C:\Program Files (x86)\GTG\GoldSim 11.1\GSPlayer.exe" –s
There are two different ways to start a GoldSim executable with the “-s” option to create a Client process.
- Using the Windows Run dialog (Windows Key + R)
Figure 3: Starting a GoldSim Player Client process from the Run dialog
- Using the Command prompt (cmd.exe)
Figure 4: Starting a GoldSim Client process from the Command Prompt
Once a Client is started, using either the Run dialog or the Command Prompt and using either GoldSim.exe or GPlayer.exe, the “GoldSim Network Client” dialog will appear as shown in Figure 5.
Figure 5: GoldSim Network Client dialog
Adding a Client Computer Address to the "Controller Settings"
Clients that are started, or spawned, manually are started separately from the “Controller Settings” dialog. As a result, the Controller (and the “Controller Settings” control dialog) does not know anything about the manually started Clients. To tell the Controller about these Clients, a Client Computer Address needs to be added to the “Controller Settings” dialog using the “Add..” button shown in Figure 2 and Figure 7.
Figure 6: Add localhost Client to "Controller Settings"
When the “Add..” button is pressed, the dialog shown in Figure 6 is obtained. Enter “localhost” in the “Address:” field and hit “Ok” to add a Client process on the local machine to the “Controller Settings” dialog. To add a Client process on a different machine (same Local Area Network), enter the machine name for the machine where the Client process is already running. An example of adding a Client process from another machine is shown in Figure 7.
Figure 7: Add a Client process on an external machine
Connecting the Controller to Manually Started Client Processes
The next step is to connect the Controller to the Client processes. At this point, the Client processes are manually started and the Controller has been told where to find the Client processes. The “Update Status” button on the “Controller Settings” dialog (shown in Figure 2 and Figure 7) can now be used to connect the Controller to the Client processes. When the Controller has successfully connected to the specified Client processes, the Status portion of the “Controller Settings” dialog will show the “Client is running and ready” message.
Figure 8 shows the “Controller Settings” dialog after the Controller has successfully connected to two Client processes. This figure also shows the corresponding “GoldSim Network Client” dialogs for two Clients. At this point, the simulation can be run using the “Run Simulation” button on the “Controller Settings” dialog. In the “Controller Settings” dialog in Figure 8, the “Client Computer Address” is listed as localhost for both Clients. This means that both Client processes are running on the same machine as Controller process.
Figure 8: Connected Controller and Clients
A Final Note: Client Process Owner or User Name
When Client processes are started manually using either the Run menu or a Command Prompt, the Client process owner (or User name) will be the User name of the person currently logged on to the computer. This is the same User name for the GoldSim process (the Controller) as shown in Figure 9. If the Client processes need to interact with Microsoft Excel as part of the simulation, the Excel process started by the Client process will run under the same User name as the Client process.
Figure 9: Client and GoldSim process User names