The Need for Speed
In High-Performance Computing we try to make
code run as fast as possible (given the
constraints we always experience)
The first step is to make our serial code run fast.
This requires some understanding of computer
Parallel Computing Means:
Executing more than one process at a time that
are related (solving the same problem).
Processes may or may not need to communicate
with one another while they are running.
Degree of communic
One of Python's strong points is its ability to do
many things well, so both numerical and textual
analysis can be done with the same language.
We have used a few string methods but there are
many, many more.
A dictionary is an unordered structure. Values
are associated with keys.
keys must consist of an immutable type
May be tuple but then the tuple cannot contain mutables
keys must be unique (no duplications)
Dictionaries are i
File IO is Common
Most programs read from one or more files, and
many write to a file (other than the console).
Files must be attached before they can be read.
The program must associate the name you have
given the file with the location on disk
Uses for Scripting
Automate repetitive tasks
Could also use languages like Perl or Python but its still
handy to know some bash
Write job scripts for the PBS queueing system
For most users these must be a shell script (bash, ksh,
Data In/Data Out
Programs are not very useful if they cannot
communicate their results
Programs also are not terribly useful if they
cannot change their controlling parameters to
compute different results
Note: always assume that t
SLURM (Simple Linux Utility for Resource
Management) is a resource manager, also
known as a queueing system.
Resource managers are used to submit jobs to
compute nodes from an access point generally
called a frontend.
The purpose of a code is to get the right answer.
How can we determine whether it does?
Simple test cases
Probably the most widely used testing method. Choose simple
test cases for which you know the
The try statement introduces a code block that
is to be executed. If any statement in the block
returns an exception, Python looks for an except
block. The except block tells it how to handle
Exceptions have names an