Skip to content

Instantly share code, notes, and snippets.

@julesghub
Last active July 17, 2024 23:34
Show Gist options
  • Save julesghub/2d1b7f3cc654918be60d075400a8e74f to your computer and use it in GitHub Desktop.
Save julesghub/2d1b7f3cc654918be60d075400a8e74f to your computer and use it in GitHub Desktop.
Gadi uw3 workflow

Guide to running Underworld3 on Gadi, baremetal only for now.

Log in and make sure your modulepath is good for Underworld custom modulefiles.

  1. export MODULEPATH=/g/data/m18/modulefiles/:$MODULEPATH should be in your .bashrc.

  2. module load underworld/dev_env - this DOESN"T load underworld3 but sets up an environment to compile and run the code on Gadi.

  3. Pull down the code and compile Using pip directly to install the development version.

pip install --no-cache-dir git+https://github.com/underworldcode/underworld3@development --user

Using git to clone the repository and build it with pip (better for development on Gadi)

git clone https://github.com/underworldcode/underworld3.git
cd underworld3
pip install -e .
  1. Run the code. First create a pbs script like this, let's call it runner.pbs
#!/bin/bash

#PBS -P m18
#PBS -q normal
#PBS -l walltime=00:05:00
#PBS -l mem=2GB
#PBS -l jobfs=1GB
#PBS -l ncpus=1
#PBS -l software=underworld
#PBS -l wd

#PBS -l storage=gdata/m18

export MODULEPATH=/g/data/m18/modulefiles:$MODULEPATH
module load underworld/dev_env

# disable numpy intrinsic parallelism
export OPENBLAS_NUM_THREADS=1

# print out environment
env

# execution
mpiexec python3 input.py

Then execute qsub runner.pbs

@lmoresi
Copy link

lmoresi commented Dec 20, 2022

Interesting, I needed to git clone git clone https://github.com/underworldcode/underworld3.git otherwise I was blocked by the 'Hub

@lmoresi
Copy link

lmoresi commented Dec 20, 2022

And, before that, export MODULEPATH=/g/data/m18/modulefiles:$MODULEPATH in order to load the module

@julesghub
Copy link
Author

Thanks for the points - updates made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment