Skip to content

PTsolvers/AdaLovelace22-GPU

Repository files navigation

Ada Lovelace 2022 GPU

GPU-computing in geodynamics workshop material

Program: https://meetings.copernicus.org/2022AdaLovelaceWorkshop/programme/programme.html

Automatic notebook generation

The presentation slides and the demo notebook are self-contained in a Jupyter notebook alw22-gd-gpu.ipynb that can be auto-generated using literate programming by deploying the alw22-gd-gpu.jl script.

To reproduce:

  1. Clone this git repo
  2. Open Julia and resolve/instantiate the project
using Pkg
Pkg.activate(@__DIR__)
Pkg.resolve()
Pkg.instantiate()
Pkg.add(url="https://github.com/EnzymeAD/Enzyme.jl.git", rev="main")

⚠️ Note that the main branch of Enzyme.jl should be used.

  1. Run the deploy script
julia> using Literate

julia> include("deploy_notebooks.jl")
  1. Then using IJulia, you can launch the notebook and get it displayed in your web browser:
julia> using IJulia

julia> notebook(dir="./")

To view the notebook as slide, you need to install the RISE plugin

Self-contained adjoint-based GD inversion scripts

The scripts used to produce the adjoint-based gradient descent point-wise inversion for the power-law prefactor in a free-surface channel flow are accessible in the scripts folder:

Resources

The pseudo-transient method

GMD paper: https://doi.org/10.5194/gmd-15-5757-2022

Julia packages

Courses and resources

Misc