Skip to content

Instantly share code, notes, and snippets.

View julesghub's full-sized avatar

Julian Giordani julesghub

View GitHub Profile
@julesghub
julesghub / 1_01_Steady_State_Heat.ipynb
Last active January 10, 2020 05:06
Multiply diffusion coefficients
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@julesghub
julesghub / Dockerfile
Last active May 19, 2020 06:13
debug dockerfile with build-args
### Build this images on top of the `ubuntu:20.04` docker image.
### Docker searches for ubuntu:20.04 on the hub.docker
FROM ubuntu:20.04
### use ubuntu's package manager system `apt-get` to install compilers
RUN apt-get update -qq && \
apt-get install -yq gcc
### add anyother packages you want above
ARG WITH_DEBUG
@julesghub
julesghub / artemis.pbs
Last active August 27, 2020 04:43
Artemis uw-full-stack setup script
#!/bin/bash
#PBS -P BGH
#PBS -N UW_Run
#PBS -l select=1:ncpus=4:mem=3GB
#PBS -l walltime=00:20:00
#PBS -q defaultQ
source /project/RDS-FSC-BGH-RW/codes/UWGeodynamics_2.10.1.sh
cd $PBS_O_WORKDIR
@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.
@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 / 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 / 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 / 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 / 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 / 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