Giter Club home page Giter Club logo

pythonhpcprep's Introduction






Make your Python code 10,000 times faster with parallel numpy!

CC BY-NC-SA 4.0

Introduction

This page details the setup steps you need to take in advance of the RSECon22 workshop Make your Python code 10,000 times faster with parallel numpy! on Wednesday 7th September 2022, 09:00 - 12:30 BST.

Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on.

In advance of the course, you need to:

  • set up Python, Anaconda, Jupyter notebooks and mpi4py on your laptop;
  • apply for a login account on ARCHER2, the UK National HPC service.

Full instructions are provided below - if there are any issues please contact [email protected].

Python setup on your laptop

Python environment

To install Python3, Anaconda and Jupyter Notebooks follow the instructions on the Software Carpentries website.

If you are a Windows user, note that during installation you should make sure you check the box Add Anaconda to my PATH environment variable.

Note that this installation can take a long time; for me it stalled for quite a while at "Setting up the base environment" but did complete eventually!

Testing

To test your numpy installation, download and unzip PythonHPCexamples.zip and open examples.ipynb in a Jupyter notebook. The notebook also includes a simple test which you can run after installing your MPI installation below.

MPI environment

Once you have the Anaconda distribution, it is a relatively straightforward matter to install mpi4py and an actual MPI implementation which is required to do the work underneath. Installation may take a lot of time so be patient!

A note for users who already have MPI installed (e.g. for C/Fortran): to prevent name clashes in your PATH it can be useful to use a conda environment to do the installation - see http://conda.pydata.org/docs/using/envs.html. You can switch to a different environment within a Jupyter notebook using "Kernel -> Change kernel".

The installation process varies slightly between different platforms. Don't worry if you have problems with this stage as there will be time at the workshop to help you, and all parallel exercises can also be undertaken on ARCHER2 (although not via a noteboook).

Having installed MPI it is essential that you completely stop and restart your notebook to pick up the new environment.

Mac

You first need to install MPI at a system level. From a local terminal type:

user@mac> brew install mpi4py

If you do not have access to brew then you can try this:

user@mac> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

where you will be prompted for your local password as part of the process.

You now need to install the Python bindings for MPI

user@mac> conda install -c conda-forge mpi4py

Windows

Windows users should launch an Anaconda Prompt terminal using CMD.exe Prompt from Anaconda Navigator.

From this terminal type:

user@windows> conda install -c conda-forge mpi4py

Linux

From a local terminal type:

user@linux> conda install -c conda-forge mpi4py

Testing

Run the mpihello.py example as instructed in the notebook you previously downloaded to test Python and numpy.

ARCHER2 Account

You will also need an account on the UK national supercomputer ARCHER2. As someone who expressed an interest in this workshop when you registered you will have received an email detailing how to apply for an account.


This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

pythonhpcprep's People

Contributors

davidhenty avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

jjengelberts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.