Python: Difference between revisions

Jump to navigation Jump to search
2 bytes removed ,  6 months ago
no edit summary
(Marked this version for translation)
No edit summary
Line 253: Line 253:


<!--T:103-->
<!--T:103-->
In order to run scripts accross multiple nodes, each nodes must have it own virtual environment activated.
In order to run scripts across multiple nodes, each node must have its own virtual environment activated.


<!--T:104-->
<!--T:104-->
1. In your submission script, create the virtual environment on each allocated nodes :
1. In your submission script, create the virtual environment on each allocated node:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
srun --ntasks $SLURM_NNODES --tasks-per-node=1 bash << EOF
srun --ntasks $SLURM_NNODES --tasks-per-node=1 bash << EOF
Line 273: Line 273:


<!--T:108-->
<!--T:108-->
2. Activate the virtual environment on the main node
2. Activate the virtual environment on the main node,
<syntaxhighlight lang="bash">source $SLURM_TMPDIR/env/bin/activate;</syntaxhighlight>
<syntaxhighlight lang="bash">source $SLURM_TMPDIR/env/bin/activate;</syntaxhighlight>


Bureaucrats, cc_docs_admin, cc_staff
2,306

edits

Navigation menu