Changes between Version 6 and Version 7 of cypress/using


Ignore:
Timestamp:
04/08/15 15:37:57 (10 years ago)
Author:
cmaggio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/using

    v6 v7  
    2929The syntax of these script directives is manager specific. For the SLURM resource manager, all script directives begin with "#SBATCH". Let's look at a basic SLURM script requesting one node and one core on which to run our helloworld program.
    3030
    31  
     31 [[Image(hello_srun.png, 50%)]]
    3232
    3333
     
    3636With 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:
    3737
    38  
     38[[Image(sbatch.png, 50%)]]
    3939
    4040Our job was successfully submitted and was assigned the job number 6041. We can check the output of our job by examining the contents of our output and error files. Referring back to the helloworld.srun SLURM script, notice the lines
    4141
    42  
     42[[Image(output_error.png, 50%)]]
    4343
    4444These specify files in which to store the output written to standard out and standard error, respectively. If our code ran without issue, then the Hi.err file should be empty and the Hi.out file should contain our greeting.
    4545
    46  
     46[[Image(Hi_output.png, 50%)]]
    4747
    4848There are two more commands we should familiarize ourselves with before we begin. The first is the “squeue” command. This shows us the list of jobs that have been submitted to SLURM that are either currently running or are in the queue waiting to run. The last is the “scancel” command. This allows us to terminate a job that is currently in the queue. So that we can see these commands in action, let’s extend our jobs run time by adding a sleep command to the end of our SLURM script.