Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Slurm
Commits
293ce350
Commit
293ce350
authored
4 years ago
by
Michael Blaschek
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
9e243d39
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+48
-11
48 additions, 11 deletions
README.md
with
48 additions
and
11 deletions
README.md
+
48
−
11
View file @
293ce350
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment