Skip to content

Commit

Permalink
Update documentation with dependencies & fix Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
zieglerSe committed Jan 16, 2024
1 parent 8c8acec commit 92f30ea
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/docfx_project/articles/sshConnection.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,33 @@ To submit the created Jobs directly to the cluster, Slurmi allows you a SSH conn
First, you need to create a `SshClient` containing your connection info (host, username, password).

```fsharp
#r "nuget: DynamicObj, 2.0.0"
#r "nuget: SSH.NET, 2023.0.0"
open Slurmi
open SshNet
open Renci.SshNet
open Renci.SshNet.Common
let hostName = "testHost"
let userName = "testUser"
let password = "testPassword"
let connectionInfo =
ConnectionInfo(hostName, userName, PasswordAuthenticationMethod(userName,password))
let client = let client = new SshClient(connectionInfo)
let client = new SshClient(connectionInfo)
```

To start the connection to the host, you can use the `Connect` method.

```fsharp
client.Connect()
```
To check if the connection was successful, you can, for example, use the following command:

```fsharp
client.RunCommand("echo Hello World")
```

To disconnect from the host, you can use the `Disconnect` method.

Expand Down
21 changes: 21 additions & 0 deletions docs/docfx_project/articles/workflowCreation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
Developing a workflow is one of the key parts of using Slurmi.
Here, you define the sequential steps for completing the work.
Some of these steps are dependent on each other, and these dependencies are defined in the workflow.

First, you need a few dependencies.

```fsharp
#r "nuget: DynamicObj, 2.0.0"
#r "nuget: SSH.NET, 2023.0.0"
#r "nuget: Graphoscope, 0.3.0"
#r "nuget: Fli, 1.101.0"
open Fli
open Slurmi
open Slurmi.Runner
open DynamicObj
open SshNet
open Renci.SshNet
open Renci.SshNet.Common
open Graphoscope
open Slurmi.Workflow
open System.Collections.Generic
```

To do this, you first create multiple jobs.

```fsharp
Expand Down Expand Up @@ -49,6 +69,7 @@ This workflow can now be submitted to the cluster. With this, all dependencies w
let workedOn = new List<string>()
Runner.submitAll resultGraph.Graph.Graph workedOn
// or if using SSH Runner.submitAllSSH
```

## Visualisation
Expand Down

0 comments on commit 92f30ea

Please sign in to comment.