diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f2cf2763..676a7f2f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ endif() project(Prerequisites LANGUAGES) set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") pkg_check_modules(PETSC_MIN REQUIRED PETSc>=3.12.0 QUIET) #CMake does not support version range -pkg_check_modules(PETSC REQUIRED PETSc<3.21.0) +pkg_check_modules(PETSC REQUIRED PETSc<3.22.0) pkg_get_variable(CMAKE_Fortran_COMPILER PETSc fcompiler) pkg_get_variable(CMAKE_C_COMPILER PETSc ccompiler) diff --git a/src/CLI.f90 b/src/CLI.f90 index 22088a3f7..f1268f87d 100644 --- a/src/CLI.f90 +++ b/src/CLI.f90 @@ -6,7 +6,7 @@ !> @brief Parse command line interface for PETSc-based solvers !-------------------------------------------------------------------------------------------------- #define PETSC_MINOR_MIN 12 -#define PETSC_MINOR_MAX 20 +#define PETSC_MINOR_MAX 21 module CLI use, intrinsic :: ISO_fortran_env @@ -46,11 +46,11 @@ subroutine CLI_init() -- UNSUPPORTED PETSc VERSION --- UNSUPPORTED PETSc VERSION --- UNSUPPORTED PETSc VERSION --- #endif #if PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR==18 - character(len=*), parameter :: PETSc_DOI = '10.2172/1893326' +#define PETSC_DOI '10.2172/1893326' #elif PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR==19 - character(len=*), parameter :: PETSc_DOI = '10.2172/1968587' +#define PETSC_DOI '10.2172/1968587' #elif PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR==20 - character(len=*), parameter :: PETSc_DOI = '10.2172/2205494' +#define PETSC_DOI '10.2172/2205494' #endif character(len=:), allocatable :: & commandLine, & !< command line call as string @@ -65,7 +65,9 @@ subroutine CLI_init() i, s integer, dimension(8) :: & dateAndTime - +#ifdef PETSC_DOI + character(len=*), parameter :: PETSc_DOI = PETSC_DOI +#endif workingDirArg = getCWD() @@ -97,7 +99,9 @@ subroutine CLI_init() print'(1x,a)', 'https://doi.org/10.1016/j.commatsci.2018.04.030'//IO_EOL #if PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>=18 print'(1x,a,i0,a,i0)', 'S. Balay et al., PETSc/TAO User Manual Revision ',PETSC_VERSION_MAJOR,'.',PETSC_VERSION_MINOR +#ifdef PETSC_DOI print'(1x,a)', 'https://doi.org/'//PETSc_DOI +#endif #endif print'(/,1x,a)', 'Version: '//DAMASKVERSION