How to use TensorFlow on Seawulf

Audience: Faculty, Researchers and Staff

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

TensorFlow is a Python library that uses GPU acceleration to complete linear algebra and machine learning tasks.  The TensorFlow libraries are available in Python through Anaconda. To use it to its fullest extent, place your TensorFlow job on the GPU queue by providing the -q flag to torque in your PBS script:

#PBS -q gpu

There are several versions of TensorFlow available on SeaWulf. If you are using Python 3, first you have to load the Anaconda 3 module and Cuda 8 toolkit:

module load anaconda/3
module load cuda80/toolkit/8.0.44
module load cudnn/5.1

The current version of TensorFlow installed in the system Anaconda 3 environment is 1.0.1. We also have an Anaconda 3 environment set up for Tensorflow 1.3, that can be accessed as follows:

source activate tensorflow1.3

The latest version of TensorFlow we have installed is 1.4.1, which only supports up to Python 3.5 and requires CuDNN 6.0. This is setup in an Anaconda 3 environment as well, and can be activated as follows:

source activate tensorflow1.4
module load cudnn/6.0

If you would rather use Python 2, simply load the Anaconda 2 module instead:

module load anaconda/2
module load cuda80/toolkit/8.0.44
module load cudnn/5.1

A hello world program for TensorFlow can be found in:

/gpfs/projects/samples/tensorflow

To make sure TensorFlow can access all 8 gpus on the node, you can run the following program:

/gpfs/project/samples/tensorflow/tensor_list_gpus.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

For More Information Contact


IACS Support System