From 8b915d4069b851453cf6291a2c31bc9782def87f Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 16:56:13 -0700 Subject: [PATCH] revert examples --- examples/CMakeLists.txt | 10 ++---- .../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 ++++----- .../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 +- .../ida/F2003_serial/idaHeat2D_kry_f2003.f90 | 6 ++-- .../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 +-- examples/sunlinsol/test_sunlinsol.f90 | 2 +- examples/sunmatrix/test_sunmatrix.f90 | 2 +- 23 files changed, 103 insertions(+), 107 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 9edd7a5d5c..a342a109eb 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -14,17 +14,13 @@ # examples level CMakeLists.txt for SUNDIALS # --------------------------------------------------------------- +# We need this to ensure the installed templates have MPI when ENABLE_MPI=TRUE, +# at least until we convert all of the templates to use the SUNDIALS CMake target. + # =============================================================== # Configure compilers for installed examples # =============================================================== -# unset the fortran module directory for the examples so that the -# example module names don't collide -set(CMAKE_Fortran_MODULE_DIRECTORY ) - -# We need this to ensure the installed templates have MPI when ENABLE_MPI=TRUE, -# at least until we convert all of the templates to use the SUNDIALS CMake target. - foreach(lang ${_SUNDIALS_ENABLED_LANGS}) if(ENABLE_MPI) if(DEFINED MPI_${lang}_COMPILER) diff --git a/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 b/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 index 23429377f4..4a0a8a5911 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_int64_t), parameter :: neq = 1 + integer(c_long), 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 98543cc949..579d70479c 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_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 + 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 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_INT64_T) :: i + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i + integer(c_long) :: i !======= Internals ============ diff --git a/examples/arkode/F2003_custom/fnvector_complex_mod.f90 b/examples/arkode/F2003_custom/fnvector_complex_mod.f90 index 785164a562..5a4ce4548a 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_INT64_T) :: len + integer(c_long) :: 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_INT64_T), value :: n + integer(c_long), 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_INT64_T), value :: n + integer(c_long), 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_INT64_T) function FN_VGetLength_Complex(sunvec_y) & + integer(c_long) 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_INT64_T) :: i + integer(c_long) :: 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_INT64_T) :: i + integer(c_long) :: 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 f63052e2df..1f4b2851bc 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_INT64_T) :: length1 - integer(C_INT64_T) :: length2 + integer(c_long) :: length1 + integer(c_long) :: 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_INT64_T), value :: n1 - integer(C_INT64_T), value :: n2 + integer(c_long), value :: n1 + integer(c_long), 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_INT64_T), value :: n1 - integer(C_INT64_T), value :: n2 + integer(c_long), value :: n1 + integer(c_long), 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_INT64_T) function FN_VGetLength_Fortran(sunvec_y) & + integer(c_long) 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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 1fa8eebd9e..6939fa2795 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_INT64_T) :: Nvar - integer(C_INT64_T) :: N - integer(C_INT64_T), allocatable :: pivots(:,:) + integer(c_long) :: Nvar + integer(c_long) :: N + integer(c_long), 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_INT64_T), value :: Nvar - integer(C_INT64_T), value :: N + integer(c_long), value :: Nvar + integer(c_long), 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_INT64_T) :: i, j, k, l + integer(c_long) :: 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_INT64_T) :: i, k, pk + integer(c_long) :: 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 af09703cc6..88dfd5710d 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_INT64_T) :: Nvar - integer(C_INT64_T) :: N + integer(c_long) :: Nvar + integer(c_long) :: 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_INT64_T), value :: Nvar - integer(C_INT64_T), value :: N + integer(c_long), value :: Nvar + integer(c_long), 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_INT64_T) :: i, j, k + integer(c_long) :: 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_INT64_T) :: i + integer(c_long) :: 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 b9cec621a6..28c5bb0410 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_int64_t), value :: N + integer(c_long), value :: N Type(N_Vector) :: sunvec_x Type(FVec), pointer :: x - integer(c_int64_t) :: i + integer(c_long) :: 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_int64_t), parameter :: N = 1000 + integer(c_long), 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 ac6e69c9d6..148f95212b 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_int64_t), value :: Nvar, N + integer(c_long), value :: Nvar, N Type(N_Vector) :: sunvec_x Type(FVec), pointer :: x - integer(c_int64_t) :: i, j + integer(c_long) :: 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_int64_t) :: i, j, loc - integer(c_int64_t), parameter :: N = 1000 - integer(c_int64_t), parameter :: Nvar = 10 + integer(c_long) :: i, j, loc + integer(c_long), parameter :: N = 1000 + integer(c_long), 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 15752897ce..508a1c74a3 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_int64_t), value :: Nvar, N + integer(c_long), value :: Nvar, N Type(N_Vector) :: sunvec_x, sunvec_y Type(FVec), pointer :: x, y - integer(c_int64_t) :: i, j + integer(c_long) :: 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_int64_t), parameter :: N = 1000 - integer(c_int64_t), parameter :: Nvar = 50 + integer(c_long), parameter :: N = 1000 + integer(c_long), 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 da5fe15966..740db810e1 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_int64_t), value :: Nvar, N + integer(c_long), value :: Nvar, N Type(SUNMatrix) :: sunmat_A, sunmat_B Type(FMat), pointer :: A, B - integer(c_int64_t) :: i, j, k + integer(c_long) :: 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_int64_t), value :: Nvar, N + integer(c_long), value :: Nvar, N Type(SUNMatrix) :: sunmat_A Type(FMat), pointer :: A - integer(c_int64_t) :: i, j, k + integer(c_long) :: 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_int64_t), value :: Nvar, N + integer(c_long), value :: Nvar, N Type(N_Vector) :: sunvec_x, sunvec_y Type(FVec), pointer :: x, y - integer(c_int64_t) :: i, j + integer(c_long) :: 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_int64_t), parameter :: N = 1000 - integer(c_int64_t), parameter :: Nvar = 50 + integer(c_long), parameter :: N = 1000 + integer(c_long), 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/cvode/F2003_serial/cv_analytic_fp_f2003.f90 b/examples/cvode/F2003_serial/cv_analytic_fp_f2003.f90 index 83c8a46598..28e82b79f7 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_int64_t), parameter :: neq = 1 + integer(c_long), 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 9302d65408..6efd6980ba 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_int64_t), parameter :: neq = 3 + integer(c_long), 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 bf79b5bde6..f2d44c4418 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_int64_t), parameter :: neq = 3 + integer(c_long), 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 479da92bde..4f458287a5 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_int64_t), parameter :: neq = 3 + integer(c_long), 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_INT64_T), pointer :: Jidxptr(:) - integer(C_INT64_T), pointer :: Jidxval(:) + integer(c_long), pointer :: Jidxptr(:) + integer(c_long), 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 33ef0b610c..3ec4d5ab3b 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_int64_t), parameter :: neq = 3 + integer(c_long), parameter :: neq = 3 ! ODE parameters double precision, parameter :: a = 1.2d0 diff --git a/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 b/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 index d74a2ba666..22c7d2d691 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_int64_t), parameter :: neq = mgrid*mgrid + integer(c_long), 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_INT64_T) :: i, j + integer(c_long) :: i, j !======= Internals ============ @@ -498,7 +498,7 @@ subroutine SetInitialProfile(sunvec_u, sunvec_up, sunvec_r) real(c_double), pointer :: r(:,:) ! local variables - integer(C_INT64_T) :: i, j + integer(c_long) :: i, j real(c_double) :: xfact, yfact integer(c_int) :: retval diff --git a/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 b/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 index 1edc6ad377..2c06761340 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_int64_t), parameter :: neq = mgrid*mgrid + integer(c_long), 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_INT64_T) :: i, j + integer(c_long) :: i, j !======= Internals ============ @@ -500,7 +500,7 @@ subroutine SetInitialProfile(sunvec_u, sunvec_up, sunvec_r) real(c_double), pointer :: r(:,:) ! local variables - integer(C_INT64_T) :: i, j + integer(c_long) :: 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 8d45c14777..823015cf9c 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_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 + 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 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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 9146954f66..e96dc3c5f0 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_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 + 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 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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_INT64_T) :: i, j + integer(c_long) :: 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 2399a29ea5..e9f56c6a3a 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_int64_t), parameter :: nvar = 8 - integer(c_int64_t), parameter :: neq = 3*nvar + integer(c_long), parameter :: nvar = 8 + integer(c_long), parameter :: neq = 3*nvar real(c_double), parameter :: ftol = 1.d-5 real(c_double), parameter :: stol = 1.d-5 diff --git a/examples/sunlinsol/test_sunlinsol.f90 b/examples/sunlinsol/test_sunlinsol.f90 index 8e3ae150e8..ffdb50250c 100644 --- a/examples/sunlinsol/test_sunlinsol.f90 +++ b/examples/sunlinsol/test_sunlinsol.f90 @@ -56,7 +56,7 @@ integer(C_INT) function Test_FSUNLinSolLastFlag(S, myid) result(failure) type(SUNLinearSolver), pointer :: S integer(C_INT) :: myid - integer(c_int64_t) :: lastflag + integer(C_LONG) :: lastflag failure = 0 diff --git a/examples/sunmatrix/test_sunmatrix.f90 b/examples/sunmatrix/test_sunmatrix.f90 index 2c077ed5dd..1f1cc3319b 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_INT64_T) :: i, xlen, ylen + integer(C_LONG) :: i, xlen, ylen real(C_DOUBLE), pointer :: xdata(:), ydata(:) failure = 0