├── Resources ├── default.slurm ├── interact │ └── README ├── mpi-helloworld ├── hello-single-core.slurm ├── hello-multi-core.slurm ├── depend │ ├── submit_part1.sh │ ├── submit_part2.sh │ ├── myfirstjob.slurm │ ├── myjob4.slurm │ ├── myjob5.slurm │ ├── myjob6.slurm │ ├── mythirdjob.slurm │ └── mysecondjob.slurm ├── checkhomeusage.sh ├── hello-multi-node.slurm ├── checkprojusage.sh ├── constraint.slurm ├── specific.slurm ├── array │ └── array.slurm ├── gattaca.txt ├── hello-monitor.slurm ├── README ├── squeue.md ├── filenames.md ├── check_project_usage ├── sinfo.md └── pbs2slurm.md ├── SlideExtractor.jar ├── Images ├── gnulinux.png ├── hypnotoad.jpg ├── rabbitjobs.jpg ├── 2020spartan.jpg ├── genericcluster.png ├── smartparallel.jpg ├── spartanlayout.png ├── network_architecture.png ├── spartan_architecture.png ├── SpartanHPCControlPlane.png └── cat-asleep-on-keyboard.jpg ├── .gitmodules ├── SlideExtractor.properties ├── README.md ├── Presentation ├── templates │ └── ResOS.template ├── index.html └── Lesson_1.html ├── Lessons ├── Lesson_1.md~ └── Lesson_1.md └── LICENSE /Resources/default.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | who -u >> who.txt 3 | -------------------------------------------------------------------------------- /Resources/interact/README: -------------------------------------------------------------------------------- 1 | sinteractive --nodes=1 --ntasks-per-node=2 --time=0:10:0 2 | -------------------------------------------------------------------------------- /SlideExtractor.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/SlideExtractor.jar -------------------------------------------------------------------------------- /Images/gnulinux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/gnulinux.png -------------------------------------------------------------------------------- /Images/hypnotoad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/hypnotoad.jpg -------------------------------------------------------------------------------- /Images/rabbitjobs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/rabbitjobs.jpg -------------------------------------------------------------------------------- /Images/2020spartan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/2020spartan.jpg -------------------------------------------------------------------------------- /Images/genericcluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/genericcluster.png -------------------------------------------------------------------------------- /Images/smartparallel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/smartparallel.jpg -------------------------------------------------------------------------------- /Images/spartanlayout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/spartanlayout.png -------------------------------------------------------------------------------- /Resources/mpi-helloworld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Resources/mpi-helloworld -------------------------------------------------------------------------------- /Images/network_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/network_architecture.png -------------------------------------------------------------------------------- /Images/spartan_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/spartan_architecture.png -------------------------------------------------------------------------------- /Images/SpartanHPCControlPlane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/SpartanHPCControlPlane.png -------------------------------------------------------------------------------- /Images/cat-asleep-on-keyboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levlafayette/SpartanIntro/HEAD/Images/cat-asleep-on-keyboard.jpg -------------------------------------------------------------------------------- /Resources/hello-single-core.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | module purge 3 | module load OpenMPI/1.10.0-GCC-4.9.2 4 | time srun mpi-helloworld 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Presentation/reveal.js"] 2 | path = Presentation/reveal.js 3 | url = https://github.com/hakimel/reveal.js.git 4 | -------------------------------------------------------------------------------- /Resources/hello-multi-core.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --ntasks=8 3 | module purge 4 | module load OpenMPI/1.10.0-GCC-4.9.2 5 | time srun mpi-helloworld 6 | -------------------------------------------------------------------------------- /Resources/depend/submit_part1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sbatch myfirstjob.slurm 3 | sbatch mysecondjob.slurm 4 | sbatch mythirdjob.slurm 5 | ./submit_part2.sh 6 | 7 | -------------------------------------------------------------------------------- /Resources/checkhomeusage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Enter username to check; default is current user. 4 | 5 | MYUSER=$1 6 | 7 | ls -lhd --si ${MYUSER} | awk '{print $3 "," $5}' 8 | -------------------------------------------------------------------------------- /Resources/hello-multi-node.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --nodes=2 3 | #SBATCH --ntasks-per-node=4 4 | module purge 5 | module load OpenMPI/1.10.0-GCC-4.9.2 6 | time srun mpi-helloworld 7 | -------------------------------------------------------------------------------- /Resources/checkprojusage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Enter the project number that you wish to check, e.g., punim0001 4 | 5 | MYPROJ=$1 6 | 7 | ls -lhd --si ${MYPROJ} | awk '{print $4 "," $5}' 8 | -------------------------------------------------------------------------------- /Resources/constraint.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SBATCH --partition=physical 3 | #SBATCH --constraint=physg4 4 | #SBATCH --ntasks=72 5 | # Load modules, show commands etc 6 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 7 | -------------------------------------------------------------------------------- /Resources/specific.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --ntasks=1 3 | #SBATCH --nodelist=spartan-bm005 4 | # Alternative to exclude specific nodes. 5 | # SBATCH --exclude=spartan-bm005 6 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 7 | -------------------------------------------------------------------------------- /Resources/array/array.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="file-array" 3 | #SBATCH --ntasks=1 4 | #SBATCH --time=0-00:15:00 5 | #SBATCH --array=1-5 6 | # Note: SLURM defaults to running jobs in the directory 7 | # where they are submitted, no need for $PBS_O_WORKDIR 8 | mkdir ${SLURM_ARRAY_TASK_ID} 9 | -------------------------------------------------------------------------------- /Resources/depend/submit_part2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FIRST=$(sbatch myjob4.slurm) 4 | echo $FIRST 5 | SUB1=$(echo ${FIRST##* }) 6 | SECOND=$(sbatch --dependency=afterany:$SUB1 myjob5.slurm) 7 | echo $SECOND 8 | SUB2=$(echo ${SECOND##* }) 9 | THIRD=$(sbatch --dependency=afterany:$SUB2 myjob6.slurm) 10 | echo $THIRD 11 | -------------------------------------------------------------------------------- /Resources/depend/myfirstjob.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="myfirstjob" 3 | #SBATCH --time=0-000:02:00 4 | #SBATCH --ntasks=1 5 | # Note: SLURM defaults to running jobs in the directory 6 | # where they are submitted, no need for $PBS_O_WORKDIR 7 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID > hostname.txt 8 | sleep 60 9 | -------------------------------------------------------------------------------- /Resources/gattaca.txt: -------------------------------------------------------------------------------- 1 | DDWEIPDGQI TVGQRIGSGS FGTVYKGKWH GDVAVKMLNV TAPTPQQLQA 2 | FKNEVGVLRK TRHVNILLFM GYSTKPQLAI VTQWCEGSSL YHHLHIIETK 3 | FEMIKLIDIA RQTAQGMDYL HAKSIIHRDL KSNNIFLHED LTVKIGDFGL 4 | ATVKSRWSGS HQFEQLSGSI LWMAPEVIRM QDKNPYSFQS DVYAFGIVLY 5 | ELMTGQLPYS NINNRDQIIF MVGRGYLSPD LSKVRSNCPK AMKRLMAECL 6 | KKKRDERPLF PQILASIELL ARSLPK 7 | -------------------------------------------------------------------------------- /Resources/depend/myjob4.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="myfourthjob" 3 | #SBATCH --time=0-000:02:00 4 | #SBATCH --ntasks=1 5 | # Note: SLURM defaults to running jobs in the directory 6 | # where they are submitted, no need for $PBS_O_WORKDIR 7 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 8 | sleep 60 9 | 10 | -------------------------------------------------------------------------------- /Resources/depend/myjob5.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="myfifthjob" 3 | #SBATCH --time=0-000:02:00 4 | #SBATCH --ntasks=1 5 | # Note: SLURM defaults to running jobs in the directory 6 | # where they are submitted, no need for $PBS_O_WORKDIR 7 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 8 | sleep 60 9 | 10 | -------------------------------------------------------------------------------- /Resources/depend/myjob6.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="mysixthjob" 3 | #SBATCH --time=0-000:02:00 4 | #SBATCH --ntasks=1 5 | # Note: SLURM defaults to running jobs in the directory 6 | # where they are submitted, no need for $PBS_O_WORKDIR 7 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 8 | sleep 60 9 | 10 | -------------------------------------------------------------------------------- /Resources/depend/mythirdjob.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="mythirdjob" 3 | #SBATCH --time=0-000:02:00 4 | #SBATCH --ntasks=1 5 | #PBS -W x=depend:afterok:mysecondjob 6 | # Note: SLURM defaults to running jobs in the directory 7 | # where they are submitted, no need for $PBS_O_WORKDIR 8 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 9 | sleep 60 10 | -------------------------------------------------------------------------------- /Resources/depend/mysecondjob.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="mysecondjob" 3 | #SBATCH --time=0-000:02:00 4 | #SBATCH --ntasks=1 5 | #PBS -W x=depend:afterok:myfirstjob 6 | # Note: SLURM defaults to running jobs in the directory 7 | # where they are submitted, no need for $PBS_O_WORKDIR 8 | echo $(hostname ) $SLURM_JOB_NAME running $SLURM_JOBID >> hostname.txt 9 | sleep 60 10 | 11 | -------------------------------------------------------------------------------- /Resources/hello-monitor.slurm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --ntasks=8 3 | module purge 4 | module load OpenMPI/1.10.0-GCC-4.9.2 5 | time srun mpi-helloworld 6 | 7 | # Add job monitor snipped to determine resource usage 8 | 9 | JOBID=$SLURM_JOB_ID 10 | if [ ! -z $SLURM_ARRAY_JOB_ID ]; then 11 | JOBID="${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}" 12 | fi 13 | my-job-stats -a -j $JOBID 14 | 15 | -------------------------------------------------------------------------------- /SlideExtractor.properties: -------------------------------------------------------------------------------- 1 | # Settings file used for the slide extractor 2 | # The target directory for the slides 3 | revealDirectory=Presentation 4 | # The source that is to be trawled through looking for slides 5 | lessonsDirectory=Lessons 6 | # Gives the files that will contain the slides 7 | lessonsFileRegex=Lesson*\\.md 8 | # the template to embed the slides into 9 | template=/Presentation/templates/ResOS.template 10 | -------------------------------------------------------------------------------- /Resources/README: -------------------------------------------------------------------------------- 1 | The file `gattaca.txt` is used for diff examples in the Introductory course and for regular expressions in the Intermediate course. 2 | 3 | The file `default.slurm` uses all the default values for slurm on this system; physical partition, one node, one task, one cpu-per-task, no mail, jobid as job name, ten minute walltime, etc. It has no specific Slurm directives other than the default! 4 | 5 | The file `specific.slurm` runs on a specific node. The list may be specified as a comma-separated list of hosts, a range of hosts (host[1-5,7,...] for example), or a filename. 6 | 7 | The file `filenames.md` gives some examples about filenaming conventions in UNIX-like systems. 8 | 9 | -------------------------------------------------------------------------------- /Resources/squeue.md: -------------------------------------------------------------------------------- 1 | The Slurm command `squeue` provides information about jobs in the squeue. The following are some basic and useful commands. 2 | 3 | squeue -a 4 | 5 | This displays information in all jobs and job steps in all partitions. 6 | 7 | squeue -A $account 8 | 9 | This displays information for jobs according to account (i.e., group). Accepts a comma separated list. 10 | 11 | squeue -j $jobids 12 | 13 | Displays information for jobs according to job id. Accepts a comma separated list. 14 | 15 | squeue -p $partition 16 | 17 | Displays information for jobs according to partition. e.g., squeue -p cloud 18 | 19 | squeue -u $users 20 | 21 | Displays information for jobs according to users. Accepts a comma separated list. 22 | 23 | -------------------------------------------------------------------------------- /Resources/filenames.md: -------------------------------------------------------------------------------- 1 | # When creating filenames any character can be used except to the `/` because that is a directory delimiter. 2 | 3 | # However, just because (almost) any character can be used, doesn't mean any character should be used. Spaces in filenames, for example, are a bad practise. 4 | 5 | touch "This is a long file name" 6 | for item in $(ls *); do echo ${item}; done 7 | 8 | # Filenames with wildcards are not a particularly good idea either. 9 | 10 | touch * # What are you thinking?! 11 | rm * # Really?! You want to remove all files in your directory? 12 | rm '*' # Safer, but shouldn't have been created in the first place. 13 | 14 | # Best to keep to plain, old fashioned, alphanumerics. Snake_case or CamelCase is helpful. 15 | 16 | touch "This_is_a_long_filename" 17 | touch "ThisIsALongFilename 18 | -------------------------------------------------------------------------------- /Resources/check_project_usage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MYGROUP=$@ 4 | 5 | if [ "$MYGROUP" == "" ]; then MYGROUP=$(groups); fi 6 | 7 | for group in $MYGROUP 8 | do 9 | if [[ $group == "gaussian" ]] || [[ $group == "rmit" ]] || [[ $group == "deakin" ]] || [[ $group == "vu" ]] || [[ $group == "rmit" ]]; then continue; fi 10 | QUOTASET=1; 11 | PROJDIR="/data/cephfs/${group}" 12 | CURQUOTABYTES=$(getfattr -n ceph.quota.max_bytes ${PROJDIR} --only-values --absolute-names 2>/dev/null) 13 | if [ $? -eq 1 ]; then QUOTASET=0; fi 14 | CURQUOTA=$((CURQUOTABYTES/(1000*1000*1000))) 15 | 16 | CURUSAGEBYTES=$(ls -ldH ${PROJDIR} | awk '{print $5}') 17 | CURUSAGE=$((CURUSAGEBYTES/(1000*1000*1000))) 18 | 19 | if [ $QUOTASET -eq 1 ] 20 | then 21 | echo $group has used ${CURUSAGE}GB out of ${CURQUOTA}GB in ${PROJDIR} 22 | else 23 | echo $group has used ${CURUSAGE}GB in ${PROJDIR}. Currently no quota is set. 24 | fi 25 | done 26 | -------------------------------------------------------------------------------- /Resources/sinfo.md: -------------------------------------------------------------------------------- 1 | The following as some sinfo examples that you might find useful on Spartan. 2 | 3 | `sinfo -s` 4 | 5 | Provides summary information the system's partitions, from the partition name, whether the partition is available, walltime limits, 6 | node information (allocated, idle, out, total), and the nodelist. 7 | 8 | `sinfo -p $partition` 9 | 10 | Provides information about the particular partition specified. Breaks sinfo up for that partition into node states (drain, drng, 11 | mix, alloc, idle) and the nodes in that state. `Drain` means that the node is marked for maintenance, and whilst existing jobs will 12 | run it will not accept new jobs. 13 | 14 | `sinfo -a` 15 | 16 | Similar to `sinfo -p` but for all partitions. 17 | 18 | `sinfo -n $nodes -p $partition` 19 | 20 | Print information only for specified nodes in specified partition; can use comma-separated values or range expression e.g., `sinfo 21 | -n spartan-bm[001-010]`. 22 | 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SpartanIntro 2 | An four hour training course and workshop that provides an introduction to the Spartan HPC/Cloud hybrid and an introduction to the Linux command line. 3 | 4 | ## Git 5 | 6 | If you check this repository out be aware that it uses Git submodules to manage the reveal.js dependency. To also checkout reveal.js, you will have to either: 7 | 8 | ### fetch it all in one hit 9 | `git clone --recursive https://github.com/UoM-ResPlat-DevOps/SpartanIntro` 10 | 11 | Or: 12 | 13 | ### take it step by step 14 | `git clone https://github.com/UoM-ResPlat-DevOps/SpartanIntro` 15 | `git submodule init` 16 | `git submodule update` 17 | 18 | To regenerate the slides 19 | 20 | The SlideExtractor.jar in the root directory will re-create the slides if needed. 21 | 22 | To run it ensure that the java version installed is java 8: 23 | 24 | `java -version` 25 | 26 | should return something along the lines of java version "1.8.0_65". 27 | 28 | If it doesn't then install java 8 from here: `http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html` 29 | 30 | Then in a command prompt in the root directory simply issue: 31 | 32 | `java -jar SlideExtractor.jar` 33 | 34 | You should see something like the following fly by: 35 | 36 | `Working on: ./Lessons/Lesson_1.md` 37 | `Writing to: ./Presentation/Lesson_1.html` 38 | `Writing to: ./Presentation/index.html` 39 | 40 | ## Folders 41 | 42 | The directories that make up this project are as follows: 43 | 44 | * Lessons - The lesson(s); 45 | * Planning - The plan used to create the course; 46 | * Resources - Resources for this particular run of the training. 47 | 48 | -------------------------------------------------------------------------------- /Resources/pbs2slurm.md: -------------------------------------------------------------------------------- 1 | For those who are more familiar with PBS there is a handy script which can do a lot of the conversion from PBS to Slurm. 2 | 3 | https://github.com/bjpop/pbs2slurm 4 | 5 | The following is a summary of common PBS commands and their Slurm equivalent, in part taken from `https://genomedk.fogbugz.com/?W6` 6 | 7 | 8 | User commands PBS/Torque Slurm 9 | Job submission qsub sbatch 10 | Job deletion qdel scancel 11 | Job deletion qdel ALL scancel -u 12 | List jobs qstat [-u user] squeue [-u user] [-l for long format] 13 | Job status qstat -f jobinfo 14 | Job hold qhold scontrol hold 15 | Job release qrls ​ scontrol release 16 | 17 | Environment PBS/Torque Slurm 18 | Job ID $PBS_JOBID $SLURM_JOBID 19 | Node list $PBS_NODEFILE $SLURM_JOB_NODELIST (new format) 20 | Submit dir $PBS_O_WORKDIR $SLURM_SUBMIT_DIR 21 | 22 | Job Specification PBS/Torque Slurm 23 | Script directive #PBS #SBATCH 24 | Queue -q -p 25 | Node count -l nodes= -N 26 | Cores(cpu) per node -l ppn= -c 27 | Memory size -l mem=16384 --mem=16g OR --mem-per-cpu=2g 28 | Wall time -l walltime= -t 29 | Standard output file -o -o 30 | Standard error file -e -e 31 | Output directory -o -o "directory/slurm-%j.out" 32 | Event notification -m abe --mail-type=[BEGIN, END, FAIL, REQUEUE, or ALL] 33 | Email address -M
--mail-user=
34 | Job name -N --job-name= 35 | Job dependency -W depend= --depend=C: 36 | Account to charge -W group_list= --account= 37 | -------------------------------------------------------------------------------- /Presentation/templates/ResOS.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Introduction to Linux and HPC 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 32 | 33 | 34 | 35 | 36 |
37 | 38 | 39 |
40 | 41 | 42 | 43 |
44 | 45 |
46 | 47 | 48 | 49 | 50 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /Presentation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Introduction to Linux and HPC 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 32 | 33 | 34 | 35 | 36 |
37 | 38 | 39 |
40 | 41 | 42 | 43 | 46 |
47 | 48 |
49 | 50 | 51 | 52 | 53 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Lessons/Lesson_1.md~: -------------------------------------------------------------------------------- 1 | -- *Slide* -- 2 | ### Goals for today 3 | * Part 1: Learning about supercomputers and Spartan. 4 | * Part 2: Logging on an exploring the Linux Environment. 5 | * Part 3: Learning about Environment Modules and the Slurm job submission system. 6 | * Part 4: Submitting test jobs. 7 | * Part 5: TORQUE/Moab and Slurm Command Summaries 8 | -- *Slide End* -- 9 | 10 | -- *Slide* -- 11 | ### Slide Respository 12 | * A copy of these slides and sample code is available at: `https://github.com/UoM-ResPlat-DevOps/SpartanIntro` 13 | * A copy of information about HPC at the University of Melbourne is available at `https://dashboard.hpc.unimelb.edu.au`. See also `man spartan` on the cluster and the `/usr/local/common/` directories for more help and code exammples. 14 | * Help is available at: `hpc-support@unimelb.edu.au`. Other courses also conducted by Research Platforms. 15 | -- *Slide End* -- 16 | 17 | -- *Slide* -- 18 | ### Part 1: Supercomputers and High Performance Computers etc 19 | * "Supercomputer" means any single computer system that has exceptional processing power for its time. 20 | * One popular metric (LINPACK) is the number of floating­ point operations per second (FLOPS) such a system can carry out (http://top500.org). HPC Challenge is a broader, more interesting metric. 21 | * High Performance Computer (HPC) is any computer system whose architecture allows for above average performance. 22 | * High Throughput Computing (HTC) is an architecture for maximum job completion; capability vs capacity computing. 23 | -- *Slide End* -- 24 | 25 | -- *Slide* -- 26 | ### Part 1: Clusters and Research Computing 27 | * Clustered computing is when two or more computers serve a single resource. This improves performance and provides redundancy in case of failure system. Typically commodity systems with a high-speed local network. 28 | * Research computing is the software applications used by the scientific community to aid research. Does not necessarily equate with high performance computing, or the use of clusters.­ It is whatever researchers use and do. Not issues of producibility and environments. 29 | -- *Slide End* -- 30 | 31 | -- *Slide* -- 32 | ### Part 1: Parallel Computing 33 | * With a cluster architecture, applications can be more easily parallelised across them. Parallel computing refers to the submission of jobs or processes over multiple processors and by splitting up the data or tasks between them. 34 | * Data parallelism, running same task in parallel; the horse and cart example, Monte Carlo experiments. 35 | * Task parallel, running indeopendent tasks in parallel with communication; driving a car, molecullar modelling. 36 | * Further examples of serial versus parallel; weather forecasting, aerodynamic design, fluid mechanics, radiation modelling, molecullar dynamics, CGI rendering for popular movies, etc. Reality is a parallel system! 37 | -- *Slide End* -- 38 | 39 | -- *Slide* -- 40 | ### Part 1: HPC Cluster and Parallel Processing Components 41 | * A chassis or rack, containing multiple computer system units, interconnect, and providing power. 42 | * Computer system units or nodes, containing memory, local disk, and sockets. 43 | * Sockets contain a processor which has one or more cores which do the processing. 44 | * Logical processes have shared resources (e.g., memory) which may have multiple instruction stream threads. 45 | -- *Slide End* -- 46 | 47 | -- *Slide* -- 48 | ### Part 1: Generic HPC Cluster Design 49 | 50 | * Image originally from the Victorian Partnership for Advanced Computing. 51 | -- *Slide End* -- 52 | 53 | -- *Slide* -- 54 | ### Part 1: King Edward Is No More! 55 | * Since 2011 UniMelb's general cluster was been Edward (previous system was Alfred). 56 | * A review was conducted looking at the infrastructure and metrics of Edward, the University's general HPC system since 2011. 57 | * Edward's usage statistics show that single-core and low memory jobs dominate; 76.35% of jobs from Feb 9 2015 to Feb 9 2016 were single core, and 96.83% used 1-4GB of memory. 58 | -- *Slide End* -- 59 | 60 | -- *Slide* -- 61 | ### Part 1: What's Different About Spartan? 62 | * New system is Spartan (not Æthelstan or Ælfweard) 63 | * Recommended solution was to make use of existing NeCTAR Research cloud with an expansion of general cloud compute provisioning and use of a smaller "true HPC" system on bare metal nodes. 64 | * Matches Sparta's citenzship structure. Spartan is not "HPC in the Cloud", it's a chimera HPC/Cloud hybrid. 65 | -- *Slide End* -- 66 | 67 | -- *Slide* -- 68 | ### Part 1: Spartan Design 69 | 70 | -- *Slide End* -- 71 | 72 | -- *Slide* -- 73 | ### Part 1: Spartan Hardware 74 | * Physical partition is c276 cores, 21 GB per core, 2 socket Intel E5-2643 v3 CPU with 6-core per socket, 3.4GHz, 192GB memory, 2x 1.2TB SAS drives, 2x 40GbE network Mellanox 2100. 75 | * Cloud partitions is almost 400 virtual machines with over 3,000 cores, dual CPU E5-2683 v4 2.1GHz, 10GBe Cisco Nexus. 76 | * There is also a GPU partition (Dual Nvidia Tesla K80, *very* big expansion this year), and departmental partitions (water and ashley). 77 | * Storage: 8TB `/scratch` NFS over RDMA, `/project` and `/home` NFS, 65TB. 78 | -- *Slide End* -- 79 | 80 | -- *Slide* -- 81 | ### Part I: Logging In 82 | * Spartan (like Edward) uses its own authentication that is tied to the university Security Assertion Markup Language (SAML). The login URL is `https://dashboard.hpc.unimelb.edu.au/karaage` 83 | * Users on Spartan must belong to a project. Projects must be led by a University of Melbourne researcher (the "Principal Investigator") and are subject to approval by the Head of Research Compute Services. Participants in a project can be researchers or research support staff from anywhere. 84 | * Projects have their own project directory for files. 85 | -- *Slide End* -- 86 | 87 | -- *Slide* -- 88 | ### Part I: Logging In 89 | * To log on to a HPC system, you will need a user account and password and a Secure Shell (ssh) client. Linux distributions almost always include SSH as part of the default installation as does 90 | Mac OS 10.x. For MS-­Windows users, the free PuTTY client is recommended (http://putty.org). 91 | * To transfer files use scp, WinSCP, Filezilla (`https://filezilla-project.org/`), or rsync. 92 | * Example login: `lev@spartan.hpc.unimelb.edu.au` 93 | * Consider using an `.ssh/config` file and using passwordless SSH by creating a keypair and adding to your `.ssh/authorized_keys` file on Spartan. 94 | -- *Slide End* -- 95 | 96 | -- *Slide* -- 97 | ### Part I: Helpdesk 98 | * Read the Message of the Day when you login! 99 | * If a user has problems with submitting a job, or needs a new application or extension to an existing application installed, or if their submissions are generated unexpected errors etc., an email can be sent to the helpdesk: `hpc­-support@unimelb.edu.au`. 100 | * Do not email individual sysadmins; we need consildated records. Please be informative about the error or issue. 101 | -- *Slide End* -- 102 | 103 | -- *Slide* -- 104 | ### Part 2: This is a GNU/Linux CLI World 105 | 106 | * In November 2016 of the Top 500 Supercomputers worldwide, every single machine used a "UNIX­like" operating system; 99.6% used Linux, 0.4% others. 107 | -- *Slide End* -- 108 | 109 | -- *Slide* -- 110 | ### Part 2: This is a GNU/Linux World CLI II 111 | * The command­line interface provides a great deal more power and is very resource efficient. 112 | * GNU/Linux scales and does so with stability and efficiency. 113 | * Critical software such as the Message Parsing Interface (MPI) and nearly all scientific programs are designed to work with GNU/Linux. 114 | * The operating system and many applications are provided as "free and open source" which are better placed to improve, optimize and maintain. 115 | -- *Slide End* -- 116 | 117 | -- *Slide* -- 118 | ### Part 2: Exploring The Environment 119 | * When a user logs in on a Linux or other UNIX-like system on the command line, they start in their home directory (`/home/<>`). Explore file system hierarchy. Project directory in `/data/projects/<>`. 120 | * "Everything in the UNIX system is a file" (Kernighan & Pike, 1984, 41). 121 | 122 | | Command | Explanation | 123 | |-------------|:--------------------------------------------------------------------------:| 124 | |`whoami` | "Who Am I?; prints the effective user id. | 125 | |`pwd` | "Print working directory"; prints the directory where you're currently in.| 126 | |`ls` | "List" directory listing | 127 | -- *Slide End* -- 128 | 129 | -- *Slide* -- 130 | ### Part 2: Command Options 131 | * Linux commands often come with options expressed as: 132 | ` --` 133 | * Options can be expressed as full words or abbreviated characters. 134 | 135 | | Command | Explanation | 136 | |-------------|:--------------------------------------------------------------------------:| 137 | |`ls -lart` | Directory listing with options (long, all, reverse time) | 138 | -- *Slide End* -- 139 | 140 | -- *Slide* -- 141 | ### Part 2: The Online Manual 142 | * Linux commands come with "man" (manual) pages, which provide a terse description of the meaning and options available to a command. A verbose alternative to man is info. 143 | 144 | | Command | Explanation | 145 | |-------------|:------------------------------------------------------------------------:| 146 | |`man ls` | Display the manual entry for the command "ls" | 147 | |`apropos ` | Search for a particular command. Equivalent to "man -k "| 148 | |`info ` | A verbose description of the command | 149 | -- *Slide End* -- 150 | 151 | -- *Slide* -- 152 | ### Part 2: Pipes 153 | * Linux also have very useful 'pipes' and redirect commands. To pipe one command through another use the '|' symbol. 154 | 155 | | Command | Explanation | 156 | |--------------------|:-------------------------------------------------------------------:| 157 | | who -u | less | "Who" shows who is logged on and how long they've been idle. | 158 | | ps afux | less | "ps" provides a list of current processes. | 159 | -- *Slide End* -- 160 | 161 | -- *Slide* -- 162 | ### Part 2: Redirects 163 | * To redirect output use the '>' symbol. To redirect input (for example, to feed data to a command) use the '<'. Concatenation is achieved through the use of '>>' symbol. 164 | 165 | | Command | Explanation | 166 | |-------------------|:--------------------------------------------------------------------:| 167 | | `w > list.txt` | 'w' is a combination of who, uptime and ps -a, redirected | 168 | | `w >> list.txt` | Same command, concatenated | 169 | -- *Slide End* -- 170 | 171 | -- *Slide* -- 172 | ### Part 2: Files and Text Editing I 173 | * Linux filenames can be constructed of any characters except the forward slash, which is for directory navigation. However it is best to avoid punctuation marks, non-printing characters (e.g., spaces). It is better to use underscores or CamelCase instead of spaces. 174 | * Linux is case-sensitive with its filenames (e.g., list.txt, LIST.txt lisT.txT are different). 175 | -- *Slide End* -- 176 | 177 | -- *Slide* -- 178 | ### Part 2: Files and Text Editing II 179 | * Files do not usually require a program association suffix, although you may find this convenient (a C compiler like files to have .c in their suffix, for example). 180 | * The type of file can be determined with the `file` command. The type returned will usually be text, executable binaries, archives, or a catch-all "data" file. 181 | * There are three text editors usually available on Linux systems on the command-line. The first is `nano`; easy to use, limited functionality. The others (both from 1976) are `vi` (or `vim`), which is terse but powerful, or `emacs` (Editor Macros) editor and environment is a feature-rich application, 182 | -- *Slide End* -- 183 | 184 | -- *Slide* -- 185 | ### Part 2: Copying Files to a Local Systems 186 | * To get a copy of the files from an external source to your home directory, you will probably want to use `wget`, or `git`, or `scp`. 187 | 188 | | Command | Explanation | 189 | |-------------------|:--------------------------------------------------------------------:| 190 | | `wget URL` | Non-interactive download of files over http, https, ftp etc. | 191 | | `git clone URL` | Clone a repository into a new directory. | 192 | -- *Slide End* -- 193 | 194 | -- *Slide* -- 195 | ### Part 2: Copying Files Within a Local Systems 196 | * To copy a file from within a system use the `cp` command. Common options include `-r` to copy and entire directory 197 | 198 | | Command | Explanation | 199 | |-------------------|:--------------------------------------------------------------------:| 200 | | `cp source destination` | Copy a file from source to destination | 201 | | `cp -r source destination` | Recursive copy (e.g., a directory) from source to destination | 202 | | `cp -a source destination` | Recursive copy as archive (with permissions, links) | 203 | -- *Slide End* -- 204 | 205 | -- *Slide* -- 206 | ### Part 2: Copying Files Between Systems 207 | * To copy files to between systems desktop use SCP (secure copy protocol) or SFTP (secure file transfer protocol), combining the ssh and cp functionality. The `cp` options can also be used. The source or destination address should also require a remote shell login. 208 | 209 | | Command | Explanation | 210 | |-------------------|:--------------------------------------------------------------------:| 211 | | `scp source.address:/path/ destination.address:/path/`| Copies files on a network | 212 | -- *Slide End* -- 213 | 214 | -- *Slide* -- 215 | ### Part 2: Synchronising Files and Directories I 216 | * The `rsync` utility provides a fast way to keep two collections of files "in sync" by tracking changes. The source or destination address should also require a remote shell login. 217 | For example; `rsync -avz --update lev@spartan.hpc.unimelb.edu.au:files/workfiles .` 218 | -- *Slide End* -- 219 | 220 | -- *Slide* -- 221 | ### Part 2: Synchronising Files and Directories II 222 | 223 | | Command | Explanation | 224 | |-------------------|:--------------------------------------------------------------------:| 225 | | `rsync source destination`| General rsync command | 226 | | `rsync -avze ssh username@remotemachine:/path/to/source .` | With ssh encryption | 227 | -- *Slide End* -- 228 | 229 | -- *Slide* -- 230 | 231 | ### Part 2: Synchronising Files and Directories III 232 | * The `rsync -avz` command ensures that it is in archive mode (recursive, copies symlinks, preserves permissions), is verbose, and compresses on transmission. 233 | * The --update restricts the copy only to files that are newer than the destination. 234 | * Note that rsync is "trailing slash sensitive". A trailing / on a source means "copy the contents of this directory". Without a trailing slash it means "copy the directory". 235 | -- *Slide End* -- 236 | 237 | -- *Slide* -- 238 | 239 | ### Part 2: Synchronising Files and Directories IV 240 | * Rsync can be used in a synchronise mode with the --delete flag. Consider this with the `-n`, or `--dry-run` options first! 241 | 242 | | Command | Explanation | 243 | |-------------------|:--------------------------------------------------------------------:| 244 | | `rsync -avz --delete source/ username@remotemachine:/path/to/destination| Synchronise source and destination | 245 | -- *Slide End* -- 246 | 247 | -- *Slide* -- 248 | ### Part 2: Creating Directories, Moving Files 249 | * Directories can be created with the `mkdir` command (e.g., `mkdir braf`). 250 | * Files can be copied with the `cp` command (e.g., `cp gattaca.txt gattaca2.txt`) 251 | * Files can be moved with the `mv` command (e.g., `mv gattaca2.txt braf`) 252 | 253 | -- *Slide* -- 254 | ### Part 2: File Differences 255 | * File differences can be determined by timestamp (e.g., `ls -l gattaca.txt braf/gattaca2.txt`) 256 | * Content differences can be determined by the `diff` command (e.g., `diff gattaca.txt braf/gattaca.txt`) 257 | * For a side-by-side representation use the command `sdiff` instead. 258 | -- *Slide End* -- 259 | 260 | -- *Slide* -- 261 | ### Part 2: Searches and Wildcards 262 | * To search for files use the find command (e.g., `find . -name '*.txt'`). See also `man find`. 263 | * To search within files, use the `grep` command (e.g., `grep -i ATEK braf/*`) 264 | * The most common wildcare is `*`, but there is also `?` (single character). 265 | * There are also range searches (e.g., `[a-z]` any character between a and z, inclusive) 266 | -- *Slide End* -- 267 | 268 | -- *Slide* -- 269 | ### Part 2: Deletions 270 | * Files can be deleted with the `rm` command (e.g., `rm gattaca.txt`) 271 | * Empty directories can be deleted with the `rmdir` command (e.g., `rmdir braf`) 272 | * Directories, files, subdirectories etc can be delted with `rm -rf <>` 273 | * BE VERY CAREFUL! 274 | -- *Slide End* -- 275 | 276 | -- *Slide* -- 277 | ### Part 2: Why The File Differences Mattered 278 |
279 | BRAF is a human gene that makes a protein (imaginatively) named B-Raf. This protein is involved in sending signals inside cells, which are involved in directing cell growth. In 2002, it was shown to be faulty (mutated) in human cancers. In particular the difference that between the two files "ATVKSRWSGS" and "ATEKSRWSGS" is the difference which leads to susceptibility to metastatic melanoma. 280 |
281 | -- *Slide End* -- 282 | 283 | -- *Slide* -- 284 | ### Part 3: A Dynamic Environment 285 | * Environment modules provide for the dynamic modification of the user's environment via module files, such as the location of the application's executables, its manual path, the library path, and so forth 286 | * Modulefiles also have the advantages of being shared on many users on a system (such as an HPC system) and easily allowing multiple installations of the same application but with different versions and compilation options. 287 | -- *Slide End* -- 288 | 289 | -- *Slide* -- 290 | ### Part 3: Environment Modules Commands 291 | * The are two implementations of environment modules. The classic modules system is available on the Edward HPC, and the newer Lmod is on Spartan. LMod is considered superior for hierarchies of modules. 292 | -- *Slide End* -- 293 | 294 | -- *Slide* -- 295 | ### Part 3: Module Commands I 296 | | Command | Explanation | 297 | |---------------------------------|:------------------------------------------------------:| 298 | | `module help` | List of switches, commands and arguments for modules | 299 | | `module avail` | Lists all the modules which are available to be loaded.| 300 | | `module display ` | Display paths etc for modulefile | 301 | | `module load ` | Loads paths etc to user's environment | 302 | | `module unload ` | Unloads paths etc from user's environment. | 303 | | `module list` | lists all the modules currently loaded. | 304 | -- *Slide End* -- 305 | 306 | -- *Slide* -- 307 | ### Part 3: Module Commands II 308 | * There is also the `module switch `, which unloads one modulefile (modulefile1) and loads another (modulefile2). 309 | * On Spartan there is also the lmod-specific `module spider 339 | * From the IBM 'Red Book' on Job Submission. 340 | -- *Slide End* -- 341 | 342 | -- *Slide* -- 343 | ### Part 3: Job Setup I 344 | * Setup and launch consists of writing a short script that initially makes resource requests 345 | (walltime, processors, memory, queues) and then commands (loading modules, changing 346 | directories, running executables against datasets etc), and optionally checking queueing system. 347 | * Core command for checking queue `showq` (TORQUE), `squeue` (Slurm) 348 | * Core command for job submission `qsub [jobscript]` (TORQUE), `sbatch [jobscript]` (Slurm) 349 | -- *Slide End* -- 350 | 351 | -- *Slide* -- 352 | ### Part 3: Job Setup II 353 | * TORQUE jobs must include `cd $PBS_O_WORKDIR` to change to the directory where they were launched. Slurm jobs do not require this. 354 | * TORQUE jobs do not parse the user's environment to the compute node by default; the `#$PBS -V` command is required. Slurm does this by default. 355 | -- *Slide End* -- 356 | 357 | -- *Slide* -- 358 | ### Part 3: Status and Output 359 | * Core command for checking job `qstat [jobid]` (TORQUE), `checkjob [jobid]` (Moab), `squeue -j [jobid]` (Slurm), detailed command `scontrol show job [jobid]` (Slurm) 360 | * Core command for deleting job `qdel [jobid]` (TORQUE), `scancel [jobid]` (Slurm) 361 | * Both TORQUE and Slurm provide error and output files (combined into one by default in 362 | Slurm). They may also have files for post-job processing. Graphic visualisation is best done on 363 | the desktop. 364 | -- *Slide End* -- 365 | 366 | -- *Slide* -- 367 | ### Part 4: Single Core Job 368 | | TORQUE (Edward) | Slurm (Spartan) | 369 | |-------------------------------------|------------------------------------------------------:| 370 | |`#!/bin/bash` | `#!/bin/bash` | 371 | |`#PBS ­-q compute` | `#SBATCH -­p cloud` | 372 | |`#PBS ­-l walltime=01:00:00` | `#SBATCH ­­--time=01:00:00` | 373 | |`#PBS ­-l nodes=1:ppn=1` | `#SBATCH ­­--nodes=1` | 374 | |`cd $PBS_O_WORKDIR` | `#SBATCH ­­--ntasks=1` | 375 | |`module load my­app­compiler/version` | `module load my­app­compiler/version` | 376 | |`my­app data` | `my­app data` | 377 | 378 | * Note that Slurm commands have abbreviated or extended versions of resource requests (e.g., `--partition=cloud` or `-p cloud`). 379 | * Examples at `/usr/local/common/MATLAB` and `/usr/local/common/R`; note that the job can call other scripts. 380 | -- *Slide End* -- 381 | 382 | -- *Slide* -- 383 | ### Part 4 : Multicore Jobs 384 | * Modifying resource allocation requests can improve job efficiency. For TORQUE/Edward use the 385 | same script as previously provided but change the resource request as follows: `#PBS ­-l --nodes=1:ppn=2`, or for Slurm/Spartan `#SBATCH --nodes=1 #SBATCH --ntasks-per-node=2` 386 | * For example shared-memory multithreaded jobs on Slurm/Spartan (e.g., OpenMP), modify the 387 | --cpus-per-task to a maximum of 16, which is the maximum number of cores on a single instance. 388 | `#SBATCH ­­--cpus-­per-­task=8` 389 | -- *Slide End* -- 390 | 391 | -- *Slide* -- 392 | ### Part 4 : Multinode Jobs Spartan 393 | * For distributed-memory multicore job using message passing, the multinode partition has to be 394 | invoked and the resource requests altered e.g., 395 | `#!/bin/bash`
396 | `#SBATCH --­partition physical`
397 | `#SBATCH ­­--nodes=2`
398 | `#SBATCH ­­--ntasks=2`
399 | `module load my­app­compiler/version`
400 | `srun my­mpi­app` 401 | -- *Slide End* -- 402 | 403 | -- *Slide* -- 404 | ### Part 4 : Job/Batch Arrays 405 | * With a job or batch array the same batch script, and therefore the same resource requests, is used multiple times. A typical example is to apply the same task across multiple datasets. The following example submits 10 batch jobs with myapp running against datasets dataset1.csv, dataset2.csv, ... 406 | dataset10.csv 407 | `#SBATCH ­­array=1­-10`
408 | `myapp ${Slurm_ARRAY_TASK_ID}.csv` 409 | * Examples at `/usr/local/common/array` and `/usr/local/common/Octave`. 410 | -- *Slide End* -- 411 | 412 | -- *Slide* -- 413 | ### Part 4 : Job/Batch Dependencies 414 | * A dependency condition is established on which the launching of a batch script depends, creating a conditional pipeline. The dependency directives consist of `after`, `afterok`, `afternotok`, `before`, `beforeok`, `beforenotok`. A typical use case is where the output of one job is required as the input of the next job. 415 | `#SBATCH ­­dependency=afterok:myfirstjobid mysecondjob` 416 | * Examples at `/usr/local/common/depend/` 417 | -- *Slide End* -- 418 | 419 | -- *Slide* -- 420 | ### Part 4: Interactive Jobs 421 | * An interactive job, based on the resource requests made on the command line, puts the user on to a compute node. This is typically done if they user wants to run a large script (and shouldn't do it on the login node), or wants to test or debug a job. The following command would launch one node with two processors for ten minutes. 422 | `sinteractive ­­--nodes=1 --­­ntasks-­per-­node=2 --­­time=0:10:0` 423 | * Example and instructions at `/usr/local/common/interact` 424 | -- *Slide End* -- 425 | 426 | -- *Slide* -- 427 | ### Part 4 : Multiple Job Steps 428 | * Sometimes a job needs to consist of several steps that need to be carried on sequence, even if the individual components are in parallel. In this case the entire job resource set can be called with an aggregation of walltime and with a maximum reduction operation for memory and resources. e.g., 429 | `#!/bin/bash`
430 | `#SBATCH --­partition physical`
431 | `#SBATCH ­­--nodes=2`
432 | `#SBATCH ­­--ntasks=12`
433 | `#SBATCH --time=24:00:00`
434 | `srun -N 2 -n 12 -t 06:00:00 ./my­mpi­app`
435 | `export OMP_NUM_THREADS=6`
436 | `srun -N 1 -n2 -c $OMP_NUM_THREADS -t 12:00:00 ./myompapp`
437 | `srun -N 1 -n 1 -t 06:00:00 ./myserialapp`
438 | -- *Slide End* -- 439 | 440 | -- *Slide* -- 441 | ### Part 4: Backfilling 442 | * Many schedulers and resource managers use a backfilling algorithm to improve system utilisation and maximise job throughout. 443 | * When more resource intensive (e.g., multiple node) jobs are running it is possible that gaps ends up in the resource allocation. To fill these gaps a best effort is made for low-resource jobs to slot into these spaces. 444 | -- *Slide End* -- 445 | 446 | -- *Slide* -- 447 | ### Part 4: Memory Allocation 448 | * By default the scheduler will set memory equal to the total amount on a compute node divided by the number of cores requested. In some cases this might not be enough (e.g., very large dataset that needs to be loaded with low level of parallelisation). 449 | * Additional memory can be allocated with the `--mem=[mem][M|G|T]` directive (entire job) or `--mem-per-cpu=[mem][M|G|T]` (per core). Maximum should be based around total cores -1 (for system processes). The --mem-per-cpu directive is for threads for OpenMP applications and processor ranks for MPI. 450 | * Not a good allocation of resources. Use only when absolutely necessary. 451 | -- *Slide End* -- 452 | 453 | -- *Slide* -- 454 | ### Part 5: User Commands 455 | | User Commad | TORQUE (Edward) | Slurm (Spartan) | 456 | |----------------|-----------------------|------------------------:| 457 | |Job submission |qsub [script_file] |sbatch [script_file] | 458 | |Job delete |qdel [job_id] |scancel [job_id] | 459 | |Job status |qstat [job_id] |squeue [job_id] | 460 | |Job status |qstat -u [user_name] |squeue -u [user_name] | 461 | |Job pause |qhold [job_id] |scontrol hold [job_id] | 462 | |Job release |qrls [job_id] |scontrol release [job_id]| 463 | |Node list |pbsnodes -a |sinfo -N | 464 | |Queue list |qstat -Q |squeue | 465 | |Cluster status |showq |sinfo | 466 | -- *Slide End* -- 467 | 468 | -- *Slide* -- 469 | ### Part 5: Job Commands 470 | | Job Specification | TORQUE (Edward) | Slurm (Spartan) | 471 | |-----------------------|------------------------|------------------------------:| 472 | |Script directive |`#PBS` |`#SBATCH` | 473 | |Queue |`-q [queue]` |`-p [queue]` `--partition` | 474 | |Job Name |`-N [name]` |`--job-name=[name]` | 475 | |Nodes |`-l nodes=[count]` |`-N [min[-max]]` `--nodes` | 476 | |CPU/Task Count |`-l ppn=[count]` |`-n [count]` `--ntasks` | 477 | |Wall Clock Limit |`-l walltime=[hh:mm:ss]`|`-t [days-hh:mm:ss]` `--time` | 478 | |Event Address |`-M [address]` |`--mail-user=[address]` | 479 | |Event Notification |`-m abe` |`--mail-type=[events]` | 480 | |Memory Size |`-l mem=[MB]` |`--mem=[mem][M|G|T]` | 481 | |Proc Memory Size |`-l pmem=[MB]` |`--mem-per-cpu=[mem][M|G|T]` | 482 | -- *Slide End* -- 483 | 484 | -- *Slide* -- 485 | ### Part 5: Environment Commands 486 | | Environment Command | TORQUE (Edward) | Slurm (Spartan) | 487 | |-----------------------|-----------------------|------------------------:| 488 | |Job ID |`$PBS_JOBID` |`$Slurm_JOBID` | 489 | |Submit Directory |`$PBS_O_WORKDIR` |`$Slurm_SUBMIT_DIR` | 490 | |Submit Host |`$PBS_O_HOST` |`$Slurm_SUBMIT_HOST` | 491 | |Node List |`$PBS_NODEFILE` |`$Slurm_JOB_NODELIST` | 492 | |Job Array Index |`$PBS_ARRAYID` |`$Slurm_ARRAY_TASK_ID` | 493 | -- *Slide End* -- 494 | 495 | -- *Slide* -- 496 | ### Part 5: Performance Test 497 | * Compare the performance of NAMD/VMD Ubiquitin protein test case under `/usr/local/common/NAMD` under different configurations 498 | 499 | | Nodes and Tasks | Partition | Time | 500 | |-----------------------|-----------------------|------------------------:| 501 | |ntasks=4 | cloud | | 502 | |ntaks=8 | cloud ` | | 503 | |nodes=2, ntasks=16 | cloud | | 504 | |nodes=2, ntasks=16 | physical | | 505 | -- *Slide End* -- 506 | 507 | -- *Slide* -- 508 | 509 | -- *Slide End* -- 510 | -------------------------------------------------------------------------------- /Lessons/Lesson_1.md: -------------------------------------------------------------------------------- 1 | -- *Slide* -- 2 | ### Goals for today 3 | * Part 1: Learning about supercomputers and Spartan 4 | * Part 2: Logging on and exploring the Linux Environment 5 | * Part 3: Environment Modules and Slurm job submission 6 | * Part 4: Job Examples 7 | * Part 5: Slurm Command Summaries and Peformance Test 8 | -- *Slide End* -- 9 | 10 | -- *Slide* -- 11 | ### Slide Respository 12 | * A copy of these slides and sample code is available at: `https://github.com/levlafayette/SpartanIntro` 13 | * A copy of information about HPC at the University of Melbourne is available at `https://dashboard.hpc.unimelb.edu.au`. See also `man spartan` on the cluster and the `/usr/local/common/` directories for more help and code exammples. 14 | * Help is available at: `hpc-support@unimelb.edu.au`. Other courses also conducted by Research Computing Services. 15 | -- *Slide End* -- 16 | 17 | -- *Slide* -- 18 | ### Part I: Helpdesk 19 | * Read the Message of the Day when you login! 20 | * If a user has problems with submitting a job, or needs a new application or extension to an existing application installed, or if their submissions are generated unexpected errors etc., an email can be sent to the helpdesk: `hpc­-support@unimelb.edu.au` or through the support page: `https://dashboard.hpc.unimelb.edu.au/training_help/`. 21 | * Don't email individual sysadmins; we need consolidated records. Please be informative about the error or issue. Separate tickets for separate issues. Don't try to use sudo! 22 | -- *Slide End* -- 23 | 24 | -- *Slide* -- 25 | ### Part I: Using HPC 26 | * People need to use HPC when their datasets are "too large" or processing is "too complex" for their PC. 27 | * HPC is the *best* tool to processing large and complex datasets. 28 | * However due to latency and bandwdith issues, it is not always the best for visualisation. 29 | -- *Slide End* -- 30 | 31 | -- *Slide* -- 32 | ### Part 1: Supercomputers and HPC 33 | * "Supercomputer" means any single computer system that has exceptional processing power for its time. 34 | * One popular metric (LINPACK) is the number of floating­ point operations per second (FLOPS) such a system can carry out (http://top500.org). HPC Challenge and HPCG are broader, more interesting metrics. 35 | * High Performance Computer (HPC) is any computer system whose architecture allows for above average performance. High Throughput Computing (HTC) is an architecture for maximum job completion; capability vs capacity computing. 36 | -- *Slide End* -- 37 | 38 | -- *Slide* -- 39 | ### Part 1: Clusters and Research Computing 40 | * Clustered computing is when two or more computers serve a single resource. This improves performance and provides redundancy in case of failure system. Typically commodity systems with a high-speed local network. 41 | * Research computing is the software applications used by the research community. Does not necessarily equate with high performance computing, or the use of clusters.­ It is whatever researchers use and do. Note issues of reproducibility and environments. 42 | -- *Slide End* -- 43 | 44 | -- *Slide* -- 45 | ### Part 1: HPC Cluster and Parallel Processing Components 46 | * A chassis or rack, containing multiple computer system units, interconnect, and providing power. 47 | * Computer system units or nodes, containing memory, local disk, and sockets. 48 | * Sockets contain a processor which has one or more cores which do the processing. 49 | * Logical processes have shared resources (e.g., memory) which may have multiple instruction stream threads. 50 | -- *Slide End* -- 51 | 52 | -- *Slide* -- 53 | ### Part 1: Generic HPC Cluster Design 54 | 55 | Image originally from the VPAC 56 | -- *Slide End* -- 57 | 58 | -- *Slide* -- 59 | ### Part 1: Parallel Computing 60 | * With a manycore architecture, applications can be more easily parallelised across them. *Data parallel*, running same task in parallel; the horse and cart example, Monte Carlo experiments. *Task parallel*, running independent tasks in parallel with communication; driving a car, molecular modelling. 61 | * Further examples of serial versus parallel; weather forecasting, aerodynamic design, fluid mechanics, radiation modelling, molecullar dynamics, CGI rendering for popular movies, etc. Reality is a parallel system! 62 | -- *Slide End* -- 63 | 64 | -- *Slide* -- 65 | 66 | -- *Slide End* -- 67 | 68 | -- *Slide* -- 69 | ### Part 1: Valedictions King Edward 70 | * From 2011-2015 UniMelb's general cluster was Edward (previous system was Alfred); new system is Spartan (not Æthelstan or Ælfweard) 71 | * A review was conducted looking at the infrastructure and metrics of Edward, the University's general HPC system since 2011. Edward's usage statistics show that single-core and low memory jobs dominate; 76.35% of jobs from Feb 9 2015 to Feb 9 2016 were single core, and 96.83% used 1-4GB of memory. 72 | -- *Slide End* -- 73 | 74 | -- *Slide* -- 75 | ### Part 1: What's Different About Spartan? 76 | * Recommended solution was to make use of existing NeCTAR Research cloud with an expansion of general cloud compute provisioning and use of a smaller "true HPC" system on bare metal nodes. Spartan was not "HPC in the Cloud", a chimera HPC/Cloud hybrid. Other institutions (e.g., University of Freiburg) do "Cloud on HPC". 77 | * Now Spartan has returned to a more traditional layout. 78 | -- *Slide End* -- 79 | 80 | -- *Slide* -- 81 | ### Part 1: Original Design 82 | 83 | -- *Slide End* -- 84 | 85 | -- *Slide* -- 86 | ### Part 1: Current Archiecture 87 | 88 | -- *Slide End* -- 89 | 90 | -- *Slide* -- 91 | ### Part 1: Spartan Hardware 92 | * Physical partition 56 nodes, 3,912 cores. Snowy partition 31 nodes, 992 cores. 93 | * GPU partition for LIEF grant recipients, 1,752 core, 4 P100 Nvidia GPUs per node (3584 CUDA Cores) 94 | * Storage: 4.3PB `/scratch` NFS over RDMA, `/project` and `/home`. 95 | * See `https://dashboard.hpc.unimelb.edu.au/status_specs/` 96 | -- *Slide End* -- 97 | 98 | -- *Slide* -- 99 | ### Part 1: Accounts and Projects 100 | * Spartan uses its an authentication that is tied to the university Security Assertion Markup Language (SAML). The login URL is `https://dashboard.hpc.unimelb.edu.au/karaage` 101 | * Users on Spartan must belong to a project. Projects must be led by a University of Melbourne researcher. Participants in a project can be researchers or research support staff from anywhere. 102 | * Projects have their own project directory for files (500GB default, can be increased to 1TB or 10TB with approval). 103 | -- *Slide End* -- 104 | 105 | -- *Slide* -- 106 | ### Part 2: This is a GNU/Linux CLI World 107 | * The command­line interface provides a great deal more power and is very resource efficient. 108 | * GNU/Linux scales and does so with stability and efficiency. 109 | * Critical software such as the Message Parsing Interface (MPI) and nearly all scientific programs are designed to work with GNU/Linux. 110 | * The operating system and many applications are provided as "free and open source" which are better placed to improve, optimize and maintain. 111 | -- *Slide End* -- 112 | 113 | -- *Slide* -- 114 | ### Part 2: Logging In 115 | * To log on to a HPC system, you will need a user account and password and a Secure Shell (ssh) client. Linux distributions almost always include SSH as part of the default installation as does 116 | Mac OS 10.x. For MS-­Windows users, the free PuTTY client is recommended (http://putty.org). 117 | * To transfer files use scp, WinSCP, Filezilla (`https://filezilla-project.org/`), or rsync. 118 | * Example login: `lev@spartan.hpc.unimelb.edu.au` 119 | -- *Slide End* -- 120 | 121 | -- *Slide* -- 122 | ### Part 2: SSH Keys, Config, Data Transfers 123 | * Consider using an `.ssh/config` file and using passwordless SSH by creating a keypair and adding to your `.ssh/authorized_keys` file on Spartan. 124 | * SSH Keys will make your life easier. Follow the instructions here: `https://dashboard.hpc.unimelb.edu.au/faq/` 125 | * Both useful for data transfers. c.f., `https://dashboard.hpc.unimelb.edu.au/managing_data/` 126 | -- *Slide End* -- 127 | 128 | -- *Slide* -- 129 | ### Part 2: File System Hierarchy 130 | * When a user logs in on a Linux or other UNIX-like system on the command line, they start in their home directory (`/home/<>`). Project directory in `/data/projects/<>`. 131 | * See `https://swcarpentry.github.io/shell-novice/fig/standard-filesystem-hierarchy.svg` 132 | * "Everything in the UNIX system is a file" (Kernighan & Pike, 1984, 41). 133 | * Develop good file management practises. 134 | -- *Slide End* -- 135 | 136 | -- *Slide* -- 137 | ### Part 2: Latency, Bandwidth, Data Location 138 | * Latency is the speed of data transfer, bandwidth is the "width" of the "band" of data transfer. 139 | * Using a road analogy, "latency" is the smoothness of the surface, "bandwidth" is the number of lanes. 140 | * Distance is a *very* important factor. Data for processing should be kept as close as possible to the processor. 141 | * As Grace Hopper used to say: "Mind your nanoseconds!" https://www.youtube.com/watch?v=9eyFDBPk4Yw 142 | -- *Slide End* -- 143 | 144 | 145 | -- *Slide* -- 146 | ### Part 2: Exploring The Environment 147 | | Command | Explanation | 148 | |:------------|:--------------------------------------------------------------------------:| 149 | |`whoami` | "Who Am I?; prints the effective user id | 150 | |`pwd` | "Print working directory" | 151 | |`ls` | "List" directory listing | 152 | -- *Slide End* -- 153 | 154 | -- *Slide* -- 155 | ### Part 2: Common Shortcuts 156 | | Command | Explanation | 157 | |:------------|:--------------------------------------------------------------------------:| 158 | |`~` | Home directory | 159 | |`.` | Current working directory | 160 | |`..` | One directory level closer to root | 161 | |`/` | root directory, directory delimiter | 162 | -- *Slide End* -- 163 | 164 | -- *Slide* -- 165 | ### Part 2: Command Options 166 | * Linux commands often come with options expressed as: ` --` 167 | * Options can be expressed as full words or abbreviated characters. 168 | 169 | | Command | Explanation | 170 | |-------------|:--------------------------------------------------------------------------:| 171 | |`ls -lart` | Directory listing with options (long, all, reverse time) | 172 | |`ls -lash` | Directory listing with options (long, all, size in human readable) | 173 | -- *Slide End* -- 174 | 175 | -- *Slide* -- 176 | ### Part 2: The Online Manual 177 | Linux commands come with "man" (manual) pages, which provide a terse description of the meaning and options available to a command. A verbose alternative to man is info. 178 | 179 | | Command | Explanation | 180 | |:--------------------|:-----------------------------------------------------------------| 181 | |`man ` | Display the manual entry for the command | 182 | |`info ` | A verbose description of the command | 183 | |`whatis ` | A terse description of the command | 184 | -- *Slide End* -- 185 | 186 | -- *Slide* -- 187 | ### Part 2: Pipes 188 | Linux also have very useful 'pipes' and redirect commands. To pipe one command through another use the '|' symbol. 189 | 190 | | Command | Explanation | 191 | |:-------------------|:--------------------------------------------------------------------------:| 192 | | who -u | less | "Who" shows who is logged on and how long they've been idle. | 193 | | who | wc -l | "Who" piped through wordcount command, count lines. | 194 | | ps -afux | less | "ps" provides a list of current processes. Check `man ps` | 195 | -- *Slide End* -- 196 | 197 | -- *Slide* -- 198 | ### Part 2: Redirects 199 | To redirect output use the '>' symbol. To redirect input (for example, to feed data to a command) use the '<'. Concatenation is achieved through the use of '>>' symbol. 200 | 201 | | Command | Explanation | 202 | |:------------------|:--------------------------------------------------------------------:| 203 | | `w > list.txt` | 'w' is a combination of who, uptime and ps -a, redirected | 204 | | `w >> list.txt` | Same command, concatenated | 205 | -- *Slide End* -- 206 | 207 | -- *Slide* -- 208 | ### Part 2: Files and Text Editing 209 | * Linux filenames can be constructed of any characters except the forward slash, which is for directory navigation. However it is best to avoid punctuation marks, non-printing characters (e.g., spaces). It is *much* better to use snake_case or CamelCase instead of spaces, newlines etc (including in job names). 210 | * Linux is case-sensitive with its filenames (e.g., list.txt, LIST.txt lisT.txT are different). The `touch` command creates an empty file, but with metadata. 211 | -- *Slide End* -- 212 | 213 | -- *Slide* -- 214 | ### Part 2: Files and Text Editing 215 | * Files do not usually require a program association suffix, although you may find this convenient (a C compiler like files to have .c in their suffix, for example). 216 | * The type of file can be determined with the `file` command. The type returned will usually be text, executable binaries, archives, or a catch-all "data" file. 217 | * There are three text editors usually available on Linux systems on the command-line. These are `nano` (1989, as `pico`) and `vim` (or `vi`), and or `emacs` (both 1976). See `https://www.vimgolf.com/` 218 | -- *Slide End* -- 219 | 220 | -- *Slide* -- 221 | ### Part 2: Copying Files to a Local Systems 222 | To get a copy of the files from an external source to your home directory, you will probably want to use `wget`, or `git`, or `scp`. 223 | 224 | | Command | Explanation | 225 | |:------------------|:--------------------------------------------------------------------:| 226 | | `wget URL` | Non-interactive download of files over http, https, ftp etc. | 227 | | `git clone URL` | Clone a repository into a new directory. | 228 | -- *Slide End* -- 229 | 230 | -- *Slide* -- 231 | ### Part 2: Copying Files Within a Local Systems 232 | To copy a file from within a system use the `cp` command. Common options include `-r` to copy an entire directory 233 | 234 | | Command | Explanation | 235 | |:------------------|:--------------------------------------------------------------------:| 236 | | `cp source destination` | Copy a file from source to destination | 237 | | `cp -r source destination` | Recursive copy (e.g., a directory) | 238 | | `cp -a source destination` | Recursive copy as archive (permissions, links) | 239 | -- *Slide End* -- 240 | 241 | -- *Slide* -- 242 | ### Part 2: Copying Files Between Systems 243 | To copy files to between systems desktop use SCP (secure copy protocol) or SFTP (secure file transfer protocol), combining the ssh and cp functionality. The `cp` options can also be used. The source or destination address should also require a remote shell login. 244 | 245 | | Command | Explanation | 246 | |:------------------|:--------------------------------------------------------------------:| 247 | | `scp source.address:/path/ destination.address:/path/`| Copies files on a network | 248 | -- *Slide End* -- 249 | 250 | -- *Slide* -- 251 | ### Part 2: Synchronising Files and Directories 252 | * The `rsync` utility provides a fast way to keep two collections of files "in sync" by tracking changes. 253 | * The source or destination address should also require a remote shell login. 254 | For example; `rsync -avz --update lev@spartan.hpc.unimelb.edu.au:files/workfiles .` 255 | -- *Slide End* -- 256 | 257 | -- *Slide* -- 258 | ### Part 2: Synchronising Files and Directories 259 | 260 | | Command | Explanation | 261 | |:------------------|:--------------------------------------------------------------------:| 262 | | `rsync source destination`| General rsync command | 263 | | `ssh username@remotemachine:/path/to/source .` | With ssh encryption | 264 | -- *Slide End* -- 265 | 266 | -- *Slide* -- 267 | ### Part 2: Synchronising Files and Directories 268 | * The `rsync -avz` command ensures that it is in archive mode (recursive, copies symlinks, preserves permissions), is verbose, and compresses on transmission. 269 | * The --update restricts the copy only to files that are newer than the destination. 270 | * Note that rsync is "trailing slash sensitive". A trailing / on a source means "copy the contents of this directory". Without a trailing slash it means "copy the directory". 271 | -- *Slide End* -- 272 | 273 | -- *Slide* -- 274 | ### Part 2: Synchronising Files and Directories IV 275 | * Rsync can be used in a synchronise mode with the --delete flag. Consider this with the `-n`, or `--dry-run` options first! 276 | 277 | | Command | Explanation | 278 | |:------------------|:--------------------------------------------------------------------:| 279 | | `rsync -avz --update source/ username@remotemachine:/path/to/destination`| Synchronise, keep older files | 280 | | `rsync -avz --delete source/ username@remotemachine:/path/to/destination`| Synchronise, absolutely | 281 | -- *Slide End* -- 282 | 283 | -- *Slide* -- 284 | ### Part 2: Creating Directories, Moving Files 285 | * Directories can be created with the `mkdir` command (e.g., `mkdir braf`). 286 | * Files can be copied with the `cp` command (e.g., `cp gattaca.txt gattaca2.txt`) 287 | * Files can be moved with the `mv` command (e.g., `mv gattaca2.txt braf`) 288 | -- *Slide End* -- 289 | 290 | -- *Slide* -- 291 | ### Part 2: File Differences 292 | * File differences can be determined by timestamp (e.g., `ls -l gattaca.txt braf/gattaca.txt`) 293 | * Content differences can be determined by the `diff` command (e.g., `diff gattaca.txt braf/gattaca.txt`) 294 | * For a side-by-side representation use the command `sdiff` instead. 295 | * The command `comm` can compare two files, lines by line (e.g., `comm gattaca.txt braf/gattaca.txt`). 296 | -- *Slide End* -- 297 | 298 | -- *Slide* -- 299 | ### Part 2: Searches and Wildcards 300 | * To search for files use the find command (e.g., `find . -name "*.txt"`). Compare with `locate` and `whereis`. 301 | * To search within files, use the `grep` command (e.g., `grep -i 'ATEK' braf/*` or `grep -l`) 302 | * The most common wildcard is `*`, but there is also `?` (single character). Expansion is 'globbing'. 303 | * There are also range searches (e.g., `[a-z]` any character between a and z, inclusive) 304 | -- *Slide End* -- 305 | 306 | -- *Slide* -- 307 | ### Part 2: Deletions 308 | * Files can be deleted with the `rm` command (e.g., `rm gattaca.txt`) 309 | * Empty directories can be deleted with the `rmdir` command (e.g., `rmdir braf`) 310 | * Directories, files, subdirectories etc can be delted with `rm -rf <>` 311 | * BE VERY CAREFUL, ESPECIALLY WITH WILDCARDS! 312 | * Consider the difference between `rm matlab *` to `rm matlab*`. 313 | -- *Slide End* -- 314 | 315 | -- *Slide* -- 316 | ### Part 2: Why The File Differences Mattered 317 |
318 | BRAF is a human gene that makes a protein (imaginatively) named B-Raf. This protein is involved in sending signals inside cells, which are involved in directing cell growth. In 2002, it was shown to be faulty (mutated) in human cancers. In particular the difference that between the two files "ATVKSRWSGS" and "ATEKSRWSGS" is the difference which leads to susceptibility to metastatic melanoma. 319 |
320 | -- *Slide End* -- 321 | 322 | -- *Slide* -- 323 | ### Part 3: A Dynamic Environment 324 | * Environment modules provide for the dynamic modification of the user's environment via module files, such as the location of the application's executables, manual path, libraries, and so forth. 325 | * Modulefiles also have the advantages of being shared on many users on a system (such as an HPC system) and easily allowing multiple installations of the same application but with different versions and compilation options. 326 | * Check the current environment with the `env` (environment) command. 327 | -- *Slide End* -- 328 | 329 | -- *Slide* -- 330 | ### Part 3: Environment Module Commands 331 | * The are two implementations of environment modules. The classic modules system was available on the Edward HPC, and the newer Lmod is on Spartan. LMod is considered superior for hierarchies of modules. 332 | -- *Slide End* -- 333 | 334 | -- *Slide* -- 335 | ### Part 3: Module Commands 336 | | Command | Explanation | 337 | |---------------------------------|:------------------------------------------------------:| 338 | | `module help` | List of switches, commands and arguments for modules | 339 | | `module avail` | Lists all the modules which are available to be loaded.| 340 | | `module display ` | Display paths etc for modulefile | 341 | -- *Slide End* -- 342 | 343 | -- *Slide* -- 344 | ### Part 3: Module Commands 345 | | Command | Explanation | 346 | |---------------------------------|:------------------------------------------------------:| 347 | | `module load ` | Loads paths etc to user's environment | 348 | | `module unload ` | Unloads paths etc from user's environment. | 349 | | `module list` | lists all the modules currently loaded. | 350 | -- *Slide End* -- 351 | 352 | -- *Slide* -- 353 | ### Part 3: Module Commands 354 | * There is also the `module switch `, which unloads one modulefile (modulefile1) and loads another (modulefile2). 355 | * Lmod modules also support regular expressions, e.g., `module -r avail "^Python"` 356 | * On Spartan there is also the lmod-specific `module spider `, which traverses through the system for all modules and provides a description. 357 | -- *Slide End* -- 358 | 359 | -- *Slide* -- 360 | ### Part 3: New Modules System 361 | * At the end of 2019 the Spartan team started to implement a new modules system, based around compiler hiearchies. With the new system, you must invoke a compiler (if different to the default), then the application. This protects people from changing toolchains. The full toolchain does not have to be specified. 362 | * Example: `source /usr/local/module/spartan_new.sh`, `module load fosscuda/2019b`, `module load tensorflow/2.1.0-python-3.7.4`. 363 | -- *Slide End* -- 364 | 365 | -- *Slide* -- 366 | ### Part 3: Portable Batch System I 367 | * The Portable Batch System (or simply PBS) performs job scheduling by assigning unattended background tasks expressed as batch jobs, among the available resources. 368 | * Originally developed by MRJ Technology Solutions under contract to NASA in the early 1990s. Released as an open-source product as OpenPBS. Forked by Adaptive Computing as TORQUE (Terascale Open-source Resource and QUEue Manager). Many of the original engineering team now part of Altair Engineering who have their own commercial version, PBSPro. 369 | -- *Slide End* -- 370 | 371 | -- *Slide* -- 372 | ### Part 3: Portable Batch System II 373 | * A batch system typically consists of a resource manager (e.g., TORQUE) and a job scheduler (e.g., Maui, Moab), or a combination (e.g., PBSPro, Slurm). 374 | * TORQUE and MOAB was used on the Edward HPC system. Slurm is used on Spartan. 375 | -- *Slide End* -- 376 | 377 | -- *Slide* -- 378 | ### Part 3: Slurm Workload Manager 379 | * Slurm, used on Spartan, began development as a collaborative effort primarily by Lawrence Livermore National Laboratory, SchedMD, Linux NetworX, Hewlett-Packard, and Groupe Bull as a Free Software resource manager. As of November 2015, TOP500 list of most powerful computers in the world indicates that Slurm is the workload manager on six of the top ten systems. Slurm's design is very modular with about 100 optional plugins. 380 | * There is a repository for converting PBS to Slurm: https://github.com/bjpop/pbs2Slurm 381 | -- *Slide End* -- 382 | 383 | -- *Slide* -- 384 | ### Part 3: Job Submission Principles 385 | * The steps for job submission are (a) setup and launch., (b) monitor., and (c) retrieve results and analyse. Jobs are launched from the login node with resource requests and, when the job scheduler decides, run on compute nodes. Some directories (e.g.,. user home or project directories) are shared across the entire cluster so output is an accessible place. 386 | * Job scripts are simply resource requests (understood by scheduler), a batch of commands (understood by shell) with output to files. Include schedular requests first! 387 | -- *Slide End* -- 388 | 389 | -- *Slide* -- 390 | ### Part 3: Fair Share 391 | * A cluster is a shared environment thus a a resource requesting system. Policies ensure that everyone has a "fair share" to the resources (e.g., user processor limits). 392 | * Spartan's general partitions treat all jobs equally. The GPGPU has allocation based on purchasing. 393 | -- *Slide End* -- 394 | 395 | -- *Slide* -- 396 | ### Part 3: DON'T RUN JOBS ON THE LOGIN NODE! 397 | * The login node is a **particularly** shared resource. All users will access the login node in order to check their files, submit jobs etc. If one or more users start to run computationally or I/O intensive tasks on the login node (such as forwarding of graphics, copying large files, running multicore jobs), then that will make operations difficult for everyone. 398 | -- *Slide End* -- 399 | 400 | -- *Slide* -- 401 | 402 | From the IBM 'Red Book' on Job Submission. 403 | -- *Slide End* -- 404 | 405 | -- *Slide* -- 406 | ### Part 2: Partitions and Queues 407 | * Setup and launch consists of writing a short script that initially makes resource requests (walltime, processors, memory, queues) and then commands (loading modules, changing directories, running executables against datasets etc), and optionally checking queueing system. 408 | * Core command for checking paritions is `sinfo -s`, or `sinfo -p $partition` for partition and node status. Major partitions are: `physical`, `snowy`, `gpgpu`. 409 | * Core command for checking queue `squeue` or `showq` (on Spartan). 410 | -- *Slide End* -- 411 | 412 | -- *Slide* -- 413 | ### Part 2: Job Status 414 | * Core command for job submission `sbatch [jobscript]` 415 | * Core command for checking job `squeue -j [jobid]`, detailed command `scontrol show job [jobid]` (SLURM), or all user's jobs `squeue -u [username]`. 416 | * Core command for deleting job `scancel [jobid]` 417 | * Basic resource usage `sacct -j [jobid] --format=JobID,JobName,MaxRSS,Elapsed` (or `-u [username]` 418 | -- *Slide End* -- 419 | 420 | -- *Slide* -- 421 | ### Part 2: Job Monitoring System 422 | * Spartan has introduced a job monitoring system. 423 | * Basic command is: `my-job-stats -j [jobID] -[ac]` 424 | * Options for Instantaneous mode `-c` or overall mode `-a` 425 | * Save information by adding snipped at the end of job submission script. 426 | -- *Slide End* -- 427 | 428 | -- *Slide* -- 429 | ### Part 3: Single Core Job 430 | ```bash 431 | #!/bin/bash 432 | #SBATCH ­­--time=01:00:00 433 | #SBATCH ­­--ntasks=1 434 | module load my­app­compiler/version 435 | my­app data ``` 436 | * Examples at `/usr/local/common/MATLAB` and `/usr/local/common/R`, `/usr/local/OpenFOAM`; note that the job can call other scripts. Note that Slurm has full and abbreviated directives. 437 | -- *Slide End* -- 438 | 439 | -- *Slide* -- 440 | ### Part 3 : Multicore and Multithreaded Jobs 441 | * In Slurm, `ntasks` means number of tasks, whereas `cpus-per-task` allocates processor cores. 442 | * With shared-memory multithreaded jobs on (e.g., OpenMP), modify the `--cpus-per-task` to a maximum of the cores in the node.
443 | `#SBATCH ­­--cpus-­per-­task=8` 444 | * See examples at `/usr/local/common/ADMIXTURE` and `/usr/local/common/IntroLinux/constraint.slurm` 445 | -- *Slide End* -- 446 | 447 | -- *Slide* -- 448 | ### Part 3 : Multinode Jobs 449 | * For distributed-memory multicore job using message passing, the multinode partition has to be 450 | invoked and the resource requests altered e.g., 451 | `#!/bin/bash`
452 | `#SBATCH -­p physical`
453 | `#SBATCH ­­--nodes=2`
454 | `#SBATCH ­­--ntasks-per-node=8`
455 | `module load my­app­compiler/version`
456 | `srun my­mpi­app` 457 | -- *Slide End* -- 458 | 459 | -- *Slide* -- 460 | ### Part 3 : Multinode Jobs 461 | * Multinodes jobs should be run on the `physical` partition which has the higher interconnect speed. 462 | * Multinode jobs on Spartan may be slower if they have a lot of interprocess communication and they cross compute nodes. 463 | * This said, multinodes jobs can also request total tasks/cores rather than allocating them per node. e.g., `#SBATCH ­­--ntasks=16`
464 | * See examples at `/usr/local/common/Python` 465 | -- *Slide End* -- 466 | 467 | -- *Slide* -- 468 | ### Part 3 : Job Script Generator 469 | 470 | `https://dashboard.hpc.unimelb.edu.au/forms/script_generator/` 471 | -- *Slide End* -- 472 | 473 | -- *Slide* -- 474 | ### Part 4 : Job/Batch Arrays 475 | * With a job or batch array the same batch script, and therefore the same resource requests, is used multiple times. A typical example is to apply the same task across multiple datasets. The following example submits 10 batch jobs with myapp running against datasets dataset1.csv, dataset2.csv, ... 476 | dataset10.csv 477 | `#SBATCH ­­array=1­-10`
478 | `myapp ${Slurm_ARRAY_TASK_ID}.csv` 479 | * Examples at `/usr/local/common/array` and `/usr/local/common/Octave`. 480 | -- *Slide End* -- 481 | 482 | -- *Slide* -- 483 | ### Part 4 : Job/Batch Dependencies 484 | * A dependency condition is established on which the launching of a batch script depends, creating a conditional pipeline. The dependency directives consist of `after`, `afterok`, `afternotok`, `afterany`, `singleton` and more. A typical use case is where the output of one job is required as the input of the next job. Multiple job dependencies are specified with colon separated values. 485 | `#SBATCH ­­dependency=afterok:myfirstjobid mysecondjob` 486 | * Examples at `/usr/local/common/depend/` 487 | -- *Slide End* -- 488 | 489 | -- *Slide* -- 490 | ### Part 4: Interactive Jobs 491 | * An interactive job, based on the resource requests made on the command line, puts the user on to a compute node. This is typically done if they user wants to run a large script (and shouldn't do it on the login node), or wants to test or debug a job. The following command would launch one node with two processors for ten minutes. 492 | `sinteractive ­­--nodes=1 --­­ntasks-­per-­node=2 --­­time=0:10:0` 493 | * Example and instructions at `/usr/local/common/interact` 494 | -- *Slide End* -- 495 | 496 | -- *Slide* -- 497 | ### Part 4: Web-Based Interactive 498 | * Spartan has two web-based interactive job submission systems, FastX and OpenOn Demand. 499 | * FastX provides a full GUI desktop system with excellent performance. 500 | * Open OnDemand provides access to interactive environments, such as RStudio and Jupyter notebooks. 501 | -- *Slide End* -- 502 | 503 | -- *Slide* -- 504 | ### Part 4 : Multiple Job Steps 505 | * Sometimes a job needs to consist of several steps that need to be carried on sequence, even if the individual components are in parallel. In this case the entire job resource set can be called with an aggregation of walltime and with a maximum reduction operation for memory and resources. 506 | * Whilst this can be convenient, to include everything in a single script, it runs the risk on a busy system of being inefficient in the queue. 507 | -- *Slide End* -- 508 | 509 | -- *Slide* -- 510 | ### Part 4 : Multiple Job Steps II 511 | ``` 512 | #!/bin/bash 513 | #SBATCH --­partition physical 514 | #SBATCH ­­--nodes=2 515 | #SBATCH ­­--ntasks=12 516 | #SBATCH --time=24:00:00 517 | srun -N 2 -n 12 -t 06:00:00 ./my­mpi­app 518 | export OMP_NUM_THREADS=6 519 | srun -N 1 -n2 -c $OMP_NUM_THREADS -t 12:00:00 ./myompapp 520 | srun -N 1 -n 1 -t 06:00:00 ./myserialapp``` 521 | -- *Slide End* -- 522 | 523 | -- *Slide* -- 524 | ### Part 4: Backfilling 525 | * Many schedulers and resource managers use a backfilling algorithm to improve system utilisation and maximise job throughout. 526 | * When more resource intensive (e.g., multiple node) jobs are running it is possible that gaps ends up in the resource allocation. To fill these gaps a best effort is made for low-resource jobs to slot into these spaces. 527 | * For example, on an 8-core node, an 8 core job is running, a 4 core job is launched, then an 8 core job, then another 4 core job. The two 4 core jobs will run before the second 8 core job. 528 | -- *Slide End* -- 529 | 530 | -- *Slide* -- 531 | ### Part 4: Memory Allocation 532 | * By default the scheduler will set memory equal to the total amount on a compute node divided by the number of cores requested. In some cases this might not be enough (e.g., very large dataset that needs to be loaded with low level of parallelisation). 533 | * Additional memory can be allocated with the `--mem=[mem][M|G|T]` directive (entire job) or `--mem-per-cpu=[mem][M|G|T]` (per core). Maximum should be based around total cores -1 (for system processes). The --mem-per-cpu directive is for threads for OpenMP applications and processor ranks for MPI. 534 | -- *Slide End* -- 535 | 536 | -- *Slide* -- 537 | ### Part 4: Staging 538 | * Local disk is typically faster than shared disks. If you find that your read-writes are slow and you are making use of a lot of I/O you may need to stage your data. 539 | * Spartan has `/data` for `/home` (slower) and `/projects` (faster), `/scratch` for temporary storage data (faster), and as local disk, `/var/local/tmp` (fastest, not shared). 540 | -- *Slide End* -- 541 | 542 | -- *Slide* -- 543 | ### Part 5: Slurm User Commands 544 | 545 | | User Commad | Slurm Command | 546 | |----------------|------------------------:| 547 | |Job submission |sbatch [script_file] | 548 | |Job delete |scancel [job_id] | 549 | |Job status |squeue [job_id] | 550 | |Job status |squeue -u [user_name] | 551 | |Node list |sinfo -N | 552 | |Queue list |squeue | 553 | |Cluster status |sinfo | 554 | -- *Slide End* -- 555 | 556 | -- *Slide* -- 557 | ### Part 5: Slurm Job Commands I 558 | | Job Specification | Slurm Command | 559 | |-----------------------|---------------------------:| 560 | |Script directive |`#SBATCH` | 561 | |Queue |`-p [queue]` | 562 | |Job Name |`--job-name=[name]` | 563 | |Nodes |`-N [min[-max]]` | 564 | |CPU Count |`-n [count]` | 565 | |Wall Clock Limit |`-t [days-hh:mm:ss]` | 566 | -- *Slide End* -- 567 | 568 | -- *Slide* -- 569 | ### Part 5: Slurm Job Commands II 570 | | Job Specification | Slurm Command | 571 | |-----------------------|---------------------------:| 572 | |Event Address |`--mail-user=[address]` | 573 | |Event Notification |`--mail-type=[events]` | 574 | |Memory Size |`--mem=[mem][M|G|T]` | 575 | |Proc Memory Size |`--mem-per-cpu=[mem][M|G|T]`| 576 | -- *Slide End* -- 577 | 578 | -- *Slide* -- 579 | ### Part 5: Slurm Environment Commands 580 | | Environment Command | Slurm (Command) | 581 | |-----------------------|------------------------:| 582 | |Job ID |`$SLURM_JOBID` | 583 | |Submit Directory |`$SLURM_SUBMIT_DIR` | 584 | |Submit Host |`$SLURM_SUBMIT_HOST` | 585 | |Node List |`$SLURM_JOB_NODELIST` | 586 | |Job Array Index |`$SLURM_ARRAY_TASK_ID` | 587 | -- *Slide End* -- 588 | 589 | -- *Slide* -- 590 | ### Part 5: Performance Test 591 | * Compare the performance of NAMD/VMD Ubiquitin protein test case under `/usr/local/common/NAMD` under different configurations 592 | 593 | | Nodes and Tasks | Time | 594 | |-----------------------|----------------------:| 595 | |ntasks=1 | | 596 | |ntasks=8 | | 597 | |nodes=2, per-node=4 | | 598 | |nodes=2, ntasks=16 | | 599 | -- *Slide End* -- 600 | 601 | -- *Slide* -- 602 | ### Part 5: Test Yourself 603 | * There is an exam for this course! 604 | `https://github.com/australia-new-zealand-hpc-educators/IntroExam` 605 | -- *Slide End* -- 606 | 607 | -- *Slide* -- 608 | 609 | -- *Slide End* -- 610 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Presentation/Lesson_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Introduction to Linux and HPC 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 32 | 33 | 34 | 35 | 36 |
37 | 38 | 39 |
40 | 41 | 42 | 43 |
51 |
57 |
63 |
69 |
75 |
80 |
87 |
92 |
97 |
100 |
105 |
110 |
114 |
118 |
125 |
131 |
138 |
145 |
151 |
158 |
165 |
173 |
182 |
192 |
202 |
212 |
221 |
226 |
232 |
241 |
251 |
259 |
265 |
273 |
279 |
288 |
294 |
301 |
308 |
316 |
322 |
328 |
332 |
340 |
348 |
354 |
359 |
364 |
369 |
374 |
379 |
384 |
388 |
392 |
398 |
405 |
412 |
422 |
429 |
440 |
447 |
452 |
460 |
466 |
472 |
478 |
483 |
496 |
502 |
507 |
512 |
525 |
536 |
545 |
555 |
566 |
571 |
574 |
575 | 576 |
577 | 578 | 579 | 580 | 581 | 622 | 623 | 624 | 625 | --------------------------------------------------------------------------------