HPC_introduction_Lecture_2
HPC_introduction_Lecture_2
Presented by
Dr. Rubaiyat Islam
Adjunct Faculty, IUB.
Omdena Bangladesh Chapter Lead
Crypto-economist Consultant
Sifchain Finance, USA.
HPC ARCHITECTURE
2
ARCHITECTURE OF A SUPERCOMPUTER
3
RACKS
4
RACKS (2)
5
COMPUTE NODE – CPU SOCKETS
• Sit within sockets on node, under large silver heat sinks (2 sockets, 2 CPUs)
• Within CPUs are cores, main processing power, and memory
• This node has 12 cores per socketed CPU, 24 total
• Power from amount of cores
6
COMPUTE NODE – MEMORY
7
INTERCONNECT
8
SOFTWARE INSTALLATION
• Load a module
• Adds software to your $PATH
• May also load dependencies
• May also unload other versions or dependencies that would conflict
• module load <name_of_module>/<version>
• Example: module load hdf5
WORKING WITH MODULES
NODE TYPES
LOGIN NODES
COMPILE NODES
COMPUTE NODES
• What is a “job”?
• Batch jobs
• Submit job that will be executed in background
• Can create a text file containing information about the job
• Submit the job file to a queue
• Interactive jobs
• Work interactively at the command line of a compute node
• Login to compute node
JOB SCHEDULING
REMOTE SYSTEMS
LOGGING IN
FILE TRANSFER
HOME
PROJECTS OR WORK
SCRATCH
• /home
• Scripts
• Code
• /projects
• Code/files/libraries relevant for any software you are installing (if you want to share files with others)
• /scratch
• Output from running jobs
• Large files
34
PART 1: LINUX
35
LINUX OVERVIEW
36
WHY USE LINUX
37
SECURE SHELL (SSH)
• To a remote system, use Secure Shell (SSH)
• From Windows
• Non-GUI SSH application: Windows PowerShell
• GUI SSH application: PuTTY
• Putty is preferred method.
• Hostname: login.rc.colorado.edu
or…
• Hostname: tlogin1.rc.colorado.edu
• From Linux, Mac OS X terminal, ssh on the command line
38
RC ACCESS: LOGGING IN
$ ssh <username>@login.rc.colorado.edu
# Where username is your identikey
• If you do not have an RMACC RC account use one of our temporary accounts:
$ ssh user<XXXX>@tlogin1.rc.colorado.edu
# Where user<XXXX> is your temporary username
39
USEFUL SSH OPTIONS
• -X or -Y
• Allows X-windows to be forwarded back to your local display
• -o TCPKeepAlive=yes
• Sends occasional communication to the SSH server even when you’re
not typing, so firewalls along the network path won’t drop your “idle”
connection
40
The Shell
• Parses and interprets typed input
• Passes results to the OS and returns results as appropriate.
• Shells
• Bourne-Again (bash) – Widely used user friendly shell. Default on Summit.
• T (tcsh) – C Shell with extended features and C syntax. Also very common.
• Features
• Tab completion
• History and command-line editing
• Scripting and programming
• Built-in utilities
41
Shells
User
Space
User
Shell
Command Applicatio
s ns
Linux Kernel
Kernel
Space
Hardware
42
Command Anatomy
flag paramete
s r
command tar -c -f archive.tar mydir target
• Case-sensitive
• Order of flags may be important
• Flags may not mean the same thing when used with different commands
43
The most important Linux command:
man
$ man <command>
$ man -k
<keyword>
44
Filesystem Commands
Command Description
pwd prints full path to current directory
cd changes directory; can use full or relative path as target
mkdir creates a subdirectory in the current directory
rmdir removes an empty directory
rm removes a file (rm -r removes a directory and all its contents)
cp copies a file
mv moves (or renames) a file or directory
ls lists the contents of a directory (ls -l gives detailed listing)
chmod/chown change permissions or ownership
df displays filesystems and their sizes
du shows disk usage (du -sk shows size of a directory and its contents in KB)
45
File Editing Commands
Command Description
less displays a file one screen at a time
cat prints entire file to the screen
head prints the first few lines of a file
tail prints the last few lines of a file (with -f shows in realtime the end of a file that may
be changing)
diff shows differences between two files
grep prints lines containing a string or other regular expression
tee prints the output of a command and copies the output to a file
sort sorts lines in a file
find searches for files that meet specified criteria
wc count words, lines, or characters in a file
46
Environments
• Set up using shell and environment variables
• shell: only effective in the current shell itself
• environment: carry forward to subsequent commands or shells
• Set default values at login time using .bash_profile
(or .profile). Non-login interactive shells will read
.bashrc instead.
• var_name[=value] (shell)
• export VAR_NAME[=value] (environment)
• env (shows current variables)
• $VAR_NAME (refers to value of variable)
47
Important variables
• PATH: directories to search for commands
• HOME: home directory
• DISPLAY: screen where graphical output will appear
• MANPATH: directories to search for manual pages
• LANG: current language encoding
• PWD: current working directory
• USER: username
• LD_LIBRARY_PATH: directories to search for shared objects
(dynamically-loaded libs)
• LM_LICENSE_FILE: files to search for FlexLM software licenses
48
The Linux Filesystem
• System of arranging files on disk
• Consists of directories (folders) that can contain files or other
directories
• Levels in full paths separated by forward slashes, e.g.
/home/nunez/scripts/analyze_data.sh
• Case-sensitive; spaces in names discouraged
• Some shorthand: Symbol Description
. Current directory
.. The directory 1 Level Above
~ The home directory
- Previous directory when used with cd
49
Filesystem MULTIPLE USERS
/
/bin /documents
/hpc
/usr/local/bin
/notes.txt
Absolute path
/home/<username>/documents/hpc/notes.txt
50
Navigating the Filesystem
• Examples:
• ls
• mkdir
• cd
• rm
• Permissions (modes)
51
File Editing
• nano – simple and intuitive to get started with; not very feature-ful;
keyboard driven
• vi/vim – universal; keyboard driven; powerful but some learning
curve required
• emacs – keyboard or GUI versions; helpful extensions for
programmers; well-documented
• LibreOffice – for WYSIWYG
• Use a local editor via an SFTP program to remotely edit files.
52
Modes/Permissions
• 3 classes of users:
• User (u) aka “owner”
• Group (g)
• Other (o)
• 3 types of permissions:
• Read (r)
• Write (w)
• Execute (x)
53
Modes
• chmod changes modes:
To set only read and execute for your group and others:
chmod go=rx filename
54
THANK YOU
55