From 269bb9e63365d7e12aa99fcbedbf62b5a8da20c7 Mon Sep 17 00:00:00 2001
From: Michael Blaschek <michael.blaschek@univie.ac.at>
Date: Thu, 29 Oct 2020 10:19:55 +0100
Subject: [PATCH] Update README.md, fibonacci.py files

---
 README.md    | 33 +++++++++++++++++++++++++--------
 fibonacci.py | 14 ++++++++++++++
 2 files changed, 39 insertions(+), 8 deletions(-)
 create mode 100644 fibonacci.py

diff --git a/README.md b/README.md
index 7c0587e..29ce11c 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,18 @@
-# SLURM
+# Introduction to SLURM on JET
 
 Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters.
 
 [[_TOC_]]
 
-# Scientific Computing
+# Split your work into JOBs
 
-In order to make great use of a super computer one needs to be able to tell it what should be done.
+In order to make great use of a super computer one needs to be able to tell it what should be done in an automated way.
 And there comes [SLURM](https://slurm.schedmd.com/documentation.html) as a workload manager for HPCs.
-There is a quickstart guide [here](https://slurm.schedmd.com/quickstart.html) and in the sections below some information on how to solve the most pressing needs.
+There is a quickstart guide [here](https://slurm.schedmd.com/quickstart.html) and in the sections below some information on how to solve the most common challenages is shown.
 
+## First Job
 ```bash
-squeue 
+>>>squeue 
              JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON) 
 ```
 What does that mean? The Queue is empty and is waiting for your jobs. 
@@ -34,6 +35,7 @@ Now we submit this job to the queue:
 sbatch test.job
 ```
 and look agin into the queue
+
 ```
              JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON) 
                211   compute test_mpi mblasche  R       0:02      1 jet03 
@@ -42,7 +44,10 @@ It is running on jet03 and about a minute later it should be finished and you sh
 ```
 jet03.jet.local
 ```
-The hostname of the node running our test script. Of course that is a silly job. However, there are things to learn for this example:
+The hostname of the node running our test script. 
+
+## Leasons learnt
+Of course that is a silly job. However, there are things to learn for this example:
 1. Writing a `job` file and using the `#SBATCH` commands to specify
     * `job-name`, this is just for you
     * `output`, this is just for you
@@ -54,8 +59,21 @@ The hostname of the node running our test script. Of course that is a silly job.
 # Writing a job file
 
 There are things to consider when writing a job
+```bash
+#!/bin/bash
+# SLURM specific commands
+#SBATCH --job-name=test
+#SBATCH --output=test.log
+#SBATCH --ntasks=1
+#SBATCH --time=01:30
+
+# Your Code below here
+srun 
 
-# Interactive Session
+```
+
+
+# Interactive Sessions
 
 It is possible to ask for an interactive session on any node. When your job runs you can always `ssh` to that node and maybe check things, although your file system is available everywhere, there is no need for that.
 
@@ -106,7 +124,6 @@ sbatch mpiexample.sh
 
 # Useful things
 
-
 ## Information on the Job
 ```
 sacct -j <JOBID>
diff --git a/fibonacci.py b/fibonacci.py
new file mode 100644
index 0000000..c726d75
--- /dev/null
+++ b/fibonacci.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+def fib(term):
+   if term <= 1:
+       return (term)
+   else:
+       return (fib(term-1) + fib(term-2))
+
+if __name__ == "__main__":
+    # Change this value to adjust the number of terms in the sequence.
+    number_of_terms = 100
+    for i in range(number_of_terms):
+        print(fib(i))
+    
-- 
GitLab