Getting Started
Exercises¶
- Write and submit a simple job script
Create a file called first_job.sh that prints the hostname, the current date, and your username. Include #SBATCH directives for job name, output file, time limit (5 minutes), 1 task, and 1G of memory. Submit it with sbatch.
Hint / Solution
- Check your job status
After submitting the job above, use squeue to check whether your job is pending or running. Note the job ID, state, and which node it was assigned to.
- Find and read the output file
Once the job completes (it should finish quickly), find the output file and display its contents. The filename pattern includes the job ID.
Hint / Solution
- Check job accounting after completion
Use sacct to look up your completed job. Display the job ID, job name, elapsed time, state, and exit code.
- Explore the cluster
Use sinfo to determine how many partitions are available, which partition is the default, and what the maximum time limit is for each partition.