Changes between Version 49 and Version 50 of cypress/using
- Timestamp:
- 08/25/16 13:08:32 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
cypress/using
v49 v50 60 60 61 61 Notice that the SLURM script begins with #!/bin/bash. This tells the Linux shell what flavor shell interpreter to run. In this example we use BASh (Bourne Again Shell). The choice of interpreter (and subsequent syntax) is up to the user, but every SLURM script should begin this way. This is followed by a collection of #SBATCH script directives telling the manager about the resources needed by our code and where to put the codes output. Lastly, we have the executable we wish the manager to run (note: this script assumes it is located in the same directory as the executable). 62 63 '''For Workshop''' : 64 If you use a temporary workshop account, modify the script like: 65 {{{#!bash 66 #!/bin/bash 67 #SBATCH --job-name=HiWorld ### Job Name 68 #SBATCH --output=Hi.out ### File in which to store job output 69 #SBATCH --error=Hi.err ### File in which to store job error messages 70 #SBATCH --partition=workshop # Partition 71 #SBATCH --qos=workshop # Quality of Service 72 ##SBATCH --qos=normal ### Quality of Service (like a queue in PBS) 73 #SBATCH --time=0-00:01:00 ### Wall clock time limit in Days-HH:MM:SS 74 #SBATCH --nodes=1 ### Node count required for the job 75 #SBATCH --ntasks-per-node=1 ### Nuber of tasks to be launched per Node 76 77 ./helloworld 78 }}} 79 62 80 63 81 With our SLURM script complete, we’re ready to run our program on the cluster. To submit our script to SLURM, we invoke the '''sbatch''' command. Suppose we saved our script in the file helloworld.srun (the extension is not important). Then our submission would look like: … … 287 305 `idev` transfers the environmental variables to computing node. Therefore, if you have loaded some modules on the login node, you don't have to load the same module again. 288 306 307 ==== For Workshop ==== 308 If you use a temporary workshop account, do this. 309 {{{ 310 export MY_PARTITION=workshop 311 export MY_QUEUE=workshop 312 }}} 289 313 290 314 ==== Options ====