From 012c896cf7867e8f39e978296235f57da2a67dfa Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 26 Feb 2024 10:09:16 -0800 Subject: [PATCH] udpate fortran examples with correct int64_t usage --- .../ark_analytic_complex_f2003.f90 | 2 +- .../F2003_custom/ark_brusselator1D_f2003.f90 | 36 +++++++++---------- .../F2003_custom/fnvector_complex_mod.f90 | 12 +++---- .../F2003_custom/fnvector_fortran_mod.f90 | 24 ++++++------- .../F2003_custom/fsunlinsol_fortran_mod.f90 | 14 ++++---- .../F2003_custom/fsunmatrix_fortran_mod.f90 | 12 +++---- .../test_fnvector_complex_mod.f90 | 6 ++-- .../test_fnvector_fortran_mod.f90 | 10 +++--- .../test_fsunlinsol_fortran_mod.f90 | 8 ++--- .../test_fsunmatrix_fortran_mod.f90 | 16 ++++----- ...ark_brusselator1D_task_local_nls_f2003.f90 | 14 ++++---- .../F2003_serial/ark_analytic_f2003.f90 | 2 +- .../arkode/F2003_serial/ark_kpr_mri_f2003.f90 | 2 +- .../F2003_serial/cv_analytic_fp_f2003.f90 | 2 +- .../cv_analytic_sys_dns_f2003.f90 | 2 +- .../cv_analytic_sys_dns_jac_f2003.f90 | 2 +- .../cv_analytic_sys_klu_f2003.f90 | 6 ++-- .../F2003_serial/cv_brusselator_dns_f2003.f90 | 2 +- .../F2003_serial/cvsAdvDiff_FSA_non_f2003.f90 | 4 +-- .../F2003_serial/cvs_analytic_fp_f2003.f90 | 2 +- .../ida/F2003_serial/idaHeat2D_kry_f2003.f90 | 6 ++-- .../ida/F2003_serial/idaRoberts_dns_f2003.f90 | 2 +- .../idasAkzoNob_ASAi_dns_f2003.f90 | 2 +- .../F2003_serial/idasHeat2D_kry_f2003.f90 | 6 ++-- .../F2003_serial/kinLaplace_bnd_f2003.f90 | 12 +++---- .../kinLaplace_picard_kry_f2003.f90 | 14 ++++---- .../F2003_serial/kinRoboKin_dns_f2003.f90 | 4 +-- .../C_openmp/test_fnvector_openmp_mod.f90 | 8 ++--- .../test_fnvector_manyvector_mod.f90 | 12 +++---- .../test_fnvector_mpimanyvector_mod.f90 | 12 +++---- .../mpiplusx/test_fnvector_mpiplusx_mod.f90 | 6 ++-- .../parallel/test_fnvector_parallel_mod.f90 | 10 +++--- .../pthreads/test_fnvector_pthreads_mod.f90 | 8 ++--- .../serial/test_fnvector_serial_mod.f90 | 8 ++--- examples/nvector/test_nvector.f90 | 6 ++-- .../band/test_fsunlinsol_band_mod.f90 | 12 +++---- .../dense/test_fsunlinsol_dense_mod.f90 | 6 ++-- .../sunlinsol/klu/test_fsunlinsol_klu_mod.f90 | 6 ++-- .../test_fsunlinsol_lapackdense_mod.f90 | 6 ++-- .../serial/test_fsunlinsol_pcg_mod_serial.f90 | 12 +++---- .../test_fsunlinsol_spbcgs_mod_serial.f90 | 12 +++---- .../test_fsunlinsol_spfgmr_mod_serial.f90 | 12 +++---- .../test_fsunlinsol_spgmr_mod_serial.f90 | 12 +++---- .../test_fsunlinsol_sptfqmr_mod_serial.f90 | 12 +++---- examples/sunlinsol/test_sunlinsol.f90 | 4 +-- .../band/test_fsunmatrix_band_mod.f90 | 18 +++++----- .../dense/test_fsunmatrix_dense_mod.f90 | 12 +++---- .../sparse/test_fsunmatrix_sparse_mod.f90 | 20 +++++------ examples/sunmatrix/test_sunmatrix.f90 | 4 +-- .../test_fsunnonlinsol_fixedpoint_mod.f90 | 4 +-- .../newton/test_fsunnonlinsol_newton_mod.f90 | 4 +-- 51 files changed, 225 insertions(+), 225 deletions(-) diff --git a/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 b/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 index fc1e3c3c5d..16a904dcb9 100644 --- a/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 +++ b/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 @@ -39,7 +39,7 @@ module ode_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: neq = 1 + integer(c_int64_t), parameter :: neq = 1 integer(c_int), parameter :: Nt = 10 complex(c_double_complex), parameter :: lambda = (-1d-2, 10.d0) real(c_double), parameter :: T0 = 0.d0 diff --git a/examples/arkode/F2003_custom/ark_brusselator1D_f2003.f90 b/examples/arkode/F2003_custom/ark_brusselator1D_f2003.f90 index b67f1e9a43..fd1263401e 100644 --- a/examples/arkode/F2003_custom/ark_brusselator1D_f2003.f90 +++ b/examples/arkode/F2003_custom/ark_brusselator1D_f2003.f90 @@ -51,21 +51,21 @@ module ode_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: N = 201 ! number of intervals - integer(c_long), parameter :: Nt = 100 ! total number of output times - integer(c_long), parameter :: Nvar = 3 ! number of solution fields - integer(c_long), parameter :: neq = N*Nvar ! total size of solution vector - real(c_double), parameter :: dx = 1.d0/(N-1) ! mesh spacing - real(c_double), parameter :: a = 0.6d0 ! constant forcing on u - real(c_double), parameter :: b = 2.d0 ! steady-state value of w - real(c_double), parameter :: du = 0.001d0 ! diffusion coeff for u - real(c_double), parameter :: dv = 0.001d0 ! diffusion coeff for v - real(c_double), parameter :: dw = 0.001d0 ! diffusion coeff for w - real(c_double), parameter :: ep = 1.d-5 ! stiffness parameter - real(c_double), parameter :: T0 = 0.d0 ! initial time - real(c_double), parameter :: Tf = 10.d0 ! final time - real(c_double), parameter :: reltol = 1.d-6 ! solver tolerances - real(c_double), parameter :: abstol = 1.d-10 + integer(c_int64_t), parameter :: N = 201 ! number of intervals + integer(c_int64_t), parameter :: Nt = 100 ! total number of output times + integer(c_int64_t), parameter :: Nvar = 3 ! number of solution fields + integer(c_int64_t), parameter :: neq = N*Nvar ! total size of solution vector + real(c_double), parameter :: dx = 1.d0/(N-1) ! mesh spacing + real(c_double), parameter :: a = 0.6d0 ! constant forcing on u + real(c_double), parameter :: b = 2.d0 ! steady-state value of w + real(c_double), parameter :: du = 0.001d0 ! diffusion coeff for u + real(c_double), parameter :: dv = 0.001d0 ! diffusion coeff for v + real(c_double), parameter :: dw = 0.001d0 ! diffusion coeff for w + real(c_double), parameter :: ep = 1.d-5 ! stiffness parameter + real(c_double), parameter :: T0 = 0.d0 ! initial time + real(c_double), parameter :: Tf = 10.d0 ! final time + real(c_double), parameter :: reltol = 1.d-6 ! solver tolerances + real(c_double), parameter :: abstol = 1.d-10 contains @@ -97,7 +97,7 @@ integer(c_int) function RhsImplicit(tn, sunvec_y, sunvec_f, user_data) & ! local variables type(FVec), pointer :: y, f ! ptrs to Fortran vector data real(c_double) :: u, v, w - integer(c_long) :: i + integer(C_INT64_T) :: i !======= Internals ============ @@ -161,7 +161,7 @@ integer(c_int) function RhsExplicit(tn, sunvec_y, sunvec_f, user_data) & ! local variables type(FVec), pointer :: y, f ! ptrs to Fortran vector data real(c_double) :: dconst(3) - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j !======= Internals ============ @@ -221,7 +221,7 @@ integer(c_int) function JacFn(tn, sunvec_y, sunvec_f, sunmat_J, & type(FVec), pointer :: y, f ! ptrs to Fortran vector data type(FMat), pointer :: J ! ptr to Fortran matrix data real(c_double) :: u, v, w - integer(c_long) :: i + integer(C_INT64_T) :: i !======= Internals ============ diff --git a/examples/arkode/F2003_custom/fnvector_complex_mod.f90 b/examples/arkode/F2003_custom/fnvector_complex_mod.f90 index 5a4ce4548a..785164a562 100644 --- a/examples/arkode/F2003_custom/fnvector_complex_mod.f90 +++ b/examples/arkode/F2003_custom/fnvector_complex_mod.f90 @@ -24,7 +24,7 @@ module fnvector_complex_mod ! ---------------------------------------------------------------- type, public :: FVec logical :: own_data - integer(c_long) :: len + integer(C_INT64_T) :: len complex(c_double_complex), pointer :: data(:) end type FVec ! ---------------------------------------------------------------- @@ -35,7 +35,7 @@ module fnvector_complex_mod function FN_VNew_Complex(n, sunctx) result(sunvec_y) implicit none - integer(c_long), value :: n + integer(C_INT64_T), value :: n type(c_ptr), value :: sunctx type(N_Vector), pointer :: sunvec_y type(N_Vector_Ops), pointer :: ops @@ -88,7 +88,7 @@ end function FN_VNew_Complex function FN_VMake_Complex(n, data, sunctx) result(sunvec_y) implicit none - integer(c_long), value :: n + integer(C_INT64_T), value :: n type(c_ptr), value :: sunctx type(N_Vector), pointer :: sunvec_y type(N_Vector_Ops), pointer :: ops @@ -191,7 +191,7 @@ subroutine FN_VDestroy_Complex(sunvec_y) bind(C) end subroutine FN_VDestroy_Complex ! ---------------------------------------------------------------- - integer(c_long) function FN_VGetLength_Complex(sunvec_y) & + integer(C_INT64_T) function FN_VGetLength_Complex(sunvec_y) & bind(C) result(length) implicit none @@ -456,7 +456,7 @@ real(c_double) function FN_VWSqrSumMask_Complex(sunvec_x, sunvec_w, sunvec_id) & type(N_Vector) :: sunvec_w type(N_Vector) :: sunvec_id type(FVec), pointer :: x, w, id - integer(c_long) :: i + integer(C_INT64_T) :: i ! extract Fortran vector structures to work with x => FN_VGetFVec(sunvec_x) @@ -571,7 +571,7 @@ integer(c_int) function FN_VInvTest_Complex(sunvec_x, sunvec_z) & type(N_Vector) :: sunvec_x type(N_Vector) :: sunvec_z type(FVec), pointer :: x, z - integer(c_long) :: i + integer(C_INT64_T) :: i ! extract Fortran vector structures to work with x => FN_VGetFVec(sunvec_x) diff --git a/examples/arkode/F2003_custom/fnvector_fortran_mod.f90 b/examples/arkode/F2003_custom/fnvector_fortran_mod.f90 index 1f4b2851bc..f63052e2df 100644 --- a/examples/arkode/F2003_custom/fnvector_fortran_mod.f90 +++ b/examples/arkode/F2003_custom/fnvector_fortran_mod.f90 @@ -25,8 +25,8 @@ module fnvector_fortran_mod ! ---------------------------------------------------------------- type, public :: FVec logical :: own_data - integer(c_long) :: length1 - integer(c_long) :: length2 + integer(C_INT64_T) :: length1 + integer(C_INT64_T) :: length2 real(c_double), pointer :: data(:,:) end type FVec ! ---------------------------------------------------------------- @@ -36,8 +36,8 @@ module fnvector_fortran_mod ! ---------------------------------------------------------------- function FN_VNew_Fortran(n1, n2, sunctx) result(sunvec_y) implicit none - integer(c_long), value :: n1 - integer(c_long), value :: n2 + integer(C_INT64_T), value :: n1 + integer(C_INT64_T), value :: n2 type(c_ptr), value :: sunctx type(N_Vector), pointer :: sunvec_y type(N_Vector_Ops), pointer :: ops @@ -97,8 +97,8 @@ end function FN_VNew_Fortran ! ---------------------------------------------------------------- function FN_VMake_Fortran(n1, n2, data, sunctx) result(sunvec_y) implicit none - integer(c_long), value :: n1 - integer(c_long), value :: n2 + integer(C_INT64_T), value :: n1 + integer(C_INT64_T), value :: n2 type(c_ptr), value :: sunctx type(N_Vector), pointer :: sunvec_y type(N_Vector_Ops), pointer :: ops @@ -206,7 +206,7 @@ subroutine FN_VDestroy_Fortran(sunvec_y) bind(C) end subroutine FN_VDestroy_Fortran ! ---------------------------------------------------------------- - integer(c_long) function FN_VGetLength_Fortran(sunvec_y) & + integer(C_INT64_T) function FN_VGetLength_Fortran(sunvec_y) & bind(C) result(length) implicit none @@ -480,7 +480,7 @@ real(c_double) function FN_VWSqrSumMask_Fortran(sunvec_x, sunvec_w, sunvec_id) & type(N_Vector) :: sunvec_w type(N_Vector) :: sunvec_id type(FVec), pointer :: x, w, id - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j ! extract Fortran vector structures to work with x => FN_VGetFVec(sunvec_x) @@ -596,7 +596,7 @@ subroutine FN_VCompare_Fortran(c, sunvec_x, sunvec_z) bind(C) type(N_Vector) :: sunvec_x type(N_Vector) :: sunvec_z type(FVec), pointer :: x, z - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j ! extract Fortran vector structures to work with x => FN_VGetFVec(sunvec_x) @@ -624,7 +624,7 @@ integer(c_int) function FN_VInvTest_Fortran(sunvec_x, sunvec_z) & type(N_Vector) :: sunvec_x type(N_Vector) :: sunvec_z type(FVec), pointer :: x, z - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j ! extract Fortran vector structures to work with x => FN_VGetFVec(sunvec_x) @@ -654,7 +654,7 @@ integer(c_int) function FN_VConstrMask_Fortran(sunvec_c, sunvec_x, sunvec_m) & type(N_Vector) :: sunvec_x type(N_Vector) :: sunvec_m type(FVec), pointer :: c, x, m - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j logical :: test ! extract Fortran vector structures to work with @@ -692,7 +692,7 @@ real(c_double) function FN_VMinQuotient_Fortran(sunvec_n, sunvec_d) & type(N_Vector) :: sunvec_n type(N_Vector) :: sunvec_d type(FVec), pointer :: n, d - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j logical :: notEvenOnce ! extract Fortran vector structures to work with diff --git a/examples/arkode/F2003_custom/fsunlinsol_fortran_mod.f90 b/examples/arkode/F2003_custom/fsunlinsol_fortran_mod.f90 index 6939fa2795..1fa8eebd9e 100644 --- a/examples/arkode/F2003_custom/fsunlinsol_fortran_mod.f90 +++ b/examples/arkode/F2003_custom/fsunlinsol_fortran_mod.f90 @@ -30,9 +30,9 @@ module fsunlinsol_fortran_mod ! ---------------------------------------------------------------- type, public :: FLinSol - integer(c_long) :: Nvar - integer(c_long) :: N - integer(c_long), allocatable :: pivots(:,:) + integer(C_INT64_T) :: Nvar + integer(C_INT64_T) :: N + integer(C_INT64_T), allocatable :: pivots(:,:) end type FLinSol ! ---------------------------------------------------------------- @@ -42,8 +42,8 @@ module fsunlinsol_fortran_mod function FSUNLinSolNew_Fortran(Nvar, N, sunctx) result(sunls_S) implicit none - integer(c_long), value :: Nvar - integer(c_long), value :: N + integer(C_INT64_T), value :: Nvar + integer(C_INT64_T), value :: N type(c_ptr), value :: sunctx type(SUNLinearSolver), pointer :: sunls_S type(SUNLinearSolver_Ops), pointer :: ops @@ -135,7 +135,7 @@ integer(c_int) function FSUNLinSolSetup_Fortran(sunls_S, sunmat_A) & type(SUNMatrix) :: sunmat_A type(FLinSol), pointer :: S type(FMat), pointer :: AMat - integer(c_long) :: i, j, k, l + integer(C_INT64_T) :: i, j, k, l real(c_double) :: temp real(c_double), pointer :: A(:,:) @@ -214,7 +214,7 @@ integer(c_int) function FSUNLinSolSolve_Fortran(sunls_S, sunmat_A, & type(FLinSol), pointer :: S type(FMat), pointer :: AMat type(FVec), pointer :: xvec, bvec - integer(c_long) :: i, k, pk + integer(C_INT64_T) :: i, k, pk real(c_double) :: temp real(c_double), pointer :: A(:,:), x(:) diff --git a/examples/arkode/F2003_custom/fsunmatrix_fortran_mod.f90 b/examples/arkode/F2003_custom/fsunmatrix_fortran_mod.f90 index 88dfd5710d..af09703cc6 100644 --- a/examples/arkode/F2003_custom/fsunmatrix_fortran_mod.f90 +++ b/examples/arkode/F2003_custom/fsunmatrix_fortran_mod.f90 @@ -30,8 +30,8 @@ module fsunmatrix_fortran_mod ! ---------------------------------------------------------------- type, public :: FMat logical :: own_data - integer(c_long) :: Nvar - integer(c_long) :: N + integer(C_INT64_T) :: Nvar + integer(C_INT64_T) :: N real(c_double), pointer :: data(:,:,:) end type FMat ! ---------------------------------------------------------------- @@ -42,8 +42,8 @@ module fsunmatrix_fortran_mod function FSUNMatNew_Fortran(Nvar, N, sunctx) result(sunmat_A) implicit none - integer(c_long), value :: Nvar - integer(c_long), value :: N + integer(C_INT64_T), value :: Nvar + integer(C_INT64_T), value :: N type(c_ptr), value :: sunctx type(SUNMatrix), pointer :: sunmat_A type(SUNMatrix_Ops), pointer :: ops @@ -236,7 +236,7 @@ integer(c_int) function FSUNMatScaleAddI_Fortran(c, sunmat_A) & real(c_double), value :: c type(SUNMatrix) :: sunmat_A type(FMat), pointer :: A - integer(c_long) :: i, j, k + integer(C_INT64_T) :: i, j, k ! extract Fortran matrix structure to work with A => FSUNMatGetFMat(sunmat_A) @@ -267,7 +267,7 @@ integer(c_int) function FSUNMatMatvec_Fortran(sunmat_A, sunvec_x, sunvec_y) & type(N_Vector) :: sunvec_y type(FMat), pointer :: A type(FVec), pointer :: x, y - integer(c_long) :: i + integer(C_INT64_T) :: i ! extract Fortran matrix and vector structures to work with A => FSUNMatGetFMat(sunmat_A) diff --git a/examples/arkode/F2003_custom/test_fnvector_complex_mod.f90 b/examples/arkode/F2003_custom/test_fnvector_complex_mod.f90 index 28c5bb0410..b9cec621a6 100644 --- a/examples/arkode/F2003_custom/test_fnvector_complex_mod.f90 +++ b/examples/arkode/F2003_custom/test_fnvector_complex_mod.f90 @@ -29,10 +29,10 @@ integer(c_int) function check_ans(val, tol, N, sunvec_x) result(failure) implicit none complex(c_double_complex), value :: val real(c_double), value :: tol - integer(c_long), value :: N + integer(c_int64_t), value :: N Type(N_Vector) :: sunvec_x Type(FVec), pointer :: x - integer(c_long) :: i + integer(c_int64_t) :: i x => FN_VGetFVec(sunvec_x) failure = 0 @@ -58,7 +58,7 @@ program main ! local variables type(c_ptr) :: sunctx integer(c_int) :: fails, i, loc - integer(c_long), parameter :: N = 1000 + integer(c_int64_t), parameter :: N = 1000 type(N_Vector), pointer :: sU, sV, sW, sX, sY, sZ type(FVec), pointer :: U, V, W, X, Y, Z complex(c_double_complex) :: Udata(N) diff --git a/examples/arkode/F2003_custom/test_fnvector_fortran_mod.f90 b/examples/arkode/F2003_custom/test_fnvector_fortran_mod.f90 index 148f95212b..ac6e69c9d6 100644 --- a/examples/arkode/F2003_custom/test_fnvector_fortran_mod.f90 +++ b/examples/arkode/F2003_custom/test_fnvector_fortran_mod.f90 @@ -28,10 +28,10 @@ integer(c_int) function check_ans(val, tol, Nvar, N, sunvec_x) result(failure) implicit none real(c_double), value :: val, tol - integer(c_long), value :: Nvar, N + integer(c_int64_t), value :: Nvar, N Type(N_Vector) :: sunvec_x Type(FVec), pointer :: x - integer(c_long) :: i, j + integer(c_int64_t) :: i, j x => FN_VGetFVec(sunvec_x) failure = 0 @@ -59,9 +59,9 @@ program main ! local variables type(c_ptr) :: sunctx integer(c_int) :: fails - integer(c_long) :: i, j, loc - integer(c_long), parameter :: N = 1000 - integer(c_long), parameter :: Nvar = 10 + integer(c_int64_t) :: i, j, loc + integer(c_int64_t), parameter :: N = 1000 + integer(c_int64_t), parameter :: Nvar = 10 type(N_Vector), pointer :: sU, sV, sW, sX, sY, sZ type(FVec), pointer :: U, V, W, X, Y, Z real(c_double), allocatable :: Udata(:,:) diff --git a/examples/arkode/F2003_custom/test_fsunlinsol_fortran_mod.f90 b/examples/arkode/F2003_custom/test_fsunlinsol_fortran_mod.f90 index 508a1c74a3..15752897ce 100644 --- a/examples/arkode/F2003_custom/test_fsunlinsol_fortran_mod.f90 +++ b/examples/arkode/F2003_custom/test_fsunlinsol_fortran_mod.f90 @@ -31,10 +31,10 @@ integer(c_int) function check_vector(sunvec_x, sunvec_y, tol, Nvar, N) result(fa implicit none real(c_double), value :: tol - integer(c_long), value :: Nvar, N + integer(c_int64_t), value :: Nvar, N Type(N_Vector) :: sunvec_x, sunvec_y Type(FVec), pointer :: x, y - integer(c_long) :: i, j + integer(c_int64_t) :: i, j x => FN_VGetFVec(sunvec_x) y => FN_VGetFVec(sunvec_y) @@ -82,8 +82,8 @@ program main ! local variables type(c_ptr) :: sunctx integer(c_int) :: fails, retval, j, k - integer(c_long), parameter :: N = 1000 - integer(c_long), parameter :: Nvar = 50 + integer(c_int64_t), parameter :: N = 1000 + integer(c_int64_t), parameter :: Nvar = 50 type(SUNMatrix), pointer :: sA type(FMat), pointer :: A type(SUNLinearSolver), pointer :: LS diff --git a/examples/arkode/F2003_custom/test_fsunmatrix_fortran_mod.f90 b/examples/arkode/F2003_custom/test_fsunmatrix_fortran_mod.f90 index 740db810e1..da5fe15966 100644 --- a/examples/arkode/F2003_custom/test_fsunmatrix_fortran_mod.f90 +++ b/examples/arkode/F2003_custom/test_fsunmatrix_fortran_mod.f90 @@ -30,10 +30,10 @@ integer(c_int) function check_matrix(sunmat_A, sunmat_B, tol, Nvar, N) result(fa implicit none real(c_double), value :: tol - integer(c_long), value :: Nvar, N + integer(c_int64_t), value :: Nvar, N Type(SUNMatrix) :: sunmat_A, sunmat_B Type(FMat), pointer :: A, B - integer(c_long) :: i, j, k + integer(c_int64_t) :: i, j, k A => FSUNMatGetFMat(sunmat_A) B => FSUNMatGetFMat(sunmat_B) @@ -53,10 +53,10 @@ integer(c_int) function check_matrix_entry(sunmat_A, val, tol, Nvar, N) result(f implicit none real(c_double), value :: tol, val - integer(c_long), value :: Nvar, N + integer(c_int64_t), value :: Nvar, N Type(SUNMatrix) :: sunmat_A Type(FMat), pointer :: A - integer(c_long) :: i, j, k + integer(c_int64_t) :: i, j, k A => FSUNMatGetFMat(sunmat_A) failure = 0 @@ -75,10 +75,10 @@ integer(c_int) function check_vector(sunvec_x, sunvec_y, tol, Nvar, N) result(fa implicit none real(c_double), value :: tol - integer(c_long), value :: Nvar, N + integer(c_int64_t), value :: Nvar, N Type(N_Vector) :: sunvec_x, sunvec_y Type(FVec), pointer :: x, y - integer(c_long) :: i, j + integer(c_int64_t) :: i, j x => FN_VGetFVec(sunvec_x) y => FN_VGetFVec(sunvec_y) @@ -127,8 +127,8 @@ program main ! local variables type(c_ptr) :: sunctx integer(c_int) :: fails, retval, i, j, k - integer(c_long), parameter :: N = 1000 - integer(c_long), parameter :: Nvar = 50 + integer(c_int64_t), parameter :: N = 1000 + integer(c_int64_t), parameter :: Nvar = 50 type(SUNMatrix), pointer :: sA, sB, sC, sD, sI type(FMat), pointer :: A, Eye type(N_Vector), pointer :: sW, sX, sY, sZ diff --git a/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 b/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 index 4e46b8991c..17ab5f0b92 100644 --- a/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 +++ b/examples/arkode/F2003_parallel/ark_brusselator1D_task_local_nls_f2003.f90 @@ -1032,8 +1032,8 @@ function TaskLocalNewton(arkode_mem, sunvec_y) result(sunnls) Fi_ptr = FN_VNewVectorArray(1, sunctx) sdata_ptr = FN_VNewVectorArray(1, sunctx) - sunvec_bnode => FN_VNew_Serial(int(Nvar, c_long), sunctx) - sunmat_Jnode => FSUNDenseMatrix(int(Nvar, c_long), int(Nvar, c_long), sunctx) + sunvec_bnode => FN_VNew_Serial(int(Nvar, c_int64_t), sunctx) + sunmat_Jnode => FSUNDenseMatrix(int(Nvar, c_int64_t), int(Nvar, c_int64_t), sunctx) sunls_Jnode => FSUNLinSol_Dense(sunvec_bnode, sunmat_Jnode, sunctx) ! initialize number of nonlinear solver function evals and fails @@ -1124,7 +1124,7 @@ program main call SetupProblem() ! Create solution vector - sunvec_ys => FN_VNew_Serial(int(Neq, c_long), sunctx) + sunvec_ys => FN_VNew_Serial(int(Neq, c_int64_t), sunctx) sunvec_y => FN_VMake_MPIPlusX(comm, sunvec_ys, sunctx) ! Enable fused vector ops in local and MPI+X vectors @@ -1253,7 +1253,7 @@ subroutine EvolveProblemIMEX(sunvec_y) end if ! Increase the max number of steps allowed between outputs - retval = FARKStepSetMaxNumSteps(arkode_mem, int(100000, c_long)) + retval = FARKStepSetMaxNumSteps(arkode_mem, int(100000, c_int64_t)) if (retval /= 0) then print *, "Error: FARKStepMaxNumSteps returned ",retval call MPI_Abort(comm, 1, ierr) @@ -1300,7 +1300,7 @@ subroutine EvolveProblemIMEX(sunvec_y) end if ! Create MPI task-local data structures for preconditioning - sunmat_P => FSUNDenseMatrix(int(Neq, c_long), int(Neq, c_long), sunctx) + sunmat_P => FSUNDenseMatrix(int(Neq, c_int64_t), int(Neq, c_int64_t), sunctx) sunls_P => FSUNLinSol_Dense(umask_s, sunmat_P, sunctx) else @@ -1541,7 +1541,7 @@ subroutine EvolveProblemExplicit(sunvec_y) end if ! Increase the max number of steps allowed between outputs - retval = FERKStepSetMaxNumSteps(arkode_mem, int(100000, c_long)) + retval = FERKStepSetMaxNumSteps(arkode_mem, int(100000, C_INT64_T)) if (retval /= 0) then print *, "Error: FERKStepMaxNumSteps returned ",retval call MPI_Abort(comm, 1, ierr) @@ -2160,7 +2160,7 @@ subroutine SetupProblem() dx = xmax / Nx ! Nx is number of intervals ! Create the solution masks - umask_s => FN_VNew_Serial(int(Neq, c_long), sunctx) + umask_s => FN_VNew_Serial(int(Neq, c_int64_t), sunctx) umask => FN_VMake_MPIPlusX(comm, umask_s, sunctx) if (fused) then diff --git a/examples/arkode/F2003_serial/ark_analytic_f2003.f90 b/examples/arkode/F2003_serial/ark_analytic_f2003.f90 index 9900c83f29..6dc58a4db2 100644 --- a/examples/arkode/F2003_serial/ark_analytic_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_analytic_f2003.f90 @@ -35,7 +35,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 1 + integer(c_int64_t), parameter :: neq = 1 ! ODE parameters double precision, parameter :: lamda = -100.0d0 diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 index 23a92487f9..c9a22280d2 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 @@ -93,7 +93,7 @@ module ode_mod real(c_double), parameter :: T0 = 0.0d0 ! initial time real(c_double), parameter :: Tf = 5.0d0 ! final time real(c_double), parameter :: dTout = 0.1d0 ! time between outputs - integer(c_long), parameter :: NEQ = 2 ! number of dependent vars. + integer(c_int64_t), parameter :: NEQ = 2 ! number of dependent vars. integer(c_int), parameter :: Nt = ceiling(Tf/dTout) ! number of output times ! parameters that can be modified via CLI args or are derived diff --git a/examples/cvode/F2003_serial/cv_analytic_fp_f2003.f90 b/examples/cvode/F2003_serial/cv_analytic_fp_f2003.f90 index 28e82b79f7..83c8a46598 100644 --- a/examples/cvode/F2003_serial/cv_analytic_fp_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_analytic_fp_f2003.f90 @@ -34,7 +34,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 1 + integer(c_int64_t), parameter :: neq = 1 ! ODE parameters double precision, parameter :: lamda = -100.0d0 diff --git a/examples/cvode/F2003_serial/cv_analytic_sys_dns_f2003.f90 b/examples/cvode/F2003_serial/cv_analytic_sys_dns_f2003.f90 index 6efd6980ba..9302d65408 100644 --- a/examples/cvode/F2003_serial/cv_analytic_sys_dns_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_analytic_sys_dns_f2003.f90 @@ -55,7 +55,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 ! ODE parameters double precision, parameter :: lamda = -100.0d0 diff --git a/examples/cvode/F2003_serial/cv_analytic_sys_dns_jac_f2003.f90 b/examples/cvode/F2003_serial/cv_analytic_sys_dns_jac_f2003.f90 index f2d44c4418..bf79b5bde6 100644 --- a/examples/cvode/F2003_serial/cv_analytic_sys_dns_jac_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_analytic_sys_dns_jac_f2003.f90 @@ -55,7 +55,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 ! ODE parameters double precision, parameter :: lamda = -100.0d0 diff --git a/examples/cvode/F2003_serial/cv_analytic_sys_klu_f2003.f90 b/examples/cvode/F2003_serial/cv_analytic_sys_klu_f2003.f90 index 4f458287a5..479da92bde 100644 --- a/examples/cvode/F2003_serial/cv_analytic_sys_klu_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_analytic_sys_klu_f2003.f90 @@ -55,7 +55,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 ! ODE parameters double precision, parameter :: lamda = -100.0d0 @@ -145,8 +145,8 @@ integer(c_int) function JacFn(tn, sunvec_y, sunvec_f, sunmat_J, & type(N_Vector) :: tmp1, tmp2, tmp3 ! workspace N_Vectors ! pointer to data in SUNDIALS matrix - integer(c_long), pointer :: Jidxptr(:) - integer(c_long), pointer :: Jidxval(:) + integer(C_INT64_T), pointer :: Jidxptr(:) + integer(C_INT64_T), pointer :: Jidxval(:) real(c_double), pointer :: Jmat(:) !======= Internals ============ diff --git a/examples/cvode/F2003_serial/cv_brusselator_dns_f2003.f90 b/examples/cvode/F2003_serial/cv_brusselator_dns_f2003.f90 index 3ec4d5ab3b..33ef0b610c 100644 --- a/examples/cvode/F2003_serial/cv_brusselator_dns_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_brusselator_dns_f2003.f90 @@ -38,7 +38,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 ! ODE parameters double precision, parameter :: a = 1.2d0 diff --git a/examples/cvodes/F2003_serial/cvsAdvDiff_FSA_non_f2003.f90 b/examples/cvodes/F2003_serial/cvsAdvDiff_FSA_non_f2003.f90 index 8ebe3a1841..76962a3154 100644 --- a/examples/cvodes/F2003_serial/cvsAdvDiff_FSA_non_f2003.f90 +++ b/examples/cvodes/F2003_serial/cvsAdvDiff_FSA_non_f2003.f90 @@ -68,8 +68,8 @@ module ode_problem integer(c_int), parameter :: NOUT = 10 integer(c_int), parameter :: NP = 2 integer(c_int), parameter :: NS = 2 - integer(c_long), parameter :: MX = 10 - integer(c_long), parameter :: NEQ = MX + integer(C_INT64_T), parameter :: MX = 10 + integer(c_int64_t), parameter :: neq = MX ! problem constants real(c_double) :: ZERO = 0.d0 diff --git a/examples/cvodes/F2003_serial/cvs_analytic_fp_f2003.f90 b/examples/cvodes/F2003_serial/cvs_analytic_fp_f2003.f90 index 705d111a5b..0cad85670a 100644 --- a/examples/cvodes/F2003_serial/cvs_analytic_fp_f2003.f90 +++ b/examples/cvodes/F2003_serial/cvs_analytic_fp_f2003.f90 @@ -34,7 +34,7 @@ module ode_mod implicit none ! number of equations - integer(c_long), parameter :: neq = 1 + integer(c_int64_t), parameter :: neq = 1 ! ODE parameters double precision, parameter :: lamda = -100.0d0 diff --git a/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 b/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 index 22c7d2d691..d74a2ba666 100644 --- a/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 +++ b/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 @@ -46,7 +46,7 @@ module dae_mod integer(c_int), parameter :: nout = 11 integer(c_int), parameter :: mgrid = 10 - integer(c_long), parameter :: neq = mgrid*mgrid + integer(c_int64_t), parameter :: neq = mgrid*mgrid real(c_double) :: dx real(c_double) :: coeff @@ -84,7 +84,7 @@ integer(c_int) function resHeat(tres, sunvec_u, sunvec_up, sunvec_r, user_data) real(c_double), pointer :: r(:,:) ! local variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j !======= Internals ============ @@ -498,7 +498,7 @@ subroutine SetInitialProfile(sunvec_u, sunvec_up, sunvec_r) real(c_double), pointer :: r(:,:) ! local variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: xfact, yfact integer(c_int) :: retval diff --git a/examples/ida/F2003_serial/idaRoberts_dns_f2003.f90 b/examples/ida/F2003_serial/idaRoberts_dns_f2003.f90 index c424d7acd3..7512353d6f 100644 --- a/examples/ida/F2003_serial/idaRoberts_dns_f2003.f90 +++ b/examples/ida/F2003_serial/idaRoberts_dns_f2003.f90 @@ -40,7 +40,7 @@ module dae_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 integer(c_long), parameter :: nout = 12 contains diff --git a/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 b/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 index c0e64c78e1..84e7c576ee 100644 --- a/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 +++ b/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 @@ -34,7 +34,7 @@ module dae_mod implicit none ! problem parameters - integer(c_long), parameter :: NEQ = 6 + integer(c_int64_t), parameter :: neq = 6 integer(c_long), parameter :: STEPS = 150 real(c_double), parameter :: T0 = 0.0d0 real(c_double), parameter :: TF = 180.d0 diff --git a/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 b/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 index 2c06761340..1edc6ad377 100644 --- a/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 +++ b/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 @@ -46,7 +46,7 @@ module dae_mod integer(c_int), parameter :: nout = 11 integer(c_int), parameter :: mgrid = 10 - integer(c_long), parameter :: neq = mgrid*mgrid + integer(c_int64_t), parameter :: neq = mgrid*mgrid real(c_double) :: dx real(c_double) :: coeff @@ -84,7 +84,7 @@ integer(c_int) function resHeat(tres, sunvec_u, sunvec_up, sunvec_r, user_data) real(c_double), pointer :: r(:,:) ! local variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j !======= Internals ============ @@ -500,7 +500,7 @@ subroutine SetInitialProfile(sunvec_u, sunvec_up, sunvec_r) real(c_double), pointer :: r(:,:) ! local variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: xfact, yfact integer(c_int) :: retval diff --git a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 index 823015cf9c..8d45c14777 100644 --- a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 @@ -31,10 +31,10 @@ module prob_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: nx = 31 - integer(c_long), parameter :: ny = 31 - integer(c_long), parameter :: neq = nx*ny - integer(c_long), parameter :: skip = 3 + integer(c_int64_t), parameter :: nx = 31 + integer(c_int64_t), parameter :: ny = 31 + integer(c_int64_t), parameter :: neq = nx*ny + integer(c_int64_t), parameter :: skip = 3 real(c_double), parameter :: ftol = 1.d-12 contains @@ -66,7 +66,7 @@ integer(c_int) function func(sunvec_u, sunvec_f, user_data) & real(c_double), pointer :: u(:,:), f(:,:) ! internal variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: dx, dy, hdiff, vdiff, hdc, vdc, uij, udn, uup, ult, urt !======= Internals ============ @@ -315,7 +315,7 @@ subroutine PrintOutput(u) real(c_double), dimension(nx,ny) :: u ! internal variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: dx, dy, x, y !======= Internals ============ diff --git a/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 b/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 index e96dc3c5f0..9146954f66 100644 --- a/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinLaplace_picard_kry_f2003.f90 @@ -34,10 +34,10 @@ module prob_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: nx = 31 - integer(c_long), parameter :: ny = 31 - integer(c_long), parameter :: neq = nx*ny - integer(c_long), parameter :: skip = 3 + integer(c_int64_t), parameter :: nx = 31 + integer(c_int64_t), parameter :: ny = 31 + integer(c_int64_t), parameter :: neq = nx*ny + integer(c_int64_t), parameter :: skip = 3 real(c_double), parameter :: ftol = 1.d-12 contains @@ -65,7 +65,7 @@ integer(c_int) function func(sunvec_u, sunvec_f, user_data) & real(c_double), pointer :: u(:,:), f(:,:) ! internal variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: dx, dy, hdiff, vdiff, hdc, vdc, uij, udn, uup, ult, urt !======= Internals ============ @@ -137,7 +137,7 @@ integer(c_int) function jactimes(sunvec_v, sunvec_Jv, sunvec_u, new_u, user_data real(c_double), pointer :: v(:,:), Jv(:,:) ! internal variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: dx, dy, hdiff, vdiff, hdc, vdc, vij, vdn, vup, vlt, vrt !======= Internals ============ @@ -376,7 +376,7 @@ subroutine PrintOutput(u) real(c_double), dimension(nx,ny) :: u ! internal variables - integer(c_long) :: i, j + integer(C_INT64_T) :: i, j real(c_double) :: dx, dy, x, y !======= Internals ============ diff --git a/examples/kinsol/F2003_serial/kinRoboKin_dns_f2003.f90 b/examples/kinsol/F2003_serial/kinRoboKin_dns_f2003.f90 index e9f56c6a3a..2399a29ea5 100644 --- a/examples/kinsol/F2003_serial/kinRoboKin_dns_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinRoboKin_dns_f2003.f90 @@ -34,8 +34,8 @@ module prob_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: nvar = 8 - integer(c_long), parameter :: neq = 3*nvar + integer(c_int64_t), parameter :: nvar = 8 + integer(c_int64_t), parameter :: neq = 3*nvar real(c_double), parameter :: ftol = 1.d-5 real(c_double), parameter :: stol = 1.d-5 diff --git a/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 b/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 index b364e5f6a1..d81352ad84 100644 --- a/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 +++ b/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 @@ -22,7 +22,7 @@ module test_nvector_openmp use test_utilities implicit none - integer(c_long), parameter :: N = 100 ! vector length + integer(c_int64_t), parameter :: N = 100 ! vector length integer(c_int), parameter :: nv = 3 ! length of vector arrays integer(c_int), parameter :: ns = 2 ! number of vector arrays @@ -31,8 +31,8 @@ module test_nvector_openmp integer function smoke_tests() result(ret) implicit none - integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size - integer(c_long) :: ival ! integer work value + integer(c_int64_t) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_int) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(N) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array @@ -150,7 +150,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X - integer(C_LONG) :: local_length, i + integer(c_int64_t) :: local_length, i real(C_DOUBLE), pointer :: Xdata(:) failure = 0 diff --git a/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 b/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 index 4b433d95a5..55139bb1dd 100644 --- a/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 +++ b/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 @@ -24,18 +24,18 @@ module test_nvector_manyvector implicit none integer(c_int), parameter :: nsubvecs = 2 - integer(c_long), parameter :: N1 = 100 ! individual vector length - integer(c_long), parameter :: N2 = 200 ! individual vector length + integer(c_int64_t), parameter :: N1 = 100 ! individual vector length + integer(c_int64_t), parameter :: N2 = 200 ! individual vector length integer(c_int), parameter :: nv = 3 ! length of vector arrays - integer(c_long), parameter :: N = N1 + N2 ! overall manyvector length + integer(c_int64_t), parameter :: N = N1 + N2 ! overall manyvector length contains integer function smoke_tests() result(ret) implicit none - integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size - integer(c_long) :: ival ! integer work value + integer(C_LONG) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_int64_t) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: x1data(N1), x2data(N2) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array @@ -167,7 +167,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X type(N_Vector), pointer :: X0, X1 - integer(C_LONG) :: local_length, i, x0len, x1len + integer(c_int64_t) :: local_length, i, x0len, x1len real(C_DOUBLE), pointer :: x0data(:), x1data(:) failure = 0 diff --git a/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 b/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 index c1218b2984..cad5b9619c 100644 --- a/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 +++ b/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 @@ -26,10 +26,10 @@ module test_nvector_mpimanyvector include "mpif.h" integer(c_int), parameter :: nsubvecs = 2 - integer(c_long), parameter :: N1 = 100 ! individual vector length - integer(c_long), parameter :: N2 = 200 ! individual vector length + integer(c_int64_t), parameter :: N1 = 100 ! individual vector length + integer(c_int64_t), parameter :: N2 = 200 ! individual vector length integer(c_int), parameter :: nv = 3 ! length of vector arrays - integer(c_long), parameter :: N = N1 + N2 ! overall manyvector length + integer(c_int64_t), parameter :: N = N1 + N2 ! overall manyvector length integer(c_int), target :: comm = MPI_COMM_WORLD ! default MPI communicator integer(c_int) :: nprocs ! number of MPI processes @@ -38,8 +38,8 @@ module test_nvector_mpimanyvector integer function smoke_tests() result(ret) implicit none - integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size - integer(c_long) :: ival ! integer work value + integer(c_int64_t) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_int64_t) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: x1data(N1), x2data(N2) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array @@ -184,7 +184,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X type(N_Vector), pointer :: X0, X1 - integer(C_LONG) :: local_length, i, x0len, x1len + integer(c_int64_t) :: local_length, i, x0len, x1len real(C_DOUBLE), pointer :: x0data(:), x1data(:) failure = 0 diff --git a/examples/nvector/mpiplusx/test_fnvector_mpiplusx_mod.f90 b/examples/nvector/mpiplusx/test_fnvector_mpiplusx_mod.f90 index cc194d7840..190be9ce7c 100644 --- a/examples/nvector/mpiplusx/test_fnvector_mpiplusx_mod.f90 +++ b/examples/nvector/mpiplusx/test_fnvector_mpiplusx_mod.f90 @@ -24,7 +24,7 @@ module test_nvector_mpiplusx implicit none include "mpif.h" - integer(c_long), parameter :: N = 100 ! overall manyvector length + integer(c_int64_t), parameter :: N = 100 ! overall manyvector length integer(c_int), target :: comm = MPI_COMM_WORLD ! default MPI communicator integer(c_int) :: nprocs ! number of MPI processes @@ -33,7 +33,7 @@ module test_nvector_mpiplusx integer function smoke_tests() result(ret) implicit none - integer(c_long) :: ival ! integer work value + integer(c_int64_t) :: ival ! integer work value real(c_double) :: x1data(N) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array type(N_Vector), pointer :: x, local ! N_Vectors @@ -106,7 +106,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X type(N_Vector), pointer :: X0 - integer(C_LONG) :: local_length, i, x0len + integer(c_int64_t) :: local_length, i, x0len real(C_DOUBLE), pointer :: x0data(:) failure = 0 diff --git a/examples/nvector/parallel/test_fnvector_parallel_mod.f90 b/examples/nvector/parallel/test_fnvector_parallel_mod.f90 index f540abf192..519cc1f4c1 100644 --- a/examples/nvector/parallel/test_fnvector_parallel_mod.f90 +++ b/examples/nvector/parallel/test_fnvector_parallel_mod.f90 @@ -23,20 +23,20 @@ module test_nvector_parallel implicit none include "mpif.h" - integer(c_long), parameter :: local_length = 100 ! vector local length + integer(c_int64_t), parameter :: local_length = 100 ! vector local length integer(c_int), parameter :: nv = 3 ! length of vector arrays integer(c_int), parameter :: ns = 2 ! number of vector arrays integer(c_int), target :: comm = MPI_COMM_WORLD ! default MPI communicator - integer(c_long) :: global_length ! vector global_length + integer(c_int64_t) :: global_length ! vector global_length integer(c_int) :: nprocs ! number of MPI processes contains integer function smoke_tests() result(ret) implicit none - integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size - integer(c_long) :: ival ! integer work value + integer(C_LONG) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_int64_t) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(local_length) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array @@ -162,7 +162,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X - integer(C_LONG) :: local_length, i + integer(c_int64_t) :: local_length, i real(C_DOUBLE), pointer :: Xdata(:) failure = 0 diff --git a/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 b/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 index c8f266ae5d..5101004c09 100644 --- a/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 +++ b/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 @@ -22,7 +22,7 @@ module test_nvector_pthreads use test_utilities implicit none - integer(c_long), parameter :: N = 100 ! vector length + integer(c_int64_t), parameter :: N = 100 ! vector length integer(c_int), parameter :: nv = 3 ! length of vector arrays integer(c_int), parameter :: ns = 2 ! number of vector arrays @@ -31,8 +31,8 @@ module test_nvector_pthreads integer function smoke_tests() result(ret) implicit none - integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size - integer(c_long) :: ival ! integer work value + integer(C_LONG) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_int64_t) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(N) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array @@ -150,7 +150,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X - integer(C_LONG) :: local_length, i + integer(c_int64_t) :: local_length, i real(C_DOUBLE), pointer :: Xdata(:) failure = 0 diff --git a/examples/nvector/serial/test_fnvector_serial_mod.f90 b/examples/nvector/serial/test_fnvector_serial_mod.f90 index a24366d6eb..e13b1d1664 100644 --- a/examples/nvector/serial/test_fnvector_serial_mod.f90 +++ b/examples/nvector/serial/test_fnvector_serial_mod.f90 @@ -22,7 +22,7 @@ module test_nvector_serial use test_utilities implicit none - integer(c_long), parameter :: N = 100 ! vector length + integer(c_int64_t), parameter :: N = 100 ! vector length integer(c_int), parameter :: nv = 3 ! length of vector arrays contains @@ -30,8 +30,8 @@ module test_nvector_serial integer function smoke_tests() result(ret) implicit none - integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size - integer(c_long) :: ival ! integer work value + integer(C_LONG) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_int64_t) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(N) ! vector data array real(c_double), pointer :: xptr(:) ! pointer to vector data array @@ -149,7 +149,7 @@ integer(C_INT) function check_ans(ans, X, local_length) result(failure) real(C_DOUBLE) :: ans type(N_Vector) :: X - integer(C_LONG) :: local_length, i + integer(c_int64_t) :: local_length, i real(C_DOUBLE), pointer :: Xdata(:) failure = 0 diff --git a/examples/nvector/test_nvector.f90 b/examples/nvector/test_nvector.f90 index c4465f6c46..5ae3fd8f65 100644 --- a/examples/nvector/test_nvector.f90 +++ b/examples/nvector/test_nvector.f90 @@ -38,7 +38,7 @@ integer(C_INT) function Test_FN_VMake(X, local_length, myid) & implicit none type(N_Vector) :: X - integer(C_LONG) :: local_length + integer(C_INT64_T) :: local_length integer(C_INT) :: myid if (.not. has_data(X)) then @@ -64,7 +64,7 @@ integer(C_INT) function Test_FN_VGetArrayPointer(W, local_length, myid) & implicit none type(N_Vector) :: W - integer(C_LONG) :: local_length + integer(C_INT64_T) :: local_length integer(C_INT) :: myid ! check vector data @@ -98,7 +98,7 @@ integer(C_INT) function Test_FN_VLinearCombination(X, local_length, myid) & result(failure) type(N_Vector) :: X - integer(C_LONG) :: local_length + integer(C_INT64_T) :: local_length integer(C_INT) :: myid, ierr type(N_Vector), pointer :: Y1, Y2, Y3 type(c_ptr), target :: V(3) diff --git a/examples/sunlinsol/band/test_fsunlinsol_band_mod.f90 b/examples/sunlinsol/band/test_fsunlinsol_band_mod.f90 index 48c66684a0..23768d17ed 100644 --- a/examples/sunlinsol/band/test_fsunlinsol_band_mod.f90 +++ b/examples/sunlinsol/band/test_fsunlinsol_band_mod.f90 @@ -20,9 +20,9 @@ module test_fsunlinsol_band use test_utilities implicit none - integer(C_LONG), parameter :: N = 10 - integer(C_LONG), parameter :: mu = 2 - integer(C_LONG), parameter :: ml = 3 + integer(c_int64_t), parameter :: N = 10 + integer(c_int64_t), parameter :: mu = 2 + integer(c_int64_t), parameter :: ml = 3 contains @@ -43,8 +43,8 @@ integer(C_INT) function unit_tests() result(fails) type(N_Vector), pointer :: x, y, b ! test vectors real(C_DOUBLE), pointer :: xdata(:), Adata(:) ! data arrays real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j, k - integer(C_LONG) :: smu, kstart, kend, offset + integer(c_int64_t) :: j, k + integer(c_int64_t) :: smu, kstart, kend, offset integer(C_INT) :: tmp fails = 0 @@ -127,7 +127,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(c_int64_t) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/dense/test_fsunlinsol_dense_mod.f90 b/examples/sunlinsol/dense/test_fsunlinsol_dense_mod.f90 index a06d69eeb5..56230165a0 100644 --- a/examples/sunlinsol/dense/test_fsunlinsol_dense_mod.f90 +++ b/examples/sunlinsol/dense/test_fsunlinsol_dense_mod.f90 @@ -20,7 +20,7 @@ module test_fsunlinsol_dense use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(c_int64_t), private, parameter :: N = 100 contains @@ -42,7 +42,7 @@ integer(C_INT) function unit_tests() result(fails) real(C_DOUBLE), pointer :: colj(:), colIj(:) ! matrix column data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j, k + integer(c_int64_t) :: j, k integer(C_INT) :: tmp fails = 0 @@ -126,7 +126,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/klu/test_fsunlinsol_klu_mod.f90 b/examples/sunlinsol/klu/test_fsunlinsol_klu_mod.f90 index 360e3c73d8..05c6f5edf6 100644 --- a/examples/sunlinsol/klu/test_fsunlinsol_klu_mod.f90 +++ b/examples/sunlinsol/klu/test_fsunlinsol_klu_mod.f90 @@ -20,7 +20,7 @@ module test_fsunlinsol_klu use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 300 + integer(C_INT64_T), private, parameter :: N = 300 contains @@ -43,7 +43,7 @@ integer(C_INT) function unit_tests() result(fails) real(C_DOUBLE), pointer :: colj(:) ! matrix column data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j, k, i + integer(C_INT64_T) :: j, k, i integer(C_INT) :: tmp fails = 0 @@ -122,7 +122,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/lapackdense/test_fsunlinsol_lapackdense_mod.f90 b/examples/sunlinsol/lapackdense/test_fsunlinsol_lapackdense_mod.f90 index 3751dd2a76..b495131175 100644 --- a/examples/sunlinsol/lapackdense/test_fsunlinsol_lapackdense_mod.f90 +++ b/examples/sunlinsol/lapackdense/test_fsunlinsol_lapackdense_mod.f90 @@ -20,7 +20,7 @@ module test_fsunlinsol_lapackdense use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(c_int64_t), private, parameter :: N = 100 contains @@ -42,7 +42,7 @@ integer(C_INT) function unit_tests() result(fails) real(C_DOUBLE), pointer :: colj(:), colIj(:) ! matrix column data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j, k + integer(C_INT64_T) :: j, k integer(C_INT) :: tmp fails = 0 @@ -125,7 +125,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/pcg/serial/test_fsunlinsol_pcg_mod_serial.f90 b/examples/sunlinsol/pcg/serial/test_fsunlinsol_pcg_mod_serial.f90 index e874047354..b1ecd75fe3 100644 --- a/examples/sunlinsol/pcg/serial/test_fsunlinsol_pcg_mod_serial.f90 +++ b/examples/sunlinsol/pcg/serial/test_fsunlinsol_pcg_mod_serial.f90 @@ -25,13 +25,13 @@ module test_fsunlinsol_pcg_serial use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(C_INT64_T), private, parameter :: N = 100 integer(C_INT), private, parameter :: pretype = 1 ! Preconditioning type (1 or 2) integer(C_INT), private, parameter :: maxl = 500 ! maxium Krylov subspace dimension (> 0) real(C_DOUBLE), private, parameter :: tol = 1e-13 ! solver tolerance type, private :: UserData - integer(C_LONG) :: N + integer(C_INT64_T) :: N type(N_Vector), pointer :: d, s end type @@ -55,7 +55,7 @@ integer(C_INT) function unit_tests() result(fails) type(UserData), pointer :: probdata ! problem data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j + integer(C_INT64_T) :: j integer(C_INT) :: tmp ! setup @@ -226,7 +226,7 @@ integer(C_INT) function ATimes(udata, vvec, zvec) result(ret) bind(C) type(N_Vector) :: vvec, zvec type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: v(:), z(:), s(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -269,7 +269,7 @@ integer(C_INT) function PSolve(udata, rvec, zvec, tol, lr) & integer(C_INT) :: lr type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: r(:), z(:), d(:), s(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -296,7 +296,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/spbcgs/serial/test_fsunlinsol_spbcgs_mod_serial.f90 b/examples/sunlinsol/spbcgs/serial/test_fsunlinsol_spbcgs_mod_serial.f90 index 5e44e48df2..6d0e55723d 100644 --- a/examples/sunlinsol/spbcgs/serial/test_fsunlinsol_spbcgs_mod_serial.f90 +++ b/examples/sunlinsol/spbcgs/serial/test_fsunlinsol_spbcgs_mod_serial.f90 @@ -25,13 +25,13 @@ module test_fsunlinsol_spbcgs_serial use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(c_int64_t), private, parameter :: N = 100 integer(C_INT), private, parameter :: pretype = 1 ! Preconditioning type (1 or 2) integer(C_INT), private, parameter :: maxl = 100 ! maxium Krylov subspace dimension (> 0) real(C_DOUBLE), private, parameter :: tol = 1e-13 ! solver tolerance type, private :: UserData - integer(C_LONG) :: N + integer(C_INT64_T) :: N type(N_Vector), pointer :: d, s1, s2 end type @@ -54,7 +54,7 @@ integer(C_INT) function unit_tests() result(fails) type(UserData), pointer :: probdata ! problem data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j + integer(C_INT64_T) :: j integer(C_INT) :: tmp ! setup @@ -217,7 +217,7 @@ integer(C_INT) function ATimes(udata, vvec, zvec) result(ret) bind(C) type(N_Vector) :: vvec, zvec type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: v(:), z(:), s1(:), s2(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -261,7 +261,7 @@ integer(C_INT) function PSolve(udata, rvec, zvec, tol, lr) & integer(C_INT) :: lr type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: r(:), z(:), d(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -287,7 +287,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/spfgmr/serial/test_fsunlinsol_spfgmr_mod_serial.f90 b/examples/sunlinsol/spfgmr/serial/test_fsunlinsol_spfgmr_mod_serial.f90 index 9a1792a7f1..20ed69cd68 100644 --- a/examples/sunlinsol/spfgmr/serial/test_fsunlinsol_spfgmr_mod_serial.f90 +++ b/examples/sunlinsol/spfgmr/serial/test_fsunlinsol_spfgmr_mod_serial.f90 @@ -25,14 +25,14 @@ module test_fsunlinsol_spfgmr_serial use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(c_int64_t), private, parameter :: N = 100 integer(C_INT), private, parameter :: pretype = 1 ! Preconditioning type (1 or 2) integer(C_INT), private, parameter :: gstype = 1 ! Gram-Schmidt orthoognalization type (1 or 2) integer(C_INT), private, parameter :: maxl = 100 ! maxium Krylov subspace dimension (> 0) real(C_DOUBLE), private, parameter :: tol = 1e-13 ! solver tolerance type, private :: UserData - integer(C_LONG) :: N + integer(C_INT64_T) :: N type(N_Vector), pointer :: d, s1, s2 end type @@ -55,7 +55,7 @@ integer(C_INT) function unit_tests() result(fails) type(UserData), pointer :: probdata ! problem data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j + integer(C_INT64_T) :: j integer(C_INT) :: tmp ! setup @@ -219,7 +219,7 @@ integer(C_INT) function ATimes(udata, vvec, zvec) result(ret) bind(C) type(N_Vector) :: vvec, zvec type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: v(:), z(:), s1(:), s2(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -263,7 +263,7 @@ integer(C_INT) function PSolve(udata, rvec, zvec, tol, lr) & integer(C_INT) :: lr type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: r(:), z(:), d(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -289,7 +289,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/spgmr/serial/test_fsunlinsol_spgmr_mod_serial.f90 b/examples/sunlinsol/spgmr/serial/test_fsunlinsol_spgmr_mod_serial.f90 index e0de52a8bd..3dc3184080 100644 --- a/examples/sunlinsol/spgmr/serial/test_fsunlinsol_spgmr_mod_serial.f90 +++ b/examples/sunlinsol/spgmr/serial/test_fsunlinsol_spgmr_mod_serial.f90 @@ -25,14 +25,14 @@ module test_fsunlinsol_spgmr_serial use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(c_int64_t), private, parameter :: N = 100 integer(C_INT), private, parameter :: pretype = 1 ! Preconditioning type (1 or 2) integer(C_INT), private, parameter :: gstype = 1 ! Gram-Schmidt orthoognalization type (1 or 2) integer(C_INT), private, parameter :: maxl = 100 ! maxium Krylov subspace dimension (> 0) real(C_DOUBLE), private, parameter :: tol = 1e-13 ! solver tolerance type, private :: UserData - integer(C_LONG) :: N + integer(C_INT64_T) :: N type(N_Vector), pointer :: d, s1, s2 end type @@ -55,7 +55,7 @@ integer(C_INT) function unit_tests() result(fails) type(UserData), pointer :: probdata ! problem data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j + integer(C_INT64_T) :: j integer(C_INT) :: tmp ! setup @@ -219,7 +219,7 @@ integer(C_INT) function ATimes(udata, vvec, zvec) result(ret) bind(C) type(N_Vector) :: vvec, zvec type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: v(:), z(:), s1(:), s2(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -263,7 +263,7 @@ integer(C_INT) function PSolve(udata, rvec, zvec, tol, lr) & integer(C_INT) :: lr type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: r(:), z(:), d(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -289,7 +289,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/sptfqmr/serial/test_fsunlinsol_sptfqmr_mod_serial.f90 b/examples/sunlinsol/sptfqmr/serial/test_fsunlinsol_sptfqmr_mod_serial.f90 index 055809c074..8c1be5473e 100644 --- a/examples/sunlinsol/sptfqmr/serial/test_fsunlinsol_sptfqmr_mod_serial.f90 +++ b/examples/sunlinsol/sptfqmr/serial/test_fsunlinsol_sptfqmr_mod_serial.f90 @@ -25,13 +25,13 @@ module test_fsunlinsol_sptfqmr_serial use test_utilities implicit none - integer(C_LONG), private, parameter :: N = 100 + integer(c_int64_t), private, parameter :: N = 100 integer(C_INT), private, parameter :: pretype = 1 ! Preconditioning type (1 or 2) integer(C_INT), private, parameter :: maxl = 100 ! maxium Krylov subspace dimension (> 0) real(C_DOUBLE), private, parameter :: tol = 1e-13 ! solver tolerance type, private :: UserData - integer(C_LONG) :: N + integer(C_INT64_T) :: N type(N_Vector), pointer :: d, s1, s2 end type @@ -54,7 +54,7 @@ integer(C_INT) function unit_tests() result(fails) type(UserData), pointer :: probdata ! problem data real(C_DOUBLE), pointer :: xdata(:) ! x vector data real(C_DOUBLE) :: tmpr ! temporary real value - integer(C_LONG) :: j + integer(C_INT64_T) :: j integer(C_INT) :: tmp ! setup @@ -217,7 +217,7 @@ integer(C_INT) function ATimes(udata, vvec, zvec) result(ret) bind(C) type(N_Vector) :: vvec, zvec type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: v(:), z(:), s1(:), s2(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -261,7 +261,7 @@ integer(C_INT) function PSolve(udata, rvec, zvec, tol, lr) & integer(C_INT) :: lr type(UserData), pointer :: probdata real(C_DOUBLE), pointer :: r(:), z(:), d(:) - integer(C_LONG) :: i, N + integer(C_INT64_T) :: i, N call c_f_pointer(udata, probdata) @@ -287,7 +287,7 @@ integer(C_INT) function check_vector(X, Y, tol) result(failure) implicit none type(N_Vector) :: x, y real(C_DOUBLE) :: tol, maxerr - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 diff --git a/examples/sunlinsol/test_sunlinsol.f90 b/examples/sunlinsol/test_sunlinsol.f90 index 8b21d09c6a..0e849edf3c 100644 --- a/examples/sunlinsol/test_sunlinsol.f90 +++ b/examples/sunlinsol/test_sunlinsol.f90 @@ -62,7 +62,7 @@ integer(C_INT) function Test_FSUNLinSolLastFlag(S, myid) result(failure) type(SUNLinearSolver), pointer :: S integer(C_INT) :: myid - integer(C_LONG) :: lastflag + integer(c_int64_t) :: lastflag failure = 0 @@ -83,7 +83,7 @@ integer(C_INT) function Test_FSUNLinSolSpace(S, myid) result(failure) type(SUNLinearSolver), pointer :: S integer(C_INT) :: myid - integer(C_LONG) :: lenrw(1), leniw(1) + integer(c_int64_t) :: lenrw(1), leniw(1) failure = 0 diff --git a/examples/sunmatrix/band/test_fsunmatrix_band_mod.f90 b/examples/sunmatrix/band/test_fsunmatrix_band_mod.f90 index 8ebc559680..849b9c0c0f 100644 --- a/examples/sunmatrix/band/test_fsunmatrix_band_mod.f90 +++ b/examples/sunmatrix/band/test_fsunmatrix_band_mod.f90 @@ -20,9 +20,9 @@ module test_fsunmatrix_band use test_utilities implicit none - integer(C_LONG), parameter :: N = 10 - integer(C_LONG), parameter :: mu = 2 - integer(C_LONG), parameter :: ml = 2 + integer(C_INT64_T), parameter :: N = 10 + integer(C_INT64_T), parameter :: mu = 2 + integer(C_INT64_T), parameter :: ml = 2 contains @@ -42,8 +42,8 @@ integer(C_INT) function smoke_tests() result(fails) type(SUNMatrix), pointer :: A, B ! SUNMatrix type(N_Vector), pointer :: x, y ! NVectors real(C_DOUBLE), pointer :: matdat(:) ! matrix data pointer - integer(C_LONG) :: lenrw(1), leniw(1) ! matrix real and int work space size - integer(C_LONG) :: val + integer(c_int64_t) :: lenrw(1), leniw(1) ! matrix real and int work space size + integer(c_int64_t) :: val type(C_PTR), pointer :: cptr fails = 0 @@ -108,7 +108,7 @@ integer(C_INT) function unit_tests() result(fails) type(SUNMatrix), pointer :: A, I type(N_Vector), pointer :: x, y real(C_DOUBLE), pointer :: Adata(:), Idata(:), xdata(:), ydata(:) - integer(C_LONG) :: ii, jj, smu, istart, iend, offset + integer(C_INT64_T) :: ii, jj, smu, istart, iend, offset fails = 0 @@ -144,7 +144,7 @@ integer(C_INT) function unit_tests() result(fails) xdata(jj+1) = jj ! y vector ydata(jj+1) = ZERO - istart = max(0_c_long, jj-ml) + istart = max(0_c_int64_t, jj-ml) iend = min(N-1, jj+mu) do ii = istart, iend ydata(jj+1) = ydata(jj+1) + (ii+ii-jj)*(ii) @@ -208,7 +208,7 @@ integer(C_INT) function check_matrix(B, A, tol) result(fails) type(SUNMatrix) :: A, B real(C_DOUBLE) :: tol real(C_DOUBLE), pointer :: Adata(:), Bdata(:) - integer(C_LONG) :: N, smu, mu, ml, ii, istart, iend, jj, offset + integer(C_INT64_T) :: N, smu, mu, ml, ii, istart, iend, jj, offset fails = 0 @@ -271,7 +271,7 @@ integer(C_INT) function check_matrix_entry(A, c, tol) result(fails) type(SUNMatrix) :: A real(C_DOUBLE) :: c, tol real(C_DOUBLE), pointer :: Adata(:) - integer(C_LONG) :: N, smu, mu, ml, ii, istart, iend, jj, offset + integer(C_INT64_T) :: N, smu, mu, ml, ii, istart, iend, jj, offset fails = 0 diff --git a/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 b/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 index 35ecd897e7..6000f97ef3 100644 --- a/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 +++ b/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 @@ -20,7 +20,7 @@ module test_fsunmatrix_dense use test_utilities implicit none - integer(C_LONG), parameter :: N = 4 + integer(c_int64_t), parameter :: N = 4 contains @@ -40,8 +40,8 @@ integer(C_INT) function smoke_tests() result(fails) type(SUNMatrix), pointer :: A, B ! SUNMatrix type(N_Vector), pointer :: x, y ! NVectors real(C_DOUBLE), pointer :: matdat(:) ! matrix data pointer - integer(C_LONG) :: lenrw(1), leniw(1) ! matrix real and int work space size - integer(C_LONG) :: val + integer(c_int64_t) :: lenrw(1), leniw(1) ! matrix real and int work space size + integer(c_int64_t) :: val fails = 0 @@ -99,7 +99,7 @@ integer(C_INT) function unit_tests() result(fails) type(SUNMatrix), pointer :: A, I type(N_Vector), pointer :: x, y real(C_DOUBLE), pointer :: Adata(:), Idata(:), xdata(:), ydata(:) - integer(C_LONG) :: ii, jj, tmp1, tmp2 + integer(C_INT64_T) :: ii, jj, tmp1, tmp2 fails = 0 @@ -193,7 +193,7 @@ integer(C_INT) function check_matrix(A, B, tol) result(fails) type(SUNMatrix) :: A, B real(C_DOUBLE) :: tol real(C_DOUBLE), pointer :: Adata(:), Bdata(:) - integer(C_LONG) :: Aldata, Bldata, i + integer(C_INT64_T) :: Aldata, Bldata, i fails = 0 @@ -229,7 +229,7 @@ integer(C_INT) function check_matrix_entry(A, c, tol) result(fails) type(SUNMatrix) :: A real(C_DOUBLE) :: c, tol real(C_DOUBLE), pointer :: Adata(:) - integer(C_LONG) :: Aldata, i + integer(C_INT64_T) :: Aldata, i fails = 0 diff --git a/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 b/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 index f0eb92d3ea..52bbe070b2 100644 --- a/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 +++ b/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 @@ -20,7 +20,7 @@ module test_fsunmatrix_sparse use test_utilities implicit none - integer(C_LONG_LONG), parameter :: N = 5 + integer(c_int64_t), parameter :: N = 5 contains @@ -40,10 +40,10 @@ integer(C_INT) function smoke_tests() result(fails) type(SUNMatrix), pointer :: A, B type(N_Vector), pointer :: x, y real(C_DOUBLE), pointer :: matdat(:) ! matrix data pointer - integer(C_LONG_LONG), pointer :: inddat(:) ! indices data pointer - integer(C_LONG) :: lenrw(1), leniw(1) ! matrix real and int work space size + integer(c_int64_t), pointer :: inddat(:) ! indices data pointer + integer(c_int64_t) :: lenrw(1), leniw(1) ! matrix real and int work space size - integer(C_LONG) :: tmp1 + integer(c_int64_t) :: tmp1 integer(C_INT) :: tmp2 fails = 0 @@ -106,7 +106,7 @@ integer(C_INT) function unit_tests() result(fails) type(SUNMatrix), pointer :: DA, DI, A, I type(N_Vector), pointer :: x, y real(C_DOUBLE), pointer :: Adata(:), Idata(:), xdata(:), ydata(:) - integer(C_LONG) :: ii, jj, tmp1, tmp2 + integer(C_INT64_T) :: ii, jj, tmp1, tmp2 fails = 0 @@ -209,9 +209,9 @@ integer(C_INT) function check_matrix(A, B, tol) result(fails) type(SUNMatrix) :: A, B real(C_DOUBLE) :: tol real(C_DOUBLE), pointer :: Adata(:), Bdata(:) - integer(C_LONG_LONG), pointer :: Aidxvals(:), Bidxvals(:) - integer(C_LONG_LONG), pointer :: Aidxptrs(:), Bidxptrs(:) - integer(C_LONG) :: i, np, Annz, Bnnz + integer(c_int64_t), pointer :: Aidxvals(:), Bidxvals(:) + integer(c_int64_t), pointer :: Aidxptrs(:), Bidxptrs(:) + integer(c_int64_t) :: i, np, Annz, Bnnz fails = 0 @@ -295,8 +295,8 @@ integer(C_INT) function check_matrix_entry(A, c, tol) result(fails) type(SUNMatrix) :: A real(C_DOUBLE) :: c, tol real(C_DOUBLE), pointer :: Adata(:) - integer(C_LONG_LONG), pointer :: Aidxptrs(:) - integer(C_LONG) :: i, np + integer(c_int64_t), pointer :: Aidxptrs(:) + integer(c_int64_t) :: i, np fails = 0 diff --git a/examples/sunmatrix/test_sunmatrix.f90 b/examples/sunmatrix/test_sunmatrix.f90 index 1f1cc3319b..d2b37980df 100644 --- a/examples/sunmatrix/test_sunmatrix.f90 +++ b/examples/sunmatrix/test_sunmatrix.f90 @@ -77,7 +77,7 @@ integer(C_INT) function check_vector(x, y, tol) result(failure) type(N_Vector) :: x, y real(C_DOUBLE) :: tol - integer(C_LONG) :: i, xlen, ylen + integer(C_INT64_T) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0 @@ -473,7 +473,7 @@ integer(C_INT) function Test_FSUNMatSpace(A, myid) result(failure) integer(C_INT) :: myid type(SUNMatrix) :: A - integer(C_LONG) :: lenrw(1), leniw(1) + integer(c_int64_t) :: lenrw(1), leniw(1) failure = 0 diff --git a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 index bedf8684c2..c776317175 100644 --- a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 +++ b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 @@ -21,7 +21,7 @@ module test_fsunnonlinsol_fixedpoint implicit none - integer(C_LONG), parameter :: NEQ = 3 ! number of equations + integer(c_int64_t), parameter :: neq = 3 ! number of equations integer(C_INT), parameter :: MAXIT = 10 ! max nonlinear iters. real(C_DOUBLE), parameter :: TOL = 1.0e-4 ! nonlinear solver tolerance @@ -45,7 +45,7 @@ integer(C_INT) function unit_tests() result(retval) type(SUNNonlinearSolver), pointer :: NLS ! test nonlinear solver type(N_Vector), pointer :: x, y0, y, w ! test vectors real(C_DOUBLE), pointer :: ydata(:) - integer(C_LONG) :: niters(1) + integer(c_int64_t) :: niters(1) integer(C_INT) :: tmp x => FN_VNew_Serial(NEQ, sunctx) diff --git a/examples/sunnonlinsol/newton/test_fsunnonlinsol_newton_mod.f90 b/examples/sunnonlinsol/newton/test_fsunnonlinsol_newton_mod.f90 index 6f9716979c..ec37fff803 100644 --- a/examples/sunnonlinsol/newton/test_fsunnonlinsol_newton_mod.f90 +++ b/examples/sunnonlinsol/newton/test_fsunnonlinsol_newton_mod.f90 @@ -24,7 +24,7 @@ module test_fsunnonlinsol_newton implicit none - integer(C_LONG), parameter :: NEQ = 3 ! number of equations + integer(c_int64_t), parameter :: neq = 3 ! number of equations integer(C_INT), parameter :: MAXIT = 10 ! max nonlinear iters. real(C_DOUBLE), parameter :: TOL = 1.0e-2 ! nonlinear solver tolerance @@ -57,7 +57,7 @@ integer(C_INT) function unit_tests() result(retval) type(SUNNonlinearSolver), pointer :: NLS ! test nonlinear solver real(C_DOUBLE), pointer :: ydata(:) - integer(C_LONG) :: niters(1) + integer(c_int64_t) :: niters(1) integer(C_INT) :: tmp type(IntegratorMem), pointer :: Imem