From b15a8c493be6013f1a033d9b12ef6c5b5ff0e0c8 Mon Sep 17 00:00:00 2001 From: dquigley533 Date: Thu, 6 Jun 2024 19:22:56 +0100 Subject: [PATCH] Added client shutdown --- advanced/ensemble/dask.markdown | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/advanced/ensemble/dask.markdown b/advanced/ensemble/dask.markdown index 5b0dce8..b345d30 100644 --- a/advanced/ensemble/dask.markdown +++ b/advanced/ensemble/dask.markdown @@ -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 @@ -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.