diff --git a/Makefile b/Makefile index 682a1905..57a19d46 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ # This uses the compilers and flags defined in the PETSc configuration # ~~~~~~~~~~~~~~~~~ -# Check PETSc version is at least 3.24.1 -PETSC_VERSION_MIN := $(shell ${PETSC_DIR}/lib/petsc/bin/petscversion ge 3.24.1) +# Check PETSc version is at least 3.25.0 +PETSC_VERSION_MIN := $(shell ${PETSC_DIR}/lib/petsc/bin/petscversion ge 3.25.0) ifeq ($(PETSC_VERSION_MIN),0) -$(error PETSc version is too old. PFLARE requires at least version 3.24.1) +$(error PETSc version is too old. PFLARE requires at least version 3.25.0) endif # Get the flags we have on input diff --git a/include/finclude/PETSc_ISO_Types.h b/include/finclude/PETSc_ISO_Types.h deleted file mode 100644 index 18b1490f..00000000 --- a/include/finclude/PETSc_ISO_Types.h +++ /dev/null @@ -1,33 +0,0 @@ -#include "petscconf.h" - -! Define an interoperable kind matching PetscInt for BIND(C) use -#ifdef PETSC_USE_64BIT_INDICES -#define PFLARE_PETSCINT_C_KIND c_long_long -#else -#define PFLARE_PETSCINT_C_KIND c_int -#endif - -! Define an interoperable kind matching PetscReal for BIND(C) use -#ifdef PETSC_USE_REAL_SINGLE -#define PFLARE_PETSCREAL_C_KIND c_float -#elif defined(PETSC_USE_REAL_DOUBLE) -#define PFLARE_PETSCREAL_C_KIND c_double -#elif defined(PETSC_USE_REAL___FLOAT128) -#define PFLARE_PETSCREAL_C_KIND c_long_double -#warning "Using long double as stand-in for __float128; verify sizes." -#else -#error "Unknown PETSc real precision" -#endif - -! Define an interoperable type matching PetscScalar for BIND(C) use -#ifdef PETSC_USE_COMPLEX -#define PFLARE_PETSCSCALAR_C_TYPE complex(PFLARE_PETSCREAL_C_KIND) -#else -#define PFLARE_PETSCSCALAR_C_TYPE real(PFLARE_PETSCREAL_C_KIND) -#endif - -! Define an interoperable kind matching PetscErrorCode for BIND(C) use -#define PFLARE_PETSCERRORCODE_C_KIND c_int - -! Define an interoperable kind matching PetscBool for BIND(C) use -#define PFLARE_PETSCBOOL_C_TYPE logical(c_bool) \ No newline at end of file diff --git a/src/C_Fortran_Bindings.F90 b/src/C_Fortran_Bindings.F90 index d7f87f92..5c6cc6a3 100644 --- a/src/C_Fortran_Bindings.F90 +++ b/src/C_Fortran_Bindings.F90 @@ -112,7 +112,6 @@ subroutine calculate_and_build_approximate_inverse_c(input_mat_ptr, inverse_type ! computation is skipped (see calculate_and_build_approximate_inverse). ! coeffs_ptr/row_size/col_size are unchanged on return. -#include "finclude/PETSc_ISO_Types.h" ! Interface to C stdlib malloc interface @@ -128,15 +127,15 @@ end function c_malloc integer(c_int), value, intent(in) :: inverse_type, poly_order, poly_sparsity_order integer(c_int), value, intent(in) :: matrix_free_int, diag_scale_polys_int, subcomm_int type(c_ptr), intent(inout) :: coeffs_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(inout) :: row_size, col_size + PetscInt, intent(inout) :: row_size, col_size integer(c_long_long), intent(inout) :: inv_matrix_ptr type(tMat) :: input_mat, inv_matrix logical :: matrix_free, subcomm, diag_scale_polys PetscReal, dimension(:, :), contiguous, pointer :: coefficients type(c_ptr) :: c_buf - real(PFLARE_PETSCREAL_C_KIND), pointer :: c_view(:,:) - integer(PFLARE_PETSCINT_C_KIND) :: nr, nc + PetscReal, pointer :: c_view(:,:) + PetscInt :: nr, nc ! ~~~~~~~~ input_mat%v = input_mat_ptr @@ -178,9 +177,9 @@ end function c_malloc ! Fresh path: Fortran allocate may use a compiler-specific allocator ! (e.g. _mm_malloc on Intel) that is incompatible with C free(). ! Copy the data into a C-malloc'd buffer so the C side can safely free() it. - nr = int(size(coefficients, 1), PFLARE_PETSCINT_C_KIND) - nc = int(size(coefficients, 2), PFLARE_PETSCINT_C_KIND) - c_buf = c_malloc(int(nr, c_size_t) * int(nc, c_size_t) * int(PFLARE_PETSCREAL_C_KIND, c_size_t)) + nr = int(size(coefficients, 1), PETSC_INT_KIND) + nc = int(size(coefficients, 2), PETSC_INT_KIND) + c_buf = c_malloc(int(nr, c_size_t) * int(nc, c_size_t) * int(PETSC_REAL_KIND, c_size_t)) call c_f_pointer(c_buf, c_view, [int(nr), int(nc)]) c_view = coefficients ! For non-matrix-free: the matshell does not exist, so the Fortran allocation diff --git a/src/C_PETSc_Interfaces.F90 b/src/C_PETSc_Interfaces.F90 index d13bfb6b..0b0bdb06 100644 --- a/src/C_PETSc_Interfaces.F90 +++ b/src/C_PETSc_Interfaces.F90 @@ -4,7 +4,6 @@ module c_petsc_interfaces use petscsys #include "petsc/finclude/petscsys.h" -#include "finclude/PETSc_ISO_Types.h" implicit none @@ -161,8 +160,8 @@ subroutine allreducesum_petscint_mine(A_array, first_int, return_int) & bind(c, name="allreducesum_petscint_mine") use iso_c_binding integer(c_long_long) :: A_array - integer(PFLARE_PETSCINT_C_KIND), value :: first_int - integer(PFLARE_PETSCINT_C_KIND) :: return_int + PetscInt, value :: first_int + PetscInt :: return_int end subroutine allreducesum_petscint_mine @@ -173,9 +172,9 @@ end subroutine allreducesum_petscint_mine subroutine GenerateIS_ProcAgglomeration_c(proc_stride, global_size, local_size_reduced, start) & bind(c, name="GenerateIS_ProcAgglomeration_c") use iso_c_binding - integer(PFLARE_PETSCINT_C_KIND), value :: proc_stride - integer(PFLARE_PETSCINT_C_KIND), value :: global_size - integer(PFLARE_PETSCINT_C_KIND) :: local_size_reduced, start + PetscInt, value :: proc_stride + PetscInt, value :: global_size + PetscInt :: local_size_reduced, start end subroutine GenerateIS_ProcAgglomeration_c @@ -187,8 +186,8 @@ subroutine MatPartitioning_c(A_array, n_parts, proc_stride, index) & bind(c, name="MatPartitioning_c") use iso_c_binding integer(c_long_long) :: A_array - integer(PFLARE_PETSCINT_C_KIND), value :: n_parts - integer(PFLARE_PETSCINT_C_KIND) :: proc_stride + PetscInt, value :: n_parts + PetscInt :: proc_stride integer(c_long_long) :: index end subroutine MatPartitioning_c @@ -212,7 +211,7 @@ subroutine MatGetNNZs_local_c(A_array, nnzs) & bind(c, name="MatGetNNZs_local_c") use iso_c_binding integer(c_long_long) :: A_array - integer(PFLARE_PETSCINT_C_KIND) :: nnzs + PetscInt :: nnzs end subroutine MatGetNNZs_local_c end interface @@ -223,7 +222,7 @@ subroutine MatGetNNZs_both_c(A_array, nnzs_local, nnzs_nonlocal) & bind(c, name="MatGetNNZs_both_c") use iso_c_binding integer(c_long_long) :: A_array - integer(PFLARE_PETSCINT_C_KIND) :: nnzs_local, nnzs_nonlocal + PetscInt :: nnzs_local, nnzs_nonlocal end subroutine MatGetNNZs_both_c end interface @@ -245,7 +244,7 @@ subroutine PCGetSetupCalled_c(A_array, setupcalled) & bind(c, name="PCGetSetupCalled_c") use iso_c_binding integer(c_long_long) :: A_array - integer(PFLARE_PETSCINT_C_KIND) :: setupcalled + PetscInt :: setupcalled end subroutine PCGetSetupCalled_c end interface @@ -291,7 +290,7 @@ subroutine remove_small_from_sparse_kokkos(A_array, tol, B_array, & bind(c, name="remove_small_from_sparse_kokkos") use iso_c_binding integer(c_long_long) :: A_array - real(PFLARE_PETSCREAL_C_KIND), value :: tol + PetscReal, value :: tol integer(c_long_long) :: B_array integer(c_int), value :: relative_max_row_tolerance_int integer(c_int), value :: lump_int @@ -308,7 +307,7 @@ subroutine remove_from_sparse_match_kokkos(A_array, B_array, lump_int, alpha_int integer(c_long_long) :: A_array integer(c_long_long) :: B_array integer(c_int), value :: lump_int, alpha_int - real(PFLARE_PETSCREAL_C_KIND), value :: alpha + PetscReal, value :: alpha end subroutine remove_from_sparse_match_kokkos end interface @@ -319,7 +318,7 @@ subroutine MatSetAllValues_kokkos(A_array, val) & bind(c, name="MatSetAllValues_kokkos") use iso_c_binding integer(c_long_long) :: A_array - real(PFLARE_PETSCREAL_C_KIND), value :: val + PetscReal, value :: val end subroutine MatSetAllValues_kokkos end interface @@ -330,7 +329,7 @@ subroutine MatSetAllValues_cpu(A_array, val) & bind(c, name="MatSetAllValues_cpu") use iso_c_binding integer(c_long_long) :: A_array - real(PFLARE_PETSCREAL_C_KIND), value :: val + PetscReal, value :: val end subroutine MatSetAllValues_cpu end interface @@ -363,7 +362,7 @@ subroutine set_VecISCopyLocal_kokkos_our_level(handle, our_level, global_row_sta use iso_c_binding type(c_ptr), value :: handle integer(c_int), value :: our_level - integer(PFLARE_PETSCINT_C_KIND), value :: global_row_start + PetscInt, value :: global_row_start integer(c_long_long) :: index_fine integer(c_long_long) :: index_coarse end subroutine set_VecISCopyLocal_kokkos_our_level @@ -413,8 +412,8 @@ subroutine MatDiagDomRatio_kokkos(A_array, max_dd_ratio_achieved, local_rows_aff bind(c, name="MatDiagDomRatio_kokkos") use iso_c_binding integer(c_long_long) :: A_array - real(PFLARE_PETSCREAL_C_KIND) :: max_dd_ratio_achieved - integer(PFLARE_PETSCINT_C_KIND) :: local_rows_aff + PetscReal :: max_dd_ratio_achieved + PetscInt :: local_rows_aff end subroutine MatDiagDomRatio_kokkos end interface @@ -426,9 +425,9 @@ subroutine ddc_kokkos(A_array, fraction_swap, max_dd_ratio, max_dd_ratio_achieve bind(c, name="ddc_kokkos") use iso_c_binding integer(c_long_long) :: A_array - real(PFLARE_PETSCREAL_C_KIND), value :: fraction_swap - real(PFLARE_PETSCREAL_C_KIND), value :: max_dd_ratio - real(PFLARE_PETSCREAL_C_KIND), value :: max_dd_ratio_achieved + PetscReal, value :: fraction_swap + PetscReal, value :: max_dd_ratio + PetscReal, value :: max_dd_ratio_achieved integer(c_long_long) :: Aff_array type(c_ptr), value :: random_numbers_ptr end subroutine ddc_kokkos @@ -481,7 +480,7 @@ subroutine compute_P_from_W_kokkos(A_array, global_row_start, indices_fine, & use iso_c_binding integer(c_long_long) :: A_array, indices_fine, indices_coarse integer(c_long_long) :: B_array - integer(PFLARE_PETSCINT_C_KIND), value :: global_row_start + PetscInt, value :: global_row_start integer(c_int), value :: identity_int, reuse_int end subroutine compute_P_from_W_kokkos @@ -505,7 +504,7 @@ subroutine compute_R_from_Z_kokkos(A_array, global_row_start, indices_fine, & use iso_c_binding integer(c_long_long) :: A_array, indices_fine, indices_coarse, indices_orig integer(c_long_long) :: B_array - integer(PFLARE_PETSCINT_C_KIND), value :: global_row_start + PetscInt, value :: global_row_start integer(c_int), value :: identity_int, reuse_int, reuse_indices_int end subroutine compute_R_from_Z_kokkos @@ -589,7 +588,7 @@ subroutine MatAXPY_kokkos(A_array, alpha, B_array) & use iso_c_binding integer(c_long_long) :: A_array integer(c_long_long) :: B_array - PFLARE_PETSCSCALAR_C_TYPE, value :: alpha + PetscScalar, value :: alpha end subroutine MatAXPY_kokkos end interface diff --git a/src/DDC_Module.F90 b/src/DDC_Module.F90 index 4204f3fa..c3da5828 100644 --- a/src/DDC_Module.F90 +++ b/src/DDC_Module.F90 @@ -11,7 +11,6 @@ module ddc_module use matdiagdom, only: MatDiagDomRatio #include "petsc/finclude/petscmat.h" -#include "finclude/PETSc_ISO_Types.h" implicit none diff --git a/src/MatDiagDom.F90 b/src/MatDiagDom.F90 index 21bfea18..99cacf8f 100644 --- a/src/MatDiagDom.F90 +++ b/src/MatDiagDom.F90 @@ -8,7 +8,6 @@ module matdiagdom use pflare_parameters, only: C_POINT, F_POINT #include "petsc/finclude/petscmat.h" -#include "finclude/PETSc_ISO_Types.h" implicit none diff --git a/src/PCAIR_C_Fortran_Bindings.F90 b/src/PCAIR_C_Fortran_Bindings.F90 index 68edd8d6..62464302 100644 --- a/src/PCAIR_C_Fortran_Bindings.F90 +++ b/src/PCAIR_C_Fortran_Bindings.F90 @@ -6,7 +6,6 @@ module pcair_c_fortran_bindings #include "petsc/finclude/petscksp.h" #include "finclude/pflare_types.h" -#include "finclude/PETSc_ISO_Types.h" implicit none @@ -26,7 +25,7 @@ subroutine PCAIRGetPrintStatsTimings_c(pc_ptr, print_stats) bind(C, name='PCAIRG ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: print_stats + PetscBool, intent(out) :: print_stats type(tPC) :: pc PetscErrorCode :: ierr @@ -46,7 +45,7 @@ subroutine PCAIRGetMaxLevels_c(pc_ptr, max_levels) bind(C, name='PCAIRGetMaxLeve ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: max_levels + PetscInt, intent(out) :: max_levels type(tPC) :: pc PetscErrorCode :: ierr @@ -63,7 +62,7 @@ subroutine PCAIRGetCoarseEqLimit_c(pc_ptr, coarse_eq_limit) bind(C, name='PCAIRG ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: coarse_eq_limit + PetscInt, intent(out) :: coarse_eq_limit type(tPC) :: pc PetscErrorCode :: ierr @@ -80,7 +79,7 @@ subroutine PCAIRGetAutoTruncateStartLevel_c(pc_ptr, start_level) bind(C, name='P ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: start_level + PetscInt, intent(out) :: start_level type(tPC) :: pc PetscErrorCode :: ierr @@ -97,7 +96,7 @@ subroutine PCAIRGetAutoTruncateTol_c(pc_ptr, tol) bind(C, name='PCAIRGetAutoTrun ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: tol + PetscReal, intent(out) :: tol type(tPC) :: pc PetscErrorCode :: ierr @@ -114,7 +113,7 @@ subroutine PCAIRGetNumLevels_c(pc_ptr, num_levels) bind(C, name='PCAIRGetNumLeve ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: num_levels + PetscInt, intent(out) :: num_levels type(tPC) :: pc PetscErrorCode :: ierr @@ -131,7 +130,7 @@ subroutine PCAIRGetProcessorAgglom_c(pc_ptr, processor_agglom) bind(C, name='PCA ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: processor_agglom + PetscBool, intent(out) :: processor_agglom type(tPC) :: pc PetscErrorCode :: ierr @@ -151,7 +150,7 @@ subroutine PCAIRGetProcessorAgglomRatio_c(pc_ptr, ratio) bind(C, name='PCAIRGetP ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: ratio + PetscReal, intent(out) :: ratio type(tPC) :: pc PetscErrorCode :: ierr @@ -168,7 +167,7 @@ subroutine PCAIRGetProcessorAgglomFactor_c(pc_ptr, factor) bind(C, name='PCAIRGe ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: factor + PetscInt, intent(out) :: factor type(tPC) :: pc PetscErrorCode :: ierr @@ -185,7 +184,7 @@ subroutine PCAIRGetProcessEqLimit_c(pc_ptr, limit) bind(C, name='PCAIRGetProcess ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: limit + PetscInt, intent(out) :: limit type(tPC) :: pc PetscErrorCode :: ierr @@ -202,7 +201,7 @@ subroutine PCAIRGetSubcomm_c(pc_ptr, subcomm) bind(C, name='PCAIRGetSubcomm_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: subcomm + PetscBool, intent(out) :: subcomm type(tPC) :: pc PetscErrorCode :: ierr @@ -222,7 +221,7 @@ subroutine PCAIRGetStrongThreshold_c(pc_ptr, thresh) bind(C, name='PCAIRGetStron ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: thresh + PetscReal, intent(out) :: thresh type(tPC) :: pc PetscErrorCode :: ierr @@ -239,7 +238,7 @@ subroutine PCAIRGetDDCIts_c(pc_ptr, its) bind(C, name='PCAIRGetDDCIts_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: its + PetscInt, intent(out) :: its type(tPC) :: pc PetscErrorCode :: ierr @@ -256,7 +255,7 @@ subroutine PCAIRGetDDCFraction_c(pc_ptr, frac) bind(C, name='PCAIRGetDDCFraction ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: frac + PetscReal, intent(out) :: frac type(tPC) :: pc PetscErrorCode :: ierr @@ -290,7 +289,7 @@ subroutine PCAIRGetMaxLubySteps_c(pc_ptr, steps) bind(C, name='PCAIRGetMaxLubySt ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: steps + PetscInt, intent(out) :: steps type(tPC) :: pc PetscErrorCode :: ierr @@ -307,7 +306,7 @@ subroutine PCAIRGetDiagScalePolys_c(pc_ptr, scale) bind(C, name='PCAIRGetDiagSca ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: scale + PetscBool, intent(out) :: scale type(tPC) :: pc @@ -328,7 +327,7 @@ subroutine PCAIRGetMatrixFreePolys_c(pc_ptr, mf) bind(C, name='PCAIRGetMatrixFre ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: mf + PetscBool, intent(out) :: mf type(tPC) :: pc PetscErrorCode :: ierr @@ -348,7 +347,7 @@ subroutine PCAIRGetOnePointClassicalProlong_c(pc_ptr, onep) bind(C, name='PCAIRG ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: onep + PetscBool, intent(out) :: onep type(tPC) :: pc PetscErrorCode :: ierr @@ -368,7 +367,7 @@ subroutine PCAIRGetFullSmoothingUpAndDown_c(pc_ptr, full) bind(C, name='PCAIRGet ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: full + PetscBool, intent(out) :: full type(tPC) :: pc PetscErrorCode :: ierr @@ -388,7 +387,7 @@ subroutine PCAIRGetSymmetric_c(pc_ptr, sym) bind(C, name='PCAIRGetSymmetric_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: sym + PetscBool, intent(out) :: sym type(tPC) :: pc PetscErrorCode :: ierr @@ -408,7 +407,7 @@ subroutine PCAIRGetConstrainW_c(pc_ptr, constrain) bind(C, name='PCAIRGetConstra ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: constrain + PetscBool, intent(out) :: constrain type(tPC) :: pc PetscErrorCode :: ierr @@ -428,7 +427,7 @@ subroutine PCAIRGetConstrainZ_c(pc_ptr, constrain) bind(C, name='PCAIRGetConstra ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: constrain + PetscBool, intent(out) :: constrain type(tPC) :: pc PetscErrorCode :: ierr @@ -448,7 +447,7 @@ subroutine PCAIRGetImproveWIts_c(pc_ptr, its) bind(C, name='PCAIRGetImproveWIts_ ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: its + PetscInt, intent(out) :: its type(tPC) :: pc PetscErrorCode :: ierr @@ -465,7 +464,7 @@ subroutine PCAIRGetImproveZIts_c(pc_ptr, its) bind(C, name='PCAIRGetImproveZIts_ ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: its + PetscInt, intent(out) :: its type(tPC) :: pc PetscErrorCode :: ierr @@ -482,7 +481,7 @@ subroutine PCAIRGetStrongRThreshold_c(pc_ptr, thresh) bind(C, name='PCAIRGetStro ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: thresh + PetscReal, intent(out) :: thresh type(tPC) :: pc PetscErrorCode :: ierr @@ -550,7 +549,7 @@ subroutine PCAIRGetLairDistance_c(pc_ptr, distance) bind(C, name='PCAIRGetLairDi ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: distance + PetscInt, intent(out) :: distance type(tPC) :: pc PetscErrorCode :: ierr @@ -567,7 +566,7 @@ subroutine PCAIRGetPolyOrder_c(pc_ptr, order) bind(C, name='PCAIRGetPolyOrder_c' ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: order + PetscInt, intent(out) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -584,7 +583,7 @@ subroutine PCAIRGetInverseSparsityOrder_c(pc_ptr, order) bind(C, name='PCAIRGetI ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: order + PetscInt, intent(out) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -601,7 +600,7 @@ subroutine PCAIRGetCPolyOrder_c(pc_ptr, order) bind(C, name='PCAIRGetCPolyOrder_ ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: order + PetscInt, intent(out) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -618,7 +617,7 @@ subroutine PCAIRGetCInverseSparsityOrder_c(pc_ptr, order) bind(C, name='PCAIRGet ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: order + PetscInt, intent(out) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -652,7 +651,7 @@ subroutine PCAIRGetCoarsestPolyOrder_c(pc_ptr, order) bind(C, name='PCAIRGetCoar ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: order + PetscInt, intent(out) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -669,7 +668,7 @@ subroutine PCAIRGetCoarsestInverseSparsityOrder_c(pc_ptr, order) bind(C, name='P ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: order + PetscInt, intent(out) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -686,7 +685,7 @@ subroutine PCAIRGetCoarsestMatrixFreePolys_c(pc_ptr, mf) bind(C, name='PCAIRGetC ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: mf + PetscBool, intent(out) :: mf type(tPC) :: pc PetscErrorCode :: ierr @@ -706,7 +705,7 @@ subroutine PCAIRGetCoarsestDiagScalePolys_c(pc_ptr, scale) bind(C, name='PCAIRGe ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: scale + PetscBool, intent(out) :: scale type(tPC) :: pc PetscErrorCode :: ierr @@ -726,7 +725,7 @@ subroutine PCAIRGetCoarsestSubcomm_c(pc_ptr, subcomm) bind(C, name='PCAIRGetCoar ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: subcomm + PetscBool, intent(out) :: subcomm type(tPC) :: pc PetscErrorCode :: ierr @@ -746,7 +745,7 @@ subroutine PCAIRGetRDrop_c(pc_ptr, rdrop) bind(C, name='PCAIRGetRDrop_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: rdrop + PetscReal, intent(out) :: rdrop type(tPC) :: pc PetscErrorCode :: ierr @@ -763,7 +762,7 @@ subroutine PCAIRGetADrop_c(pc_ptr, adrop) bind(C, name='PCAIRGetADrop_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: adrop + PetscReal, intent(out) :: adrop type(tPC) :: pc PetscErrorCode :: ierr @@ -780,7 +779,7 @@ subroutine PCAIRGetGridComplexity_c(pc_ptr, complexity) bind(C, name='PCAIRGetGr ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: complexity + PetscReal, intent(out) :: complexity type(tPC) :: pc PetscErrorCode :: ierr @@ -797,7 +796,7 @@ subroutine PCAIRGetOperatorComplexity_c(pc_ptr, complexity) bind(C, name='PCAIRG ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: complexity + PetscReal, intent(out) :: complexity type(tPC) :: pc PetscErrorCode :: ierr @@ -814,7 +813,7 @@ subroutine PCAIRGetCycleComplexity_c(pc_ptr, complexity) bind(C, name='PCAIRGetC ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: complexity + PetscReal, intent(out) :: complexity type(tPC) :: pc PetscErrorCode :: ierr @@ -831,7 +830,7 @@ subroutine PCAIRGetStorageComplexity_c(pc_ptr, complexity) bind(C, name='PCAIRGe ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: complexity + PetscReal, intent(out) :: complexity type(tPC) :: pc PetscErrorCode :: ierr @@ -848,7 +847,7 @@ subroutine PCAIRGetReuseStorageComplexity_c(pc_ptr, complexity) bind(C, name='PC ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), intent(out) :: complexity + PetscReal, intent(out) :: complexity type(tPC) :: pc PetscErrorCode :: ierr @@ -865,7 +864,7 @@ subroutine PCAIRGetALump_c(pc_ptr, lump) bind(C, name='PCAIRGetALump_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: lump + PetscBool, intent(out) :: lump type(tPC) :: pc PetscErrorCode :: ierr @@ -885,7 +884,7 @@ subroutine PCAIRGetReuseSparsity_c(pc_ptr, reuse) bind(C, name='PCAIRGetReuseSpa ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: reuse + PetscBool, intent(out) :: reuse type(tPC) :: pc PetscErrorCode :: ierr @@ -905,7 +904,7 @@ subroutine PCAIRGetReusePolyCoeffs_c(pc_ptr, reuse) bind(C, name='PCAIRGetReuseP ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, intent(out) :: reuse + PetscBool, intent(out) :: reuse type(tPC) :: pc PetscErrorCode :: ierr @@ -930,15 +929,15 @@ subroutine PCAIRGetPolyCoeffs_c(pc_ptr, petsc_level, which_inverse, & ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: petsc_level + PetscInt, value, intent(in) :: petsc_level integer(c_int), value, intent(in) :: which_inverse - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: row_size, col_size + PetscInt, intent(out) :: row_size, col_size type(c_ptr), intent(out) :: coeffs_ptr type(tPC) :: pc PetscErrorCode :: ierr integer :: our_level, errorcode - integer(PFLARE_PETSCINT_C_KIND) :: num_levels + PetscInt :: num_levels type(tPC) :: pc_shell type(pc_air_multigrid_data), pointer :: pc_air_data=>null() @@ -1010,7 +1009,7 @@ subroutine PCAIRSetPrintStatsTimings_c(pc_ptr, print_stats) bind(C, name='PCAIRS ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: print_stats + PetscBool, value, intent(in) :: print_stats type(tPC) :: pc PetscErrorCode :: ierr @@ -1030,7 +1029,7 @@ subroutine PCAIRSetMaxLevels_c(pc_ptr, max_levels) bind(C, name='PCAIRSetMaxLeve ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: max_levels + PetscInt, value, intent(in) :: max_levels type(tPC) :: pc PetscErrorCode :: ierr @@ -1047,7 +1046,7 @@ subroutine PCAIRSetCoarseEqLimit_c(pc_ptr, coarse_eq_limit) bind(C, name='PCAIRS ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: coarse_eq_limit + PetscInt, value, intent(in) :: coarse_eq_limit type(tPC) :: pc PetscErrorCode :: ierr @@ -1064,7 +1063,7 @@ subroutine PCAIRSetAutoTruncateStartLevel_c(pc_ptr, start_level) bind(C, name='P ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: start_level + PetscInt, value, intent(in) :: start_level type(tPC) :: pc PetscErrorCode :: ierr @@ -1081,7 +1080,7 @@ subroutine PCAIRSetAutoTruncateTol_c(pc_ptr, tol) bind(C, name='PCAIRSetAutoTrun ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: tol + PetscReal, value, intent(in) :: tol type(tPC) :: pc PetscErrorCode :: ierr @@ -1098,7 +1097,7 @@ subroutine PCAIRSetProcessorAgglom_c(pc_ptr, processor_agglom) bind(C, name='PCA ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: processor_agglom + PetscBool, value, intent(in) :: processor_agglom type(tPC) :: pc PetscErrorCode :: ierr @@ -1118,7 +1117,7 @@ subroutine PCAIRSetProcessorAgglomRatio_c(pc_ptr, ratio) bind(C, name='PCAIRSetP ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: ratio + PetscReal, value, intent(in) :: ratio type(tPC) :: pc PetscErrorCode :: ierr @@ -1135,7 +1134,7 @@ subroutine PCAIRSetProcessorAgglomFactor_c(pc_ptr, factor) bind(C, name='PCAIRSe ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: factor + PetscInt, value, intent(in) :: factor type(tPC) :: pc PetscErrorCode :: ierr @@ -1152,7 +1151,7 @@ subroutine PCAIRSetProcessEqLimit_c(pc_ptr, limit) bind(C, name='PCAIRSetProcess ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: limit + PetscInt, value, intent(in) :: limit type(tPC) :: pc PetscErrorCode :: ierr @@ -1169,7 +1168,7 @@ subroutine PCAIRSetSubcomm_c(pc_ptr, subcomm) bind(C, name='PCAIRSetSubcomm_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: subcomm + PetscBool, value, intent(in) :: subcomm type(tPC) :: pc PetscErrorCode :: ierr @@ -1189,7 +1188,7 @@ subroutine PCAIRSetStrongThreshold_c(pc_ptr, thresh) bind(C, name='PCAIRSetStron ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: thresh + PetscReal, value, intent(in) :: thresh type(tPC) :: pc PetscErrorCode :: ierr @@ -1206,7 +1205,7 @@ subroutine PCAIRSetDDCIts_c(pc_ptr, its) bind(C, name='PCAIRSetDDCIts_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: its + PetscInt, value, intent(in) :: its type(tPC) :: pc PetscErrorCode :: ierr @@ -1223,7 +1222,7 @@ subroutine PCAIRSetDDCFraction_c(pc_ptr, frac) bind(C, name='PCAIRSetDDCFraction ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: frac + PetscReal, value, intent(in) :: frac type(tPC) :: pc PetscErrorCode :: ierr @@ -1257,7 +1256,7 @@ subroutine PCAIRSetMaxLubySteps_c(pc_ptr, steps) bind(C, name='PCAIRSetMaxLubySt ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: steps + PetscInt, value, intent(in) :: steps type(tPC) :: pc PetscErrorCode :: ierr @@ -1340,7 +1339,7 @@ subroutine PCAIRSetDiagScalePolys_c(pc_ptr, scale) bind(C, name='PCAIRSetDiagSca ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: scale + PetscBool, value, intent(in) :: scale type(tPC) :: pc PetscErrorCode :: ierr @@ -1360,7 +1359,7 @@ subroutine PCAIRSetMatrixFreePolys_c(pc_ptr, mf) bind(C, name='PCAIRSetMatrixFre ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: mf + PetscBool, value, intent(in) :: mf type(tPC) :: pc PetscErrorCode :: ierr @@ -1380,7 +1379,7 @@ subroutine PCAIRSetOnePointClassicalProlong_c(pc_ptr, onep) bind(C, name='PCAIRS ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: onep + PetscBool, value, intent(in) :: onep type(tPC) :: pc PetscErrorCode :: ierr @@ -1400,7 +1399,7 @@ subroutine PCAIRSetFullSmoothingUpAndDown_c(pc_ptr, full) bind(C, name='PCAIRSet ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: full + PetscBool, value, intent(in) :: full type(tPC) :: pc PetscErrorCode :: ierr @@ -1420,7 +1419,7 @@ subroutine PCAIRSetSymmetric_c(pc_ptr, sym) bind(C, name='PCAIRSetSymmetric_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: sym + PetscBool, value, intent(in) :: sym type(tPC) :: pc PetscErrorCode :: ierr @@ -1440,7 +1439,7 @@ subroutine PCAIRSetConstrainW_c(pc_ptr, constrain) bind(C, name='PCAIRSetConstra ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: constrain + PetscBool, value, intent(in) :: constrain type(tPC) :: pc PetscErrorCode :: ierr @@ -1460,7 +1459,7 @@ subroutine PCAIRSetConstrainZ_c(pc_ptr, constrain) bind(C, name='PCAIRSetConstra ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: constrain + PetscBool, value, intent(in) :: constrain type(tPC) :: pc PetscErrorCode :: ierr @@ -1480,7 +1479,7 @@ subroutine PCAIRSetImproveWIts_c(pc_ptr, its) bind(C, name='PCAIRSetImproveWIts_ ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: its + PetscInt, value, intent(in) :: its type(tPC) :: pc PetscErrorCode :: ierr @@ -1497,7 +1496,7 @@ subroutine PCAIRSetImproveZIts_c(pc_ptr, its) bind(C, name='PCAIRSetImproveZIts_ ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: its + PetscInt, value, intent(in) :: its type(tPC) :: pc PetscErrorCode :: ierr @@ -1514,7 +1513,7 @@ subroutine PCAIRSetStrongRThreshold_c(pc_ptr, thresh) bind(C, name='PCAIRSetStro ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: thresh + PetscReal, value, intent(in) :: thresh type(tPC) :: pc PetscErrorCode :: ierr @@ -1582,7 +1581,7 @@ subroutine PCAIRSetLairDistance_c(pc_ptr, distance) bind(C, name='PCAIRSetLairDi ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: distance + PetscInt, value, intent(in) :: distance type(tPC) :: pc PetscErrorCode :: ierr @@ -1599,7 +1598,7 @@ subroutine PCAIRSetPolyOrder_c(pc_ptr, order) bind(C, name='PCAIRSetPolyOrder_c' ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: order + PetscInt, value, intent(in) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -1616,7 +1615,7 @@ subroutine PCAIRSetInverseSparsityOrder_c(pc_ptr, order) bind(C, name='PCAIRSetI ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: order + PetscInt, value, intent(in) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -1633,7 +1632,7 @@ subroutine PCAIRSetCPolyOrder_c(pc_ptr, order) bind(C, name='PCAIRSetCPolyOrder_ ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: order + PetscInt, value, intent(in) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -1650,7 +1649,7 @@ subroutine PCAIRSetCInverseSparsityOrder_c(pc_ptr, order) bind(C, name='PCAIRSet ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: order + PetscInt, value, intent(in) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -1684,7 +1683,7 @@ subroutine PCAIRSetCoarsestPolyOrder_c(pc_ptr, order) bind(C, name='PCAIRSetCoar ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: order + PetscInt, value, intent(in) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -1701,7 +1700,7 @@ subroutine PCAIRSetCoarsestInverseSparsityOrder_c(pc_ptr, order) bind(C, name='P ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: order + PetscInt, value, intent(in) :: order type(tPC) :: pc PetscErrorCode :: ierr @@ -1718,7 +1717,7 @@ subroutine PCAIRSetCoarsestMatrixFreePolys_c(pc_ptr, mf) bind(C, name='PCAIRSetC ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: mf + PetscBool, value, intent(in) :: mf type(tPC) :: pc PetscErrorCode :: ierr @@ -1738,7 +1737,7 @@ subroutine PCAIRSetCoarsestDiagScalePolys_c(pc_ptr, scale) bind(C, name='PCAIRSe ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: scale + PetscBool, value, intent(in) :: scale type(tPC) :: pc PetscErrorCode :: ierr @@ -1758,7 +1757,7 @@ subroutine PCAIRSetCoarsestSubcomm_c(pc_ptr, subcomm) bind(C, name='PCAIRSetCoar ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: subcomm + PetscBool, value, intent(in) :: subcomm type(tPC) :: pc PetscErrorCode :: ierr @@ -1778,7 +1777,7 @@ subroutine PCAIRSetRDrop_c(pc_ptr, rdrop) bind(C, name='PCAIRSetRDrop_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: rdrop + PetscReal, value, intent(in) :: rdrop type(tPC) :: pc PetscErrorCode :: ierr @@ -1795,7 +1794,7 @@ subroutine PCAIRSetADrop_c(pc_ptr, adrop) bind(C, name='PCAIRSetADrop_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - real(PFLARE_PETSCREAL_C_KIND), value, intent(in) :: adrop + PetscReal, value, intent(in) :: adrop type(tPC) :: pc PetscErrorCode :: ierr @@ -1812,7 +1811,7 @@ subroutine PCAIRSetALump_c(pc_ptr, lump) bind(C, name='PCAIRSetALump_c') ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: lump + PetscBool, value, intent(in) :: lump type(tPC) :: pc PetscErrorCode :: ierr @@ -1832,7 +1831,7 @@ subroutine PCAIRSetReuseSparsity_c(pc_ptr, reuse) bind(C, name='PCAIRSetReuseSpa ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: reuse + PetscBool, value, intent(in) :: reuse type(tPC) :: pc PetscErrorCode :: ierr @@ -1852,7 +1851,7 @@ subroutine PCAIRSetReusePolyCoeffs_c(pc_ptr, reuse) bind(C, name='PCAIRSetReuseP ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - PFLARE_PETSCBOOL_C_TYPE, value, intent(in) :: reuse + PetscBool, value, intent(in) :: reuse type(tPC) :: pc PetscErrorCode :: ierr @@ -1872,7 +1871,7 @@ subroutine PCAIRGetReuseAmount_c(pc_ptr, amount) bind(C, name='PCAIRGetReuseAmou ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: amount + PetscInt, intent(out) :: amount type(tPC) :: pc PetscErrorCode :: ierr @@ -1891,7 +1890,7 @@ subroutine PCAIRSetReuseAmount_c(pc_ptr, amount) bind(C, name='PCAIRSetReuseAmou ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: amount + PetscInt, value, intent(in) :: amount type(tPC) :: pc PetscErrorCode :: ierr @@ -1909,18 +1908,18 @@ subroutine PCAIRSetPolyCoeffs_c(pc_ptr, petsc_level, which_inverse, & ! ~~~~~~~~ integer(c_long_long), intent(inout) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: petsc_level + PetscInt, value, intent(in) :: petsc_level integer(c_int), value, intent(in) :: which_inverse - integer(PFLARE_PETSCINT_C_KIND), value, intent(in) :: row_size, col_size + PetscInt, value, intent(in) :: row_size, col_size type(c_ptr), value, intent(in) :: coeffs_ptr type(tPC) :: pc PetscErrorCode :: ierr integer :: our_level, errorcode - integer(PFLARE_PETSCINT_C_KIND) :: num_levels, i_loc, j_loc + PetscInt :: num_levels, i_loc, j_loc type(tPC) :: pc_shell type(pc_air_multigrid_data), pointer :: pc_air_data=>null() - real(PFLARE_PETSCREAL_C_KIND), pointer :: coeffs_c(:,:) + PetscReal, pointer :: coeffs_c(:,:) ! ~~~~~~~~ diff --git a/src/PCPFLAREINV_Interfaces.F90 b/src/PCPFLAREINV_Interfaces.F90 index 69cd7dc8..07dbb738 100644 --- a/src/PCPFLAREINV_Interfaces.F90 +++ b/src/PCPFLAREINV_Interfaces.F90 @@ -5,7 +5,6 @@ module pcpflareinv_interfaces #include "petsc/finclude/petscksp.h" #include "finclude/pflare_types.h" -#include "finclude/PETSc_ISO_Types.h" implicit none @@ -27,8 +26,8 @@ function PCPFLAREINVGetPolyOrder_mine(A_array,b) & use iso_c_binding #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array - integer(PFLARE_PETSCINT_C_KIND) :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetPolyOrder_mine + PetscInt :: b + PetscErrorCode :: PCPFLAREINVGetPolyOrder_mine end function PCPFLAREINVGetPolyOrder_mine end interface @@ -38,8 +37,8 @@ function PCPFLAREINVGetSparsityOrder_mine(A_array,b) & use iso_c_binding #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array - integer(PFLARE_PETSCINT_C_KIND) :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetSparsityOrder_mine + PetscInt :: b + PetscErrorCode :: PCPFLAREINVGetSparsityOrder_mine end function PCPFLAREINVGetSparsityOrder_mine end interface @@ -50,7 +49,7 @@ function PCPFLAREINVGetType_mine(A_array,b) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_int) :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetType_mine + PetscErrorCode :: PCPFLAREINVGetType_mine end function PCPFLAREINVGetType_mine end interface @@ -61,7 +60,7 @@ function PCPFLAREINVGetMatrixFree_mine(A_array,b) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_int) :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetMatrixFree_mine + PetscErrorCode :: PCPFLAREINVGetMatrixFree_mine end function PCPFLAREINVGetMatrixFree_mine end interface @@ -70,12 +69,11 @@ function PCPFLAREINVGetPolyCoeffs_mine(A_array, coeffs_ptr, rows, cols) & bind(c, name="PCPFLAREINVGetPolyCoeffs") use iso_c_binding #include "finclude/pflare_types.h" -#include "finclude/PETSc_ISO_Types.h" integer(c_long_long), value :: A_array type(c_ptr), intent(out) :: coeffs_ptr - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: rows - integer(PFLARE_PETSCINT_C_KIND), intent(out) :: cols - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetPolyCoeffs_mine + PetscInt, intent(out) :: rows + PetscInt, intent(out) :: cols + PetscErrorCode :: PCPFLAREINVGetPolyCoeffs_mine end function PCPFLAREINVGetPolyCoeffs_mine end interface @@ -86,7 +84,7 @@ function PCPFLAREINVGetReusePolyCoeffs_mine(A_array, b) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_int), intent(out) :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetReusePolyCoeffs_mine + PetscErrorCode :: PCPFLAREINVGetReusePolyCoeffs_mine end function PCPFLAREINVGetReusePolyCoeffs_mine end interface @@ -97,7 +95,7 @@ function PCPFLAREINVGetInverseMat_mine(A_array, mat_array) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_long_long), intent(out) :: mat_array - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVGetInverseMat_mine + PetscErrorCode :: PCPFLAREINVGetInverseMat_mine end function PCPFLAREINVGetInverseMat_mine end interface @@ -111,8 +109,8 @@ function PCPFLAREINVSetPolyOrder_mine(A_array,b) & use iso_c_binding #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array - integer(PFLARE_PETSCINT_C_KIND), value :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVSetPolyOrder_mine + PetscInt, value :: b + PetscErrorCode :: PCPFLAREINVSetPolyOrder_mine end function PCPFLAREINVSetPolyOrder_mine end interface @@ -122,8 +120,8 @@ function PCPFLAREINVSetSparsityOrder_mine(A_array,b) & use iso_c_binding #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array - integer(PFLARE_PETSCINT_C_KIND), value :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVSetSparsityOrder_mine + PetscInt, value :: b + PetscErrorCode :: PCPFLAREINVSetSparsityOrder_mine end function PCPFLAREINVSetSparsityOrder_mine end interface @@ -134,7 +132,7 @@ function PCPFLAREINVSetType_mine(A_array,b) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_int), value :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVSetType_mine + PetscErrorCode :: PCPFLAREINVSetType_mine end function PCPFLAREINVSetType_mine end interface @@ -145,7 +143,7 @@ function PCPFLAREINVSetMatrixFree_mine(A_array,b) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_int), value :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVSetMatrixFree_mine + PetscErrorCode :: PCPFLAREINVSetMatrixFree_mine end function PCPFLAREINVSetMatrixFree_mine end interface @@ -154,12 +152,11 @@ function PCPFLAREINVSetPolyCoeffs_mine(A_array, coeffs_ptr, rows, cols) & bind(c, name="PCPFLAREINVSetPolyCoeffs") use iso_c_binding #include "finclude/pflare_types.h" -#include "finclude/PETSc_ISO_Types.h" integer(c_long_long), value :: A_array type(c_ptr), value :: coeffs_ptr - integer(PFLARE_PETSCINT_C_KIND), value :: rows - integer(PFLARE_PETSCINT_C_KIND), value :: cols - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVSetPolyCoeffs_mine + PetscInt, value :: rows + PetscInt, value :: cols + PetscErrorCode :: PCPFLAREINVSetPolyCoeffs_mine end function PCPFLAREINVSetPolyCoeffs_mine end interface @@ -170,7 +167,7 @@ function PCPFLAREINVSetReusePolyCoeffs_mine(A_array, b) & #include "finclude/pflare_types.h" integer(c_long_long), value :: A_array integer(c_int), value :: b - integer(PFLARE_PETSCERRORCODE_C_KIND) :: PCPFLAREINVSetReusePolyCoeffs_mine + PetscErrorCode :: PCPFLAREINVSetReusePolyCoeffs_mine end function PCPFLAREINVSetReusePolyCoeffs_mine end interface @@ -265,7 +262,6 @@ subroutine PCPFLAREINVGetPolyCoeffs(pc, coeffs, ierr) ! coeffs(:,1) = real roots (or power/arnoldi coefficients) ! coeffs(:,2) = imaginary roots (Newton basis only) -#include "finclude/PETSc_ISO_Types.h" ! ~~~~~~~~~~ type(tPC), intent(in) :: pc @@ -274,8 +270,8 @@ subroutine PCPFLAREINVGetPolyCoeffs(pc, coeffs, ierr) integer(c_long_long) :: pc_ptr type(c_ptr) :: coeffs_c_ptr - integer(PFLARE_PETSCINT_C_KIND) :: rows, cols - real(PFLARE_PETSCREAL_C_KIND), pointer :: coeffs_f(:,:) + PetscInt :: rows, cols + PetscReal, pointer :: coeffs_f(:,:) ! ~~~~~~~~~~ pc_ptr = pc%v @@ -435,7 +431,6 @@ subroutine PCPFLAREINVSetPolyCoeffs(pc, coeffs, ierr) ! PCPFLAREINVSetReusePolyCoeffs(pc, PETSC_TRUE) and then KSPSolve ! to apply them. -#include "finclude/PETSc_ISO_Types.h" ! ~~~~~~~~~~ type(tPC), intent(in) :: pc @@ -443,12 +438,12 @@ subroutine PCPFLAREINVSetPolyCoeffs(pc, coeffs, ierr) PetscErrorCode, intent(inout) :: ierr integer(c_long_long) :: pc_ptr - integer(PFLARE_PETSCINT_C_KIND) :: rows, cols + PetscInt :: rows, cols ! ~~~~~~~~~~ pc_ptr = pc%v - rows = int(size(coeffs, 1), PFLARE_PETSCINT_C_KIND) - cols = int(size(coeffs, 2), PFLARE_PETSCINT_C_KIND) + rows = int(size(coeffs, 1), PETSC_INT_KIND) + cols = int(size(coeffs, 2), PETSC_INT_KIND) ierr = PCPFLAREINVSetPolyCoeffs_mine(pc_ptr, c_loc(coeffs(1,1)), rows, cols) end subroutine PCPFLAREINVSetPolyCoeffs diff --git a/src/PMISR_Module.F90 b/src/PMISR_Module.F90 index e5916d28..0b1e3261 100644 --- a/src/PMISR_Module.F90 +++ b/src/PMISR_Module.F90 @@ -10,7 +10,6 @@ module pmisr_module use pflare_parameters, only: C_POINT, F_POINT #include "petsc/finclude/petscmat.h" -#include "finclude/PETSc_ISO_Types.h" implicit none @@ -292,8 +291,8 @@ subroutine pmisr_existing_measure_cf_markers(strength_mat, max_luby_steps, pmis, integer :: comm_rank, errorcode PetscErrorCode :: ierr MPIU_Comm :: MPI_COMM_MATRIX - PFLARE_PETSCBOOL_C_TYPE, dimension(:), allocatable :: in_set_this_loop - PFLARE_PETSCBOOL_C_TYPE, dimension(:), allocatable, target :: assigned_local, assigned_nonlocal + PetscBool, dimension(:), allocatable :: in_set_this_loop + PetscBool, dimension(:), allocatable, target :: assigned_local, assigned_nonlocal type(c_ptr) :: measure_nonlocal_ptr=c_null_ptr, assigned_local_ptr=c_null_ptr, assigned_nonlocal_ptr=c_null_ptr real(c_double), pointer :: measure_nonlocal(:) => null() type(tMat) :: Ad, Ao @@ -710,9 +709,9 @@ subroutine pmisr_existing_measure_implicit_transpose(strength_mat, max_luby_step integer :: comm_rank, errorcode PetscErrorCode :: ierr MPIU_Comm :: MPI_COMM_MATRIX - PFLARE_PETSCBOOL_C_TYPE, dimension(:), allocatable, target :: in_set_this_loop - PFLARE_PETSCBOOL_C_TYPE, dimension(:), allocatable, target :: assigned_local, assigned_nonlocal - PFLARE_PETSCBOOL_C_TYPE, dimension(:), allocatable, target :: veto_local, veto_nonlocal + PetscBool, dimension(:), allocatable, target :: in_set_this_loop + PetscBool, dimension(:), allocatable, target :: assigned_local, assigned_nonlocal + PetscBool, dimension(:), allocatable, target :: veto_local, veto_nonlocal type(c_ptr) :: measure_nonlocal_ptr=c_null_ptr, assigned_local_ptr=c_null_ptr, assigned_nonlocal_ptr=c_null_ptr type(c_ptr) :: veto_local_ptr=c_null_ptr, veto_nonlocal_ptr=c_null_ptr, in_set_ptr=c_null_ptr real(c_double), pointer :: measure_nonlocal(:) => null()