Skip to content
Snippets Groups Projects
Commit 293ce350 authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

Update README.md

parent 9e243d39
Branches
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ Of course that is a silly job. However, there are things to learn for this examp
* `output`, this is just for you
* `ntasks`, this tells slurm how many threads you should be allowed to have
* `time`, this tells slurm how much time it should give your job
* other `#SBATCH` commands [https://slurm.schedmd.com/sbatch.html](https://slurm.schedmd.com/sbatch.html)
2. Submit the job with `sbatch`
3. Check the Queue and Status of your job with `squeue`
......@@ -78,9 +79,47 @@ module load miniconda3
# nice for testing
/usr/bin/time -v python3 fibonacci.py
```
Save the job as `fibonacci.job` and submit the job with `sbatch fibonacci.job`.
Let's have a look at the output.
```
Recursive version
165580141, Elapsed: 00h00m55s
Loop version
165580141, Elapsed: 00h00m00s
Memory version
165580141, Elapsed: 00h00m00s
Command being timed: "python3 fibonacci.py"
User time (seconds): 55.84
System time (seconds): 0.00
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:55.94
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 10900
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 1288
Voluntary context switches: 9
Involuntary context switches: 22
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
You can find information on the CPU usage, memory, ... For this job the only relevant information is on the CPU, as it basically only uses that.
The time man page is [here](https://man7.org/linux/man-pages/man1/time.1.html).
## Run a Multi-processing job
**under construction.**
`icc -o fibonacci.x fibonacci_openmp.c`
ask for more tasks
# Interactive Sessions
......@@ -112,23 +151,21 @@ How to submit an MPI batch job
```bash
#!/bin/bash
# Some example sbatch options.
# See also https://slurm.schedmd.com/sbatch.html
#SBATCH --job-name=testprog
#SBATCH --output=testprog.out
#SBATCH --job-name=hello
#SBATCH --output=hello.log
#SBATCH --ntasks=7
# Load the OpenMPI module.
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)
# from SLURM.
srun ./testprog
# Run the program with mpi. Srun will execute mpirun with
# the info (e.g., hosts) from SLURM.
srun ./hello
```
Submit with
```bash
sbatch mpiexample.sh
sbatch hello.job
```
# Useful things
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment