Skip to content

Commit

Permalink
Added client shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
dquigley533 committed Jun 6, 2024
1 parent 85ef41f commit b15a8c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions advanced/ensemble/dask.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ if __name__ == '__main__':

# Code which uses Dask features...


# Shutdown client now we're done
client.shutdown()


```
In the above we make use of various environment variables set by SLURM to tell Dask how much
RAM is available per worker, and how many CPUs each worker can use. We use the high performance infiniband interconnect `ib0` to communicate between scheduler and workers. Temporary/scratch files will be written
Expand Down Expand Up @@ -138,6 +143,10 @@ if __name__ == '__main__':

# Code which uses Dask features...

# Shutdown client now we're done
client.shutdown()


```
In this case the number of available workers is the number of SLURM tasks.
</details>
Expand Down

0 comments on commit b15a8c4

Please sign in to comment.