1
+ # TODO: Fix and then move this as matrix arch into build.yml and
2
+
1
3
name : Install and test Firedrake (CUDA)
2
4
3
5
on :
@@ -24,11 +26,18 @@ jobs:
24
26
arch : [default]
25
27
runs-on : [self-hosted, Linux]
26
28
container :
27
- image : firedrakeproject/firedrake-env:latest
29
+ image : nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04
30
+ options : --gpus all
28
31
env :
29
32
FIREDRAKE_CI : 1
30
33
OMP_NUM_THREADS : 1
31
34
steps :
35
+ - name : Fix HOME
36
+ # For unknown reasons GitHub actions overwrite HOME to /github/home
37
+ # which will break everything unless fixed
38
+ # (https://github.com/actions/runner/issues/863)
39
+ run : echo "HOME=/root" >> "$GITHUB_ENV"
40
+
32
41
- name : Pre-run cleanup
33
42
# Make sure the current directory is empty
34
43
run : find . -delete
39
48
40
49
- name : Install system dependencies
41
50
run : |
42
- sudo apt-get update
43
- sudo apt-get -y install \
51
+ apt-get update
52
+ apt-get install -y curl
53
+ apt-get install -y git
54
+ apt-get install -y python3
55
+ apt install -y python3.12-venv
56
+ apt-get -y install \
44
57
$(python3 ./firedrake-repo/scripts/firedrake-configure --arch ${{ matrix.arch }} --show-system-packages)
45
58
46
59
- name : Install PETSc
@@ -49,16 +62,16 @@ jobs:
49
62
cd petsc
50
63
# TODO update configure file
51
64
./configure --with-make-np=12 --with-c2html=0 --with-debugging=0 --with-fortran-bindings=0 --with-shared-libraries=1 --with-strict-petscerrorcode PETSC_ARCH=arch-firedrake-default --COPTFLAGS=-O3 -march=native -mtune=native --CXXOPTFLAGS=-O3 -march=native -mtune=native --FOPTFLAGS=-O3 -march=native -mtune=native --download-bison --download-fftw --download-hdf5 --download-hwloc --download-metis --download-mumps --download-netcdf --download-pnetcdf --download-ptscotch --download-scalapack --download-suitesparse --download-superlu_dist --download-zlib --download-hypre --with-cuda --with-cuda-dir=/usr/local/cuda CUDAPPFLAGS=-Wno-deprecated-gpu-targets --download-openmpi
52
- make
65
+ make PETSC_DIR=/__w/firedrake/firedrake/petsc PETSC_ARCH=arch-firedrake-default all
53
66
# TODO: This fails for some reason
54
- # make check
67
+ make PETSC_DIR=/__w/firedrake/firedrake/petsc PETSC_ARCH=arch-firedrake-default check MPIEXEC="mpiexec --allow-run-as-root"
55
68
56
69
- name : Install Firedrake
57
70
id : install
58
71
run : |
59
72
# TODO update configure file for the exports
60
73
# export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch ${{ matrix.arch }} --show-env)
61
- export PETSC_DIR=. /petsc
74
+ export PETSC_DIR=/__w/firedrake/firedrake /petsc
62
75
export PETSC_ARCH=arch-firedrake-default
63
76
export MPI_HOME=$PETSC_DIR/$PETSC_ARCH
64
77
export CC=$PETSC_DIR/$PETSC_ARCH/bin/mpicc
0 commit comments