How to use Python on Seawulf

Audience: Faculty, Researchers and Staff

This KB Article References:
This Information is Intended for: Faculty, Researchers, Staff
Last Updated: November 03, 2017

Current Version

Three versions of python are currently available on Seawulf: a standard disribution of python 2.7, along with python 2, and python 3 managend through Anaconda. 

Anaconda2 and Anaconda3 are installed on Seawulf and can be accessed by loading the respective module file:

module load anaconda/2

or

module load anaconda/3

 

To ensure that you are executing the correct version, type which python to confirm that Anaconda2 or 3 is loaded:

which python

/gpfs/software/Anaconda2/bin/python

MPI with Python

Anaconda2 and Anaconda3 are used to manage packages.   These versions come with many commonly used scientific computing libraries.

For multi-node programming in Python, mpi4py is installed.  A python script must interface with this package to run across nodes.  Example scripts can be found here, and in our examples folder:

/gpfs/projects/samples/python

To launch a Python job using PBS, load the following modules:

module load shared
module load anaconda/2 
module load mvapich2/gcc/64/2.2rc1

To run your script, use mpirun:

mpirun python my_script.py

Additional Information


There are no additional resources available for this article.

Getting Help


The Division of Information Technology provides support on all of our services. If you require assistance please submit a support ticket through the IT Service Management system.

Submit A Ticket

Supported By