This lesson is being piloted (Beta version)

Python for High Performance Computing: Setup

To follow this workshop, you will need three things: Python, an account on the Supercomputing Wales facility, and an SSH client.

Supercomputing Wales

In this workshop we will use the Supercomputing Wales facilities to learn to use High-Performance Computing. For this, you will need an account on the Supercomputing Wales facilities.

If you already have previously attended the "Introduction to High Performance Computing" training, and so have already joined the "scw1389" project, please contact e.j.bennett@swansea.ac.uk and we will reactivate your membership.

If you are new to SA2C training events, create and account through the following steps.

  1. Visit My Supercomputing Wales
  2. Sign in with your Swansea University email and password
  3. Fill in the form requesting a Supercomputing Wales account. Your account request will be processed by an administrator.
  4. Once you receive an email indicating that your account has been created, then revisit My Supercomputing Wales, and log in again if necessary.
  5. Click the "Reset SCW Password" button, and enter a password that you will use to access the Supercomputing Wales hardware. (This does not have to be the same as your Swansea University password.) Click Submit.
  6. Under "Join a project", enter scw1389 as the project code for this training session, and click "Join".

SSH

SSH is used to connect to the Unix shell on machines across the network.

Windows

  1. If you are using Windows and have previously followed the Unix Shell lesson, then the Git Bash tool installed as part of that lesson will provide you with this.
  2. Otherwise, then download and install PuTTY.

macOS

  1. SSH is installed as part of macOS and is available via the Terminal application.

Linux

  1. SSH is installed as part of Linux and is available through a terminal/console application.

Python

In this lesson we will be using Python 3 with some of its scientific libraries. Although one can install a “plain vanilla” Python 3 and all required libraries “by hand”, we recommend installing Anaconda, a Python distribution that comes with everything we need for the lesson.

Python is a popular language for research computing, and great for general-purpose programming as well. Installing all of its research packages individually can be a bit difficult, so we recommend Anaconda, an all-in-one installer.

Regardless of how you choose to install it, please make sure you install Python version 3.x (e.g., 3.6 is fine).

Windows

Video Tutorial
  1. Open https://www.anaconda.com/download/#windows with your web browser.
  2. Download the Python 3 installer for Windows.
  3. Install Python 3 using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.

macOS

    Video Tutorial
    1. Open https://www.anaconda.com/download/#macos with your web browser.
    2. Download the Python 3 installer for OS X.
    3. Install Python 3 using all of the defaults for installation.

Linux

  1. Open https://www.anaconda.com/download/#linux with your web browser.
  2. Download the Python 3 installer for Linux.
    (The installation requires using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.)
  3. Open a terminal window.
  4. Type
    bash Anaconda3-
    and then press Tab. The name of the file you just downloaded should appear. If it does not, navigate to the folder where you downloaded the file, for example with:
    cd Downloads
    Then, try again.
  5. Press Return. You will follow the text-only prompts. To move through the text, press Spacebar. Type yes and press enter to approve the license. Press enter to approve the default location for the files. Type yes and press enter to prepend Anaconda to your PATH (this makes the Anaconda distribution the default Python).
  6. Close the terminal window.