You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is dealing with bug https://gitlab.com/petsc/petsc/-/issues/868
Which is fixed for 3.15. Unfortunately no workaround exists in fortran,
because even if we do provide the optional argument it still gets
recognized for NULL and hits the bug. So instead write our own wrapper
in C.
This also drop support for petsc version <3.8 Note that Bionic official
packages are 3.7 - but we have always supplied our own 3.8 package for
it. Groovy and Hirsute are now on 3.14 Dropping support for <3.8
simplifies/removes a lot of the legacy workarounds. We no longer support
linking with petsc without fortran modules (we never did for versions
>=3.8).
AC_MSG_NOTICE([Detected PETSc version "$PETSC_VERSION_MAJOR"."$PETSC_VERSION_MINOR"])
442
-
# if major<3 or minor<4
443
-
if test "0$PETSC_VERSION_MAJOR" -lt 3 -o "0$PETSC_VERSION_MINOR" -lt 4; then
444
-
AC_MSG_ERROR([Fluidity needs PETSc version >=3.4])
442
+
# if major<3 or minor<8
443
+
if test "0$PETSC_VERSION_MAJOR" -lt 3 -o "0$PETSC_VERSION_MINOR" -lt 8; then
444
+
AC_MSG_ERROR([Fluidity needs PETSc version >=3.8])
445
445
fi
446
446
447
447
AC_LANG(Fortran)
@@ -451,35 +451,27 @@ ac_ext=F90
451
451
# may need some extra flags for testing that we don't want to use in the end
452
452
SAVE_FCFLAGS="$FCFLAGS"
453
453
454
-
if test "$enable_petsc_fortran_modules" != "no" ; then
455
-
# now try if the petsc fortran modules work:
456
-
AC_LINK_IFELSE(
457
-
[AC_LANG_PROGRAM([],[[
458
-
use petsc
459
-
integer :: ierr
460
-
print*, "hello petsc"
461
-
call PetscInitialize(PETSC_NULL_CHARACTER, ierr)
462
-
]])],
463
-
[
464
-
AC_MSG_NOTICE([PETSc modules are working.])
465
-
AC_DEFINE(HAVE_PETSC_MODULES,1,[Define if you have petsc fortran modules.])
466
-
FCFLAGS="$FCFLAGS -DHAVE_PETSC_MODULES"
467
-
],
468
-
[
469
-
AC_MSG_NOTICE([PETSc modules don't work, using headers instead.])
470
-
])
471
-
elif test "0$PETSC_VERSION_MINOR" -ge 8; then
472
-
AC_MSG_ERROR([PETSc v3.8 and newer requires petsc fortran modules. Do not use the --disable-petsc-fortran-modules option])
473
-
fi
454
+
# now try if the petsc fortran modules work:
455
+
AC_LINK_IFELSE(
456
+
[AC_LANG_PROGRAM([],[[
457
+
use petsc
458
+
integer :: ierr
459
+
print*, "hello petsc"
460
+
call PetscInitialize(PETSC_NULL_CHARACTER, ierr)
461
+
]])],
462
+
[
463
+
AC_MSG_NOTICE([PETSc modules are working.])
464
+
],
465
+
[
466
+
AC_MSG_ERROR([PETSc fortran modules cannot be used. Either it the petsc*.mod files cannot be found, or petsc has been built using a different fortran compiler.])
467
+
])
474
468
475
469
# now try a more realistic program, it's a stripped down
476
470
# petsc tutorial - using the headers in the same way as we do in the code
{ $as_echo"$as_me:${as_lineno-$LINENO}: PETSc modules don't work, using headers instead.">&5
12767
-
$as_echo"$as_me: PETSc modules don't work, using headers instead.">&6;}
12749
+
as_fn_error $?"PETSc fortran modules cannot be used. Either it the petsc*.mod files cannot be found, or petsc has been built using a different fortran compiler.""$LINENO" 5
12768
12750
12769
12751
fi
12770
12752
rm -f core conftest.err conftest.$ac_objext \
12771
12753
conftest$ac_exeext conftest.$ac_ext
12772
-
eliftest"0$PETSC_VERSION_MINOR" -ge 8;then
12773
-
as_fn_error $?"PETSc v3.8 and newer requires petsc fortran modules. Do not use the --disable-petsc-fortran-modules option""$LINENO" 5
12774
-
fi
12775
12754
12776
12755
# now try a more realistic program, it's a stripped down
12777
12756
# petsc tutorial - using the headers in the same way as we do in the code
[By default fluidity tries to use fortran modules provided with petsc. Use --disable-petsc-fortran-modules if these are known to be not functional (e.g. compiled with different compiler version)])])
834
831
ACX_PETSc([AC_MSG_NOTICE(["PETSc found, enabling scalable solver"])], [AC_MSG_ERROR(["PETSc not found"])])
835
832
ACX_hypre([AC_MSG_NOTICE(["hypre found, enabling hypre preconditioners"])], [AC_MSG_WARN(["hypre not found"])])
0 commit comments