> ## 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.

# syscconnectf Interface Reference

Provide an interface to connect to System Coupling.

## Public Member Functions

| Type | Name |
| - | - |
| type([syscerrorf](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/structfortran_1_1syscerrorf.md)) function | [syscconnectf](#af397378cdff4f98ef3c736cdda2dc2a0) (scHost, scPort, participantName, buildInformation) Provide a function to establish connection to System Coupling. |
| type([syscerrorf](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/structfortran_1_1syscerrorf.md)) function | [syscconnectparallelf](#a15b29cc1bce67f869dea1b183de9c569) (scHost, scPort, participantName, communicator, buildInformation) Provide a function to establish connection to System Coupling and pass a custom MPI communicator. |

## Detailed Description

Provide an interface to connect to System Coupling.

Definition at line [83](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/syscSystemCouplingF_8fi_source) of file [syscSystemCouplingF.fi](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/syscSystemCouplingF_8fi_source).

## Constructor & Destructor Documentation

### syscconnectf()

```fortran-free-form theme={null}
type( syscerrorf ) function syscconnectf(
    character(*), intent(in) scHost,
    integer(kind=4), intent(in) scPort,
    character(*), intent(in) participantName,
    character(*), intent(in), optional buildInformation
)
```

Provide a function to establish connection to System Coupling.

A participant must have obtained the host and port information from System Coupling prior to calling this function (e.g. via an input argument when participant application was started).

If using a support MPI distribution, this function should be called on all ranks that belong to the `MPI_COMM_WORLD` communicator.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | scHost | Name of the host on which System Coupling is running. |
| \[in] | scPort | Port number on which System Coupling is listening for participant connections. |
| \[in] | participantName | Name of this participant (e.g. "MAPDL-1"). |
| \[in] | buildInformation | Information about the build of this participant solver. |

**Returns**

a `SyscErrorF` type that can be checked for any errors.

Definition at line [109](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/syscSystemCouplingF_8fi_source) of file [syscSystemCouplingF.fi](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/syscSystemCouplingF_8fi_source).

```fortran-free-form theme={null}
 !
   import :: syscerrorf
   integer(kind=4), intent(in)  :: scPort
   character(*), intent(in) :: scHost
   character(*), intent(in) :: participantName
   character(*), optional, intent(in) :: buildInformation
   type(SyscErrorF) :: ret
 !
 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
 !DIR$ ATTRIBUTES DLLIMPORT :: syscConnectF
 !DIR$ ENDIF
 !
```

## Member Function/Subroutine Documentation

### syscconnectparallelf()

```fortran-free-form theme={null}
type( syscerrorf ) function syscconnectparallelf(
    character(*), intent(in) scHost,
    integer(kind=4), intent(in) scPort,
    character(*), intent(in) participantName,
    integer(kind=4), intent(in) communicator,
    character(*), intent(in), optional buildInformation
)
```

Provide a function to establish connection to System Coupling and pass a custom MPI communicator.

A participant must have obtained the host and port information from System Coupling prior to calling this function (e.g. via an input argument when participant application was started).

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | scHost | Name of the host on which System Coupling is running. |
| \[in] | scPort | Port number on which System Coupling is listening for participant connections. |
| \[in] | participantName | Name of this participant (e.g. "MAPDL-1"). |
| \[in] | communicator | MPI communicator on which all API calls are made. |
| \[in] | buildInformation | Information about the build of this participant solver. |

**Returns**

a `SyscErrorF` type that can be checked for any errors.

Definition at line [151](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/syscSystemCouplingF_8fi_source) of file [syscSystemCouplingF.fi](https://developer.synopsys.com/docs/system-coupling/system-coupling-fortran-library/syscSystemCouplingF_8fi_source).

```fortran-free-form theme={null}
 !
   import :: syscerrorf
   integer(kind=4), intent(in)  :: scPort
   character(*), intent(in) :: scHost
   character(*), intent(in) :: participantName
   integer(kind=4), intent(in)  :: communicator
   character(*), optional, intent(in) :: buildInformation
   type(SyscErrorF) :: ret
 !
 !DIR$ IF DEFINED(_WIN32) .and. ( .not. DEFINED(SYSTEM_COUPLING_PARTICIPANT_PROXY))
 !DIR$ ATTRIBUTES DLLIMPORT :: syscConnectParallelF
 !DIR$ ENDIF
 !
```
