Skip to content

Instantly share code, notes, and snippets.

View julesghub's full-sized avatar

Julian Giordani julesghub

View GitHub Profile
@julesghub
julesghub / uw216_gadi_bare.md
Last active December 3, 2024 11:55
Underworld 2.16 Bare metal install - Gadi

Guide to setting up and installing a bare metal underworld install on [email protected]

1st - Setup python venv

FOO=/some/path/in/scratch

module load petsc/3.21.3 python3/3.12.1 openmpi/4.1.7 python3-as-python swig/4.0.2 hdf5/1.12.2p
export CC='mpicc' CXX='mpicxx' F90='mpifort' F77='mpifort' LD='mpicc' LDSHARED='mpicc -shared'
python -mvenv --system-site-packages $FOO/venv/uw_env
@julesghub
julesghub / job.sh
Created May 1, 2023 03:53
Singularity on GADI - qsub job.sh
#!/bin/bash -l
#PBS -P m18
#PBS -q normal
#PBS -l ncpus=96
#PBS -l walltime=04:00:00
#PBS -l mem=80Gb
#PBS -l jobfs=2Gb
#PBS -l software=underworld
#PBS -l wd
@julesghub
julesghub / install_uw2.16.sh
Last active June 26, 2024 05:07
Underworld 2 & 3 Setonix baremetal run scripts
#!/bin/bash -l
# Installation script installing Underworld (baremetal) on Setonix
# A python virtual environment is made under your $PAWSEY_PROJECT directory, ie,
# /software/projects/$PAWSEY_PROJECT/setonix/venv/py311
## installing latest uw2 on setonix
module load petsc/3.20.1-nocomplex py-pip/23.1.2-py3.11.6 py-h5py/3.8.0
# Now create a python virtual directory
@julesghub
julesghub / UW_SETONIX_TEST.py
Last active April 14, 2023 04:27
h5py IO issue
#!/usr/bin/env python3
# coding: utf-8
##from underworld.UWGeodynamics.surfaceProcesses import SedimentationThreshold
##from UWGeodynamics import visualisation as vis
import underworld as uw
from underworld import UWGeodynamics as GEO
from underworld import function as fn
@julesghub
julesghub / Environment setup on Gadi
Last active January 30, 2025 00:00
Gadi uw3 workflow
## bash to install a virtual environment iwth uw3 on Gadi - 30Jan25
```
module load python3/3.11.7 python3-as-python openmpi/4.1.3 hdf5/1.12.1p petsc/3.21.3 gmsh/4.13.1
export CC='mpicc' CXX='mpicxx' F90='mpifort' F77='mpifort' LD='mpicc' LDSHARED='-shared'
python3 -mvenv --system-site-packages /foo/bar
source /foo/bar/bin/activate
pip3 install --no-binary :mpi4py: --no-cache-dir --no-build-isolation mpi4py
HDF5_DIR= HDF5_LIBDIR=/apps/hdf5/1.12.1p/lib/ompi3 HDF5_INCLUDEDIR=/apps/hdf5/1.12.1p/include/ HDF5_MPI=ON HDF5_VERSION=1.12.1 pip3 install --no-build-isolation --no-binary :all: --no-cache-dir --no-build-isolation h5py
LDSHARED='-shared' pip3 install --no-build-isolation --no-cache-dir petsc4py==3.21.3
@julesghub
julesghub / Test.py
Last active September 12, 2022 06:03
Setonix singularity runner
#!/usr/bin/env python
# coding: utf-8
# In[3]:
import underworld as uw
from underworld import function as fn
import underworld.visualisation as vis
uw.utils.matplotlib_inline()
@julesghub
julesghub / gadi_release_install.md
Last active November 29, 2022 02:01
Gadi install guidlines for FY2023
  • Jump on gadi with account the has write access to /d/gdata/m18/.
  • Immediately start a tmux session to always remin connected.
  • Load dependency modules. python, swig, petsc, etc.
  • Initialise a virtualenv: python -m venv /g/data/m18/software/underworld/<version>
  • Activate venv: source /g/data/m18/software/underworld/<version>/bin/activate
  • install all python packages in this environment which is separate from the system python environment, include lavavu & badlands
  • Write a correctponding modulefile in /g/data/m18/modulefiles/underworld/ that setups the runtime environment required to use the installation without activating the venv.
@julesghub
julesghub / PathPostProcessingScipt.ipynb
Last active July 8, 2022 06:47
Post processing script for tracer path plots. Script is for processing the output of Cenki et al. models.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@julesghub
julesghub / FK_convection.ipynb
Created July 14, 2021 06:33
Example of FK rheology in UWGeodynamics 2.10.2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@julesghub
julesghub / 3DStokesSinker.ipynb
Last active December 15, 2020 22:35
3D Stokes sinker for UWGeo - 2.10.2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.