Breadcrumb Links:

Using Mathematica on the High Performance Computing (HPC) cluster - PC Users guide

 
  • Need an Account:

In order to use Mathematica on the HPC cluster you need to have a HPC user account. See Jason Bell for details on how to get an account.

  • Setting up a GUI interface:

You will most likely need to use VNC to use the graphical interface for Mathemathica. It is suggected that you look at Connecting to the Einstein Cluster and Running VNCServer links to see how to connect to the Einstein cluster using VNC.

Submitting a Mathematica Job to the cluster

In order to submit a job to the cluster you need to write a script file similar to the one below. Lines beginning with "##" represents comments. Replace the username in the directory structure to your username and the email address to your email address. Change the Mathematica Script File Name to the name of the Mathematica file that you want to be executed on the cluster.

You may replace every occurrence of the file name "Mathematica-Job1" in the file with your own choice of file name.

###### Select resources #####
#PBS -N Math-Job1
#PBS -l ncpus=1
#PBS -l mem=4g
#PBS -l walltime=100:00:00

#### Output File #####
#PBS -o /home/username/DirectoryName/Mathematica-Job1.out

#### Error File #####
#PBS -e /home/username/DirectoryName/Mathematica-Job1.err

##### Queue #####
#pbs -q workq

##### Mail Options #####
#PBS -m abe
#PBS -M EmailAddress@cqu.edu.au

##### Change to current working directory #####
cd /home/username/DirectoryName

##### Execute Program #####
. /etc/profile.d/modules.sh
module load x11
export DISPLAY=`cd /home/username/.vnc ; ls einstein\:?.pid | awk -F. '{print $1}'`
math < MathematicaScriptFileName.m

Executing script on the cluster

The Einstein Cluster uses a job scheduler that allows you to schedule and run jobs on the various compute nodes.  To submit a job, simply execute the command:

qsub [pbs_script_file]

A handy command, to check if your job is running, queued or completed is by using the command:

qstat -an

 

 

 

A special thanks to Noel Patson for assisting with the creation of this document.