Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
876e773
Noble testing
stephankramer Oct 31, 2025
c476194
Ensure our vtk 9.4 build is used in python vtk/vtktools
stephankramer Oct 31, 2025
9bee134
First set of short test noble fixes
stephankramer Nov 3, 2025
4327a0f
Revert to gmsh 2.6.15
stephankramer Nov 7, 2025
fb4aa9f
Backport recent spud updates into fluidity copy
stephankramer Nov 7, 2025
716a6b7
Update for vtk 9
stephankramer Nov 7, 2025
efff184
Backport spud 1.2.2 changes
stephankramer Nov 7, 2025
0fce529
Tweak test tolerances for noble
stephankramer Nov 20, 2025
c999894
Restore GAMG smoothers to SOR
stephankramer Nov 20, 2025
9e5251e
Relax gamg iterations
stephankramer Nov 27, 2025
92a8623
Small tweaks for petsc 3.23/24
stephankramer Nov 27, 2025
8d37c01
Avoid calling MatSetValue(s) with negative row index
stephankramer Nov 27, 2025
57e2459
HOSTNAME is not always set
stephankramer Nov 27, 2025
a7ad5f9
Use PetscBool when calling petsc
stephankramer Nov 28, 2025
9d10b27
Loosen tolerance
stephankramer Nov 28, 2025
7a9453e
Deactivate Stokes May gamg tests
stephankramer Nov 28, 2025
2e1e87c
Build and use PETSC 24 in long tests
Dec 11, 2025
eafad78
Use correct Dockerfile for testing
Dec 11, 2025
f52c347
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 11, 2025
c16bd8b
Fix negative index errors serial vectors.
stephankramer Dec 12, 2025
032a164
Configure petsc with required ext. depend.
stephankramer Dec 12, 2025
ed57a80
Fix petsc build: need pnetcdf flex and bison
stephankramer Dec 13, 2025
dd785a4
More skipping negative rows before MatSetvalues
stephankramer Dec 14, 2025
f7b6943
Cycle not continue!
stephankramer Dec 15, 2025
4aa6049
There seems to be some issue with eisenstat in parallel
stephankramer Dec 15, 2025
c2dd8ad
Add petsc bin to path
stephankramer Dec 16, 2025
55e1ce9
Loosen tolerance
stephankramer Dec 16, 2025
4ccd80a
Let petsc build its own netcdf
stephankramer Dec 16, 2025
a0d700e
Try with less unusual preconditioner
stephankramer Dec 17, 2025
57ff09d
Loosen tolerance
stephankramer Dec 17, 2025
0edf408
Move building petsc from actions to base container
stephankramer Dec 18, 2025
0ae2793
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 18, 2025
5295937
Build and test both Jammy and Noble
stephankramer Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [ "Build Jammy", "Build Jammy OMP", "Build Noble" ]
name: [ "Build Noble", "Build Noble OMP", "Build Jammy" ]
include:

- name: "Build Jammy"
release: jammy

- name: "Build Jammy OMP"
release: jammy-omp

- name: "Build Noble"
release: noble

- name: "Build Noble OMP"
release: noble-omp

- name: "Build Jammy"
release: jammy

steps:

- name: Check Out Repo
Expand Down Expand Up @@ -59,28 +59,28 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [ "Unit Jammy", "Short Jammy", "Medium Jammy", "Unit Noble" ]
name: [ "Unit Noble", "Short Noble", "Medium Noble", "Short Jammy" ]
include:

- name: "Unit Jammy"
release: jammy
- name: "Unit Noble"
release: noble
command: "make unittest"
output: "test_results_unittests.xml"

- name: "Short Jammy"
release: jammy
- name: "Short Noble"
release: noble
command: "make THREADS=2 test"
output: "test_results.xml"

- name: "Medium Jammy"
release: jammy
- name: "Medium Noble"
release: noble
command: "make THREADS=2 mediumtest"
output: "test_results_medium.xml"

- name: "Unit Noble"
release: noble
command: "make unittest"
output: "test_results_unittests.xml"
- name: "Short Jammy"
release: jammy
command: "make THREADS=2 test"
output: "test_results.xml"

