R: Difference between revisions

Jump to navigation Jump to search
181 bytes added ,  6 months ago
make multi-node example optional rather than copy-n-paste default
No edit summary
(make multi-node example optional rather than copy-n-paste default)
Line 374: Line 374:
#!/bin/bash
#!/bin/bash
#SBATCH --account=def-someacct  # replace this with your supervisors account
#SBATCH --account=def-someacct  # replace this with your supervisors account
#SBATCH --ntasks-per-node=2    # add this line to make sure that slurm uses multiple nodes
#SBATCH --ntasks=4              # number of processes
#SBATCH --ntasks=4              # number of processes
#SBATCH --mem-per-cpu=512M      # memory; default unit is megabytes
#SBATCH --mem-per-cpu=512M      # memory; default unit is megabytes
Line 389: Line 388:
R -f test_makecluster.R
R -f test_makecluster.R
}}
}}
In the above example the scheduler might place all four processes on just one node. 
This is okay, but if you wish to prove that the same job works even if the processes happen
to be placed on different nodes, then add the line <code>#SBATCH --ntasks-per-node=2</code>


<!--T:65-->
<!--T:65-->
Bureaucrats, cc_docs_admin, cc_staff
2,915

edits

Navigation menu