@@ -58,19 +58,28 @@ Of course that is a silly job. However, there are things to learn for this examp
# Writing a job file
There are things to consider when writing a job
There are things to consider when writing a job:
1. How many `tasks` or threads (each CPU has 2 threads) the job should be allowed to use.
2. How much `time` your Jobs will need. This can be quite tricky. If you make your job too short, the program will be killed. If it is too long the job will take longer to start. Although that is currently no problem.
```bash
#!/bin/bash
# SLURM specific commands
#SBATCH --job-name=test
#SBATCH --output=test.log
#SBATCH --job-name=fibonacci
#SBATCH --output=fibonacci.log
#SBATCH --ntasks=1
#SBATCH --time=01:30
#SBATCH --time=05:00
# Your Code below here
srun
module load miniconda3
# Execute the Fibonacci Script with the miniconda Python
# use /usr/bin/time -v [program]
# gives statistics on the resources the program uses
# nice for testing
/usr/bin/time -v python3 fibonacci.py
```
Let's have a look at the output.
# Interactive Sessions
...
...
@@ -110,7 +119,7 @@ How to submit an MPI batch job
#SBATCH --ntasks=7
# Load the OpenMPI module.
module load openmpi/4.0.5-gcc-8.3.1-773ztsv
module load openmpi/4.0.5
# Run the program with mpirun. Additional mpirun options
# are not required. mpirun will get the info (e.g., hosts)