> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Command line arguments for participant solvers

This section describes command line arguments that System Coupling solver
provides to the participant solvers. This section is not relevant for mapping-only
workflows.

System Coupling starts participant solvers as child processes
during the setup stage and at the beginning of a coupled analysis.
Therefore, the participant participant executable will need to
be provided to System Coupling.
See *System Coupling User's Guide* for more details.

It is highly recommended to create a wrapper script (either batch script, shell script, or any other
kind of script) around actual participant executable. This script can parse the arguments
provided by System Coupling and set any environment variables, as needed.

## Coupling-specific command line arguments

The following command line arguments are provided by System Coupling:

* `--schost HOSTNAME` : name of the host where System Coupling is running.
  This value should be passed in as input into the participant library function that
  establishes the connection with System Coupling.

* `--scport PORTNUMBER` : port number on which System Coupling is listening for incoming connections from
  the participant solvers. This value should be passed in as input into the participant
  library function that establishes the connection with System Coupling.

* `--scname PARTICIPANTNAME` : unique name for this participant, given by System Coupling.
  This value should be passed in as input into the participant library function that
  establishes the connection with System Coupling.

* `--scsetup` : This argument is used to indicate the the participant should be started
  in the setup mode.

* `--screstart RESTART_STRING` : This command line argument is only used during
  a restart run. The provided string is used to tell the participant solver
  which restart point to use. This string is provided from participant solver
  to System Coupling during a previous run. See
  [Creating restart points and restarting the coupled analysis](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/user-guide/restarts.md)
  for more details.

For example, the following execution command may be generated by System Coupling:

```bash theme={null}
solver.sh --schost host1 --scport 12345 --scname DEFAULT-1 --screstart RestartPoint3
```

## Parallel execution-specific command line aguments

For a coupled analysis, System Coupling typically allocates available computing
resources to each participant. For a participant that uses the
the participant library, System Coupling will pass available computing
resources via a command-line argument when starting this
participant.

See [Execution in a parallel environment](https://developer.synopsys.com/docs/system-coupling/system-coupling-participant-library/user-guide/parallel-execution.md)
for more details.

### Local parallel execution

To enable local parallel execution, the following command-line
argument will be passed to the participant:

`-np NPROCS`

Here, `NPROCS` is replaced with the number of processes. For example,
if the participant solver is to be executed on a local machine
using four processes, the command-line argument will be as follows:

`-np 4`

### Distributed parallel execution

To enable distributed parallel execution, the following command-line
argument will be passed to the  participant:

`-hostlist HOSTLIST`

Here, `HOSTLIST` is replaced with the comma-separated list
of machines and number of cores available on that machine.
The machine name and core count are separated by a colon.
For example, if there are two machines available named
hostA and hostB, and each machine has four cores available,
then the command-line argument will be as follows:

`-hostlist hostA:4,hostB:4`

Note that on Windows platform, quotes are added around `HOSTLIST`, so that
all hosts are provided in a single command line argument.

`-hostlist "hostA:4,hostB:4"`

## Other command line arguments

If other command line arguments need to be passed to the participant
solver, this can be accomplished by adding those arguments in the
`ExecutionControl.AdditionalArguments` parameter in the System Coupling datamodel.
For example, the following snippet sets the custom command line
argument for participant `DEFAULT-1` in the System Coupling script:

```python theme={null}
participant = DatamodelRoot().CouplingParticipant['DEFAULT-1']
participant.ExecutionControl.AdditionalArguments = '--input input.file'
```

For more information on the data model structure, see *System Coupling User's Guide*.
