GPU-computing in geodynamics workshop material
Program: https://meetings.copernicus.org/2022AdaLovelaceWorkshop/programme/programme.html
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:
- Clone this git repo
- 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")
main
branch of Enzyme.jl should be used.
- Run the deploy script
julia> using Literate
julia> include("deploy_notebooks.jl")
- 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
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:
- GPU version: free_surface_flow_enzyme_2D_cuda.jl
- CPU version: free_surface_flow_enzyme_2D.jl
GMD paper: https://doi.org/10.5194/gmd-15-5757-2022
- Stokes flow examples: https://github.com/PTsolvers/PseudoTransientStokes.jl
- Diffusion solver examples: https://github.com/PTsolvers/PseudoTransientDiffusion.jl
- ETHZ course on solving PDEs with GPUs: https://pde-on-gpu.vaw.ethz.ch
- More here
- Frontier GPU multi-physics solvers: https://ptsolvers.github.io/GPU4GEO/