Reconnecting the GUI to a Running Coupled Solution

System Coupling provides you with the ability to connect the System Coupling GUI to a running coupled analysis — functionality that can be especially useful when a solution is expected to have a long runtime. This feature allows you to start the analysis, disengage from it, and then come back later to connect/reconnect to the running instance of System Coupling and check on the simulation's progress.

Prerequisites

To connect/reconnect the System Coupling GUI to an analysis in-progress, the instance of System Coupling executing the analysis must meet the following criteria:

System Coupling is running in GUI Server mode.

System Coupling must be running in GUI Server mode, a GUI-only mode in which System Coupling is launched as a server and waits for an instance of the System Coupling GUI to connect to it.

System Coupling is always started in this mode when opened in its GUI. It can also be started in GUI Server mode from the command line, by appending the --guiserver argument to its executable. Note that when started in GUI Server mode from the command line, System Coupling operates in a non-interactive session (that is, its CLI does not stay open after execution of a script).

When started in GUI Server mode, System Coupling writes a GUI Server file to its working directory. This file contains the server port and host information needed to connect/reconnect an instance of the GUI to the corresponding coupling solution while it is still progressing.

System Coupling's working directory is visible to the GUI.

The System Coupling instance may be running either locally or on a remote host. If running on a remote host, then its working directory must be visible/accessible to the GUI attempting to connect.

System Coupling has no active GUI connections in the working directory.

System Coupling must have no active connection with an existing instance of the System Coupling GUI that is running in the working directory. The presence of a GUI Server file in the working directory indicates that another connection already exists.

Disconnecting from the Running Solution

To reconnect an instance of the System Coupling GUI to a coupled analysis that is in progress, the solution must be actively running with System Coupling in GUI Server mode, and it must be disconnected from any GUI. To do this, use one of the following methods:

Disconnecting from the Solution in the GUI

To start and disconnect from the solution using the System Coupling GUI, perform the following steps:

  1. Open the System Coupling GUI as described in Starting the System Coupling GUI.

    When opened in its GUI by any method, System Coupling always starts in GUI Server mode.

  2. Set up the analysis and start its solution.

  3. Disconnect the GUI from the running analysis, as follows:

    1. Select File > Exit.

      A dialog opens, indicating that a solution is in progress and that you may reconnect to it later.

    2. Click Continue.

The GUI closes, but System Coupling continues to run and execute the coupled analysis.

Disconnecting from the Solution from the Command Line

To start and disconnect from the solution using the command line, perform the following steps:

  1. Open the shell for your operating system in System Coupling's working directory.

  2. Run System Coupling's executable, using the --guiserver argument to start in GUI Server mode and the -R argument to run a coupling script.

    • Windows

      
      > "%AWP_ROOT195%\SystemCoupling\bin\systemcoupling" -R <scriptname> --guiserver 
      
      
    • Linux

      
      $ "$AWP_ROOT242/SystemCoupling/bin/systemcoupling" -R <scriptname> --guiserver 
      
      

This starts System Coupling in GUI Server mode, creates the analysis, and begins the solution.

Note that System Coupling is running in a non-interactive mode, which means that its CLI closes after the script is run. The only way to interact with an analysis started using this method is to connect it to an instance of the System Coupling GUI during its execution.

Reconnecting to the Running Solution

To connect/reconnect to a solution in progress, open the System Coupling GUI in the working directory for the coupled analysis.

  • If the working directory already contains a sycGui.srv file, then the GUI will use the server port and host information it contains to connect with the solution in progress.

    When the GUI connects to the running analysis, System Coupling's connection and execution details are written to the Transcript output in the Command Console tab. Solution details are written to the Transcript during the remainder of its execution, allowing you to monitor its progress.

  • If the directory does not contain a sycGui.srv file (for example, System Coupling may have exited when the solution completed), then the System Coupling GUI opens there, starting System Coupling in GUI Server mode and generating its own sycGui.srv file

Connection to an analysis requires that System Coupling is still running in the working directory. System Coupling exits under the following circumstances:

  • System Coupling is both idle and not attached to a GUI instance — for example, when:

    • the GUI is exited when no coupling processes are running, or

    • the solution completes after the GUI has disconnected.

  • An Interrupt or Abort operation has been requested for the analysis.

For details on issues you may encounter when using System Coupling's reconnect capabilities, see Known Issues and Limitations.