steps:

Expand Down Expand Up @@ -220,8 +220,8 @@ jobs:
- name: ${{ matrix.name }} Longtesting
run: |
chmod 777 .
docker pull fluidity/actions:jammy-${{ github.sha }}
docker run -v $PWD:/host fluidity/actions:jammy-${{ github.sha }} /bin/bash -c "git clone https://github.com/fluidityproject/longtests && bin/testharness -x test_results_${{ matrix.name }}.xml -f ${{ matrix.name }}.xml && cp -v test_results_${{ matrix.name }}.xml /host"
docker pull fluidity/actions:noble-${{ github.sha }}
docker run -v $PWD:/host fluidity/actions:noble-${{ github.sha }} /bin/bash -c "git clone https://github.com/fluidityproject/longtests && bin/testharness -x test_results_${{ matrix.name }}.xml -f ${{ matrix.name }}.xml && cp -v test_results_${{ matrix.name }}.xml /host"

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion assemble/Full_Projection.F90
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ subroutine petsc_solve_setup_full_projection(y,A,b,ksp,petsc_numbering_p,name,so

! Set up RHS and Solution vectors (note these are loaded later):
b = PetscNumberingCreateVec(petsc_numbering_p)
call VecDuplicate(b,y,ierr) ! Duplicate vector b and form vector y
call FixedVecDuplicate(b,y,ierr) ! Duplicate vector b and form vector y

! Schur complement objects now fully set up. The next stage is to setup
! KSP and PC for the solution of Ay = b, where A = G_t*M^-1*G.
Expand Down
2 changes: 1 addition & 1 deletion assemble/tests/test_matrix_free.F90
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ subroutine petsc_solve_matrix_free(x, matrix, rhs)

call VecCreateSeq(MPI_COMM_SELF,size(rhs%val), b, ierr)

call VecDuplicate(b, y, ierr)
call FixedVecDuplicate(b, y, ierr)

! copy array into PETSc vecs
call VecSetValues(b, size(rhs%val), &
Expand Down
22 changes: 21 additions & 1 deletion docker/Dockerfile.noble
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ RUN apt-get update && \
apt-get update && \
echo "Europe/London" > /etc/timezone && \
apt-get -y install fluidity-dev texlive-pstricks texlive texlive-latex-extra texlive-science python3-pip python3-junit.xml && \
apt-get -y install sudo flex bison && \
apt-get clean

# Use old version of gmsh in CI to avoid mesh-sensitive tests failing
WORKDIR /usr/local
RUN curl -fsL https://gmsh.info/bin/Linux/gmsh-4.14.0-Linux64.tgz | tar --strip-components=1 -zxf -
RUN curl -fsL https://gmsh.info/bin/Linux/gmsh-2.16.0-Linux64.tgz | tar --strip-components=1 -zxf -

ENV OMPI_MCA_btl_vader_single_copy_mechanism=none
ENV OMPI_MCA_rmaps_base_oversubscribe=1

# Build vtk 9.4 instead of noble's vtk 9.2 as we need the fix for https://gitlab.kitware.com/vtk/vtk/-/issues/19258
# (failing reading of vtk files with newer versions of expat)
WORKDIR /root
RUN curl -fsL https://vtk.org/files/release/9.4/VTK-9.4.0.tar.gz | tar -xzf - && \
cd VTK-9.4.0 && \
Expand All @@ -38,6 +42,22 @@ RUN curl -fsL https://vtk.org/files/release/9.4/VTK-9.4.0.tar.gz | tar -xzf - &&
cd ../.. && \
rm -rf VTK-9.4.0

# Build petsc 3.24 because noble's petsc version has an intermediate gamg with known issues
WORKDIR /tmp
RUN curl -O https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.24.2.tar.gz
RUN tar -xzf petsc-3.24.2.tar.gz && mv petsc-3.24.2 /opt/petsc && rm petsc-3.24.2.tar.gz

WORKDIR /opt/petsc
RUN ./configure --with-debugging=1 --with-fortran-bindings=1 --with-shared-libraries=1 --with-strict-petscerrorcode --with-bison --with-fftw --with-hdf5 --with-hwloc --with-metis --with-mumps --download-netcdf --download-pnetcdf --download-ptscotch --with-scalapack-lib=-lscalapack-openmpi --with-suitesparse --download-superlu_dist --with-zlib --download-hypre -download-hdf5
RUN make PETSC_DIR=/opt/petsc PETSC_ARCH=arch-linux-c-debug all

# Environment for building fluidity with this vtk and petsc
ENV VTK_INSTALL_PREFIX=/opt/vtk-9.4.0
ENV PETSC_DIR=/opt/petsc
ENV PETSC_ARCH=arch-linux-c-debug
ENV PATH="$PETSC_DIR/$PETSC_ARCH/bin:$PATH"
ENV PYTHONPATH="/opt/vtk-9.4.0/lib/python3.12/site-packages"

# Add a Fluidity user who will be the default user for this container
# Make sure the user has a userid matching the host system
# -- pass this as an argument at build time
Expand Down
27 changes: 0 additions & 27 deletions docker/actions/Dockerfile.actions.jammy-omp

This file was deleted.

13 changes: 11 additions & 2 deletions docker/actions/Dockerfile.actions.noble
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ USER root

RUN apt-get -y update && \
apt-get -y dist-upgrade && \
apt-get -y install sudo && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists

Expand All @@ -15,11 +14,21 @@ COPY . /home/fluidity
RUN chown -R fluidity /home/fluidity

USER fluidity
WORKDIR /home/fluidity

ENV VTK_INSTALL_PREFIX=/opt/vtk-9.4.0
RUN ./configure --enable-2d-adaptivity
# NOTE: running "make makefiles" is only needed for
# developers that have changed any of the module use statements
# For all other users, this step is NOT needed.
# "make makefiles" regenerates the */Makefile.dependencies
# which should already be committed to the repo. We do this here
# only to check whether the regenerated files have changed from
# the committed version, in which case the "test -z" and thus the
# build fails. If that happens, developers should run "make makefiles"
# locally and commit the changes.
RUN make makefiles
RUN test -z "$(git status --porcelain */Makefile.dependencies)"

RUN make
RUN make fltools
RUN make manual
Expand Down
37 changes: 37 additions & 0 deletions docker/actions/Dockerfile.actions.noble-omp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM fluidity/baseimages:noble

USER root

RUN apt-get -y update && \
apt-get -y dist-upgrade && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists

RUN adduser fluidity sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

COPY . /home/fluidity
RUN chown -R fluidity /home/fluidity

USER fluidity
WORKDIR /home/fluidity

RUN ./configure --enable-2d-adaptivity --enable-omp
# NOTE: running "make makefiles" is only needed for
# developers that have changed any of the module use statements
# For all other users, this step is NOT needed.
# "make makefiles" regenerates the */Makefile.dependencies
# which should already be committed to the repo. We do this here
# only to check whether the regenerated files have changed from
# the committed version, in which case the "test -z" and thus the
# build fails. If that happens, developers should run "make makefiles"
# locally and commit the changes.
RUN make makefiles
RUN test -z "$(git status --porcelain */Makefile.dependencies)"

RUN make
RUN make fltools
RUN make manual

# Python module 'assess' is required for some longtests
RUN python3 -m pip install --break-system-packages assess
4 changes: 1 addition & 3 deletions examples/rotating_channel/channel.flml
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,7 @@
<integer_value rank="0">40</integer_value>
</restart>
</iterative_method>
<preconditioner name="hypre">
<hypre_type name="euclid"/>
</preconditioner>
<preconditioner name="sor"/>
<relative_error>
<real_value rank="0">1.0e-10</real_value>
</relative_error>
Expand Down
2 changes: 1 addition & 1 deletion examples/water_collapse/water_collapse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nodesend= stat("water_collapse.stat")["CoordinateMesh"]["nodes"][-1]</variable>
<pass_tests>
<test name="finish_time" language="python">assert finishtime &gt; 2.4</test>
<test name="water_conservation" language="python">print('mass loss = ', abs(vfracintend-vfracintstart)/vfracintstart)
assert abs(vfracintend-vfracintstart)/vfracintstart &lt; 1.e-5
assert abs(vfracintend-vfracintstart)/vfracintstart &lt; 5.e-5
</test>
<test name="divergence" language="python">print('divergence = ', max(maxdivergence, mindivergence))
assert max(maxdivergence, mindivergence) &lt; 1.E-5
Expand Down
7 changes: 4 additions & 3 deletions femtools/Diagnostic_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1184,10 +1184,11 @@ subroutine initialise_constant_diagnostics(unit, binary_format)

call get_environment_variable(name="HOSTNAME", value=value_buffer, status=stat)
if (stat /= 0) then
ewrite(-1, *) "GET_ENVIRONMENT_VARIABLE('HOSTNAME') returned no-zero status: ", stat
ewrite(0, *) "GET_ENVIRONMENT_VARIABLE('HOSTNAME') returned no-zero status: ", stat
else
buffer=constant_tag(name="HostName", type="string", value=trim(value_buffer))
write(unit, '(a)') trim(buffer)
end if
buffer=constant_tag(name="HostName", type="string", value=trim(value_buffer))
write(unit, '(a)') trim(buffer)

! Constant values
if(present_and_true(binary_format)) then
Expand Down
4 changes: 2 additions & 2 deletions femtools/Multigrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ function Prolongator(A, epsilon, omega, maxclustersize, cluster) result (P)
call VecCopy(diag, sqrt_diag, ierr)
call VecSqrtAbs(sqrt_diag, ierr)
!
call VecDuplicate(sqrt_diag, inv_sqrt_diag, ierr)
call FixedVecDuplicate(sqrt_diag, inv_sqrt_diag, ierr)
call VecCopy(sqrt_diag, inv_sqrt_diag, ierr)
call VecReciprocal(inv_sqrt_diag, ierr)
call MatDiagonalScale(A, inv_sqrt_diag, inv_sqrt_diag, ierr)
Expand Down Expand Up @@ -802,7 +802,7 @@ function Prolongator(A, epsilon, omega, maxclustersize, cluster) result (P)
! now restore the original matrix
! unfortunately MatDiagonalScale is broken for one-sided scaling, i.e.
! supplying PETSC_NULL(_OBJECT) for one the vectors
call VecDuplicate(diag, one, ierr)
call FixedVecDuplicate(diag, one, ierr)
call VecSet(one, 1.0_PetscReal_kind, ierr)
call MatDiagonalScale(A, diag, one, ierr)

Expand Down
15 changes: 15 additions & 0 deletions femtools/Petsc_Tools.F90
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ module Petsc_Tools
logical, public, save :: petsc_test_error_handler_called = .false.
public petsc_test_error_handler
public IsNullMatNullSpace
public FixedVecDuplicate

contains

Expand Down Expand Up @@ -1030,6 +1031,7 @@ function block_csr2petsc(A, petsc_numbering, column_petsc_numbering, &
if (A%diagonal .and. bh/=bv) cycle
! row number in PETSc land:
rows(1)=row_numbering%gnn2unn(i, bv)
if (rows(1)<0) cycle
vals => row_val_ptr(A, bv, bh, i)
#ifdef DOUBLEP
call MatSetValues(M, 1, rows, len, colidx(1:len), vals, &
Expand Down Expand Up @@ -1539,5 +1541,18 @@ function IsNullMatNullSpace(nullsp)

end function IsNullMatNullSpace

subroutine FixedVecDuplicate(v, newv, ierr)
! It appears that for VecSeq, petsc does not copy the options
! of the duplicated vector. Ensure it does.
Vec, intent(in) :: v
Vec, intent(out) :: newv
PetscErrorCode :: ierr

call VecDuplicate(v, newv, ierr)
call VecSetOption(newv, VEC_IGNORE_NEGATIVE_INDICES, PETSC_TRUE, ierr)
call VecSetOption(newv, VEC_IGNORE_OFF_PROC_ENTRIES, PETSC_TRUE, ierr)

end subroutine FixedVecDuplicate

#include "Reference_count_petsc_numbering_type.F90"
end module Petsc_Tools
Loading
Loading