From RedwoodCenter
Revision as of 03:11, 10 September 2009 by Kilian (talk | contribs)
Jump to navigationJump to search

General Information

Directory setup

home directory quota

There is a 10GB quota limit enforced on $HOME directory (/global/home/users/username) usage. Please keep your usage below this limit. There will NETAPP snapshots in place in this file system so we suggest you store only your source code and scripts in this area and store all your data under /clusterfs/cortex (see below).

In order to see your current quota and usage, use the following command:

 quota -s


For large amounts of data, please create a directory


and store the data inside that directory.


get a password

  • press the PASS WORD button on your crypto card
  • enter passoword
  • press enter
  • the 7 digit password is given (without the dash)

ssh to the gateway computer (hadley)

note: please don't use the gateway for computations (e.g. matlab)!

 ssh -Y (or 

and use your crypto password

Setup environment

  • put all your customizations into your .bashrc
  • for login shells, .bash_profile is used, which in turn loads .bashrc

Useful commands

Start interactive session on compute node

  • start interactive session:
 qsub -X -I
  • start interactive session on particular node (nodes n0000.cortex and n0001.cortex have GPUs):
 qsub -X -I -l nodes=n0001.cortex

Perceus commands

The perceus manual is here

  • listing available cluster nodes:
  • list cluster usage
  • to restrict the scope of these commands to cortex cluster, add the following line to your .bashrc
 export NODES='*cortex'
  • module list
  • module avail
  • module help

Resource Manager PBS

  • Job Scheduler MOAB
  • List running jobs:
 qstat -a
  • List jobs of a given node:
 qstat -n 98
  • sample script
 #PBS -q cortex
 #PBS -l nodes=1:ppn=2:cortex
 #PBS -l walltime=01:00:00
 #PBS -o path-to-output
 #PBS -e path-to-error
 cd /global/home/users/kilian/sample_executables
 mpirun -np 8 /bin/hostname
 sleep 60
  • submit script
 qsub scriptname
  • interactive session
 qsub -I -q cortex -l nodes=1:ppn=2:cortex -l walltime=00:15:00
  • flush STDOUT and STDERR to files in your home directory so you can tail the output of the job while it's running
 qsub -k oe scriptname
  • remove a queued/running job (you can get the job_id from qstat)
 qdel job_id
  • list nodes that your job is running on
  • run the program on several cores
 mpirun -np 4 -mca btl ^openib sample_executables/mpi_hello



note: remember to start an interactive session before starting matlab!

In order to use matlab, you have to load the matlab environment:

 module load matlab

Once the matlab environment is loaded, you can start a matlab session by running

 matlab -nojvm -nodesktop


We have several Python Distributions installed: The Enthought Python Distribution (EPD), the Source Python Distribution (SPD) and Sage. The easiest way to get started is probably to use EPD (see below).

Enthought Python Distribution (EPD)

We have the Enthought Python Distribution 5.0.0 installed [EPD]. In order to use it, you have to follow the following steps:

  • login to the gateway server using "ssh -Y" (see above)
  • start an interactive session using "qsub -I -X" (see above)
  • load the python environment module:
 module load python/epd
  • start ipython:
 ipython -pylab
  • run the following commands inside ipython to test the setup:
 from enthought.mayavi import mlab

Source Python Distribution (SPD)

We have the Source Python Distribution installed [SPD]. In order to use it, you have to first load the python environment module:

 module load python/spd

Afterwards, you can run ipython

 % ipython -pylab

At the moment, we have numpy, scipy, and matplotlib installed. If you would like to have additional modules installed, let me know [kilian]


Sage is In order to use sage, you have to first load the sage environment module

 module load python/sage

After loading the sage module, if you want to have a scipy environment (run ipython, etc) in your interactive session, first do:

 % sage -sh

then you can run:

 % ipython

or you can just do:

 % sage -ipython

This is a temporary solution for people wanting use scipy with mpi on the cluster. It was built against the default openmpi (1.2.8) (icc) and mpi4py 1.1.0. For those using hdf5, I also built hdf5 1.8.3 (gcc) and h5py 1.2.

Sample pbs and mpi script is here:


You can run it as:

 % mkdir -p ~/jobs
 % cd ~amirk/test
 % qsub pbs



CUDA is a library to use the graphics processing units (GPU) on the graphics card for general-purpose computing. We have a separate wiki page to collect information on how to do general-purpose computing on the GPU: GPGPU. We have installed the CUDA 2.3 driver and toolkit.

In order to use CUDA, you have to load the CUDA environment:

 module load cuda


You can install the CUDA SDK by running

 bash /clusterfs/cortex/software/cuda-2.3/src/

You can compile all the code examples by running

 module load X11
 cd ~/NVIDIA_GPU_Computing_SDK/C

The compiled examples can be found in the directory



PyCuda 0.93 is installed as part of the Source Python Distribution (SPD). This is how you run all unit tests:

 module load python/spd
 cd /clusterfs/cortex/software/src/pycuda-0.93/test/

Support Requests

  • If you have a problem that is not covered on this page, you can send an email to our user list:
  • If you need additional help from the LBL group, send an email to their email list. Please always cc our email list as well.
  • In urgent cases, you can also email Krishna Muriki (LBL User Services) directly.


note: OpenCL doesn't work yet

The OpenCL applications in the NVIDIA GPU Computing SDK require a GPU with CUDA Compute Architecture to run properly. In order to use OpenCL, you have to load the CUDA environment:

 module load cuda

GPU Computing SDK

Install version 2.3 of the NVIDIA GPU Computing SDK by executing the followin command

 bash /clusterfs/cortex/software/opencl-2.3/src/

You can compile all the code examples by running

 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/NVIDIA_GPU_Computing_SDK/OpenCL/common/lib/Linux64
 module load X11
 cd ~/NVIDIA_GPU_Computing_SDK/OpenCL

The compiled examples can be found in the directory