Skip to content

Commit e28a4ab

Browse files
Merge pull request #390 from FluidityProject/fix-petsc-makefile
Updates for VTK9 and PETSC 3.15-24: * (most of) https://github.com/dsroberts/fluidity/tree/dsroberts/noble including fixes for petsc v3.19 and support for configuring with vtk 9 from autoconf. Except the manual changes (which break on Jammy). Keeping the gmsh version at 2.6 in the Docker container for now (to be fixed later). * drop Bionic and Focal builds * fixes for petsc 3.23/3.24. One open issue is that with a debug petsc build it spews a lot of warnings, which I attempted to fix but that seemed to change answers for reasons I don't understand. See bbe7ea0 for the reversal of that "attempted fix". Again I will leave that for now as without the fix, everything seems to work. Now builds succesfully in CI on Noble. Still some failing short and medium tests that need sorting out later.
2 parents 50cc388 + 8c72b79 commit e28a4ab

35 files changed

+5057
-3685
lines changed

.github/workflows/ubuntu.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,18 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
name: [ "Build Bionic", "Build Focal", "Build Jammy", "Build Jammy OMP" ]
20+
name: [ "Build Jammy", "Build Jammy OMP", "Build Noble" ]
2121
include:
2222

23-
- name: "Build Bionic"
24-
release: bionic
25-
26-
- name: "Build Focal"
27-
release: focal
28-
2923
- name: "Build Jammy"
3024
release: jammy
3125

3226
- name: "Build Jammy OMP"
3327
release: jammy-omp
3428

29+
- name: "Build Noble"
30+
release: noble
31+
3532
steps:
3633

3734
- name: Check Out Repo
@@ -62,29 +59,9 @@ jobs:
6259
strategy:
6360
fail-fast: false
6461
matrix:
65-
name: [ "Short Bionic", "Unit Focal", "Short Focal", "Medium Focal", "Unit Jammy", "Short Jammy", "Medium Jammy" ]
62+
name: [ "Unit Jammy", "Short Jammy", "Medium Jammy", "Unit Noble" ]
6663
include:
6764

68-
- name: "Short Bionic"
69-
release: bionic
70-
command: "make THREADS=2 test"
71-
output: "test_results.xml"
72-
73-
- name: "Unit Focal"
74-
release: focal
75-
command: "make unittest"
76-
output: "test_results_unittests.xml"
77-
78-
- name: "Short Focal"
79-
release: focal
80-
command: "make THREADS=2 test"
81-
output: "test_results.xml"
82-
83-
- name: "Medium Focal"
84-
release: focal
85-
command: "make THREADS=2 mediumtest"
86-
output: "test_results_medium.xml"
87-
8865
- name: "Unit Jammy"
8966
release: jammy
9067
command: "make unittest"
@@ -100,6 +77,11 @@ jobs:
10077
command: "make THREADS=2 mediumtest"
10178
output: "test_results_medium.xml"
10279

80+
- name: "Unit Noble"
81+
release: noble
82+
command: "make unittest"
83+
output: "test_results_unittests.xml"
84+
10385
steps:
10486

10587
- name: ${{ matrix.name }} Testing

aclocal.m4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,11 @@ if test "x$PETSC_DIR" == "x"; then
419419
fi
420420
AC_MSG_NOTICE([Using PETSC_DIR=$PETSC_DIR])
421421
422-
PETSC_LINK_LIBS=`make -s -f petsc_makefile_old getlinklibs 2> /dev/null || make -s -f petsc_makefile getlinklibs`
422+
PETSC_LINK_LIBS=`make -s -f petsc_makefile getlinklibs`
423423
LIBS="$PETSC_LINK_LIBS $LIBS"
424424
425425
# need to add -I$PWD/include/ to what we get from petsc, so we can use our own petsc_legacy.h wrapper
426-
PETSC_INCLUDE_FLAGS=`make -s -f petsc_makefile_old getincludedirs 2> /dev/null || make -s -f petsc_makefile getincludedirs`
426+
PETSC_INCLUDE_FLAGS=`make -s -f petsc_makefile getincludedirs`
427427
CPPFLAGS="$CPPFLAGS $PETSC_INCLUDE_FLAGS -I$PWD/include/"
428428
FCFLAGS="$FCFLAGS $PETSC_INCLUDE_FLAGS -I$PWD/include/"
429429
@@ -562,6 +562,9 @@ AC_LANG_RESTORE
562562
563563
564564
AC_DEFINE(HAVE_PETSC,1,[Define if you have the PETSc library.])
565+
if test "0$PETSC_VERSION_MAJOR" -ge 3 -a "0$PETSC_VERSION_MINOR" -lt 19; then
566+
AC_DEFINE(PETSC_NULLPTR,PETSC_NULL,[Name of PETSc's null pointer type])
567+
fi
565568
566569
])dnl ACX_PETSc
567570

assemble/tests/test_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
6565
}
6666
#endif
6767
#ifdef HAVE_PETSC
68-
PetscInitialize(&argc, &argv, NULL, PETSC_NULL);
68+
PetscInitialize(&argc, &argv, NULL, PETSC_NULLPTR);
6969
PetscInitializeFortran();
7070
#endif
7171

climatology/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LINKER = $(CXX)
3232
CXXFLAGS = -I../include @CXXFLAGS@ @CPPFLAGS@
3333

3434
LFLAGS = @LDFLAGS@
35-
LIBS = -L../lib/ @LIBS@ @FLIBS@
35+
LIBS = -L../lib/ @LIBS@ @FLIBS@ @LAPACK_LIBS@
3636

3737
.SUFFIXES: .cpp .o
3838

0 commit comments

Comments
 (0)