Skip to content

Commit

Permalink
Merge branch 'update-guix' into 'master'
Browse files Browse the repository at this point in the history
Update guix and make PETSc container runnable on Juwels

See merge request ogs/ogs!4726
  • Loading branch information
bilke committed Sep 22, 2023
2 parents 98d08d8 + 308c846 commit 6081637
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .guix/modules/ogs-package.scm
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@
(arguments
(substitute-keyword-arguments (package-arguments vtk)
((#:configure-flags flags)
`(cons* "-DVTK_MODULE_ENABLE_VTK_IOParallelXML=YES"
"-DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES" "-DVTK_USE_MPI=ON"
,flags))))
#~(append '("-DVTK_MODULE_ENABLE_VTK_IOParallelXML=YES"
"-DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES" "-DVTK_USE_MPI=ON")
#$flags))))
(synopsis "VTK with OpenMPI support")))

(define pybind11-2.10.4
Expand Down
17 changes: 10 additions & 7 deletions scripts/ci/jobs/build-guix.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
variables:
GUIX_PETSC_CONTAINER: /data/ogs/apptainer/guix/ogs-petsc-ssd_head.squashfs
GUIX_COMMIT: v1.4.0
GUIX_PETSC_CONTAINER: /data/ogs/apptainer/guix/ogs-petsc_head.squashfs
GUIX_COMMIT: 8d70ff3a49f7cdf0eab93b3a1c54ec2f016afc4a

build guix:
stage: build
tags: [guix]
needs: []
variables:
GIT_SUBMODULE_STRATEGY: recursive
GUIX_COMMIT: v1.4.0
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
allow_failure: true
- when: manual
allow_failure: true
script:
- which guix
- guix describe
# SteadyStateDiffusion only!
- guix time-machine --commit=${GUIX_COMMIT} -- build --fallback -L $PWD/.guix/modules ogs-ssd
- guix time-machine --commit=${GUIX_COMMIT} -- build --fallback -L $PWD/.guix/modules ogs-petsc-ssd
- guix build --fallback -L $PWD/.guix/modules ogs-ssd
- guix build --fallback -L $PWD/.guix/modules ogs-petsc-ssd

deploy guix container eve:
stage: build
Expand All @@ -29,8 +30,10 @@ deploy guix container eve:
- if: '$CI_COMMIT_BRANCH == "master"'
allow_failure: true
script:
- which guix
- guix describe
# All processes.
- image=$( guix time-machine --commit=${GUIX_COMMIT} -- pack --fallback -L $PWD/.guix/modules -S /bin=bin -RR --format=squashfs bash ogs-petsc | tee | tail -1 )
- image=$( guix pack --no-substitutes -L $PWD/.guix/modules -RR --format=squashfs bash ogs-petsc | tee | tail -1 )
- echo "Image $image"
- ssh [email protected] rm -f ${GUIX_PETSC_CONTAINER}
- scp $image [email protected]:${GUIX_PETSC_CONTAINER}
Expand All @@ -47,7 +50,7 @@ test guix container eve:
- mkdir -p $work_dir
- cp -r ${CI_PROJECT_DIR}/Tests/Data/EllipticPETSc $work_dir/
- export prj_file=${work_dir}/EllipticPETSc/cube_1e3_XDMF_np3.prj
- jid=$(sbatch --chdir=${work_dir} --job-name=test-guix-container --mem-per-cpu=1G --ntasks=3 --output=/work/%u/%x_%j.out --parsable --time=1 --partition=rocky-9 --wrap="srun apptainer exec ${GUIX_PETSC_CONTAINER} ogs ${prj_file}")
- jid=$(sbatch --chdir=${work_dir} --job-name=test-guix-container --mem-per-cpu=1G --ntasks=3 --output=/work/%u/%x_%j.out --parsable --time=5 --partition=rocky-9 --wrap="srun apptainer exec ${GUIX_PETSC_CONTAINER} ogs ${prj_file}")
# - touch /work/$USER/ci_log_$jid.out # required on frontend1, tail -F does not recognize file created
- while true; do grep "$jid" < <(squeue -hj "$jid") || break; sleep 10; done &> /dev/null & tail -F /work/$USER/test-guix-container_$jid.out --pid="$!" || true
- exit_code=$(sacct -j $jid.0 --format=ExitCode --noheader | cut -d':' -f1)
Expand Down
4 changes: 2 additions & 2 deletions web/content/docs/userguide/features/parallel_computing_mpi.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ For the detailed syntax of job script of SLURM for EVE, please visit <https://wi

A prebuilt container with `ogs` (current master) is available at:

* `/data/ogs/apptainer/guix/ogs-petsc-ssd_head.squashfs`
* `/data/ogs/apptainer/guix/ogs-petsc_head.squashfs`

You need to modify your submit script, e.g.:

```bash
...
#SBATCH ...

srun apptainer exec /data/ogs/apptainer/guix/ogs-petsc-ssd_head.squashfs ogs $PRJ_FILE
srun apptainer exec /data/ogs/apptainer/guix/ogs-petsc_head.squashfs ogs $PRJ_FILE
```

### 3. Check results
Expand Down

0 comments on commit 6081637

Please sign in to comment.