Changes between Version 67 and Version 68 of cypress/using


Ignore:
Timestamp:
11/22/22 16:29:17 (17 months ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/using

    v67 v68  
    407407* '''afterok:jobid[:jobid...]'''        job can begin after the specified jobs have run to completion with an exit code of zero (see the user guide for caveats).
    408408
    409 See [https://wiki.hpc.tulane.edu/trac/wiki/Workshops/cypress/JobDependency here] for more about job-dependency.
     409See [https://wiki.hpc.tulane.edu/trac/wiki/Workshops/cypress/JobDependency here] for more about job dependency.
     410
     411=== Many-task computing ===
     412If you have many tasks and each task needs a few cores, it may be beneficial to pack several tasks into one job.
     413For example,
     414
     415{{{
     416#!/bin/bash
     417#SBATCH --qos=normal            # Quality of Service
     418#SBATCH --job-name=many-task    # Job Name
     419#SBATCH --time=24:00:00         # WallTime
     420#SBATCH --nodes=1               # Number of Nodes
     421#SBATCH --ntasks-per-node=1     # Number of tasks (MPI presseces)
     422#SBATCH --cpus-per-task=20      # Number of processors per task OpenMP threads()
     423
     424# Our custom function
     425cust_func(){
     426  echo "Do something $1 task"
     427  sleep 1
     428}
     429# For loop 20 times
     430date
     431for i in {1..20}
     432do
     433        cust_func $i & # Put a function in the background
     434done
     435
     436## Put all cust_func in the background and bash
     437## would wait until those are completed
     438## before displaying all done message
     439wait
     440echo "All done"
     441date
     442}}}
     443
     444See [https://wiki.hpc.tulane.edu/trac/wiki/Workshops/cypress/ManyTaskComputing here] for more about Many Task Computing.
     445
    410446
    411447== Submitting Interactive Jobs ==