Shutdown File

The Shutdown file is a text file named scStop which indicates whether the run should be interrupted or aborted. When System Coupling finds this file in its working directory, it shuts down as soon as possible according to the contents of the file. The Shutdown file can be used to stop coupling runs that are executed using either System Coupling's CLI or System Coupling in Workbench.

System Coupling's CLI

A coupled analysis that is run from the command line using the Solve() command performs the entire solution straight through (as opposed to an analysis that is run using interactive solve commands, which provide the ability to pause, interact with, and shut down the run at designated points). However, you can either interrupt or abort such an analysis by creating a Shutdown file in System Coupling's working directory.

System Coupling in Workbench

When a coupled analysis is stopped by clicking either Abort or Interrupt, a Shutdown file is automatically generated in System Coupling's working directory. However, you can also create a Shutdown file in the working directory manually.

Create the Shutdown file according to how the analysis is to be stopped. In general, the file contains one or two lines:

  • The first line contains a single integer, which indicates whether to interrupt (0) or abort (1) the run.

  • The second line is optional and contains text that indicates the reason for terminating the run. This information is recorded in System Coupling's Transcript.


Tip:  You can abort a run by simply creating an empty scStop file. This is most useful when you want to abort the run as abruptly as possible.


The Shutdown file does not have a file extension. When creating the file manually, ensure that the file does not have an extension so that System Coupling can find it.

When the analysis is interrupted, System Coupling completes the current coupling step or iteration and signals the coupling participants that the execution has ended. This causes System Coupling and participants to shut down cleanly and create restart points for the end of the run. An example Shutdown file to interrupt the run is shown below.

 

0
Interrupt this run because resources are needed for another analysis. 

 

When the analysis is aborted, System Coupling signals the coupling participants to stop the run as quickly as possible. No restart points are created for the end of the run. Note, however, that any previously created restart points are retained.

Once the analysis has been stopped, the Shutdown file is automatically removed from System Coupling's working directory.