Pytorch

 PyTorch is a Python package that provides Tensor computation (like NumPy) with strong GPU acceleration and     Deep neural networks built on a tape-based autograd system.

Quote from Pytorch Github documentation

Availability and Restrictions

Versions

The following version of Pytorch is available on OSC clusters:

VERSION

OWENS

 1.1.0 (using Python 3.6)

 

 

The current version of Pytorch on Owens requires cuda/xx for GPU calculations.  Pytorch is a Python package and therefore requires loading module load python/3.6. The version of TensorFlow may actively change with updates to Anaconda Python on Owens so that you can check the latest version with conda list pytorch.

Installing Pytorch locally

Load python module:

module load python/3.6-conda5.2

Create local python environment (e.g., pytorch-test) for Pytorch installation:

conda create -n pytorch-test python=3.6 anaconda

Activate the environment:

source activate pytorch-test

Install Pytorch:

pip install torch torchvision

Please refer here if you want a different version of the Pytorch

Please follow this link for more information:

Feel free to contact OSC Help if you have any issues with installation.

Access 

Pytorch is available to all OSC users without restriction.

Publisher/Vendor/Repository and License Type

https://pytorch.org, Open source

Usage on Owens

Usage on Owens

Setup on Owens

 To configure the Owens cluster for the use of Pytorch, use the following commands:

module load python/3.6 cuda/9.2.88

Batch Usage on Ruby or Owens

Batch jobs can request multiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations for Owens, and Scheduling Policies and Limits for more info.  In particular, Pytorch should be run on a GPU-enabled compute node.

An Example of Using  TensorFlow with MNIST model and Logistic Regression

Below is an example batch script (job.pbs and logistic_regression_on_mnist.py) for using TensorFlow.

Contents of job.pbs

#PBS -N Pytorch
#PBS -l nodes=1:ppn=28:gpus=1:default
#PBS -l walltime=30:00
#PBS -j oe
#PBS -S /bin/bash 
#PBS -A yourprojectID

cd $PBS_O_WORKDIR
module load python/3.6 cuda/9.2.88
source activate your-local-python-environment-name
python your-pytorch-script.py

In order to run it via the batch system, submit the job.pbs  file with the following command:

qsub job.pbs

Further Reading

TensorFlow homepage

Supercomputer: 
Service: 
Technologies: 
Fields of Science: