Difference between revisions of "BwUniCluster2.0/Batch System Migration Guide"

From bwHPC Wiki
Jump to: navigation, search
(Multithreaded Programs)
(Multithreaded Programs)
Line 19: Line 19:
 
* Use the time option '''-t''' or '''--time''' (instead of '''-l walltime'''). If only one number is entered behind '''-t''', the default unit is minutes.
 
* Use the time option '''-t''' or '''--time''' (instead of '''-l walltime'''). If only one number is entered behind '''-t''', the default unit is minutes.
 
* Use the option '''-N 1''' or '''--nodes=1''' and '''c ''x''''' or '''--cpus-per-task=''x''''' (instead of '''-l nodes=1,ppn=''x'' '''). '''''x''''' can be a number between 1 and 40 (because of 40 cores within one node); it can also be a number between 41 and 80 (because of active hyperthreading).
 
* Use the option '''-N 1''' or '''--nodes=1''' and '''c ''x''''' or '''--cpus-per-task=''x''''' (instead of '''-l nodes=1,ppn=''x'' '''). '''''x''''' can be a number between 1 and 40 (because of 40 cores within one node); it can also be a number between 41 and 80 (because of active hyperthreading).
* Use the option ''-m'' or ''--mem'' (instead of ''-l pmem''). The default unit is MegaByte.
+
* Use the option '''-m''' or '''--mem''' (instead of '''-l pmem'''). The default unit is MegaByte.
  +
* Use the option '''--export''' to set the needed environment variable OMP_NUM_THREADS for the batch job. Adding '''ALL''' means to pass all interactively set environment variables to the batch job.
 
* If you want to use one node exclusively, you must enter the whole memory (''-m 96327'' or ''--mem=96327'').
 
* If you want to use one node exclusively, you must enter the whole memory (''-m 96327'' or ''--mem=96327'').
 
<br>
 
<br>

Revision as of 12:42, 13 March 2020

1 Serial Programs

  • Use the time option -t or --time (instead of -l walltime). If only one number is entered behind -t, the default unit is minutes.
  • Use the option -n 1 or --ntasks=1 (instead of -l nodes=1,ppn=1).
  • Use the option -m or --mem (instead of -l pmem). The default unit is MegaByte.
  • If you want to use one node exclusively, you must enter the whole memory (-m 96327 or --mem=96327).


Example for a serial job

$ sbatch -p single -t 60 -n 1 -m 96327 ./job.sh 

The script job.sh (containing the execution of a serial program) is started running 60 minutes exclusively on a batch node.


2 Multithreaded Programs

  • Use the time option -t or --time (instead of -l walltime). If only one number is entered behind -t, the default unit is minutes.
  • Use the option -N 1 or --nodes=1 and c x or --cpus-per-task=x (instead of -l nodes=1,ppn=x ). x can be a number between 1 and 40 (because of 40 cores within one node); it can also be a number between 41 and 80 (because of active hyperthreading).
  • Use the option -m or --mem (instead of -l pmem). The default unit is MegaByte.
  • Use the option --export to set the needed environment variable OMP_NUM_THREADS for the batch job. Adding ALL means to pass all interactively set environment variables to the batch job.
  • If you want to use one node exclusively, you must enter the whole memory (-m 96327 or --mem=96327).


Example for a multithreaded job

$ sbatch -p single -t 1:00:00 -N 1 -c 40 -m 50gb --export=ALL,OMP_NUM_THREADS=40 ./job_threaded.sh 

The script job_threaded.sh (containing a multithreaded program) is started running 1 hour in shared mode on all cores requesting 50GB on one batch node.