From 64db5a024285be643b5aed95ac7d4b254dc5109a Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 14:25:07 -0800 Subject: [PATCH 001/101] cmake tweaks for windows fortran builds --- cmake/SundialsSetupFortran.cmake | 26 ++-------------- cmake/macros/SundialsAddLibrary.cmake | 31 +++++-------------- examples/CMakeLists.txt | 10 ++++-- src/nvector/serial/fmod/CMakeLists.txt | 1 - src/sunadaptcontroller/imexgus/CMakeLists.txt | 1 - .../soderlind/CMakeLists.txt | 1 - .../soderlind/fmod/CMakeLists.txt | 2 -- src/sundials/CMakeLists.txt | 10 ++---- 8 files changed, 19 insertions(+), 63 deletions(-) diff --git a/cmake/SundialsSetupFortran.cmake b/cmake/SundialsSetupFortran.cmake index a56ce213a4..126072a004 100644 --- a/cmake/SundialsSetupFortran.cmake +++ b/cmake/SundialsSetupFortran.cmake @@ -19,36 +19,14 @@ # Fortran 2003 standard # --------------------------------------------------------------- -# If the Fortran compiler flags are set using environemnt variables (i.e., -# CMAKE_Fortran_FLAGS is not set), then check if both FFLAGS and FCFLAGS are -# set. If both are set and not the same then a fatal error occurs. -# -# NOTE: This check must occur before 'enable_language(Fortran)' as it will use -# the value of FFLAGS to set CMAKE_Fortran_FLAGS -set(ENV_FFLAGS "$ENV{FFLAGS}") -set(ENV_FCFLAGS "$ENV{FCFLAGS}") - -# check if environment variables are used and CMAKE_Fortran_FLAGS is not -if ((NOT "${ENV_FFLAGS}" STREQUAL "") AND (NOT "${ENV_FCFLAGS}" STREQUAL "") - AND ("${CMAKE_Fortran_FLAGS}" STREQUAL "")) - - # check if environment variables are equal - if (NOT "${ENV_FFLAGS}" STREQUAL "${ENV_FCFLAGS}") - print_error("FFLAGS='${ENV_FFLAGS}' and FCFLAGS='${ENV_FCFLAGS}' are both set but are not equal.") - endif() -endif() - # ----------------------------------------------------------------------------- # Enable Fortran # ----------------------------------------------------------------------------- enable_language(Fortran) set(Fortran_FOUND TRUE) -# Enable preprocessing Fortran code. With older versions of CMake is this -# handled in SundialsAddLibrary.cmake by adding a compiler option. -if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") - set(CMAKE_Fortran_PREPROCESS ON) -endif() +# Enable preprocessing Fortran code. +set(CMAKE_Fortran_PREPROCESS ON) # ----------------------------------------------------------------------------- # Check if Fortran 2003 is supported diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index bafe3a7e18..9905ee4668 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -419,32 +419,17 @@ macro(sundials_add_f2003_library target) # set target properties and target dependencies so that includes # and links get passed on when this target is used - if(CMAKE_Fortran_MODULE_DIRECTORY) - set(_includes - PUBLIC - $ - $ - ) - set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}_{{libtype}}") - else() - set(_includes - PUBLIC - $ - $ - ) - set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir") - endif() + set(_includes + PUBLIC + $ + $ + ) + set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}") # get the name of the C library which the fortran library interfaces to string(REPLACE "sundials_f" "sundials_" _clib_name "${target}") string(REPLACE "_mod" "" _clib_name "${_clib_name}") - # If SundialsSetupFortran.cmake did not set CMAKE_Fortran_PREPROCESS to ON, - # then add a compiler flag to preprocess Fortran code. - if(CMAKE_VERSION VERSION_LESS "3.18") - set(_preprocess PRIVATE -cpp) - endif() - sundials_add_library(${target} SOURCES ${sundials_add_f2003_library_SOURCES} OBJECT_LIBRARIES ${sundials_add_f2003_library_OBJECT_LIBRARIES} @@ -455,8 +440,8 @@ macro(sundials_add_f2003_library target) ${sundials_add_f2003_library_INCLUDE_DIRECTORIES} ${_includes} COMPILE_DEFINITIONS ${sundials_add_f2003_library_COMPILE_DEFINITIONS} - COMPILE_OPTIONS ${sundials_add_f2003_library_COMPILE_OPTIONS} ${_preprocess} - PROPERTIES ${sundials_add_f2003_library_PROPERTIES} ${_properties} + COMPILE_OPTIONS ${sundials_add_f2003_library_COMPILE_OPTIONS} + PROPERTIES ${sundials_add_f2003_library_PROPERTIES} OUTPUT_NAME ${sundials_add_f2003_library_OUTPUT_NAME} VERSION ${sundials_add_f2003_library_VERSION} SOVERSION ${sundials_add_f2003_library_SOVERSION} diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index bb9df6250f..b11797b7df 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -14,13 +14,17 @@ # 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/src/nvector/serial/fmod/CMakeLists.txt b/src/nvector/serial/fmod/CMakeLists.txt index 293239b9fb..ebf2ec0182 100644 --- a/src/nvector/serial/fmod/CMakeLists.txt +++ b/src/nvector/serial/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fnvecserial_mod fnvector_serial_mod.f90 fnvector_serial_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fnvecserial_mod VERSION diff --git a/src/sunadaptcontroller/imexgus/CMakeLists.txt b/src/sunadaptcontroller/imexgus/CMakeLists.txt index 9ca6b96a15..4eedcdc571 100644 --- a/src/sunadaptcontroller/imexgus/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/CMakeLists.txt @@ -22,7 +22,6 @@ sundials_add_library(sundials_sunadaptcontrollerimexgus PUBLIC sundials_core INCLUDE_SUBDIR sunadaptcontroller - OBJECT_LIB_ONLY ) # Add F2003 module if the interface is enabled diff --git a/src/sunadaptcontroller/soderlind/CMakeLists.txt b/src/sunadaptcontroller/soderlind/CMakeLists.txt index 0b8c4c8cf4..22cb64a270 100644 --- a/src/sunadaptcontroller/soderlind/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/CMakeLists.txt @@ -22,7 +22,6 @@ sundials_add_library(sundials_sunadaptcontrollersoderlind PUBLIC sundials_core INCLUDE_SUBDIR sunadaptcontroller - OBJECT_LIB_ONLY ) # Add F2003 module if the interface is enabled diff --git a/src/sunadaptcontroller/soderlind/fmod/CMakeLists.txt b/src/sunadaptcontroller/soderlind/fmod/CMakeLists.txt index 44aa8a4922..1d902274cb 100644 --- a/src/sunadaptcontroller/soderlind/fmod/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/fmod/CMakeLists.txt @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollersoderlind_mod fsunadaptcontroller_soderlind_mod.f90 fsunadaptcontroller_soderlind_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunadaptcontrollersoderlind_mod - OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_Soderlind F2003 interface") diff --git a/src/sundials/CMakeLists.txt b/src/sundials/CMakeLists.txt index c7f1f90ee0..82a65f3c62 100644 --- a/src/sundials/CMakeLists.txt +++ b/src/sundials/CMakeLists.txt @@ -32,6 +32,7 @@ set(sundials_HEADERS sundials_dense.h sundials_direct.h sundials_errors.h + sundials_futils.h sundials_iterative.h sundials_linearsolver.h sundials_linearsolver.hpp @@ -53,10 +54,6 @@ set(sundials_HEADERS sundials_version.h ) -if(BUILD_FORTRAN_MODULE_INTERFACE) - list(APPEND sundials_HEADERS sundials_futils.h) -endif() - if(ENABLE_MPI) list(APPEND sundials_HEADERS sundials_mpi_errors.h) endif() @@ -88,6 +85,7 @@ set(sundials_SOURCES sundials_dense.c sundials_direct.c sundials_errors.c + sundials_futils.c sundials_iterative.c sundials_linearsolver.c sundials_logger.c @@ -105,10 +103,6 @@ if(ENABLE_MPI) list(APPEND sundials_SOURCES sundials_mpi_errors.c) endif() -if(BUILD_FORTRAN_MODULE_INTERFACE) - list(APPEND sundials_SOURCES sundials_futils.c) -endif() - # Add prefix with complete path to the source files add_prefix(${SUNDIALS_SOURCE_DIR}/src/sundials/ sundials_SOURCES) From d90ef4cec59d24ca0efcadb3396a7a311d1c43c0 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 14:49:00 -0800 Subject: [PATCH 002/101] fix various spots in f90 examples where long was used instead of long long --- .../F2003_serial/test_ark_butcher_f2003.f90 | 6 ++-- .../C_openmp/test_fnvector_openmp_mod.f90 | 2 +- .../test_fnvector_manyvector_mod.f90 | 2 +- .../test_fnvector_mpimanyvector_mod.f90 | 2 +- .../parallel/test_fnvector_parallel_mod.f90 | 2 +- .../pthreads/test_fnvector_pthreads_mod.f90 | 2 +- .../serial/test_fnvector_serial_mod.f90 | 2 +- .../sparse/test_fsunmatrix_sparse_mod.f90 | 34 +++++++++---------- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 b/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 index a6132d9df6..0e656199b3 100644 --- a/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 +++ b/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 @@ -27,9 +27,9 @@ integer function smoke_tests() result(ret) !======== Declarations ======== implicit none type(c_ptr) :: ERK, DIRK - integer(C_INT) :: ierr, q(1), p(1) - integer(C_LONG) :: liw(1), lrw(1) - real(C_DOUBLE) :: b(2), c(2), d(2), A(4) + integer(c_int) :: ierr, q(1), p(1) + integer(c_long_long) :: liw(1), lrw(1) + real(c_double) :: b(2), c(2), d(2), A(4) !===== Setup ==== diff --git a/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 b/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 index a4b7648839..b364e5f6a1 100644 --- a/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 +++ b/examples/nvector/C_openmp/test_fnvector_openmp_mod.f90 @@ -31,7 +31,7 @@ module test_nvector_openmp integer function smoke_tests() result(ret) implicit none - integer(c_long) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size integer(c_long) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(N) ! vector data array diff --git a/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 b/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 index d87b6747b0..4b433d95a5 100644 --- a/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 +++ b/examples/nvector/manyvector/test_fnvector_manyvector_mod.f90 @@ -34,7 +34,7 @@ module test_nvector_manyvector integer function smoke_tests() result(ret) implicit none - integer(c_long) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size integer(c_long) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: x1data(N1), x2data(N2) ! vector data array diff --git a/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 b/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 index 0e9f02f6aa..c1218b2984 100644 --- a/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 +++ b/examples/nvector/mpimanyvector/test_fnvector_mpimanyvector_mod.f90 @@ -38,7 +38,7 @@ module test_nvector_mpimanyvector integer function smoke_tests() result(ret) implicit none - integer(c_long) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size integer(c_long) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: x1data(N1), x2data(N2) ! vector data array diff --git a/examples/nvector/parallel/test_fnvector_parallel_mod.f90 b/examples/nvector/parallel/test_fnvector_parallel_mod.f90 index 59f4d16968..f540abf192 100644 --- a/examples/nvector/parallel/test_fnvector_parallel_mod.f90 +++ b/examples/nvector/parallel/test_fnvector_parallel_mod.f90 @@ -35,7 +35,7 @@ module test_nvector_parallel integer function smoke_tests() result(ret) implicit none - integer(c_long) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size integer(c_long) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(local_length) ! vector data array diff --git a/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 b/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 index 13b3429927..c8f266ae5d 100644 --- a/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 +++ b/examples/nvector/pthreads/test_fnvector_pthreads_mod.f90 @@ -31,7 +31,7 @@ module test_nvector_pthreads integer function smoke_tests() result(ret) implicit none - integer(c_long) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size integer(c_long) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(N) ! vector data array diff --git a/examples/nvector/serial/test_fnvector_serial_mod.f90 b/examples/nvector/serial/test_fnvector_serial_mod.f90 index eb958fb6ea..a24366d6eb 100644 --- a/examples/nvector/serial/test_fnvector_serial_mod.f90 +++ b/examples/nvector/serial/test_fnvector_serial_mod.f90 @@ -30,7 +30,7 @@ module test_nvector_serial integer function smoke_tests() result(ret) implicit none - integer(c_long) :: lenrw(1), leniw(1) ! real and int work space size + integer(c_long_long) :: lenrw(1), leniw(1) ! real and int work space size integer(c_long) :: ival ! integer work value real(c_double) :: rval ! real work value real(c_double) :: xdata(N) ! vector data array diff --git a/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 b/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 index 740cc82a39..f0eb92d3ea 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), parameter :: N = 5 + integer(C_LONG_LONG), parameter :: N = 5 contains @@ -37,11 +37,11 @@ integer(C_INT) function smoke_tests() result(fails) implicit none ! local variables - type(SUNMatrix), pointer :: A, B ! SUNMatrix - type(N_Vector), pointer :: x, y ! NVectors - real(C_DOUBLE), pointer :: matdat(:) ! matrix data pointer - integer(C_LONG), pointer :: inddat(:) ! indices pointer - integer(C_LONG) :: lenrw(1), leniw(1) ! matrix real and int work space size + 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_LONG) :: tmp1 integer(C_INT) :: tmp2 @@ -206,12 +206,12 @@ integer(C_INT) function check_matrix(A, B, tol) result(fails) implicit none - type(SUNMatrix) :: A, B - real(C_DOUBLE) :: tol - real(C_DOUBLE), pointer :: Adata(:), Bdata(:) - integer(C_LONG), pointer :: Aidxvals(:), Bidxvals(:) - integer(C_LONG), pointer :: Aidxptrs(:), Bidxptrs(:) - integer(C_LONG) :: i, np, Annz, Bnnz + 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 fails = 0 @@ -292,11 +292,11 @@ integer(C_INT) function check_matrix_entry(A, c, tol) result(fails) implicit none - type(SUNMatrix) :: A - real(C_DOUBLE) :: c, tol - real(C_DOUBLE), pointer :: Adata(:) - integer(C_LONG), pointer :: Aidxptrs(:) - integer(C_LONG) :: i, np + type(SUNMatrix) :: A + real(C_DOUBLE) :: c, tol + real(C_DOUBLE), pointer :: Adata(:) + integer(C_LONG_LONG), pointer :: Aidxptrs(:) + integer(C_LONG) :: i, np fails = 0 From 008ab1fde1a4ef47acf0553254eefc39730a60f5 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 14:53:43 -0800 Subject: [PATCH 003/101] enable fortran in windows github actions --- .github/workflows/windows-latest-mingw.yml | 5 ++++- .github/workflows/windows-latest.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index beb55d1efe..a12cd51072 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -27,7 +27,10 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_LOGGING_LEVEL=2 -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: | + cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_FORTRAN_MODULE_INTERFACE=ON + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index ccfa6c2251..f4a9dfa546 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -23,7 +23,10 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_LOGGING_LEVEL=2 -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: | + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build # Build your program with the given configuration From 2450d3240f5ac1850efe8716237fa5e301b714ec Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 14:57:39 -0800 Subject: [PATCH 004/101] fix windows github action syntax --- .github/workflows/windows-latest-mingw.yml | 11 +++------- .github/workflows/windows-latest.yml | 25 +++++++++++++++++----- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index a12cd51072..560994a0e5 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -25,19 +25,14 @@ jobs: msystem: mingw64 - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | - cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_FORTRAN_MODULE_INTERFACE=ON - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON \ + -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build - # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index f4a9dfa546..f2e0cafd73 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -20,12 +20,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + - name: Configure CMake (Shared) run: | - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF \ + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build @@ -37,3 +35,20 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} + + - name: Configure CMake (Static) + run: | + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF \ + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON \ + -DBUILD_FORTRAN_MODULE_INTERFACE=ON + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + From 4d6138eab8ab665f1c39e706db20a63939d88218 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:00:34 -0800 Subject: [PATCH 005/101] use > instead of | --- .github/workflows/windows-latest-mingw.yml | 2 +- .github/workflows/windows-latest.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 560994a0e5..32b642cd81 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -25,7 +25,7 @@ jobs: msystem: mingw64 - name: Configure CMake - run: | + run: > cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index f2e0cafd73..921998c855 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: | + run: > cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF \ -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON @@ -37,7 +37,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: | + run: > cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF \ -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON From 7c0911ecff683d80cea7d4b7544443cac6454b75 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:02:13 -0800 Subject: [PATCH 006/101] use correct windows escape --- .github/workflows/windows-latest-mingw.yml | 4 ++-- .github/workflows/windows-latest.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 32b642cd81..876fc420d5 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -26,8 +26,8 @@ jobs: - name: Configure CMake run: > - cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON \ + cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^ + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON ^ -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 921998c855..0c16af7a6b 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -22,8 +22,8 @@ jobs: - name: Configure CMake (Shared) run: > - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF \ - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON \ + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF ^ + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON ^ -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build @@ -38,8 +38,8 @@ jobs: - name: Configure CMake (Static) run: > - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF \ - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON \ + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF ^ + -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON ^ -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build From 4891267220e9de8055f6f1ac8f8b4edd74b17687 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:04:47 -0800 Subject: [PATCH 007/101] use one line since github doesnt like more than one --- .github/workflows/windows-latest-mingw.yml | 5 +---- .github/workflows/windows-latest.yml | 10 ++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 876fc420d5..b8235a5823 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -25,10 +25,7 @@ jobs: msystem: mingw64 - name: Configure CMake - run: > - cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^ - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON ^ - -DBUILD_FORTRAN_MODULE_INTERFACE=ON + run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 0c16af7a6b..ecd2b49428 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -21,10 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: > - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF ^ - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON ^ - -DBUILD_FORTRAN_MODULE_INTERFACE=ON + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build # Build your program with the given configuration @@ -37,10 +34,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: > - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF ^ - -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON ^ - -DBUILD_FORTRAN_MODULE_INTERFACE=ON + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build # Build your program with the given configuration From 8a6587b7fe397f2a2b463cc1f09f41b53bd74648 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:10:44 -0800 Subject: [PATCH 008/101] oops, no fortran with msvc --- .github/workflows/windows-latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index ecd2b49428..df4adf6a91 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration @@ -34,7 +34,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration From f616e6ca56559bbe259a2bb99f4e9009a60b294b Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:14:10 -0800 Subject: [PATCH 009/101] add a ninja build --- .github/workflows/windows-latest-ninja.yml | 48 ++++++++++++++++++++++ .github/workflows/windows-latest.yml | 4 +- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/windows-latest-ninja.yml diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml new file mode 100644 index 0000000000..9f79991427 --- /dev/null +++ b/.github/workflows/windows-latest-ninja.yml @@ -0,0 +1,48 @@ +name: Build and Test - Windows/MSVC (short) + +on: + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build_and_test: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake (Shared) + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + + - name: Configure CMake (Static) + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index df4adf6a91..44bd1fa856 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration @@ -34,7 +34,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration From b6698e24afde0501226494a8db0a5567cff67b71 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:15:04 -0800 Subject: [PATCH 010/101] run ninja build on push temporarily --- .github/workflows/windows-latest-ninja.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index 9f79991427..5285dbe233 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -1,6 +1,7 @@ name: Build and Test - Windows/MSVC (short) on: + push: # temporary pull_request: merge_group: workflow_dispatch: From b9c7714d68d190c0fedc08ad1d7f81037ac6c136 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:15:56 -0800 Subject: [PATCH 011/101] rename ninja build --- .github/workflows/windows-latest-ninja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index 5285dbe233..d0b6174b9e 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -1,4 +1,4 @@ -name: Build and Test - Windows/MSVC (short) +name: Build and Test - Windows/Ninja/MSVC (short) on: push: # temporary From 33fa185849e94cad2a80739192e1a82960f9c10f Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:17:01 -0800 Subject: [PATCH 012/101] install ninja --- .github/workflows/windows-latest-ninja.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index d0b6174b9e..14e8b0106d 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -21,6 +21,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install Ninja + run: choco install ninja + - name: Configure CMake (Shared) run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON From bf03889e72a4d9a734d50793c8416945ccdb2570 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:22:37 -0800 Subject: [PATCH 013/101] turn off unit tests for now --- .github/workflows/windows-latest-ninja.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index 14e8b0106d..ba2e311a4b 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -1,4 +1,4 @@ -name: Build and Test - Windows/Ninja/MSVC (short) +name: Build and Test - Windows/mingw/ninja (short) on: push: # temporary @@ -25,7 +25,7 @@ jobs: run: choco install ninja - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration @@ -38,7 +38,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration From 60fd5092557e86577ab65a28cae8ff09386d4be4 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:28:48 -0800 Subject: [PATCH 014/101] use intel compilers with ninja --- .github/workflows/windows-latest-ninja.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index ba2e311a4b..0768f996bd 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -1,4 +1,4 @@ -name: Build and Test - Windows/mingw/ninja (short) +name: Build and Test - Windows/intel/ninja (short) on: push: # temporary @@ -19,13 +19,19 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: fortran-lang/setup-fortran@v1 + id: setup-fortran + with: + compiler: intel + version: '2023.2' - name: Install Ninja run: choco install ninja + - uses: actions/checkout@v3 + - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration From 483a340feeb8e9a1d17fe4489278846cb239b687 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:49:16 -0800 Subject: [PATCH 015/101] check cmake version --- .github/workflows/windows-latest-ninja.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index 0768f996bd..04918c638d 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -28,6 +28,9 @@ jobs: - name: Install Ninja run: choco install ninja + - name: Check cmake version + run: cmake --version + - uses: actions/checkout@v3 - name: Configure CMake (Shared) From 892e1bbf29d7d9a016015b763b22a8dc8d5b5d37 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:54:06 -0800 Subject: [PATCH 016/101] use icx-cl --- .github/workflows/windows-latest-ninja.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index 04918c638d..ab5ad15e04 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -28,13 +28,10 @@ jobs: - name: Install Ninja run: choco install ninja - - name: Check cmake version - run: cmake --version - - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration From 33681a8704bc689e01d64047444d3361f1931c88 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 15:59:50 -0800 Subject: [PATCH 017/101] use different build dirs for static and shared --- .github/workflows/windows-latest-ninja.yml | 12 ++++++------ .github/workflows/windows-latest.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index ab5ad15e04..aec685bf4b 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -31,27 +31,27 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build + run: cmake --build ${{github.workspace}}/build_shared - name: Test - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build_shared # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build + run: cmake --build ${{github.workspace}}/build_static - name: Test - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build_static # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 44bd1fa856..a67c5cf242 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -21,27 +21,27 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_shared -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build_shared --config ${{env.BUILD_TYPE}} - name: Test - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build_shared # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build_static --config ${{env.BUILD_TYPE}} - name: Test - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build_static # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} From 59d891a56e2aee26c06bbd4077932f774e3a1d4c Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 16:09:34 -0800 Subject: [PATCH 018/101] default to shared llibs off on Windows, and warn users if they try to build both --- .github/workflows/windows-latest-ninja.yml | 4 ++-- .github/workflows/windows-latest.yml | 4 ++-- cmake/SundialsBuildOptionsPre.cmake | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-ninja.yml index aec685bf4b..c38b8bb458 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-ninja.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration @@ -44,7 +44,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index a67c5cf242..83445fc2d8 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_shared -DBUILD_STATIC_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_shared -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration @@ -34,7 +34,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build # Build your program with the given configuration diff --git a/cmake/SundialsBuildOptionsPre.cmake b/cmake/SundialsBuildOptionsPre.cmake index b9c9d2e98d..bef3b20db9 100644 --- a/cmake/SundialsBuildOptionsPre.cmake +++ b/cmake/SundialsBuildOptionsPre.cmake @@ -122,11 +122,22 @@ set(EXE_EXTRA_LINK_LIBS "${SUNDIALS_MATH_LIBRARY}") # --------------------------------------------------------------- sundials_option(BUILD_STATIC_LIBS BOOL "Build static libraries" ON) -sundials_option(BUILD_SHARED_LIBS BOOL "Build shared libraries" ON) + +# There are some bugs in our CMake preventing simulatenous static+shared builds +# from working on Windows. So, on Windows we dont build shared libraries +# by default. +if(WIN32) + sundials_option(BUILD_SHARED_LIBS BOOL "Build shared libraries" OFF) + if(BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS) + message(WARNING "Building SUNDIALS static and shared libraries in the same build directory on Windows is not currently supported.") + endif() +else() + sundials_option(BUILD_SHARED_LIBS BOOL "Build shared libraries" ON) +endif() # Make sure we build at least one type of libraries if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS) - print_error("Both static and shared library generation were disabled.") + message(FATAL_ERROR "Both static and shared library generation were disabled.") endif() # --------------------------------------------------------------- From b96f4fa8c66b636190ae0e24bfbb67350c6e55bd Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 17:26:35 -0800 Subject: [PATCH 019/101] fix build order for fortran modules --- cmake/macros/SundialsAddLibrary.cmake | 2 +- src/sunlinsol/band/fmod/CMakeLists.txt | 5 +---- src/sunlinsol/dense/fmod/CMakeLists.txt | 5 +---- src/sunlinsol/klu/fmod/CMakeLists.txt | 5 +---- src/sunlinsol/lapackdense/fmod/CMakeLists.txt | 5 +---- src/sunlinsol/pcg/fmod/CMakeLists.txt | 1 - src/sunlinsol/spbcgs/fmod/CMakeLists.txt | 1 - src/sunlinsol/spfgmr/fmod/CMakeLists.txt | 1 - src/sunlinsol/spgmr/fmod/CMakeLists.txt | 1 - src/sunlinsol/sptfqmr/fmod/CMakeLists.txt | 1 - src/sunmatrix/band/fmod/CMakeLists.txt | 1 - src/sunmatrix/dense/fmod/CMakeLists.txt | 1 - src/sunmatrix/sparse/fmod/CMakeLists.txt | 1 - src/sunnonlinsol/fixedpoint/fmod/CMakeLists.txt | 1 - src/sunnonlinsol/newton/fmod/CMakeLists.txt | 1 - 15 files changed, 5 insertions(+), 27 deletions(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index 9905ee4668..159690c68e 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -434,8 +434,8 @@ macro(sundials_add_f2003_library target) SOURCES ${sundials_add_f2003_library_SOURCES} OBJECT_LIBRARIES ${sundials_add_f2003_library_OBJECT_LIBRARIES} LINK_LIBRARIES - ${sundials_add_f2003_library_LINK_LIBRARIES} PUBLIC ${_clib_name} # depend on the c library + ${sundials_add_f2003_library_LINK_LIBRARIES} INCLUDE_DIRECTORIES ${sundials_add_f2003_library_INCLUDE_DIRECTORIES} ${_includes} diff --git a/src/sunlinsol/band/fmod/CMakeLists.txt b/src/sunlinsol/band/fmod/CMakeLists.txt index 250f17c914..8b6e38724e 100644 --- a/src/sunlinsol/band/fmod/CMakeLists.txt +++ b/src/sunlinsol/band/fmod/CMakeLists.txt @@ -18,10 +18,7 @@ sundials_add_f2003_library(sundials_fsunlinsolband_mod SOURCES fsunlinsol_band_mod.f90 fsunlinsol_band_mod.c LINK_LIBRARIES - PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES - LINK_LIBRARIES - PUBLIC sundials_fsunmatrixband_mod + PUBLIC sundials_fsunmatrixband_mod sundials_fcore_mod OUTPUT_NAME sundials_fsunlinsolband_mod VERSION diff --git a/src/sunlinsol/dense/fmod/CMakeLists.txt b/src/sunlinsol/dense/fmod/CMakeLists.txt index 61bdf87108..3a1329e120 100644 --- a/src/sunlinsol/dense/fmod/CMakeLists.txt +++ b/src/sunlinsol/dense/fmod/CMakeLists.txt @@ -18,10 +18,7 @@ sundials_add_f2003_library(sundials_fsunlinsoldense_mod SOURCES fsunlinsol_dense_mod.f90 fsunlinsol_dense_mod.c LINK_LIBRARIES - PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES - LINK_LIBRARIES - PUBLIC sundials_fsunmatrixdense_mod + PUBLIC sundials_fsunmatrixdense_mod sundials_fcore_mod OUTPUT_NAME sundials_fsunlinsoldense_mod VERSION diff --git a/src/sunlinsol/klu/fmod/CMakeLists.txt b/src/sunlinsol/klu/fmod/CMakeLists.txt index 4a0323d921..683f76cc3b 100644 --- a/src/sunlinsol/klu/fmod/CMakeLists.txt +++ b/src/sunlinsol/klu/fmod/CMakeLists.txt @@ -18,10 +18,7 @@ sundials_add_f2003_library(sundials_fsunlinsolklu_mod SOURCES fsunlinsol_klu_mod.f90 fsunlinsol_klu_mod.c LINK_LIBRARIES - PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES - LINK_LIBRARIES - PUBLIC sundials_fsunmatrixsparse_mod + PUBLIC sundials_fsunmatrixsparse_mod sundials_fcore_mod OUTPUT_NAME sundials_fsunlinsolklu_mod VERSION diff --git a/src/sunlinsol/lapackdense/fmod/CMakeLists.txt b/src/sunlinsol/lapackdense/fmod/CMakeLists.txt index 12bcb2fae2..72b9d5acda 100644 --- a/src/sunlinsol/lapackdense/fmod/CMakeLists.txt +++ b/src/sunlinsol/lapackdense/fmod/CMakeLists.txt @@ -19,10 +19,7 @@ sundials_add_f2003_library(sundials_fsunlinsollapackdense_mod SOURCES fsunlinsol_lapackdense_mod.f90 fsunlinsol_lapackdense_mod.c LINK_LIBRARIES - PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES - LINK_LIBRARIES - PUBLIC sundials_fsunmatrixdense_mod + PUBLIC sundials_fsunmatrixdense_mod sundials_fcore_mod OUTPUT_NAME sundials_fsunlinsollapackdense_mod VERSION diff --git a/src/sunlinsol/pcg/fmod/CMakeLists.txt b/src/sunlinsol/pcg/fmod/CMakeLists.txt index 535741e7d6..e863f286ee 100644 --- a/src/sunlinsol/pcg/fmod/CMakeLists.txt +++ b/src/sunlinsol/pcg/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolpcg_mod fsunlinsol_pcg_mod.f90 fsunlinsol_pcg_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunlinsolpcg_mod VERSION diff --git a/src/sunlinsol/spbcgs/fmod/CMakeLists.txt b/src/sunlinsol/spbcgs/fmod/CMakeLists.txt index d1b588396f..d05fdd7d0c 100644 --- a/src/sunlinsol/spbcgs/fmod/CMakeLists.txt +++ b/src/sunlinsol/spbcgs/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolspbcgs_mod fsunlinsol_spbcgs_mod.f90 fsunlinsol_spbcgs_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunlinsolspbcgs_mod VERSION diff --git a/src/sunlinsol/spfgmr/fmod/CMakeLists.txt b/src/sunlinsol/spfgmr/fmod/CMakeLists.txt index c2cbd50123..4a236368f8 100644 --- a/src/sunlinsol/spfgmr/fmod/CMakeLists.txt +++ b/src/sunlinsol/spfgmr/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolspfgmr_mod fsunlinsol_spfgmr_mod.f90 fsunlinsol_spfgmr_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunlinsolspfgmr_mod VERSION diff --git a/src/sunlinsol/spgmr/fmod/CMakeLists.txt b/src/sunlinsol/spgmr/fmod/CMakeLists.txt index 9ea74e0e45..005f891f6c 100644 --- a/src/sunlinsol/spgmr/fmod/CMakeLists.txt +++ b/src/sunlinsol/spgmr/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolspgmr_mod fsunlinsol_spgmr_mod.f90 fsunlinsol_spgmr_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunlinsolspgmr_mod VERSION diff --git a/src/sunlinsol/sptfqmr/fmod/CMakeLists.txt b/src/sunlinsol/sptfqmr/fmod/CMakeLists.txt index ff3dc41956..2aa92f9022 100644 --- a/src/sunlinsol/sptfqmr/fmod/CMakeLists.txt +++ b/src/sunlinsol/sptfqmr/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolsptfqmr_mod fsunlinsol_sptfqmr_mod.f90 fsunlinsol_sptfqmr_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunlinsolsptfqmr_mod VERSION diff --git a/src/sunmatrix/band/fmod/CMakeLists.txt b/src/sunmatrix/band/fmod/CMakeLists.txt index 465260d783..6026568af8 100644 --- a/src/sunmatrix/band/fmod/CMakeLists.txt +++ b/src/sunmatrix/band/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunmatrixband_mod fsunmatrix_band_mod.f90 fsunmatrix_band_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunmatrixband_mod VERSION diff --git a/src/sunmatrix/dense/fmod/CMakeLists.txt b/src/sunmatrix/dense/fmod/CMakeLists.txt index 987102b9f6..6b11defa31 100644 --- a/src/sunmatrix/dense/fmod/CMakeLists.txt +++ b/src/sunmatrix/dense/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunmatrixdense_mod fsunmatrix_dense_mod.f90 fsunmatrix_dense_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunmatrixdense_mod VERSION diff --git a/src/sunmatrix/sparse/fmod/CMakeLists.txt b/src/sunmatrix/sparse/fmod/CMakeLists.txt index fb0ed79b4c..407bddff70 100644 --- a/src/sunmatrix/sparse/fmod/CMakeLists.txt +++ b/src/sunmatrix/sparse/fmod/CMakeLists.txt @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunmatrixsparse_mod fsunmatrix_sparse_mod.f90 fsunmatrix_sparse_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunmatrixsparse_mod VERSION diff --git a/src/sunnonlinsol/fixedpoint/fmod/CMakeLists.txt b/src/sunnonlinsol/fixedpoint/fmod/CMakeLists.txt index bb2f0097b6..6e24d5269c 100644 --- a/src/sunnonlinsol/fixedpoint/fmod/CMakeLists.txt +++ b/src/sunnonlinsol/fixedpoint/fmod/CMakeLists.txt @@ -20,7 +20,6 @@ sundials_add_f2003_library(sundials_fsunnonlinsolfixedpoint_mod fsunnonlinsol_fixedpoint_mod.f90 fsunnonlinsol_fixedpoint_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunnonlinsolfixedpoint_mod VERSION diff --git a/src/sunnonlinsol/newton/fmod/CMakeLists.txt b/src/sunnonlinsol/newton/fmod/CMakeLists.txt index 46be1ab585..883fac35ed 100644 --- a/src/sunnonlinsol/newton/fmod/CMakeLists.txt +++ b/src/sunnonlinsol/newton/fmod/CMakeLists.txt @@ -20,7 +20,6 @@ sundials_add_f2003_library(sundials_fsunnonlinsolnewton_mod fsunnonlinsol_newton_mod.f90 fsunnonlinsol_newton_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunnonlinsolnewton_mod VERSION From 0b969f25ce38f6028b4c682b1d0dc23932fb8f89 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 17:27:25 -0800 Subject: [PATCH 020/101] temporarily do all windows tests on push --- .github/workflows/windows-latest-mingw.yml | 1 + .github/workflows/windows-latest.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index b8235a5823..f4808af498 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -1,6 +1,7 @@ name: Build and Test - Windows/mingw (short) on: + push: # temporary pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 83445fc2d8..859f8a31ed 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -1,6 +1,7 @@ name: Build and Test - Windows/MSVC (short) on: + push: # temporary pull_request: merge_group: workflow_dispatch: From 57688aaa5d39a527ea74668a84d371c55f027903 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 16 Feb 2024 17:37:34 -0800 Subject: [PATCH 021/101] change space functions to use long int --- include/arkode/arkode_butcher.h | 4 ++-- include/arkode/arkode_mristep.h | 2 +- include/arkode/arkode_sprk.h | 4 ++-- include/nvector/nvector_cuda.h | 4 ++-- include/nvector/nvector_hip.h | 4 ++-- include/nvector/nvector_manyvector.h | 2 +- include/nvector/nvector_mpimanyvector.h | 2 +- include/nvector/nvector_openmp.h | 2 +- include/nvector/nvector_openmpdev.h | 4 ++-- include/nvector/nvector_parallel.h | 2 +- include/nvector/nvector_parhyp.h | 4 ++-- include/nvector/nvector_petsc.h | 4 ++-- include/nvector/nvector_pthreads.h | 2 +- include/nvector/nvector_raja.h | 4 ++-- include/nvector/nvector_serial.h | 2 +- include/nvector/nvector_sycl.h | 4 ++-- include/nvector/nvector_trilinos.h | 4 ++-- include/sundials/sundials_nvector.h | 2 +- src/arkode/arkode_butcher.c | 4 ++-- src/arkode/arkode_mri_tables.c | 4 ++-- src/arkode/arkode_sprk.c | 4 ++-- src/nvector/cuda/nvector_cuda.cu | 2 +- src/nvector/hip/nvector_hip.hip.cpp | 2 +- src/nvector/manyvector/nvector_manyvector.c | 2 +- src/nvector/openmp/nvector_openmp.c | 2 +- src/nvector/openmpdev/nvector_openmpdev.c | 2 +- src/nvector/parallel/nvector_parallel.c | 2 +- src/nvector/parhyp/nvector_parhyp.c | 2 +- src/nvector/petsc/nvector_petsc.c | 2 +- src/nvector/pthreads/nvector_pthreads.c | 2 +- src/nvector/raja/nvector_raja.cpp | 2 +- src/nvector/serial/nvector_serial.c | 2 +- src/nvector/sycl/nvector_sycl.cpp | 2 +- src/nvector/trilinos/nvector_trilinos.cpp | 2 +- src/sundials/sundials_nvector.c | 2 +- 35 files changed, 48 insertions(+), 48 deletions(-) diff --git a/include/arkode/arkode_butcher.h b/include/arkode/arkode_butcher.h index 029b3d1c8d..863d828ace 100644 --- a/include/arkode/arkode_butcher.h +++ b/include/arkode/arkode_butcher.h @@ -50,8 +50,8 @@ SUNDIALS_EXPORT ARKodeButcherTable ARKodeButcherTable_Create(int s, int q, int p sunrealtype* d); SUNDIALS_EXPORT ARKodeButcherTable ARKodeButcherTable_Copy(ARKodeButcherTable B); SUNDIALS_EXPORT void ARKodeButcherTable_Space(ARKodeButcherTable B, - sunindextype* liw, - sunindextype* lrw); + long int* liw, + long int* lrw); SUNDIALS_EXPORT void ARKodeButcherTable_Free(ARKodeButcherTable B); SUNDIALS_EXPORT void ARKodeButcherTable_Write(ARKodeButcherTable B, FILE* outfile); diff --git a/include/arkode/arkode_mristep.h b/include/arkode/arkode_mristep.h index d4451e64c2..78fd6185c2 100644 --- a/include/arkode/arkode_mristep.h +++ b/include/arkode/arkode_mristep.h @@ -113,7 +113,7 @@ SUNDIALS_EXPORT MRIStepCoupling MRIStepCoupling_MIStoMRI(ARKodeButcherTable B, int q, int p); SUNDIALS_EXPORT MRIStepCoupling MRIStepCoupling_Copy(MRIStepCoupling MRIC); SUNDIALS_EXPORT void MRIStepCoupling_Space(MRIStepCoupling MRIC, - sunindextype* liw, sunindextype* lrw); + long int* liw, long int* lrw); SUNDIALS_EXPORT void MRIStepCoupling_Free(MRIStepCoupling MRIC); SUNDIALS_EXPORT void MRIStepCoupling_Write(MRIStepCoupling MRIC, FILE* outfile); diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 1c6263e828..7f5f148de6 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -78,8 +78,8 @@ SUNDIALS_EXPORT void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile); SUNDIALS_EXPORT -void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_storage, sunindextype* liw, - sunindextype* lrw); +void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_storage, long int* liw, + long int* lrw); SUNDIALS_EXPORT void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_storage); diff --git a/include/nvector/nvector_cuda.h b/include/nvector/nvector_cuda.h index 0c5bc079f3..15b21fdad0 100644 --- a/include/nvector/nvector_cuda.h +++ b/include/nvector/nvector_cuda.h @@ -114,8 +114,8 @@ static inline N_Vector_ID N_VGetVectorID_Cuda(N_Vector /*v*/) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Cuda(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Cuda(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Cuda(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Cuda(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_Cuda(N_Vector v, long int* lrw, + long int* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_Cuda(sunrealtype a, N_Vector x, sunrealtype b, diff --git a/include/nvector/nvector_hip.h b/include/nvector/nvector_hip.h index caed088adb..5b2f3ede52 100644 --- a/include/nvector/nvector_hip.h +++ b/include/nvector/nvector_hip.h @@ -113,8 +113,8 @@ static inline N_Vector_ID N_VGetVectorID_Hip(N_Vector /*v*/) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Hip(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Hip(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Hip(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Hip(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_Hip(N_Vector v, long int* lrw, + long int* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_Hip(sunrealtype a, N_Vector x, sunrealtype b, diff --git a/include/nvector/nvector_manyvector.h b/include/nvector/nvector_manyvector.h index ae0eac152e..a6e47c237b 100644 --- a/include/nvector/nvector_manyvector.h +++ b/include/nvector/nvector_manyvector.h @@ -101,7 +101,7 @@ SUNDIALS_EXPORT void N_VDestroy_ManyVector(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_ManyVector(N_Vector v, sunindextype* lrw, sunindextype* liw); +void N_VSpace_ManyVector(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT sunindextype N_VGetLength_ManyVector(N_Vector v); diff --git a/include/nvector/nvector_mpimanyvector.h b/include/nvector/nvector_mpimanyvector.h index f25125a0e3..3a9950f91d 100644 --- a/include/nvector/nvector_mpimanyvector.h +++ b/include/nvector/nvector_mpimanyvector.h @@ -108,7 +108,7 @@ SUNDIALS_EXPORT void N_VDestroy_MPIManyVector(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_MPIManyVector(N_Vector v, sunindextype* lrw, sunindextype* liw); +void N_VSpace_MPIManyVector(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_MPIManyVector(N_Vector v); diff --git a/include/nvector/nvector_openmp.h b/include/nvector/nvector_openmp.h index f52e2274ae..3dac216812 100644 --- a/include/nvector/nvector_openmp.h +++ b/include/nvector/nvector_openmp.h @@ -124,7 +124,7 @@ SUNDIALS_EXPORT void N_VDestroy_OpenMP(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_OpenMP(N_Vector v, sunindextype* lrw, sunindextype* liw); +void N_VSpace_OpenMP(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_OpenMP(N_Vector v); diff --git a/include/nvector/nvector_openmpdev.h b/include/nvector/nvector_openmpdev.h index b7b4ae31fb..33c4ad9de8 100644 --- a/include/nvector/nvector_openmpdev.h +++ b/include/nvector/nvector_openmpdev.h @@ -117,8 +117,8 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID_OpenMPDEV(N_Vector v); SUNDIALS_EXPORT N_Vector N_VCloneEmpty_OpenMPDEV(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_OpenMPDEV(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_OpenMPDEV(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_OpenMPDEV(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_OpenMPDEV(N_Vector v, long int* lrw, + long int* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_OpenMPDEV(sunrealtype a, N_Vector x, diff --git a/include/nvector/nvector_parallel.h b/include/nvector/nvector_parallel.h index e05e4c7ef8..b16692bfc5 100644 --- a/include/nvector/nvector_parallel.h +++ b/include/nvector/nvector_parallel.h @@ -132,7 +132,7 @@ SUNDIALS_EXPORT void N_VDestroy_Parallel(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_Parallel(N_Vector v, sunindextype* lrw, sunindextype* liw); +void N_VSpace_Parallel(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_Parallel(N_Vector v); diff --git a/include/nvector/nvector_parhyp.h b/include/nvector/nvector_parhyp.h index a7c7ced8a1..87bb95f614 100644 --- a/include/nvector/nvector_parhyp.h +++ b/include/nvector/nvector_parhyp.h @@ -94,8 +94,8 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID_ParHyp(N_Vector v); SUNDIALS_EXPORT N_Vector N_VCloneEmpty_ParHyp(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_ParHyp(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_ParHyp(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_ParHyp(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_ParHyp(N_Vector v, long int* lrw, + long int* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_ParHyp(N_Vector v); SUNDIALS_EXPORT void N_VSetArrayPointer_ParHyp(sunrealtype* v_data, N_Vector v); SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_ParHyp(N_Vector v); diff --git a/include/nvector/nvector_petsc.h b/include/nvector/nvector_petsc.h index 1fa3b536b2..b44ef3d99b 100644 --- a/include/nvector/nvector_petsc.h +++ b/include/nvector/nvector_petsc.h @@ -91,8 +91,8 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID_Petsc(N_Vector v); SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Petsc(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Petsc(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Petsc(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Petsc(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_Petsc(N_Vector v, long int* lrw, + long int* liw); SUNDIALS_EXPORT void N_VSetArrayPointer_Petsc(sunrealtype* v_data, N_Vector v); SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_Petsc(N_Vector v); SUNDIALS_EXPORT sunindextype N_VGetLength_Petsc(N_Vector v); diff --git a/include/nvector/nvector_pthreads.h b/include/nvector/nvector_pthreads.h index 97ae23008f..d6af8024c5 100644 --- a/include/nvector/nvector_pthreads.h +++ b/include/nvector/nvector_pthreads.h @@ -160,7 +160,7 @@ SUNDIALS_EXPORT void N_VDestroy_Pthreads(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_Pthreads(N_Vector v, sunindextype* lrw, sunindextype* liw); +void N_VSpace_Pthreads(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_Pthreads(N_Vector v); diff --git a/include/nvector/nvector_raja.h b/include/nvector/nvector_raja.h index 1bcb2a5cc2..c4d86a7b0f 100644 --- a/include/nvector/nvector_raja.h +++ b/include/nvector/nvector_raja.h @@ -111,8 +111,8 @@ static inline N_Vector_ID N_VGetVectorID_Raja(N_Vector v) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Raja(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Raja(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Raja(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Raja(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_Raja(N_Vector v, long int* lrw, + long int* liw); SUNDIALS_EXPORT void N_VSetArrayPointer_Raja(sunrealtype* v_data, N_Vector v); /* standard vector operations */ diff --git a/include/nvector/nvector_serial.h b/include/nvector/nvector_serial.h index bcbc995f2e..3003cb62fe 100644 --- a/include/nvector/nvector_serial.h +++ b/include/nvector/nvector_serial.h @@ -117,7 +117,7 @@ SUNDIALS_EXPORT void N_VDestroy_Serial(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_Serial(N_Vector v, sunindextype* lrw, sunindextype* liw); +void N_VSpace_Serial(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_Serial(N_Vector v); diff --git a/include/nvector/nvector_sycl.h b/include/nvector/nvector_sycl.h index 82935ccca6..0cfa236fba 100644 --- a/include/nvector/nvector_sycl.h +++ b/include/nvector/nvector_sycl.h @@ -113,8 +113,8 @@ static inline N_Vector_ID N_VGetVectorID_Sycl(N_Vector v) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Sycl(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Sycl(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Sycl(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Sycl(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_Sycl(N_Vector v, long int* lrw, + long int* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_Sycl(sunrealtype a, N_Vector x, sunrealtype b, diff --git a/include/nvector/nvector_trilinos.h b/include/nvector/nvector_trilinos.h index 385cfa0d01..5d6f02c14f 100644 --- a/include/nvector/nvector_trilinos.h +++ b/include/nvector/nvector_trilinos.h @@ -96,8 +96,8 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID_Trilinos(N_Vector v); SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Trilinos(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Trilinos(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Trilinos(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Trilinos(N_Vector v, sunindextype* lrw, - sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace_Trilinos(N_Vector v, long int* lrw, + long int* liw); SUNDIALS_EXPORT SUNComm N_VGetCommunicator_Trilinos(N_Vector v); SUNDIALS_EXPORT sunindextype N_VGetLength_Trilinos(N_Vector v); SUNDIALS_EXPORT void N_VLinearSum_Trilinos(sunrealtype a, N_Vector x, diff --git a/include/sundials/sundials_nvector.h b/include/sundials/sundials_nvector.h index 68ea9340e7..61d966e29e 100644 --- a/include/sundials/sundials_nvector.h +++ b/include/sundials/sundials_nvector.h @@ -217,7 +217,7 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone(N_Vector w); SUNDIALS_EXPORT N_Vector N_VCloneEmpty(N_Vector w); SUNDIALS_EXPORT void N_VDestroy(N_Vector v); -SUNDIALS_EXPORT void N_VSpace(N_Vector v, sunindextype* lrw, sunindextype* liw); +SUNDIALS_EXPORT void N_VSpace(N_Vector v, long int* lrw, long int* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer(N_Vector v); SUNDIALS_EXPORT sunrealtype* N_VGetDeviceArrayPointer(N_Vector v); SUNDIALS_EXPORT void N_VSetArrayPointer(sunrealtype* v_data, N_Vector v); diff --git a/src/arkode/arkode_butcher.c b/src/arkode/arkode_butcher.c index 0807d05fca..690d620d28 100644 --- a/src/arkode/arkode_butcher.c +++ b/src/arkode/arkode_butcher.c @@ -293,8 +293,8 @@ ARKodeButcherTable ARKodeButcherTable_Copy(ARKodeButcherTable B) /*--------------------------------------------------------------- Routine to query the Butcher table structure workspace size ---------------------------------------------------------------*/ -void ARKodeButcherTable_Space(ARKodeButcherTable B, sunindextype* liw, - sunindextype* lrw) +void ARKodeButcherTable_Space(ARKodeButcherTable B, long int* liw, + long int* lrw) { /* initialize outputs and return if B is not allocated */ *liw = 0; diff --git a/src/arkode/arkode_mri_tables.c b/src/arkode/arkode_mri_tables.c index fa6dd9b256..18da20f595 100644 --- a/src/arkode/arkode_mri_tables.c +++ b/src/arkode/arkode_mri_tables.c @@ -444,8 +444,8 @@ MRIStepCoupling MRIStepCoupling_Copy(MRIStepCoupling MRIC) /*--------------------------------------------------------------- Routine to query the MRIStepCoupling structure workspace size ---------------------------------------------------------------*/ -void MRIStepCoupling_Space(MRIStepCoupling MRIC, sunindextype* liw, - sunindextype* lrw) +void MRIStepCoupling_Space(MRIStepCoupling MRIC, long int* liw, + long int* lrw) { /* initialize outputs and return if MRIC is not allocated */ *liw = 0; diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index 65d1a07069..3bf1bbd7bd 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -541,8 +541,8 @@ ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_table) return sprk_table; } -void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, sunindextype* liw, - sunindextype* lrw) +void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, long int* liw, + long int* lrw) { *liw = 2; *lrw = sprk_table->stages * 2; diff --git a/src/nvector/cuda/nvector_cuda.cu b/src/nvector/cuda/nvector_cuda.cu index 5acd83c038..5c528b801d 100644 --- a/src/nvector/cuda/nvector_cuda.cu +++ b/src/nvector/cuda/nvector_cuda.cu @@ -750,7 +750,7 @@ void N_VDestroy_Cuda(N_Vector v) return; } -void N_VSpace_Cuda(N_Vector X, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Cuda(N_Vector X, long int* lrw, long int* liw) { *lrw = NVEC_CUDA_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/hip/nvector_hip.hip.cpp b/src/nvector/hip/nvector_hip.hip.cpp index 95f2d09f25..77546eb890 100644 --- a/src/nvector/hip/nvector_hip.hip.cpp +++ b/src/nvector/hip/nvector_hip.hip.cpp @@ -716,7 +716,7 @@ void N_VDestroy_Hip(N_Vector v) return; } -void N_VSpace_Hip(N_Vector X, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Hip(N_Vector X, long int* lrw, long int* liw) { *lrw = NVEC_HIP_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/manyvector/nvector_manyvector.c b/src/nvector/manyvector/nvector_manyvector.c index 2785ee7b91..c1b0c031cc 100644 --- a/src/nvector/manyvector/nvector_manyvector.c +++ b/src/nvector/manyvector/nvector_manyvector.c @@ -569,7 +569,7 @@ void MVAPPEND(N_VDestroy)(N_Vector v) /* Returns the space requirements for the ManyVector, by accumulating this information from all subvectors. */ -void MVAPPEND(N_VSpace)(N_Vector v, sunindextype* lrw, sunindextype* liw) +void MVAPPEND(N_VSpace)(N_Vector v, long int* lrw, long int* liw) { SUNFunctionBegin(v->sunctx); sunindextype i, lrw1, liw1; diff --git a/src/nvector/openmp/nvector_openmp.c b/src/nvector/openmp/nvector_openmp.c index 649a27a6df..22f03aff38 100644 --- a/src/nvector/openmp/nvector_openmp.c +++ b/src/nvector/openmp/nvector_openmp.c @@ -386,7 +386,7 @@ void N_VDestroy_OpenMP(N_Vector v) * Get storage requirement for N_Vector */ -void N_VSpace_OpenMP(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_OpenMP(N_Vector v, long int* lrw, long int* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/openmpdev/nvector_openmpdev.c b/src/nvector/openmpdev/nvector_openmpdev.c index 773feae94e..03ac83aed3 100644 --- a/src/nvector/openmpdev/nvector_openmpdev.c +++ b/src/nvector/openmpdev/nvector_openmpdev.c @@ -502,7 +502,7 @@ void N_VDestroy_OpenMPDEV(N_Vector v) * Get storage requirement for N_Vector */ -void N_VSpace_OpenMPDEV(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_OpenMPDEV(N_Vector v, long int* lrw, long int* liw) { *lrw = NV_LENGTH_OMPDEV(v); *liw = 1; diff --git a/src/nvector/parallel/nvector_parallel.c b/src/nvector/parallel/nvector_parallel.c index a438b4eb29..341ba757c4 100644 --- a/src/nvector/parallel/nvector_parallel.c +++ b/src/nvector/parallel/nvector_parallel.c @@ -387,7 +387,7 @@ void N_VDestroy_Parallel(N_Vector v) return; } -void N_VSpace_Parallel(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Parallel(N_Vector v, long int* lrw, long int* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/parhyp/nvector_parhyp.c b/src/nvector/parhyp/nvector_parhyp.c index 4e9ef4d50c..51d8988da4 100644 --- a/src/nvector/parhyp/nvector_parhyp.c +++ b/src/nvector/parhyp/nvector_parhyp.c @@ -406,7 +406,7 @@ void N_VDestroy_ParHyp(N_Vector v) return; } -void N_VSpace_ParHyp(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_ParHyp(N_Vector v, long int* lrw, long int* liw) { MPI_Comm comm; int npes; diff --git a/src/nvector/petsc/nvector_petsc.c b/src/nvector/petsc/nvector_petsc.c index 87960d839a..9a782add53 100644 --- a/src/nvector/petsc/nvector_petsc.c +++ b/src/nvector/petsc/nvector_petsc.c @@ -380,7 +380,7 @@ void N_VDestroy_Petsc(N_Vector v) return; } -void N_VSpace_Petsc(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Petsc(N_Vector v, long int* lrw, long int* liw) { MPI_Comm comm; int npes; diff --git a/src/nvector/pthreads/nvector_pthreads.c b/src/nvector/pthreads/nvector_pthreads.c index 6938934059..d7597f300c 100644 --- a/src/nvector/pthreads/nvector_pthreads.c +++ b/src/nvector/pthreads/nvector_pthreads.c @@ -465,7 +465,7 @@ void N_VDestroy_Pthreads(N_Vector v) * Get storage requirement for vector */ -void N_VSpace_Pthreads(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Pthreads(N_Vector v, long int* lrw, long int* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/raja/nvector_raja.cpp b/src/nvector/raja/nvector_raja.cpp index 5369a06f1a..8c82c55c8e 100644 --- a/src/nvector/raja/nvector_raja.cpp +++ b/src/nvector/raja/nvector_raja.cpp @@ -748,7 +748,7 @@ void N_VDestroy_Raja(N_Vector v) return; } -void N_VSpace_Raja(N_Vector X, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Raja(N_Vector X, long int* lrw, long int* liw) { *lrw = NVEC_RAJA_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/serial/nvector_serial.c b/src/nvector/serial/nvector_serial.c index a4a1bff95a..006575faa6 100644 --- a/src/nvector/serial/nvector_serial.c +++ b/src/nvector/serial/nvector_serial.c @@ -355,7 +355,7 @@ void N_VDestroy_Serial(N_Vector v) return; } -void N_VSpace_Serial(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Serial(N_Vector v, long int* lrw, long int* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/sycl/nvector_sycl.cpp b/src/nvector/sycl/nvector_sycl.cpp index 2f5b6a0a61..ce2106e210 100644 --- a/src/nvector/sycl/nvector_sycl.cpp +++ b/src/nvector/sycl/nvector_sycl.cpp @@ -870,7 +870,7 @@ void N_VDestroy_Sycl(N_Vector v) return; } -void N_VSpace_Sycl(N_Vector X, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Sycl(N_Vector X, long int* lrw, long int* liw) { *lrw = NVEC_SYCL_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/trilinos/nvector_trilinos.cpp b/src/nvector/trilinos/nvector_trilinos.cpp index fdb28b7ef5..1032a659dc 100644 --- a/src/nvector/trilinos/nvector_trilinos.cpp +++ b/src/nvector/trilinos/nvector_trilinos.cpp @@ -222,7 +222,7 @@ void N_VDestroy_Trilinos(N_Vector v) return; } -void N_VSpace_Trilinos(N_Vector x, sunindextype* lrw, sunindextype* liw) +void N_VSpace_Trilinos(N_Vector x, long int* lrw, long int* liw) { Teuchos::RCP xv = N_VGetVector_Trilinos(x); const Teuchos::RCP>& comm = xv->getMap()->getComm(); diff --git a/src/sundials/sundials_nvector.c b/src/sundials/sundials_nvector.c index a6549d81b5..926c110371 100644 --- a/src/sundials/sundials_nvector.c +++ b/src/sundials/sundials_nvector.c @@ -327,7 +327,7 @@ void N_VDestroy(N_Vector v) return; } -void N_VSpace(N_Vector v, sunindextype* lrw, sunindextype* liw) +void N_VSpace(N_Vector v, long int* lrw, long int* liw) { v->ops->nvspace(v, lrw, liw); return; From 4489fc291665f2ea0c3cd56bbd975deb17dd86b8 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 26 Feb 2024 09:28:30 -0800 Subject: [PATCH 022/101] fix use of Space functions in iterative solvers --- src/kinsol/kinsol.c | 2 +- src/sunlinsol/pcg/sunlinsol_pcg.c | 2 +- src/sunlinsol/spbcgs/sunlinsol_spbcgs.c | 2 +- src/sunlinsol/spfgmr/sunlinsol_spfgmr.c | 2 +- src/sunlinsol/spgmr/sunlinsol_spgmr.c | 2 +- src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kinsol/kinsol.c b/src/kinsol/kinsol.c index 205ffbc8f0..d1e19cd140 100644 --- a/src/kinsol/kinsol.c +++ b/src/kinsol/kinsol.c @@ -322,7 +322,7 @@ void* KINCreate(SUNContext sunctx) int KINInit(void* kinmem, KINSysFn func, N_Vector tmpl) { - sunindextype liw1, lrw1; + long int liw1, lrw1; KINMem kin_mem; sunbooleantype allocOK, nvectorOK, dotprodSB; diff --git a/src/sunlinsol/pcg/sunlinsol_pcg.c b/src/sunlinsol/pcg/sunlinsol_pcg.c index 1504a744dc..d795467812 100644 --- a/src/sunlinsol/pcg/sunlinsol_pcg.c +++ b/src/sunlinsol/pcg/sunlinsol_pcg.c @@ -517,7 +517,7 @@ SUNErrCode SUNLinSolSpace_PCG(SUNLinearSolver S, long int* lenrwLS, long int* leniwLS) { SUNFunctionBegin(S->sunctx); - sunindextype liw1, lrw1; + long int liw1, lrw1; N_VSpace(PCG_CONTENT(S)->r, &lrw1, &liw1); SUNCheckLastErr(); *lenrwLS = 1 + lrw1 * 4; diff --git a/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c b/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c index 168e554176..83f5764e9b 100644 --- a/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c +++ b/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c @@ -753,7 +753,7 @@ SUNErrCode SUNLinSolSpace_SPBCGS(SUNLinearSolver S, long int* lenrwLS, long int* leniwLS) { SUNFunctionBegin(S->sunctx); - sunindextype liw1, lrw1; + long int liw1, lrw1; if (SPBCGS_CONTENT(S)->vtemp->ops->nvspace) { N_VSpace(SPBCGS_CONTENT(S)->vtemp, &lrw1, &liw1); diff --git a/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c b/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c index 4e726e2d7e..2718b450c4 100644 --- a/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c +++ b/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c @@ -706,7 +706,7 @@ SUNErrCode SUNLinSolSpace_SPFGMR(SUNLinearSolver S, long int* lenrwLS, { SUNFunctionBegin(S->sunctx); int maxl; - sunindextype liw1, lrw1; + long int liw1, lrw1; maxl = SPFGMR_CONTENT(S)->maxl; if (SPFGMR_CONTENT(S)->vtemp->ops->nvspace) { diff --git a/src/sunlinsol/spgmr/sunlinsol_spgmr.c b/src/sunlinsol/spgmr/sunlinsol_spgmr.c index c1e10b3629..de879a32c0 100644 --- a/src/sunlinsol/spgmr/sunlinsol_spgmr.c +++ b/src/sunlinsol/spgmr/sunlinsol_spgmr.c @@ -783,7 +783,7 @@ SUNErrCode SUNLinSolSpace_SPGMR(SUNLinearSolver S, long int* lenrwLS, { SUNFunctionBegin(S->sunctx); int maxl; - sunindextype liw1, lrw1; + long int liw1, lrw1; maxl = SPGMR_CONTENT(S)->maxl; if (SPGMR_CONTENT(S)->vtemp->ops->nvspace) { diff --git a/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c b/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c index 6f09ccc1db..8a39fe4b7d 100644 --- a/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c +++ b/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c @@ -947,7 +947,7 @@ SUNErrCode SUNLinSolSpace_SPTFQMR(SUNLinearSolver S, long int* lenrwLS, long int* leniwLS) { SUNFunctionBegin(S->sunctx); - sunindextype liw1, lrw1; + long int liw1, lrw1; if (SPTFQMR_CONTENT(S)->vtemp1->ops->nvspace) { N_VSpace(SPTFQMR_CONTENT(S)->vtemp1, &lrw1, &liw1); From 012c896cf7867e8f39e978296235f57da2a67dfa Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 26 Feb 2024 10:09:16 -0800 Subject: [PATCH 023/101] 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 From 7a89ea6d0fbada7930caca29dec65d2d74084973 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 10:09:59 -0800 Subject: [PATCH 024/101] regen fortran --- src/arkode/fmod/farkode_mod.c | 20 +++++++++---------- src/arkode/fmod/farkode_mod.f90 | 8 ++++---- src/arkode/fmod/farkode_mristep_mod.c | 10 +++++----- src/arkode/fmod/farkode_mristep_mod.f90 | 4 ++-- .../manyvector/fmod/fnvector_manyvector_mod.c | 10 +++++----- .../fmod/fnvector_manyvector_mod.f90 | 4 ++-- .../fmod/fnvector_mpimanyvector_mod.c | 10 +++++----- .../fmod/fnvector_mpimanyvector_mod.f90 | 4 ++-- src/nvector/openmp/fmod/fnvector_openmp_mod.c | 10 +++++----- .../openmp/fmod/fnvector_openmp_mod.f90 | 4 ++-- .../parallel/fmod/fnvector_parallel_mod.c | 10 +++++----- .../parallel/fmod/fnvector_parallel_mod.f90 | 4 ++-- .../pthreads/fmod/fnvector_pthreads_mod.c | 10 +++++----- .../pthreads/fmod/fnvector_pthreads_mod.f90 | 4 ++-- src/nvector/serial/fmod/fnvector_serial_mod.c | 10 +++++----- .../serial/fmod/fnvector_serial_mod.f90 | 4 ++-- src/sundials/fmod/fsundials_core_mod.c | 10 +++++----- src/sundials/fmod/fsundials_core_mod.f90 | 4 ++-- 18 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index a66b1b0dcd..a37c50d95f 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -688,14 +688,14 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeButcherTable arg1 = (ARKodeButcherTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeButcherTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeButcherTable_Space(arg1,arg2,arg3); } @@ -1019,14 +1019,14 @@ SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { } -SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeSPRKTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index 7724193873..4e62dc08f4 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -1229,8 +1229,8 @@ function FARKodeButcherTable_Copy(b) & subroutine FARKodeButcherTable_Space(b, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: b -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 @@ -1621,8 +1621,8 @@ subroutine FARKodeSPRKTable_Write(sprk_table, outfile) subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod/farkode_mristep_mod.c b/src/arkode/fmod/farkode_mristep_mod.c index c9fc9edf0c..cac8323310 100644 --- a/src/arkode/fmod/farkode_mristep_mod.c +++ b/src/arkode/fmod/farkode_mristep_mod.c @@ -599,14 +599,14 @@ SWIGEXPORT void * _wrap_FMRIStepCoupling_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, long *farg2, long *farg3) { MRIStepCoupling arg1 = (MRIStepCoupling) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (MRIStepCoupling)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); MRIStepCoupling_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod/farkode_mristep_mod.f90 b/src/arkode/fmod/farkode_mristep_mod.f90 index 163f24f8f8..bb76bee620 100644 --- a/src/arkode/fmod/farkode_mristep_mod.f90 +++ b/src/arkode/fmod/farkode_mristep_mod.f90 @@ -1732,8 +1732,8 @@ function FMRIStepCoupling_Copy(mric) & subroutine FMRIStepCoupling_Space(mric, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: mric -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c index 3cd395bf66..7012d29bf1 100644 --- a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c +++ b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c @@ -328,14 +328,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_ManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_ManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 index 1c747bb028..c36042496f 100644 --- a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 +++ b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 @@ -744,8 +744,8 @@ subroutine FN_VDestroy_ManyVector(v) subroutine FN_VSpace_ManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c index 2374d9a846..bbf156e18c 100644 --- a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c +++ b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c @@ -356,14 +356,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_MPIManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_MPIManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 index d214fc462b..a4bb027bcb 100644 --- a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 +++ b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 @@ -866,8 +866,8 @@ subroutine FN_VDestroy_MPIManyVector(v) subroutine FN_VSpace_MPIManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/openmp/fmod/fnvector_openmp_mod.c b/src/nvector/openmp/fmod/fnvector_openmp_mod.c index 34f3b918df..d173984a44 100644 --- a/src/nvector/openmp/fmod/fnvector_openmp_mod.c +++ b/src/nvector/openmp/fmod/fnvector_openmp_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_OpenMP(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_OpenMP(arg1,arg2,arg3); } diff --git a/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 b/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 index bcdc99e1bf..50a2618282 100644 --- a/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 +++ b/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_OpenMP(v) subroutine FN_VSpace_OpenMP(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/parallel/fmod/fnvector_parallel_mod.c b/src/nvector/parallel/fmod/fnvector_parallel_mod.c index 877640429b..3d0aa44e17 100644 --- a/src/nvector/parallel/fmod/fnvector_parallel_mod.c +++ b/src/nvector/parallel/fmod/fnvector_parallel_mod.c @@ -380,14 +380,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Parallel(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Parallel(arg1,arg2,arg3); } diff --git a/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 b/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 index c4a036de7b..715a254c19 100644 --- a/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 +++ b/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 @@ -862,8 +862,8 @@ subroutine FN_VDestroy_Parallel(v) subroutine FN_VSpace_Parallel(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c index 76af5ca784..31aae83b2b 100644 --- a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c +++ b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Pthreads(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Pthreads(arg1,arg2,arg3); } diff --git a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 index d3b92e8269..5af51476e6 100644 --- a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 +++ b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_Pthreads(v) subroutine FN_VSpace_Pthreads(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/serial/fmod/fnvector_serial_mod.c b/src/nvector/serial/fmod/fnvector_serial_mod.c index 7611d0b848..191dd35b8c 100644 --- a/src/nvector/serial/fmod/fnvector_serial_mod.c +++ b/src/nvector/serial/fmod/fnvector_serial_mod.c @@ -326,14 +326,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Serial(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Serial(arg1,arg2,arg3); } diff --git a/src/nvector/serial/fmod/fnvector_serial_mod.f90 b/src/nvector/serial/fmod/fnvector_serial_mod.f90 index bbdc76c8b7..f789b7932b 100644 --- a/src/nvector/serial/fmod/fnvector_serial_mod.f90 +++ b/src/nvector/serial/fmod/fnvector_serial_mod.f90 @@ -706,8 +706,8 @@ subroutine FN_VDestroy_Serial(v) subroutine FN_VSpace_Serial(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/sundials/fmod/fsundials_core_mod.c b/src/sundials/fmod/fsundials_core_mod.c index 4af16b91a4..da4a940a20 100644 --- a/src/sundials/fmod/fsundials_core_mod.c +++ b/src/sundials/fmod/fsundials_core_mod.c @@ -906,14 +906,14 @@ SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace(arg1,arg2,arg3); } diff --git a/src/sundials/fmod/fsundials_core_mod.f90 b/src/sundials/fmod/fsundials_core_mod.f90 index 4334dfe0d3..ac4e05c382 100644 --- a/src/sundials/fmod/fsundials_core_mod.f90 +++ b/src/sundials/fmod/fsundials_core_mod.f90 @@ -2743,8 +2743,8 @@ subroutine FN_VDestroy(v) subroutine FN_VSpace(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 From 89b9f35c795c5ee202f05185bc9d04c8edc66d11 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 26 Feb 2024 10:38:06 -0800 Subject: [PATCH 025/101] various fixes in examples --- .../arkode/F2003_serial/ark_kpr_mri_f2003.f90 | 25 ++++++++++++------- .../F2003_serial/test_ark_butcher_f2003.f90 | 2 +- .../idasAkzoNob_ASAi_dns_f2003.f90 | 2 +- examples/sunlinsol/test_sunlinsol.f90 | 2 +- .../band/test_fsunmatrix_band_mod.f90 | 2 +- .../dense/test_fsunmatrix_dense_mod.f90 | 4 +-- .../sparse/test_fsunmatrix_sparse_mod.f90 | 2 +- examples/sunmatrix/test_sunmatrix.f90 | 2 +- .../test_fsunnonlinsol_fixedpoint_mod.f90 | 2 +- .../newton/test_fsunnonlinsol_newton_mod.f90 | 2 +- 10 files changed, 26 insertions(+), 19 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 index c9a22280d2..78ae338aef 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 @@ -71,14 +71,13 @@ ! at the end. !-------------------------------------------------------------------- -module ode_mod +module ark_kpr_mri_mod use, intrinsic :: iso_c_binding use fsundials_core_mod use farkode_mod use farkode_arkstep_mod use farkode_mristep_mod - use fnvector_serial_mod use fsunmatrix_dense_mod use fsunlinsol_dense_mod @@ -556,9 +555,17 @@ integer(c_int) function Ytrue(t, y) & program main - use ode_mod - implicit none + use, intrinsic :: iso_c_binding + use fsundials_core_mod + use farkode_mod + use farkode_arkstep_mod + use farkode_mristep_mod + use fnvector_serial_mod + use fsunmatrix_dense_mod + use fsunlinsol_dense_mod + use ark_kpr_mri_mod + implicit none ! general problem variables type(c_ptr) sunctx ! SUNDIALS simulation context @@ -666,14 +673,14 @@ program main print *, " solver: none/exp-3 (no slow, explicit fast)" case (2) reltol = max(hs*hs*hs, real(1e-10,8)) - abstol = 1e-11 + abstol = real(1e-11,8) print *, " solver: none/dirk-3 (no slow, dirk fast)" print '(A,E12.4,A,E12.4)', " reltol: ", reltol, " abstol: ", abstol case (3) print *, " solver: exp-3/none (explicit slow, no fast)" case (4) reltol = max(hs*hs, real(1e-10,8)) - abstol = 1e-11 + abstol = real(1e-11,8) print *, " solver: dirk-2/none (dirk slow, no fast)" print '(A,E12.4,A,E12.4)', " reltol: ", reltol, " abstol: ", abstol case (5) @@ -682,17 +689,17 @@ program main print *, " solver: exp-4/exp-3 (MRI-GARK-ERK45a / ERK-3-3)" case (7) reltol = max(hs*hs*hs, real(1e-10,8)) - abstol = 1e-11 + abstol = real(1e-11,8) print *, " solver: dirk-3/exp-3 (MRI-GARK-ESDIRK34a / ERK-3-3) -- solve decoupled" print '(A,E12.4,A,E12.4)', " reltol: ", reltol, " abstol: ", abstol case (8) reltol = max(hs*hs*hs, real(1e-10,8)) - abstol = 1e-11 + abstol = real(1e-11,8) print *, " solver: ars343/exp-3 (IMEX-MRI3b / ERK-3-3) -- solve decoupled" print '(A,E12.4,A,E12.4)', " reltol: ", reltol, " abstol: ", abstol case (9) reltol = max(hs*hs*hs*hs, real(1e-14,8)) - abstol = 1e-14 + abstol = real(1e-14,8) print *, " solver: imexark4/exp-4 (IMEX-MRI4 / ERK-4-4) -- solve decoupled" print '(A,E12.4,A,E12.4)', " reltol: ", reltol, " abstol: ", abstol end select diff --git a/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 b/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 index 0e656199b3..44b50a6410 100644 --- a/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 +++ b/examples/arkode/F2003_serial/test_ark_butcher_f2003.f90 @@ -28,7 +28,7 @@ integer function smoke_tests() result(ret) implicit none type(c_ptr) :: ERK, DIRK integer(c_int) :: ierr, q(1), p(1) - integer(c_long_long) :: liw(1), lrw(1) + integer(c_long) :: liw(1), lrw(1) real(c_double) :: b(2), c(2), d(2), A(4) !===== Setup ==== diff --git a/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 b/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 index 84e7c576ee..8cf331b07d 100644 --- a/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 +++ b/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 @@ -408,7 +408,7 @@ program main retval = FIDASStolerancesB(mem, indexB(1), RTOLB, ATOLB) call check_retval(retval, "FIDASStolerancesB") - retval = FIDASetMaxNumStepsB(mem, indexB(1), 1000_8) + retval = FIDASetMaxNumStepsB(mem, indexB(1), 1000) call check_retval(retval, "FIDASetMaxNumStepsB") ! Create dense SUNMatrix for use in linear solves diff --git a/examples/sunlinsol/test_sunlinsol.f90 b/examples/sunlinsol/test_sunlinsol.f90 index 0e849edf3c..382403a181 100644 --- a/examples/sunlinsol/test_sunlinsol.f90 +++ b/examples/sunlinsol/test_sunlinsol.f90 @@ -83,7 +83,7 @@ integer(C_INT) function Test_FSUNLinSolSpace(S, myid) result(failure) type(SUNLinearSolver), pointer :: S integer(C_INT) :: myid - integer(c_int64_t) :: lenrw(1), leniw(1) + integer(C_LONG) :: 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 849b9c0c0f..df734a0377 100644 --- a/examples/sunmatrix/band/test_fsunmatrix_band_mod.f90 +++ b/examples/sunmatrix/band/test_fsunmatrix_band_mod.f90 @@ -42,7 +42,7 @@ 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_int64_t) :: lenrw(1), leniw(1) ! matrix real and int work space size + integer(C_LONG) :: lenrw(1), leniw(1) ! matrix real and int work space size integer(c_int64_t) :: val type(C_PTR), pointer :: cptr diff --git a/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 b/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 index 6000f97ef3..f91110f946 100644 --- a/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 +++ b/examples/sunmatrix/dense/test_fsunmatrix_dense_mod.f90 @@ -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_int64_t) :: lenrw(1), leniw(1) ! matrix real and int work space size - integer(c_int64_t) :: val + integer(C_LONG) :: lenrw(1), leniw(1) ! matrix real and int work space size + integer(c_int64_t) :: val fails = 0 diff --git a/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 b/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 index 52bbe070b2..3e01b0068d 100644 --- a/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 +++ b/examples/sunmatrix/sparse/test_fsunmatrix_sparse_mod.f90 @@ -41,7 +41,7 @@ integer(C_INT) function smoke_tests() result(fails) type(N_Vector), pointer :: x, y real(C_DOUBLE), pointer :: matdat(:) ! matrix data pointer 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) :: lenrw(1), leniw(1) ! matrix real and int work space size integer(c_int64_t) :: tmp1 integer(C_INT) :: tmp2 diff --git a/examples/sunmatrix/test_sunmatrix.f90 b/examples/sunmatrix/test_sunmatrix.f90 index d2b37980df..2c077ed5dd 100644 --- a/examples/sunmatrix/test_sunmatrix.f90 +++ b/examples/sunmatrix/test_sunmatrix.f90 @@ -473,7 +473,7 @@ integer(C_INT) function Test_FSUNMatSpace(A, myid) result(failure) integer(C_INT) :: myid type(SUNMatrix) :: A - integer(c_int64_t) :: lenrw(1), leniw(1) + integer(C_LONG) :: 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 c776317175..9aa2b31ac3 100644 --- a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 +++ b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 @@ -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_int64_t) :: niters(1) + integer(C_LONG) :: 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 ec37fff803..ddf4f984db 100644 --- a/examples/sunnonlinsol/newton/test_fsunnonlinsol_newton_mod.f90 +++ b/examples/sunnonlinsol/newton/test_fsunnonlinsol_newton_mod.f90 @@ -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_int64_t) :: niters(1) + integer(C_LONG) :: niters(1) integer(C_INT) :: tmp type(IntegratorMem), pointer :: Imem From d779532adb7d1d004d73e6a7ad38cf9a31d0af6c Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 26 Feb 2024 10:45:10 -0800 Subject: [PATCH 026/101] test intel mpi on windows --- ...est-ninja.yml => windows-latest-intel.yml} | 33 +++++++++++++------ ...ows-latest.yml => windows-latest-msvc.yml} | 0 2 files changed, 23 insertions(+), 10 deletions(-) rename .github/workflows/{windows-latest-ninja.yml => windows-latest-intel.yml} (52%) rename .github/workflows/{windows-latest.yml => windows-latest-msvc.yml} (100%) diff --git a/.github/workflows/windows-latest-ninja.yml b/.github/workflows/windows-latest-intel.yml similarity index 52% rename from .github/workflows/windows-latest-ninja.yml rename to .github/workflows/windows-latest-intel.yml index c38b8bb458..3ec8b477eb 100644 --- a/.github/workflows/windows-latest-ninja.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -33,26 +33,39 @@ jobs: - name: Configure CMake (Shared) run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - - name: Build - # Build your program with the given configuration + - name: Build Shared run: cmake --build ${{github.workspace}}/build_shared - - name: Test + - name: Test Shared working-directory: ${{github.workspace}}/build_shared - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + + - name: Configure CMake (Shared + MPI) + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 + + - name: Build Shared + MPI + run: cmake --build ${{github.workspace}}/build_shared_mpi + + - name: Test Shared + MPI + working-directory: ${{github.workspace}}/build_shared_mpi run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - - name: Build - # Build your program with the given configuration + - name: Build Static run: cmake --build ${{github.workspace}}/build_static - - name: Test + - name: Test Static working-directory: ${{github.workspace}}/build_static - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} + - name: Configure CMake (Static + MPI) + run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 + + - name: Build Static + MPI + run: cmake --build ${{github.workspace}}/build_static_mpi + + - name: Test Static + MPI + working-directory: ${{github.workspace}}/build_static_mpi + run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest-msvc.yml similarity index 100% rename from .github/workflows/windows-latest.yml rename to .github/workflows/windows-latest-msvc.yml From 01a6b6d4a3cf35b4b45ff4f8457980528c322040 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 10:52:17 -0800 Subject: [PATCH 027/101] cleanup --- .github/workflows/windows-latest-mingw.yml | 3 +-- .github/workflows/windows-latest-msvc.yml | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index f4808af498..e405181657 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -11,7 +11,6 @@ concurrency: cancel-in-progress: true env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release jobs: @@ -26,7 +25,7 @@ jobs: msystem: mingw64 - name: Configure CMake - run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON + run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest-msvc.yml b/.github/workflows/windows-latest-msvc.yml index 859f8a31ed..58fe970993 100644 --- a/.github/workflows/windows-latest-msvc.yml +++ b/.github/workflows/windows-latest-msvc.yml @@ -11,7 +11,6 @@ concurrency: cancel-in-progress: true env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release jobs: @@ -25,25 +24,19 @@ jobs: run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_shared -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build - # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build_shared --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build_shared - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build - # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build_static --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build_static - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} From 858cf21a16ac11897a136a95bad9373636709cf1 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 11:20:36 -0800 Subject: [PATCH 028/101] rename file back to what it was so actions sees it as the same --- .github/workflows/{windows-latest-msvc.yml => windows-latest.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{windows-latest-msvc.yml => windows-latest.yml} (100%) diff --git a/.github/workflows/windows-latest-msvc.yml b/.github/workflows/windows-latest.yml similarity index 100% rename from .github/workflows/windows-latest-msvc.yml rename to .github/workflows/windows-latest.yml From 4bef21398cd03efbf2b40c98c57ba51406c356a2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 11:23:54 -0800 Subject: [PATCH 029/101] fix nvector space op --- include/sundials/sundials_nvector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sundials/sundials_nvector.h b/include/sundials/sundials_nvector.h index 61d966e29e..362e7c5e76 100644 --- a/include/sundials/sundials_nvector.h +++ b/include/sundials/sundials_nvector.h @@ -108,7 +108,7 @@ struct _generic_N_Vector_Ops N_Vector (*nvclone)(N_Vector); N_Vector (*nvcloneempty)(N_Vector); void (*nvdestroy)(N_Vector); - void (*nvspace)(N_Vector, sunindextype*, sunindextype*); + void (*nvspace)(N_Vector, long int*, long int*); sunrealtype* (*nvgetarraypointer)(N_Vector); sunrealtype* (*nvgetdevicearraypointer)(N_Vector); void (*nvsetarraypointer)(sunrealtype*, N_Vector); From 37875a7a711fdda28124c7ccb4151c92db80b8e4 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 11:24:01 -0800 Subject: [PATCH 030/101] regen fortran --- src/arkode/fmod/farkode_mod.c | 20 +++++++++---------- src/arkode/fmod/farkode_mod.f90 | 8 ++++---- src/arkode/fmod/farkode_mristep_mod.c | 10 +++++----- src/arkode/fmod/farkode_mristep_mod.f90 | 4 ++-- .../manyvector/fmod/fnvector_manyvector_mod.c | 10 +++++----- .../fmod/fnvector_manyvector_mod.f90 | 4 ++-- .../fmod/fnvector_mpimanyvector_mod.c | 10 +++++----- .../fmod/fnvector_mpimanyvector_mod.f90 | 4 ++-- src/nvector/openmp/fmod/fnvector_openmp_mod.c | 10 +++++----- .../openmp/fmod/fnvector_openmp_mod.f90 | 4 ++-- .../parallel/fmod/fnvector_parallel_mod.c | 10 +++++----- .../parallel/fmod/fnvector_parallel_mod.f90 | 4 ++-- .../pthreads/fmod/fnvector_pthreads_mod.c | 10 +++++----- .../pthreads/fmod/fnvector_pthreads_mod.f90 | 4 ++-- src/nvector/serial/fmod/fnvector_serial_mod.c | 10 +++++----- .../serial/fmod/fnvector_serial_mod.f90 | 4 ++-- src/sundials/fmod/fsundials_core_mod.c | 10 +++++----- src/sundials/fmod/fsundials_core_mod.f90 | 4 ++-- 18 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/arkode/fmod/farkode_mod.c b/src/arkode/fmod/farkode_mod.c index a66b1b0dcd..a37c50d95f 100644 --- a/src/arkode/fmod/farkode_mod.c +++ b/src/arkode/fmod/farkode_mod.c @@ -688,14 +688,14 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeButcherTable arg1 = (ARKodeButcherTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeButcherTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeButcherTable_Space(arg1,arg2,arg3); } @@ -1019,14 +1019,14 @@ SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { } -SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeSPRKTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index 7724193873..4e62dc08f4 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -1229,8 +1229,8 @@ function FARKodeButcherTable_Copy(b) & subroutine FARKodeButcherTable_Space(b, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: b -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 @@ -1621,8 +1621,8 @@ subroutine FARKodeSPRKTable_Write(sprk_table, outfile) subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod/farkode_mristep_mod.c b/src/arkode/fmod/farkode_mristep_mod.c index c9fc9edf0c..cac8323310 100644 --- a/src/arkode/fmod/farkode_mristep_mod.c +++ b/src/arkode/fmod/farkode_mristep_mod.c @@ -599,14 +599,14 @@ SWIGEXPORT void * _wrap_FMRIStepCoupling_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, long *farg2, long *farg3) { MRIStepCoupling arg1 = (MRIStepCoupling) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (MRIStepCoupling)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); MRIStepCoupling_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod/farkode_mristep_mod.f90 b/src/arkode/fmod/farkode_mristep_mod.f90 index 163f24f8f8..bb76bee620 100644 --- a/src/arkode/fmod/farkode_mristep_mod.f90 +++ b/src/arkode/fmod/farkode_mristep_mod.f90 @@ -1732,8 +1732,8 @@ function FMRIStepCoupling_Copy(mric) & subroutine FMRIStepCoupling_Space(mric, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: mric -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c index 3cd395bf66..7012d29bf1 100644 --- a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c +++ b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.c @@ -328,14 +328,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_ManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_ManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 index 1c747bb028..c36042496f 100644 --- a/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 +++ b/src/nvector/manyvector/fmod/fnvector_manyvector_mod.f90 @@ -744,8 +744,8 @@ subroutine FN_VDestroy_ManyVector(v) subroutine FN_VSpace_ManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c index 2374d9a846..bbf156e18c 100644 --- a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c +++ b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c @@ -356,14 +356,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_MPIManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_MPIManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 index d214fc462b..a4bb027bcb 100644 --- a/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 +++ b/src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90 @@ -866,8 +866,8 @@ subroutine FN_VDestroy_MPIManyVector(v) subroutine FN_VSpace_MPIManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/openmp/fmod/fnvector_openmp_mod.c b/src/nvector/openmp/fmod/fnvector_openmp_mod.c index 34f3b918df..d173984a44 100644 --- a/src/nvector/openmp/fmod/fnvector_openmp_mod.c +++ b/src/nvector/openmp/fmod/fnvector_openmp_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_OpenMP(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_OpenMP(arg1,arg2,arg3); } diff --git a/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 b/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 index bcdc99e1bf..50a2618282 100644 --- a/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 +++ b/src/nvector/openmp/fmod/fnvector_openmp_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_OpenMP(v) subroutine FN_VSpace_OpenMP(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/parallel/fmod/fnvector_parallel_mod.c b/src/nvector/parallel/fmod/fnvector_parallel_mod.c index 877640429b..3d0aa44e17 100644 --- a/src/nvector/parallel/fmod/fnvector_parallel_mod.c +++ b/src/nvector/parallel/fmod/fnvector_parallel_mod.c @@ -380,14 +380,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Parallel(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Parallel(arg1,arg2,arg3); } diff --git a/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 b/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 index c4a036de7b..715a254c19 100644 --- a/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 +++ b/src/nvector/parallel/fmod/fnvector_parallel_mod.f90 @@ -862,8 +862,8 @@ subroutine FN_VDestroy_Parallel(v) subroutine FN_VSpace_Parallel(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c index 76af5ca784..31aae83b2b 100644 --- a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c +++ b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Pthreads(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Pthreads(arg1,arg2,arg3); } diff --git a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 index d3b92e8269..5af51476e6 100644 --- a/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 +++ b/src/nvector/pthreads/fmod/fnvector_pthreads_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_Pthreads(v) subroutine FN_VSpace_Pthreads(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/serial/fmod/fnvector_serial_mod.c b/src/nvector/serial/fmod/fnvector_serial_mod.c index 7611d0b848..191dd35b8c 100644 --- a/src/nvector/serial/fmod/fnvector_serial_mod.c +++ b/src/nvector/serial/fmod/fnvector_serial_mod.c @@ -326,14 +326,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Serial(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Serial(arg1,arg2,arg3); } diff --git a/src/nvector/serial/fmod/fnvector_serial_mod.f90 b/src/nvector/serial/fmod/fnvector_serial_mod.f90 index bbdc76c8b7..f789b7932b 100644 --- a/src/nvector/serial/fmod/fnvector_serial_mod.f90 +++ b/src/nvector/serial/fmod/fnvector_serial_mod.f90 @@ -706,8 +706,8 @@ subroutine FN_VDestroy_Serial(v) subroutine FN_VSpace_Serial(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/sundials/fmod/fsundials_core_mod.c b/src/sundials/fmod/fsundials_core_mod.c index 4af16b91a4..da4a940a20 100644 --- a/src/sundials/fmod/fsundials_core_mod.c +++ b/src/sundials/fmod/fsundials_core_mod.c @@ -906,14 +906,14 @@ SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace(arg1,arg2,arg3); } diff --git a/src/sundials/fmod/fsundials_core_mod.f90 b/src/sundials/fmod/fsundials_core_mod.f90 index 4334dfe0d3..ac4e05c382 100644 --- a/src/sundials/fmod/fsundials_core_mod.f90 +++ b/src/sundials/fmod/fsundials_core_mod.f90 @@ -2743,8 +2743,8 @@ subroutine FN_VDestroy(v) subroutine FN_VSpace(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 From b6c67fbecf10f55b632f9527458dbbaaee36aee2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 11:36:43 -0800 Subject: [PATCH 031/101] update places where Space is called and wrong type of args is used --- src/arkode/arkode.c | 8 ++++---- src/arkode/arkode_arkstep.c | 4 ++-- src/arkode/arkode_arkstep_io.c | 6 +++--- src/arkode/arkode_bandpre.c | 2 +- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_erkstep_io.c | 6 +++--- src/arkode/arkode_impl.h | 4 ++-- src/arkode/arkode_ls.c | 4 ++-- src/arkode/arkode_mristep.c | 4 ++-- src/cvode/cvode.c | 2 +- src/cvode/cvode_bandpre.c | 2 +- src/cvode/cvode_ls.c | 2 +- src/cvodes/cvodes.c | 2 +- src/cvodes/cvodes_bandpre.c | 2 +- src/cvodes/cvodes_ls.c | 2 +- src/ida/ida.c | 2 +- src/ida/ida_ls.c | 2 +- src/idas/idas.c | 2 +- src/idas/idas_ls.c | 2 +- src/kinsol/kinsol_ls.c | 2 +- 20 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 69ec2d37fe..8adbc77c16 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -228,7 +228,7 @@ int arkResize(ARKodeMem ark_mem, N_Vector y0, sunrealtype hscale, sunrealtype t0, ARKVecResizeFn resize, void* resize_data) { sunbooleantype resizeOK; - sunindextype lrw1, liw1, lrw_diff, liw_diff; + long int lrw1, liw1, lrw_diff, liw_diff; int retval; /* Check ark_mem */ @@ -1329,7 +1329,7 @@ int arkInit(ARKodeMem ark_mem, sunrealtype t0, N_Vector y0, int init_type) { sunbooleantype stepperOK, nvectorOK, allocOK; int retval; - sunindextype lrw1, liw1; + long int lrw1, liw1; /* Check ark_mem */ if (ark_mem == NULL) @@ -1649,7 +1649,7 @@ sunbooleantype arkAllocVec(ARKodeMem ark_mem, N_Vector tmpl, N_Vector* v) } sunbooleantype arkAllocVecArray(int count, N_Vector tmpl, N_Vector** v, - sunindextype lrw1, long int* lrw, + long int lrw1, long int* lrw, sunindextype liw1, long int* liw) { /* allocate the new vector array if necessary */ @@ -1682,7 +1682,7 @@ void arkFreeVec(ARKodeMem ark_mem, N_Vector* v) } } -void arkFreeVecArray(int count, N_Vector** v, sunindextype lrw1, long int* lrw, +void arkFreeVecArray(int count, N_Vector** v, long int lrw1, long int* lrw, sunindextype liw1, long int* liw) { if (*v != NULL) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 7e4361c516..e8fa748788 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -240,7 +240,7 @@ int ARKStepResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ARKodeMem ark_mem; ARKodeARKStepMem step_mem; SUNNonlinearSolver NLS; - sunindextype lrw1, liw1, lrw_diff, liw_diff; + long int lrw1, liw1, lrw_diff, liw_diff; int i, retval; /* access ARKodeARKStepMem structure */ @@ -2243,7 +2243,7 @@ int arkStep_SetButcherTables(ARKodeMem ark_mem) { int etable, itable; ARKodeARKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; /* access ARKodeARKStepMem structure */ if (ark_mem->step_mem == NULL) diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index 58f78862c3..539b5a6747 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -1036,7 +1036,7 @@ int ARKStepSetOrder(void* arkode_mem, int ord) { ARKodeMem ark_mem; ARKodeARKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; int retval; /* access ARKodeARKStepMem structure */ @@ -1270,7 +1270,7 @@ int ARKStepSetTables(void* arkode_mem, int q, int p, ARKodeButcherTable Bi, int retval; ARKodeMem ark_mem; ARKodeARKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; /* access ARKodeARKStepMem structure */ retval = arkStep_AccessStepMem(arkode_mem, __func__, &ark_mem, &step_mem); @@ -1436,7 +1436,7 @@ int ARKStepSetTableNum(void* arkode_mem, ARKODE_DIRKTableID itable, int flag, retval; ARKodeMem ark_mem; ARKodeARKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; /* access ARKodeARKStepMem structure */ retval = arkStep_AccessStepMem(arkode_mem, __func__, &ark_mem, &step_mem); diff --git a/src/arkode/arkode_bandpre.c b/src/arkode/arkode_bandpre.c index 6eb5f576da..fd21cbb680 100644 --- a/src/arkode/arkode_bandpre.c +++ b/src/arkode/arkode_bandpre.c @@ -196,7 +196,7 @@ int ARKBandPrecGetWorkSpace(void* arkode_mem, long int* lenrwBP, long int* leniw ARKodeMem ark_mem; ARKLsMem arkls_mem; ARKBandPrecData pdata; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 1e80ea0f20..24b2630662 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -142,7 +142,7 @@ int ERKStepResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, { ARKodeMem ark_mem; ARKodeERKStepMem step_mem; - sunindextype lrw1, liw1, lrw_diff, liw_diff; + long int lrw1, liw1, lrw_diff, liw_diff; int i, retval; /* access ARKodeERKStepMem structure */ diff --git a/src/arkode/arkode_erkstep_io.c b/src/arkode/arkode_erkstep_io.c index 15904203a0..16619fa94b 100644 --- a/src/arkode/arkode_erkstep_io.c +++ b/src/arkode/arkode_erkstep_io.c @@ -486,7 +486,7 @@ int ERKStepSetOrder(void* arkode_mem, int ord) { ARKodeMem ark_mem; ARKodeERKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; int retval; /* access ARKodeERKStepMem structure */ @@ -526,7 +526,7 @@ int ERKStepSetTable(void* arkode_mem, ARKodeButcherTable B) { ARKodeMem ark_mem; ARKodeERKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; int retval; /* access ARKodeERKStepMem structure */ @@ -584,7 +584,7 @@ int ERKStepSetTableNum(void* arkode_mem, ARKODE_ERKTableID etable) { ARKodeMem ark_mem; ARKodeERKStepMem step_mem; - sunindextype Blrw, Bliw; + long int Blrw, Bliw; int retval; /* access ARKodeERKStepMem structure */ diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 54065a7fcb..e484bf00c2 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -875,10 +875,10 @@ void arkProcessError(ARKodeMem ark_mem, int error_code, int line, int arkInit(ARKodeMem ark_mem, sunrealtype t0, N_Vector y0, int init_type); sunbooleantype arkAllocVec(ARKodeMem ark_mem, N_Vector tmpl, N_Vector* v); sunbooleantype arkAllocVecArray(int count, N_Vector tmpl, N_Vector** v, - sunindextype lrw1, long int* lrw, + long int lrw1, long int* lrw, sunindextype liw1, long int* liw); void arkFreeVec(ARKodeMem ark_mem, N_Vector* v); -void arkFreeVecArray(int count, N_Vector** v, sunindextype lrw1, long int* lrw, +void arkFreeVecArray(int count, N_Vector** v, long int lrw1, long int* lrw, sunindextype liw1, long int* liw); sunbooleantype arkResizeVec(ARKodeMem ark_mem, ARKVecResizeFn resize, void* resize_data, sunindextype lrw_diff, diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index bf43998744..53576feb8c 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -944,7 +944,7 @@ int arkLSGetWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) { ARKodeMem ark_mem; ARKLsMem arkls_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; @@ -1367,7 +1367,7 @@ int arkLSGetMassWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) { ARKodeMem ark_mem; ARKLsMassMem arkls_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 25d1620834..21f700581b 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -230,7 +230,7 @@ int MRIStepResize(void* arkode_mem, N_Vector y0, sunrealtype t0, ARKodeMem ark_mem; ARKodeMRIStepMem step_mem; SUNNonlinearSolver NLS; - sunindextype lrw1, liw1, lrw_diff, liw_diff; + long int lrw1, liw1, lrw_diff, liw_diff; int retval; /* access ARKodeMRIStepMem structure */ @@ -2964,7 +2964,7 @@ int mriStepInnerStepper_Reset(MRIStepInnerStepper stepper, sunrealtype tR, int mriStepInnerStepper_AllocVecs(MRIStepInnerStepper stepper, int count, N_Vector tmpl) { - sunindextype lrw1, liw1; + long int lrw1, liw1; if (stepper == NULL) { return ARK_ILL_INPUT; } diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 1bb942b264..27dc1c8b68 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -382,7 +382,7 @@ int CVodeInit(void* cvode_mem, CVRhsFn f, sunrealtype t0, N_Vector y0) { CVodeMem cv_mem; sunbooleantype nvectorOK, allocOK; - sunindextype lrw1, liw1; + long int lrw1, liw1; int i, k, retval; SUNNonlinearSolver NLS; diff --git a/src/cvode/cvode_bandpre.c b/src/cvode/cvode_bandpre.c index f421257440..94959121c7 100644 --- a/src/cvode/cvode_bandpre.c +++ b/src/cvode/cvode_bandpre.c @@ -213,7 +213,7 @@ int CVBandPrecGetWorkSpace(void* cvode_mem, long int* lenrwBP, long int* leniwBP CVodeMem cv_mem; CVLsMem cvls_mem; CVBandPrecData pdata; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int flag; diff --git a/src/cvode/cvode_ls.c b/src/cvode/cvode_ls.c index a51ef16132..d14ba5343e 100644 --- a/src/cvode/cvode_ls.c +++ b/src/cvode/cvode_ls.c @@ -643,7 +643,7 @@ int CVodeGetLinWorkSpace(void* cvode_mem, long int* lenrwLS, long int* leniwLS) { CVodeMem cv_mem; CVLsMem cvls_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index d1e994f05d..1fa941f88f 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -678,7 +678,7 @@ int CVodeInit(void* cvode_mem, CVRhsFn f, sunrealtype t0, N_Vector y0) { CVodeMem cv_mem; sunbooleantype nvectorOK, allocOK; - sunindextype lrw1, liw1; + long int lrw1, liw1; int i, k, retval; SUNNonlinearSolver NLS; diff --git a/src/cvodes/cvodes_bandpre.c b/src/cvodes/cvodes_bandpre.c index 98a9308759..246c2359f9 100644 --- a/src/cvodes/cvodes_bandpre.c +++ b/src/cvodes/cvodes_bandpre.c @@ -216,7 +216,7 @@ int CVBandPrecGetWorkSpace(void* cvode_mem, long int* lenrwBP, long int* leniwBP CVodeMem cv_mem; CVLsMem cvls_mem; CVBandPrecData pdata; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int flag; diff --git a/src/cvodes/cvodes_ls.c b/src/cvodes/cvodes_ls.c index 6c7362d74b..bb19933fb0 100644 --- a/src/cvodes/cvodes_ls.c +++ b/src/cvodes/cvodes_ls.c @@ -719,7 +719,7 @@ int CVodeGetLinWorkSpace(void* cvode_mem, long int* lenrwLS, long int* leniwLS) { CVodeMem cv_mem; CVLsMem cvls_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/ida/ida.c b/src/ida/ida.c index 523675422e..1ee9367632 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -377,7 +377,7 @@ int IDAInit(void* ida_mem, IDAResFn res, sunrealtype t0, N_Vector yy0, int retval; IDAMem IDA_mem; sunbooleantype nvectorOK, allocOK; - sunindextype lrw1, liw1; + long int lrw1, liw1; SUNNonlinearSolver NLS; /* Check ida_mem */ diff --git a/src/ida/ida_ls.c b/src/ida/ida_ls.c index c0a0c73649..2a5c10ae6d 100644 --- a/src/ida/ida_ls.c +++ b/src/ida/ida_ls.c @@ -598,7 +598,7 @@ int IDAGetLinWorkSpace(void* ida_mem, long int* lenrwLS, long int* leniwLS) { IDAMem IDA_mem; IDALsMem idals_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/idas/idas.c b/src/idas/idas.c index d42aebab2c..a0314d086b 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -568,7 +568,7 @@ int IDAInit(void* ida_mem, IDAResFn res, sunrealtype t0, N_Vector yy0, int retval; IDAMem IDA_mem; sunbooleantype nvectorOK, allocOK; - sunindextype lrw1, liw1; + long int lrw1, liw1; SUNNonlinearSolver NLS; /* Check ida_mem */ diff --git a/src/idas/idas_ls.c b/src/idas/idas_ls.c index dc0c0bab52..13ee68bc90 100644 --- a/src/idas/idas_ls.c +++ b/src/idas/idas_ls.c @@ -639,7 +639,7 @@ int IDAGetLinWorkSpace(void* ida_mem, long int* lenrwLS, long int* leniwLS) { IDAMem IDA_mem; IDALsMem idals_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/kinsol/kinsol_ls.c b/src/kinsol/kinsol_ls.c index 684995a069..e1989a8988 100644 --- a/src/kinsol/kinsol_ls.c +++ b/src/kinsol/kinsol_ls.c @@ -414,7 +414,7 @@ int KINGetLinWorkSpace(void* kinmem, long int* lenrwLS, long int* leniwLS) { KINMem kin_mem; KINLsMem kinls_mem; - sunindextype lrw1, liw1; + long int lrw1, liw1; long int lrw, liw; int retval; From ead7727175096a03328eff629c11e7eb9df40bc8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 26 Feb 2024 11:43:48 -0800 Subject: [PATCH 032/101] more places where liw lrw dont match --- src/arkode/arkode_bbdpre.c | 3 ++- src/cvode/cvode_bbdpre.c | 4 ++-- src/cvodes/cvodes_bbdpre.c | 4 ++-- src/ida/ida_bbdpre.c | 4 ++-- src/ida/ida_ls.c | 3 +-- src/idas/idas_bbdpre.c | 4 ++-- src/idas/idas_ls.c | 3 +-- src/kinsol/kinsol_bbdpre.c | 4 ++-- src/nvector/manyvector/nvector_manyvector.c | 3 ++- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/arkode/arkode_bbdpre.c b/src/arkode/arkode_bbdpre.c index 52f2ee29d9..51baa2a437 100644 --- a/src/arkode/arkode_bbdpre.c +++ b/src/arkode/arkode_bbdpre.c @@ -56,7 +56,8 @@ int ARKBBDPrecInit(void* arkode_mem, sunindextype Nlocal, sunindextype mudq, ARKodeMem ark_mem; ARKLsMem arkls_mem; ARKBBDPrecData pdata; - sunindextype muk, mlk, storage_mu, lrw1, liw1; + sunindextype muk, mlk, storage_mu; + long int lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/cvode/cvode_bbdpre.c b/src/cvode/cvode_bbdpre.c index 6c8a28470b..5a73772153 100644 --- a/src/cvode/cvode_bbdpre.c +++ b/src/cvode/cvode_bbdpre.c @@ -60,8 +60,8 @@ int CVBBDPrecInit(void* cvode_mem, sunindextype Nlocal, sunindextype mudq, CVodeMem cv_mem; CVLsMem cvls_mem; CVBBDPrecData pdata; - sunindextype muk, mlk, storage_mu, lrw1, liw1; - long int lrw, liw; + sunindextype muk, mlk, storage_mu; + long int lrw, liw, lrw1, liw1; int flag; if (cvode_mem == NULL) diff --git a/src/cvodes/cvodes_bbdpre.c b/src/cvodes/cvodes_bbdpre.c index af9cba7900..98e3321a29 100644 --- a/src/cvodes/cvodes_bbdpre.c +++ b/src/cvodes/cvodes_bbdpre.c @@ -72,8 +72,8 @@ int CVBBDPrecInit(void* cvode_mem, sunindextype Nlocal, sunindextype mudq, CVodeMem cv_mem; CVLsMem cvls_mem; CVBBDPrecData pdata; - sunindextype muk, mlk, storage_mu, lrw1, liw1; - long int lrw, liw; + sunindextype muk, mlk, storage_mu; + long int lrw, liw, lrw1, liw1;; int flag; if (cvode_mem == NULL) diff --git a/src/ida/ida_bbdpre.c b/src/ida/ida_bbdpre.c index 2352ff3b64..5c96b105bb 100644 --- a/src/ida/ida_bbdpre.c +++ b/src/ida/ida_bbdpre.c @@ -62,8 +62,8 @@ int IDABBDPrecInit(void* ida_mem, sunindextype Nlocal, sunindextype mudq, IDAMem IDA_mem; IDALsMem idals_mem; IBBDPrecData pdata; - sunindextype muk, mlk, storage_mu, lrw1, liw1; - long int lrw, liw; + sunindextype muk, mlk, storage_mu; + long int lrw, liw, lrw1, liw1; int flag; if (ida_mem == NULL) diff --git a/src/ida/ida_ls.c b/src/ida/ida_ls.c index 2a5c10ae6d..78e5cbe983 100644 --- a/src/ida/ida_ls.c +++ b/src/ida/ida_ls.c @@ -598,8 +598,7 @@ int IDAGetLinWorkSpace(void* ida_mem, long int* lenrwLS, long int* leniwLS) { IDAMem IDA_mem; IDALsMem idals_mem; - long int lrw1, liw1; - long int lrw, liw; + long int lrw, liw, lrw1, liw1; int retval; /* access IDALsMem structure */ diff --git a/src/idas/idas_bbdpre.c b/src/idas/idas_bbdpre.c index a584499293..6fc015a2be 100644 --- a/src/idas/idas_bbdpre.c +++ b/src/idas/idas_bbdpre.c @@ -76,8 +76,8 @@ int IDABBDPrecInit(void* ida_mem, sunindextype Nlocal, sunindextype mudq, IDAMem IDA_mem; IDALsMem idals_mem; IBBDPrecData pdata; - sunindextype muk, mlk, storage_mu, lrw1, liw1; - long int lrw, liw; + sunindextype muk, mlk, storage_mu; + long int lrw, liw, lrw1, liw1; int flag; if (ida_mem == NULL) diff --git a/src/idas/idas_ls.c b/src/idas/idas_ls.c index 13ee68bc90..236778dbed 100644 --- a/src/idas/idas_ls.c +++ b/src/idas/idas_ls.c @@ -639,8 +639,7 @@ int IDAGetLinWorkSpace(void* ida_mem, long int* lenrwLS, long int* leniwLS) { IDAMem IDA_mem; IDALsMem idals_mem; - long int lrw1, liw1; - long int lrw, liw; + long int lrw, liw, lrw1, liw1; int retval; /* access IDALsMem structure */ diff --git a/src/kinsol/kinsol_bbdpre.c b/src/kinsol/kinsol_bbdpre.c index 3cd8b78e5f..37d314859c 100644 --- a/src/kinsol/kinsol_bbdpre.c +++ b/src/kinsol/kinsol_bbdpre.c @@ -63,8 +63,8 @@ int KINBBDPrecInit(void* kinmem, sunindextype Nlocal, sunindextype mudq, KINMem kin_mem; KINLsMem kinls_mem; KBBDPrecData pdata; - sunindextype muk, mlk, storage_mu, lrw1, liw1; - long int lrw, liw; + sunindextype muk, mlk, storage_mu; + long int lrw, liw, lrw1, liw1; int flag; if (kinmem == NULL) diff --git a/src/nvector/manyvector/nvector_manyvector.c b/src/nvector/manyvector/nvector_manyvector.c index c1b0c031cc..4c8765b232 100644 --- a/src/nvector/manyvector/nvector_manyvector.c +++ b/src/nvector/manyvector/nvector_manyvector.c @@ -572,7 +572,8 @@ void MVAPPEND(N_VDestroy)(N_Vector v) void MVAPPEND(N_VSpace)(N_Vector v, long int* lrw, long int* liw) { SUNFunctionBegin(v->sunctx); - sunindextype i, lrw1, liw1; + sunindextype i; + long int lrw1, liw1; *lrw = 0; *liw = 0; for (i = 0; i < MANYVECTOR_NUM_SUBVECS(v); i++) From 330ea323eef21a693cf44532c5bac9f2b32f1a79 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 16:48:48 -0700 Subject: [PATCH 033/101] update windows workflow scripts --- .github/workflows/windows-latest-intel.yml | 16 ++++++++-------- .github/workflows/windows-latest-mingw.yml | 2 +- .github/workflows/windows-latest.yml | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index 3ec8b477eb..5d3eb0d6d1 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -33,39 +33,39 @@ jobs: - name: Configure CMake (Shared) run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - - name: Build Shared + - name: Build (Shared) run: cmake --build ${{github.workspace}}/build_shared - - name: Test Shared + - name: Test (Shared) working-directory: ${{github.workspace}}/build_shared run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Shared + MPI) run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - - name: Build Shared + MPI + - name: Build (Shared + MPI) run: cmake --build ${{github.workspace}}/build_shared_mpi - - name: Test Shared + MPI + - name: Test (Shared + MPI) working-directory: ${{github.workspace}}/build_shared_mpi run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - - name: Build Static + - name: Build (Static) run: cmake --build ${{github.workspace}}/build_static - - name: Test Static + - name: Test (Static) working-directory: ${{github.workspace}}/build_static run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static + MPI) run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - - name: Build Static + MPI + - name: Build (Static + MPI) run: cmake --build ${{github.workspace}}/build_static_mpi - - name: Test Static + MPI + - name: Test (Static + MPI) working-directory: ${{github.workspace}}/build_static_mpi run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index e2c0a2b211..b7249cea71 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -62,7 +62,7 @@ jobs: - name: Build # Build program - run: cmake --build ${GITHUB_WORKSPACE}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${GITHUB_WORKSPACE}/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 58fe970993..d8ea4d9e6c 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -23,20 +23,20 @@ jobs: - name: Configure CMake (Shared) run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_shared -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - - name: Build + - name: Build (Shared) run: cmake --build ${{github.workspace}}/build_shared --config ${{env.BUILD_TYPE}} - - name: Test + - name: Test (Shared) working-directory: ${{github.workspace}}/build_shared run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - - name: Build + - name: Build (Static) run: cmake --build ${{github.workspace}}/build_static --config ${{env.BUILD_TYPE}} - - name: Test + - name: Test (Static) working-directory: ${{github.workspace}}/build_static run: ctest -C ${{env.BUILD_TYPE}} From 6dbfe5bbb1ae531214a6b4483e9791a07a8b106f Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 16:52:35 -0700 Subject: [PATCH 034/101] make swig a variable in makefile --- swig/Makefile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/swig/Makefile b/swig/Makefile index f8aabe16ba..9a92008499 100644 --- a/swig/Makefile +++ b/swig/Makefile @@ -14,6 +14,8 @@ # Makefile to generate SUNDIALS fortran interfaces with swig # --------------------------------------------------------------- +SWIG=swig + ARKODE=farkode_mod farkode_arkstep_mod farkode_erkstep_mod farkode_sprkstep_mod farkode_mristep_mod CVODE=fcvode_mod CVODES=fcvodes_mod @@ -48,77 +50,77 @@ modules: core arkode cvode cvodes ida idas kinsol nvector sunmatrix sunlinsol su core: $(CORE:%:sundials/%.i) @for i in ${CORE} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sundials/fmod_int${INT_SIZE} -o ../src/sundials/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} sundials/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sundials/fmod_int${INT_SIZE} -o ../src/sundials/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} sundials/$${i}.i; \ done arkode: $(ARKODE:%:arkode/%.i) @for i in ${ARKODE} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/arkode/fmod_int${INT_SIZE} -o ../src/arkode/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} arkode/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/arkode/fmod_int${INT_SIZE} -o ../src/arkode/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} arkode/$${i}.i; \ done cvode: $(CVODE:%:cvode/%.i) @for i in ${CVODE} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/cvode/fmod_int${INT_SIZE} -o ../src/cvode/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} cvode/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/cvode/fmod_int${INT_SIZE} -o ../src/cvode/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} cvode/$${i}.i; \ done cvodes: $(CVODE:%:cvodes/%.i) @for i in ${CVODES} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/cvodes/fmod_int${INT_SIZE} -o ../src/cvodes/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} cvodes/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/cvodes/fmod_int${INT_SIZE} -o ../src/cvodes/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} cvodes/$${i}.i; \ done ida: $(IDA:%:ida/%.i) @for i in ${IDA} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/ida/fmod_int${INT_SIZE} -o ../src/ida/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} ida/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/ida/fmod_int${INT_SIZE} -o ../src/ida/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} ida/$${i}.i; \ done idas: $(IDAS:%:idas/%.i) @for i in ${IDAS} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/idas/fmod_int${INT_SIZE} -o ../src/idas/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} idas/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/idas/fmod_int${INT_SIZE} -o ../src/idas/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} idas/$${i}.i; \ done kinsol: $(KINSOL:%:kinsol/%.i) @for i in ${KINSOL} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/kinsol/fmod_int${INT_SIZE} -o ../src/kinsol/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} kinsol/$${i}.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/kinsol/fmod_int${INT_SIZE} -o ../src/kinsol/fmod_int${INT_SIZE}/$${i}.c ${INCLUDES} kinsol/$${i}.i; \ done nvector: $(NVECTOR:%:nvector/fnvector_%_mod.i) mpimanyvector @for i in ${NVECTOR} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/nvector/$${i}/fmod_int${INT_SIZE} -o ../src/nvector/$${i}/fmod_int${INT_SIZE}/fnvector_$${i}_mod.c ${INCLUDES} nvector/fnvector_$${i}_mod.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/nvector/$${i}/fmod_int${INT_SIZE} -o ../src/nvector/$${i}/fmod_int${INT_SIZE}/fnvector_$${i}_mod.c ${INCLUDES} nvector/fnvector_$${i}_mod.i; \ done mpimanyvector: nvector/fnvector_mpimanyvector_mod.i set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/nvector/manyvector/fmod_int${INT_SIZE} -o ../src/nvector/manyvector/fmod_int${INT_SIZE}/fnvector_mpimanyvector_mod.c ${INCLUDES} nvector/fnvector_mpimanyvector_mod.i; + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/nvector/manyvector/fmod_int${INT_SIZE} -o ../src/nvector/manyvector/fmod_int${INT_SIZE}/fnvector_mpimanyvector_mod.c ${INCLUDES} nvector/fnvector_mpimanyvector_mod.i; sunmatrix: $(SUNMATRIX:%:sunmatrix/fsunmatrix_%_mod.i) @for i in ${SUNMATRIX} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunmatrix/$${i}/fmod_int${INT_SIZE} -o ../src/sunmatrix/$${i}/fmod_int${INT_SIZE}/fsunmatrix_$${i}_mod.c ${INCLUDES} sunmatrix/fsunmatrix_$${i}_mod.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunmatrix/$${i}/fmod_int${INT_SIZE} -o ../src/sunmatrix/$${i}/fmod_int${INT_SIZE}/fsunmatrix_$${i}_mod.c ${INCLUDES} sunmatrix/fsunmatrix_$${i}_mod.i; \ done sunlinsol: $(SUNLINSOL:%:sunlinsol/fsunlinsol_%_mod.i) @for i in ${SUNLINSOL} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunlinsol/$${i}/fmod_int${INT_SIZE} -o ../src/sunlinsol/$${i}/fmod_int${INT_SIZE}/fsunlinsol_$${i}_mod.c ${INCLUDES} sunlinsol/fsunlinsol_$${i}_mod.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunlinsol/$${i}/fmod_int${INT_SIZE} -o ../src/sunlinsol/$${i}/fmod_int${INT_SIZE}/fsunlinsol_$${i}_mod.c ${INCLUDES} sunlinsol/fsunlinsol_$${i}_mod.i; \ done sunnonlinsol: $(SUNNONLINSOL:%:sunnonlinsol/fsunnonlinsol_%_mod.i) @for i in ${SUNNONLINSOL} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunnonlinsol/$${i}/fmod_int${INT_SIZE} -o ../src/sunnonlinsol/$${i}/fmod_int${INT_SIZE}/fsunnonlinsol_$${i}_mod.c ${INCLUDES} sunnonlinsol/fsunnonlinsol_$${i}_mod.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunnonlinsol/$${i}/fmod_int${INT_SIZE} -o ../src/sunnonlinsol/$${i}/fmod_int${INT_SIZE}/fsunnonlinsol_$${i}_mod.c ${INCLUDES} sunnonlinsol/fsunnonlinsol_$${i}_mod.i; \ done sunadaptcontroller: $(SUNADAPTCONTROLLER:%:sunadaptcontroller/fsunadaptcontroller_%_mod.i) @for i in ${SUNADAPTCONTROLLER} ; do \ set -x; \ - swig -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunadaptcontroller/$${i}/fmod_int${INT_SIZE} -o ../src/sunadaptcontroller/$${i}/fmod_int${INT_SIZE}/fsunadaptcontroller_$${i}_mod.c ${INCLUDES} sunadaptcontroller/fsunadaptcontroller_$${i}_mod.i; \ + ${SWIG} -DGENERATE_INT${INT_SIZE} -fortran -outdir ../src/sunadaptcontroller/$${i}/fmod_int${INT_SIZE} -o ../src/sunadaptcontroller/$${i}/fmod_int${INT_SIZE}/fsunadaptcontroller_$${i}_mod.c ${INCLUDES} sunadaptcontroller/fsunadaptcontroller_$${i}_mod.i; \ done clean: From 6a474134eb1e9b1172aa788b4a6f3b3c16984040 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 16:53:12 -0700 Subject: [PATCH 035/101] regen fortran --- src/arkode/fmod_int32/farkode_mod.c | 20 +++++++++---------- src/arkode/fmod_int32/farkode_mod.f90 | 8 ++++---- src/arkode/fmod_int32/farkode_mristep_mod.c | 10 +++++----- src/arkode/fmod_int32/farkode_mristep_mod.f90 | 4 ++-- src/arkode/fmod_int64/farkode_mod.c | 20 +++++++++---------- src/arkode/fmod_int64/farkode_mod.f90 | 8 ++++---- .../fmod_int32/fnvector_manyvector_mod.c | 10 +++++----- .../fmod_int32/fnvector_manyvector_mod.f90 | 4 ++-- .../fmod_int32/fnvector_mpimanyvector_mod.c | 10 +++++----- .../fmod_int32/fnvector_mpimanyvector_mod.f90 | 4 ++-- .../openmp/fmod_int32/fnvector_openmp_mod.c | 10 +++++----- .../openmp/fmod_int32/fnvector_openmp_mod.f90 | 4 ++-- .../fmod_int32/fnvector_parallel_mod.c | 10 +++++----- .../fmod_int32/fnvector_parallel_mod.f90 | 4 ++-- .../fmod_int32/fnvector_pthreads_mod.c | 10 +++++----- .../fmod_int32/fnvector_pthreads_mod.f90 | 4 ++-- .../serial/fmod_int32/fnvector_serial_mod.c | 10 +++++----- .../serial/fmod_int32/fnvector_serial_mod.f90 | 4 ++-- src/sundials/fmod_int32/fsundials_core_mod.c | 10 +++++----- .../fmod_int32/fsundials_core_mod.f90 | 4 ++-- src/sundials/fmod_int64/fsundials_core_mod.c | 10 +++++----- .../fmod_int64/fsundials_core_mod.f90 | 4 ++-- 22 files changed, 91 insertions(+), 91 deletions(-) diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 1423d2e582..e1a54bf6d5 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -2610,14 +2610,14 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeButcherTable arg1 = (ARKodeButcherTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeButcherTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeButcherTable_Space(arg1,arg2,arg3); } @@ -2967,14 +2967,14 @@ SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { } -SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeSPRKTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 366867f40a..7393c9c1e9 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -5025,8 +5025,8 @@ function FARKodeButcherTable_Copy(b) & subroutine FARKodeButcherTable_Space(b, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: b -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 @@ -5445,8 +5445,8 @@ subroutine FARKodeSPRKTable_Write(sprk_table, outfile) subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod_int32/farkode_mristep_mod.c b/src/arkode/fmod_int32/farkode_mristep_mod.c index 35721938c4..28ec0d195c 100644 --- a/src/arkode/fmod_int32/farkode_mristep_mod.c +++ b/src/arkode/fmod_int32/farkode_mristep_mod.c @@ -599,14 +599,14 @@ SWIGEXPORT void * _wrap_FMRIStepCoupling_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, long *farg2, long *farg3) { MRIStepCoupling arg1 = (MRIStepCoupling) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (MRIStepCoupling)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); MRIStepCoupling_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int32/farkode_mristep_mod.f90 b/src/arkode/fmod_int32/farkode_mristep_mod.f90 index 74a3de5637..faa79f53e3 100644 --- a/src/arkode/fmod_int32/farkode_mristep_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mristep_mod.f90 @@ -1749,8 +1749,8 @@ function FMRIStepCoupling_Copy(mric) & subroutine FMRIStepCoupling_Space(mric, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: mric -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 7b2c3c9811..772e9ecffd 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -2610,14 +2610,14 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeButcherTable arg1 = (ARKodeButcherTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeButcherTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeButcherTable_Space(arg1,arg2,arg3); } @@ -2967,14 +2967,14 @@ SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { } -SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, long *farg2, long *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (ARKodeSPRKTable)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index e627472572..76a40021b9 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -5025,8 +5025,8 @@ function FARKodeButcherTable_Copy(b) & subroutine FARKodeButcherTable_Space(b, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: b -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 @@ -5445,8 +5445,8 @@ subroutine FARKodeSPRKTable_Write(sprk_table, outfile) subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c index 39cc98fdf7..817493fe6f 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c +++ b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c @@ -328,14 +328,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_ManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_ManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 index a9e0c7ea09..bb95b47366 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 +++ b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 @@ -748,8 +748,8 @@ subroutine FN_VDestroy_ManyVector(v) subroutine FN_VSpace_ManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c index b567955a3d..aa0aada90b 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c +++ b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c @@ -356,14 +356,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_MPIManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_MPIManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 index 2226643c27..5ff68927de 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 +++ b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 @@ -870,8 +870,8 @@ subroutine FN_VDestroy_MPIManyVector(v) subroutine FN_VSpace_MPIManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c index ddf0295838..f3864aceba 100644 --- a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c +++ b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_OpenMP(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_OpenMP(arg1,arg2,arg3); } diff --git a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 index e5f7cdc3f2..26a4daea6a 100644 --- a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 +++ b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_OpenMP(v) subroutine FN_VSpace_OpenMP(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c index cdbd1f87c3..938f839b53 100644 --- a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c +++ b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c @@ -380,14 +380,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Parallel(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Parallel(arg1,arg2,arg3); } diff --git a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 index 571b01856b..7ac6ef1a1c 100644 --- a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 +++ b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 @@ -862,8 +862,8 @@ subroutine FN_VDestroy_Parallel(v) subroutine FN_VSpace_Parallel(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c index 77ac40a163..2cab775ca2 100644 --- a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c +++ b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Pthreads(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Pthreads(arg1,arg2,arg3); } diff --git a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 index fb2af230a5..5ab77dd3ff 100644 --- a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 +++ b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_Pthreads(v) subroutine FN_VSpace_Pthreads(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/serial/fmod_int32/fnvector_serial_mod.c b/src/nvector/serial/fmod_int32/fnvector_serial_mod.c index 14ddfe38a0..e7217aa1ce 100644 --- a/src/nvector/serial/fmod_int32/fnvector_serial_mod.c +++ b/src/nvector/serial/fmod_int32/fnvector_serial_mod.c @@ -326,14 +326,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Serial(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace_Serial(arg1,arg2,arg3); } diff --git a/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 b/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 index ac6df66be2..482c838c25 100644 --- a/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 +++ b/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 @@ -706,8 +706,8 @@ subroutine FN_VDestroy_Serial(v) subroutine FN_VSpace_Serial(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/sundials/fmod_int32/fsundials_core_mod.c b/src/sundials/fmod_int32/fsundials_core_mod.c index ad1f31a295..378f417f03 100644 --- a/src/sundials/fmod_int32/fsundials_core_mod.c +++ b/src/sundials/fmod_int32/fsundials_core_mod.c @@ -902,14 +902,14 @@ SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int32_t *farg2, int32_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace(arg1,arg2,arg3); } diff --git a/src/sundials/fmod_int32/fsundials_core_mod.f90 b/src/sundials/fmod_int32/fsundials_core_mod.f90 index f47a3141f2..d5e2702b70 100644 --- a/src/sundials/fmod_int32/fsundials_core_mod.f90 +++ b/src/sundials/fmod_int32/fsundials_core_mod.f90 @@ -2750,8 +2750,8 @@ subroutine FN_VDestroy(v) subroutine FN_VSpace(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/sundials/fmod_int64/fsundials_core_mod.c b/src/sundials/fmod_int64/fsundials_core_mod.c index 9fa73f722b..18fed71ce7 100644 --- a/src/sundials/fmod_int64/fsundials_core_mod.c +++ b/src/sundials/fmod_int64/fsundials_core_mod.c @@ -902,14 +902,14 @@ SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int64_t *farg2, int64_t *farg3) { +SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, long *farg2, long *farg3) { N_Vector arg1 = (N_Vector) 0 ; - sunindextype *arg2 = (sunindextype *) 0 ; - sunindextype *arg3 = (sunindextype *) 0 ; + long *arg2 = (long *) 0 ; + long *arg3 = (long *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (sunindextype *)(farg2); - arg3 = (sunindextype *)(farg3); + arg2 = (long *)(farg2); + arg3 = (long *)(farg3); N_VSpace(arg1,arg2,arg3); } diff --git a/src/sundials/fmod_int64/fsundials_core_mod.f90 b/src/sundials/fmod_int64/fsundials_core_mod.f90 index c51487dd30..3661cacda1 100644 --- a/src/sundials/fmod_int64/fsundials_core_mod.f90 +++ b/src/sundials/fmod_int64/fsundials_core_mod.f90 @@ -2750,8 +2750,8 @@ subroutine FN_VDestroy(v) subroutine FN_VSpace(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw -integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_LONG), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 From 8b915d4069b851453cf6291a2c31bc9782def87f Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 16:56:13 -0700 Subject: [PATCH 036/101] 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 From 2a70714ada51d998a44f322826b228d580b77ff0 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 16:57:28 -0700 Subject: [PATCH 037/101] undo restriction to only one build type --- cmake/SundialsBuildOptionsPre.cmake | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cmake/SundialsBuildOptionsPre.cmake b/cmake/SundialsBuildOptionsPre.cmake index 67d44546d1..b78212e720 100644 --- a/cmake/SundialsBuildOptionsPre.cmake +++ b/cmake/SundialsBuildOptionsPre.cmake @@ -115,18 +115,7 @@ set(EXE_EXTRA_LINK_LIBS "${SUNDIALS_MATH_LIBRARY}") # --------------------------------------------------------------- sundials_option(BUILD_STATIC_LIBS BOOL "Build static libraries" ON) - -# There are some bugs in our CMake preventing simulatenous static+shared builds -# from working on Windows. So, on Windows we dont build shared libraries -# by default. -if(WIN32) - sundials_option(BUILD_SHARED_LIBS BOOL "Build shared libraries" OFF) - if(BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS) - message(WARNING "Building SUNDIALS static and shared libraries in the same build directory on Windows is not currently supported.") - endif() -else() - sundials_option(BUILD_SHARED_LIBS BOOL "Build shared libraries" ON) -endif() +sundials_option(BUILD_SHARED_LIBS BOOL "Build shared libraries" ON) # Make sure we build at least one type of libraries if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS) From c0e1315670ea4130e358eb24108e4a6464c43902 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 14 Jun 2024 17:03:48 -0700 Subject: [PATCH 038/101] undo space function update --- include/arkode/arkode_butcher.h | 4 ++-- include/arkode/arkode_mristep.h | 2 +- include/arkode/arkode_sprk.h | 4 ++-- include/nvector/nvector_cuda.h | 4 ++-- include/nvector/nvector_hip.h | 4 ++-- include/nvector/nvector_manyvector.h | 2 +- include/nvector/nvector_mpimanyvector.h | 2 +- include/nvector/nvector_openmp.h | 2 +- include/nvector/nvector_openmpdev.h | 4 ++-- include/nvector/nvector_parallel.h | 2 +- include/nvector/nvector_pthreads.h | 2 +- include/nvector/nvector_raja.h | 4 ++-- include/nvector/nvector_serial.h | 2 +- include/nvector/nvector_sycl.h | 4 ++-- include/nvector/nvector_trilinos.h | 4 ++-- include/sundials/sundials_nvector.h | 4 ++-- src/arkode/arkode_arkstep.c | 4 ++-- src/arkode/arkode_bandpre.c | 2 +- src/arkode/arkode_bbdpre.c | 3 +-- src/arkode/arkode_butcher.c | 4 ++-- src/arkode/arkode_ls.c | 4 ++-- src/arkode/arkode_mri_tables.c | 4 ++-- src/arkode/arkode_sprk.c | 4 ++-- src/arkode/fmod_int32/farkode_mod.c | 20 +++++++++---------- src/arkode/fmod_int32/farkode_mod.f90 | 8 ++++---- src/arkode/fmod_int32/farkode_mristep_mod.c | 10 +++++----- src/arkode/fmod_int32/farkode_mristep_mod.f90 | 4 ++-- src/arkode/fmod_int64/farkode_mod.c | 20 +++++++++---------- src/arkode/fmod_int64/farkode_mod.f90 | 8 ++++---- src/arkode/fmod_int64/farkode_mristep_mod.c | 10 +++++----- src/arkode/fmod_int64/farkode_mristep_mod.f90 | 4 ++-- src/cvode/cvode.c | 2 +- src/cvode/cvode_bandpre.c | 2 +- src/cvode/cvode_bbdpre.c | 4 ++-- src/cvode/cvode_ls.c | 2 +- src/cvodes/cvodes.c | 2 +- src/cvodes/cvodes_bandpre.c | 2 +- src/cvodes/cvodes_bbdpre.c | 4 ++-- src/cvodes/cvodes_ls.c | 2 +- src/ida/ida.c | 2 +- src/ida/ida_bbdpre.c | 4 ++-- src/ida/ida_ls.c | 3 ++- src/idas/idas.c | 2 +- src/idas/idas_bbdpre.c | 4 ++-- src/idas/idas_ls.c | 3 ++- src/kinsol/kinsol.c | 2 +- src/kinsol/kinsol_bbdpre.c | 4 ++-- src/kinsol/kinsol_ls.c | 2 +- .../fmod_int32/fnvector_manyvector_mod.c | 10 +++++----- .../fmod_int32/fnvector_manyvector_mod.f90 | 4 ++-- .../fmod_int32/fnvector_mpimanyvector_mod.c | 10 +++++----- .../fmod_int32/fnvector_mpimanyvector_mod.f90 | 4 ++-- .../fmod_int64/fnvector_manyvector_mod.c | 10 +++++----- .../fmod_int64/fnvector_manyvector_mod.f90 | 4 ++-- .../fmod_int64/fnvector_mpimanyvector_mod.c | 10 +++++----- .../fmod_int64/fnvector_mpimanyvector_mod.f90 | 4 ++-- src/nvector/manyvector/nvector_manyvector.c | 5 ++--- .../openmp/fmod_int32/fnvector_openmp_mod.c | 10 +++++----- .../openmp/fmod_int32/fnvector_openmp_mod.f90 | 4 ++-- .../openmp/fmod_int64/fnvector_openmp_mod.c | 10 +++++----- .../openmp/fmod_int64/fnvector_openmp_mod.f90 | 4 ++-- src/nvector/openmp/nvector_openmp.c | 2 +- src/nvector/openmpdev/nvector_openmpdev.c | 2 +- .../fmod_int32/fnvector_parallel_mod.c | 10 +++++----- .../fmod_int32/fnvector_parallel_mod.f90 | 4 ++-- .../fmod_int64/fnvector_parallel_mod.c | 10 +++++----- .../fmod_int64/fnvector_parallel_mod.f90 | 4 ++-- src/nvector/parallel/nvector_parallel.c | 2 +- src/nvector/parhyp/nvector_parhyp.c | 2 +- src/nvector/petsc/nvector_petsc.c | 2 +- .../fmod_int32/fnvector_pthreads_mod.c | 10 +++++----- .../fmod_int32/fnvector_pthreads_mod.f90 | 4 ++-- .../fmod_int64/fnvector_pthreads_mod.c | 10 +++++----- .../fmod_int64/fnvector_pthreads_mod.f90 | 4 ++-- src/nvector/pthreads/nvector_pthreads.c | 2 +- .../serial/fmod_int32/fnvector_serial_mod.c | 10 +++++----- .../serial/fmod_int32/fnvector_serial_mod.f90 | 4 ++-- .../serial/fmod_int64/fnvector_serial_mod.c | 10 +++++----- .../serial/fmod_int64/fnvector_serial_mod.f90 | 4 ++-- src/nvector/serial/nvector_serial.c | 2 +- src/sundials/fmod_int32/fsundials_core_mod.c | 10 +++++----- .../fmod_int32/fsundials_core_mod.f90 | 4 ++-- src/sundials/fmod_int64/fsundials_core_mod.c | 10 +++++----- .../fmod_int64/fsundials_core_mod.f90 | 4 ++-- src/sundials/sundials_nvector.c | 2 +- src/sunlinsol/pcg/sunlinsol_pcg.c | 2 +- src/sunlinsol/spbcgs/sunlinsol_spbcgs.c | 2 +- src/sunlinsol/spfgmr/sunlinsol_spfgmr.c | 2 +- src/sunlinsol/spgmr/sunlinsol_spgmr.c | 2 +- src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c | 2 +- swig/Makefile | 2 +- 91 files changed, 217 insertions(+), 217 deletions(-) diff --git a/include/arkode/arkode_butcher.h b/include/arkode/arkode_butcher.h index 863d828ace..029b3d1c8d 100644 --- a/include/arkode/arkode_butcher.h +++ b/include/arkode/arkode_butcher.h @@ -50,8 +50,8 @@ SUNDIALS_EXPORT ARKodeButcherTable ARKodeButcherTable_Create(int s, int q, int p sunrealtype* d); SUNDIALS_EXPORT ARKodeButcherTable ARKodeButcherTable_Copy(ARKodeButcherTable B); SUNDIALS_EXPORT void ARKodeButcherTable_Space(ARKodeButcherTable B, - long int* liw, - long int* lrw); + sunindextype* liw, + sunindextype* lrw); SUNDIALS_EXPORT void ARKodeButcherTable_Free(ARKodeButcherTable B); SUNDIALS_EXPORT void ARKodeButcherTable_Write(ARKodeButcherTable B, FILE* outfile); diff --git a/include/arkode/arkode_mristep.h b/include/arkode/arkode_mristep.h index 18c555d001..000bae135a 100644 --- a/include/arkode/arkode_mristep.h +++ b/include/arkode/arkode_mristep.h @@ -128,7 +128,7 @@ SUNDIALS_EXPORT MRIStepCoupling MRIStepCoupling_MIStoMRI(ARKodeButcherTable B, int q, int p); SUNDIALS_EXPORT MRIStepCoupling MRIStepCoupling_Copy(MRIStepCoupling MRIC); SUNDIALS_EXPORT void MRIStepCoupling_Space(MRIStepCoupling MRIC, - long int* liw, long int* lrw); + sunindextype* liw, sunindextype* lrw); SUNDIALS_EXPORT void MRIStepCoupling_Free(MRIStepCoupling MRIC); SUNDIALS_EXPORT void MRIStepCoupling_Write(MRIStepCoupling MRIC, FILE* outfile); diff --git a/include/arkode/arkode_sprk.h b/include/arkode/arkode_sprk.h index 7f5f148de6..1c6263e828 100644 --- a/include/arkode/arkode_sprk.h +++ b/include/arkode/arkode_sprk.h @@ -78,8 +78,8 @@ SUNDIALS_EXPORT void ARKodeSPRKTable_Write(ARKodeSPRKTable sprk_table, FILE* outfile); SUNDIALS_EXPORT -void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_storage, long int* liw, - long int* lrw); +void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_storage, sunindextype* liw, + sunindextype* lrw); SUNDIALS_EXPORT void ARKodeSPRKTable_Free(ARKodeSPRKTable sprk_storage); diff --git a/include/nvector/nvector_cuda.h b/include/nvector/nvector_cuda.h index 15b21fdad0..0c5bc079f3 100644 --- a/include/nvector/nvector_cuda.h +++ b/include/nvector/nvector_cuda.h @@ -114,8 +114,8 @@ static inline N_Vector_ID N_VGetVectorID_Cuda(N_Vector /*v*/) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Cuda(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Cuda(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Cuda(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Cuda(N_Vector v, long int* lrw, - long int* liw); +SUNDIALS_EXPORT void N_VSpace_Cuda(N_Vector v, sunindextype* lrw, + sunindextype* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_Cuda(sunrealtype a, N_Vector x, sunrealtype b, diff --git a/include/nvector/nvector_hip.h b/include/nvector/nvector_hip.h index 5b2f3ede52..caed088adb 100644 --- a/include/nvector/nvector_hip.h +++ b/include/nvector/nvector_hip.h @@ -113,8 +113,8 @@ static inline N_Vector_ID N_VGetVectorID_Hip(N_Vector /*v*/) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Hip(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Hip(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Hip(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Hip(N_Vector v, long int* lrw, - long int* liw); +SUNDIALS_EXPORT void N_VSpace_Hip(N_Vector v, sunindextype* lrw, + sunindextype* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_Hip(sunrealtype a, N_Vector x, sunrealtype b, diff --git a/include/nvector/nvector_manyvector.h b/include/nvector/nvector_manyvector.h index a6e47c237b..ae0eac152e 100644 --- a/include/nvector/nvector_manyvector.h +++ b/include/nvector/nvector_manyvector.h @@ -101,7 +101,7 @@ SUNDIALS_EXPORT void N_VDestroy_ManyVector(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_ManyVector(N_Vector v, long int* lrw, long int* liw); +void N_VSpace_ManyVector(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT sunindextype N_VGetLength_ManyVector(N_Vector v); diff --git a/include/nvector/nvector_mpimanyvector.h b/include/nvector/nvector_mpimanyvector.h index 3a9950f91d..f25125a0e3 100644 --- a/include/nvector/nvector_mpimanyvector.h +++ b/include/nvector/nvector_mpimanyvector.h @@ -108,7 +108,7 @@ SUNDIALS_EXPORT void N_VDestroy_MPIManyVector(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_MPIManyVector(N_Vector v, long int* lrw, long int* liw); +void N_VSpace_MPIManyVector(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_MPIManyVector(N_Vector v); diff --git a/include/nvector/nvector_openmp.h b/include/nvector/nvector_openmp.h index 3dac216812..f52e2274ae 100644 --- a/include/nvector/nvector_openmp.h +++ b/include/nvector/nvector_openmp.h @@ -124,7 +124,7 @@ SUNDIALS_EXPORT void N_VDestroy_OpenMP(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_OpenMP(N_Vector v, long int* lrw, long int* liw); +void N_VSpace_OpenMP(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_OpenMP(N_Vector v); diff --git a/include/nvector/nvector_openmpdev.h b/include/nvector/nvector_openmpdev.h index 33c4ad9de8..b7b4ae31fb 100644 --- a/include/nvector/nvector_openmpdev.h +++ b/include/nvector/nvector_openmpdev.h @@ -117,8 +117,8 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID_OpenMPDEV(N_Vector v); SUNDIALS_EXPORT N_Vector N_VCloneEmpty_OpenMPDEV(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_OpenMPDEV(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_OpenMPDEV(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_OpenMPDEV(N_Vector v, long int* lrw, - long int* liw); +SUNDIALS_EXPORT void N_VSpace_OpenMPDEV(N_Vector v, sunindextype* lrw, + sunindextype* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_OpenMPDEV(sunrealtype a, N_Vector x, diff --git a/include/nvector/nvector_parallel.h b/include/nvector/nvector_parallel.h index 55a003492b..385ca528ed 100644 --- a/include/nvector/nvector_parallel.h +++ b/include/nvector/nvector_parallel.h @@ -130,7 +130,7 @@ SUNDIALS_EXPORT void N_VDestroy_Parallel(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_Parallel(N_Vector v, long int* lrw, long int* liw); +void N_VSpace_Parallel(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_Parallel(N_Vector v); diff --git a/include/nvector/nvector_pthreads.h b/include/nvector/nvector_pthreads.h index d6af8024c5..97ae23008f 100644 --- a/include/nvector/nvector_pthreads.h +++ b/include/nvector/nvector_pthreads.h @@ -160,7 +160,7 @@ SUNDIALS_EXPORT void N_VDestroy_Pthreads(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_Pthreads(N_Vector v, long int* lrw, long int* liw); +void N_VSpace_Pthreads(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_Pthreads(N_Vector v); diff --git a/include/nvector/nvector_raja.h b/include/nvector/nvector_raja.h index c4d86a7b0f..1bcb2a5cc2 100644 --- a/include/nvector/nvector_raja.h +++ b/include/nvector/nvector_raja.h @@ -111,8 +111,8 @@ static inline N_Vector_ID N_VGetVectorID_Raja(N_Vector v) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Raja(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Raja(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Raja(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Raja(N_Vector v, long int* lrw, - long int* liw); +SUNDIALS_EXPORT void N_VSpace_Raja(N_Vector v, sunindextype* lrw, + sunindextype* liw); SUNDIALS_EXPORT void N_VSetArrayPointer_Raja(sunrealtype* v_data, N_Vector v); /* standard vector operations */ diff --git a/include/nvector/nvector_serial.h b/include/nvector/nvector_serial.h index 904ff97dfb..988e090af2 100644 --- a/include/nvector/nvector_serial.h +++ b/include/nvector/nvector_serial.h @@ -115,7 +115,7 @@ SUNDIALS_EXPORT void N_VDestroy_Serial(N_Vector v); SUNDIALS_EXPORT -void N_VSpace_Serial(N_Vector v, long int* lrw, long int* liw); +void N_VSpace_Serial(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer_Serial(N_Vector v); diff --git a/include/nvector/nvector_sycl.h b/include/nvector/nvector_sycl.h index 0cfa236fba..82935ccca6 100644 --- a/include/nvector/nvector_sycl.h +++ b/include/nvector/nvector_sycl.h @@ -113,8 +113,8 @@ static inline N_Vector_ID N_VGetVectorID_Sycl(N_Vector v) SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Sycl(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Sycl(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Sycl(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Sycl(N_Vector v, long int* lrw, - long int* liw); +SUNDIALS_EXPORT void N_VSpace_Sycl(N_Vector v, sunindextype* lrw, + sunindextype* liw); /* standard vector operations */ SUNDIALS_EXPORT void N_VLinearSum_Sycl(sunrealtype a, N_Vector x, sunrealtype b, diff --git a/include/nvector/nvector_trilinos.h b/include/nvector/nvector_trilinos.h index 5d6f02c14f..385cfa0d01 100644 --- a/include/nvector/nvector_trilinos.h +++ b/include/nvector/nvector_trilinos.h @@ -96,8 +96,8 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID_Trilinos(N_Vector v); SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Trilinos(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone_Trilinos(N_Vector w); SUNDIALS_EXPORT void N_VDestroy_Trilinos(N_Vector v); -SUNDIALS_EXPORT void N_VSpace_Trilinos(N_Vector v, long int* lrw, - long int* liw); +SUNDIALS_EXPORT void N_VSpace_Trilinos(N_Vector v, sunindextype* lrw, + sunindextype* liw); SUNDIALS_EXPORT SUNComm N_VGetCommunicator_Trilinos(N_Vector v); SUNDIALS_EXPORT sunindextype N_VGetLength_Trilinos(N_Vector v); SUNDIALS_EXPORT void N_VLinearSum_Trilinos(sunrealtype a, N_Vector x, diff --git a/include/sundials/sundials_nvector.h b/include/sundials/sundials_nvector.h index 362e7c5e76..68ea9340e7 100644 --- a/include/sundials/sundials_nvector.h +++ b/include/sundials/sundials_nvector.h @@ -108,7 +108,7 @@ struct _generic_N_Vector_Ops N_Vector (*nvclone)(N_Vector); N_Vector (*nvcloneempty)(N_Vector); void (*nvdestroy)(N_Vector); - void (*nvspace)(N_Vector, long int*, long int*); + void (*nvspace)(N_Vector, sunindextype*, sunindextype*); sunrealtype* (*nvgetarraypointer)(N_Vector); sunrealtype* (*nvgetdevicearraypointer)(N_Vector); void (*nvsetarraypointer)(sunrealtype*, N_Vector); @@ -217,7 +217,7 @@ SUNDIALS_EXPORT N_Vector_ID N_VGetVectorID(N_Vector w); SUNDIALS_EXPORT N_Vector N_VClone(N_Vector w); SUNDIALS_EXPORT N_Vector N_VCloneEmpty(N_Vector w); SUNDIALS_EXPORT void N_VDestroy(N_Vector v); -SUNDIALS_EXPORT void N_VSpace(N_Vector v, long int* lrw, long int* liw); +SUNDIALS_EXPORT void N_VSpace(N_Vector v, sunindextype* lrw, sunindextype* liw); SUNDIALS_EXPORT sunrealtype* N_VGetArrayPointer(N_Vector v); SUNDIALS_EXPORT sunrealtype* N_VGetDeviceArrayPointer(N_Vector v); SUNDIALS_EXPORT void N_VSetArrayPointer(sunrealtype* v_data, N_Vector v); diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 6ed3b0ee34..5f91285edb 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -398,7 +398,7 @@ int arkStep_Resize(ARKodeMem ark_mem, N_Vector y0, { ARKodeARKStepMem step_mem; SUNNonlinearSolver NLS; - long int lrw1, liw1, lrw_diff, liw_diff; + sunindextype lrw1, liw1, lrw_diff, liw_diff; int i, retval; /* access ARKodeARKStepMem structure */ @@ -2181,7 +2181,7 @@ int arkStep_SetButcherTables(ARKodeMem ark_mem) { int etable, itable; ARKodeARKStepMem step_mem; - long int Blrw, Bliw; + sunindextype Blrw, Bliw; /* access ARKodeARKStepMem structure */ if (ark_mem->step_mem == NULL) diff --git a/src/arkode/arkode_bandpre.c b/src/arkode/arkode_bandpre.c index 35f362aa79..5355311d98 100644 --- a/src/arkode/arkode_bandpre.c +++ b/src/arkode/arkode_bandpre.c @@ -197,7 +197,7 @@ int ARKBandPrecGetWorkSpace(void* arkode_mem, long int* lenrwBP, long int* leniw ARKodeMem ark_mem; ARKLsMem arkls_mem; ARKBandPrecData pdata; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/arkode/arkode_bbdpre.c b/src/arkode/arkode_bbdpre.c index 1319cfa9db..f6445c8ede 100644 --- a/src/arkode/arkode_bbdpre.c +++ b/src/arkode/arkode_bbdpre.c @@ -56,8 +56,7 @@ int ARKBBDPrecInit(void* arkode_mem, sunindextype Nlocal, sunindextype mudq, ARKodeMem ark_mem; ARKLsMem arkls_mem; ARKBBDPrecData pdata; - sunindextype muk, mlk, storage_mu; - long int lrw1, liw1; + sunindextype muk, mlk, storage_mu, lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/arkode/arkode_butcher.c b/src/arkode/arkode_butcher.c index 825f66bfdc..f0d4326d39 100644 --- a/src/arkode/arkode_butcher.c +++ b/src/arkode/arkode_butcher.c @@ -328,8 +328,8 @@ ARKodeButcherTable ARKodeButcherTable_Copy(ARKodeButcherTable B) /*--------------------------------------------------------------- Routine to query the Butcher table structure workspace size ---------------------------------------------------------------*/ -void ARKodeButcherTable_Space(ARKodeButcherTable B, long int* liw, - long int* lrw) +void ARKodeButcherTable_Space(ARKodeButcherTable B, sunindextype* liw, + sunindextype* lrw) { /* initialize outputs and return if B is not allocated */ *liw = 0; diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index 60f32fae70..646b87ab6f 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -1156,7 +1156,7 @@ int ARKodeGetLinWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) { ARKodeMem ark_mem; ARKLsMem arkls_mem; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int retval; @@ -1824,7 +1824,7 @@ int ARKodeGetMassWorkSpace(void* arkode_mem, long int* lenrw, long int* leniw) { ARKodeMem ark_mem; ARKLsMassMem arkls_mem; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/arkode/arkode_mri_tables.c b/src/arkode/arkode_mri_tables.c index 18da20f595..fa6dd9b256 100644 --- a/src/arkode/arkode_mri_tables.c +++ b/src/arkode/arkode_mri_tables.c @@ -444,8 +444,8 @@ MRIStepCoupling MRIStepCoupling_Copy(MRIStepCoupling MRIC) /*--------------------------------------------------------------- Routine to query the MRIStepCoupling structure workspace size ---------------------------------------------------------------*/ -void MRIStepCoupling_Space(MRIStepCoupling MRIC, long int* liw, - long int* lrw) +void MRIStepCoupling_Space(MRIStepCoupling MRIC, sunindextype* liw, + sunindextype* lrw) { /* initialize outputs and return if MRIC is not allocated */ *liw = 0; diff --git a/src/arkode/arkode_sprk.c b/src/arkode/arkode_sprk.c index f48b8dabf1..a7d0349416 100644 --- a/src/arkode/arkode_sprk.c +++ b/src/arkode/arkode_sprk.c @@ -541,8 +541,8 @@ ARKodeSPRKTable ARKodeSPRKTable_Copy(ARKodeSPRKTable that_sprk_table) return sprk_table; } -void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, long int* liw, - long int* lrw) +void ARKodeSPRKTable_Space(ARKodeSPRKTable sprk_table, sunindextype* liw, + sunindextype* lrw) { *liw = 2; *lrw = sprk_table->stages * 2; diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index e1a54bf6d5..1423d2e582 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -2610,14 +2610,14 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, int32_t *farg2, int32_t *farg3) { ARKodeButcherTable arg1 = (ARKodeButcherTable) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (ARKodeButcherTable)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); ARKodeButcherTable_Space(arg1,arg2,arg3); } @@ -2967,14 +2967,14 @@ SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { } -SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int32_t *farg2, int32_t *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (ARKodeSPRKTable)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 7393c9c1e9..366867f40a 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -5025,8 +5025,8 @@ function FARKodeButcherTable_Copy(b) & subroutine FARKodeButcherTable_Space(b, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: b -integer(C_LONG), dimension(*), target, intent(inout) :: liw -integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 @@ -5445,8 +5445,8 @@ subroutine FARKodeSPRKTable_Write(sprk_table, outfile) subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage -integer(C_LONG), dimension(*), target, intent(inout) :: liw -integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod_int32/farkode_mristep_mod.c b/src/arkode/fmod_int32/farkode_mristep_mod.c index 28ec0d195c..35721938c4 100644 --- a/src/arkode/fmod_int32/farkode_mristep_mod.c +++ b/src/arkode/fmod_int32/farkode_mristep_mod.c @@ -599,14 +599,14 @@ SWIGEXPORT void * _wrap_FMRIStepCoupling_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, int32_t *farg2, int32_t *farg3) { MRIStepCoupling arg1 = (MRIStepCoupling) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (MRIStepCoupling)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); MRIStepCoupling_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int32/farkode_mristep_mod.f90 b/src/arkode/fmod_int32/farkode_mristep_mod.f90 index faa79f53e3..74a3de5637 100644 --- a/src/arkode/fmod_int32/farkode_mristep_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mristep_mod.f90 @@ -1749,8 +1749,8 @@ function FMRIStepCoupling_Copy(mric) & subroutine FMRIStepCoupling_Space(mric, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: mric -integer(C_LONG), dimension(*), target, intent(inout) :: liw -integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 772e9ecffd..7b2c3c9811 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -2610,14 +2610,14 @@ SWIGEXPORT void * _wrap_FARKodeButcherTable_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FARKodeButcherTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { ARKodeButcherTable arg1 = (ARKodeButcherTable) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (ARKodeButcherTable)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); ARKodeButcherTable_Space(arg1,arg2,arg3); } @@ -2967,14 +2967,14 @@ SWIGEXPORT void _wrap_FARKodeSPRKTable_Write(void *farg1, void *farg2) { } -SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FARKodeSPRKTable_Space(void *farg1, int64_t *farg2, int64_t *farg3) { ARKodeSPRKTable arg1 = (ARKodeSPRKTable) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (ARKodeSPRKTable)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); ARKodeSPRKTable_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 76a40021b9..e627472572 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -5025,8 +5025,8 @@ function FARKodeButcherTable_Copy(b) & subroutine FARKodeButcherTable_Space(b, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: b -integer(C_LONG), dimension(*), target, intent(inout) :: liw -integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 @@ -5445,8 +5445,8 @@ subroutine FARKodeSPRKTable_Write(sprk_table, outfile) subroutine FARKodeSPRKTable_Space(sprk_storage, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: sprk_storage -integer(C_LONG), dimension(*), target, intent(inout) :: liw -integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/arkode/fmod_int64/farkode_mristep_mod.c b/src/arkode/fmod_int64/farkode_mristep_mod.c index 28ec0d195c..c2e254fa54 100644 --- a/src/arkode/fmod_int64/farkode_mristep_mod.c +++ b/src/arkode/fmod_int64/farkode_mristep_mod.c @@ -599,14 +599,14 @@ SWIGEXPORT void * _wrap_FMRIStepCoupling_Copy(void *farg1) { } -SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FMRIStepCoupling_Space(void *farg1, int64_t *farg2, int64_t *farg3) { MRIStepCoupling arg1 = (MRIStepCoupling) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (MRIStepCoupling)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); MRIStepCoupling_Space(arg1,arg2,arg3); } diff --git a/src/arkode/fmod_int64/farkode_mristep_mod.f90 b/src/arkode/fmod_int64/farkode_mristep_mod.f90 index faa79f53e3..782c3c1df9 100644 --- a/src/arkode/fmod_int64/farkode_mristep_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mristep_mod.f90 @@ -1749,8 +1749,8 @@ function FMRIStepCoupling_Copy(mric) & subroutine FMRIStepCoupling_Space(mric, liw, lrw) use, intrinsic :: ISO_C_BINDING type(C_PTR) :: mric -integer(C_LONG), dimension(*), target, intent(inout) :: liw -integer(C_LONG), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index e53f2afac0..0558991e85 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -367,7 +367,7 @@ int CVodeInit(void* cvode_mem, CVRhsFn f, sunrealtype t0, N_Vector y0) { CVodeMem cv_mem; sunbooleantype nvectorOK, allocOK; - long int lrw1, liw1; + sunindextype lrw1, liw1; int i, k, retval; SUNNonlinearSolver NLS; diff --git a/src/cvode/cvode_bandpre.c b/src/cvode/cvode_bandpre.c index a6d7281701..b19c32e1e5 100644 --- a/src/cvode/cvode_bandpre.c +++ b/src/cvode/cvode_bandpre.c @@ -213,7 +213,7 @@ int CVBandPrecGetWorkSpace(void* cvode_mem, long int* lenrwBP, long int* leniwBP CVodeMem cv_mem; CVLsMem cvls_mem; CVBandPrecData pdata; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int flag; diff --git a/src/cvode/cvode_bbdpre.c b/src/cvode/cvode_bbdpre.c index 1ae64695f6..4cdefc1c28 100644 --- a/src/cvode/cvode_bbdpre.c +++ b/src/cvode/cvode_bbdpre.c @@ -60,8 +60,8 @@ int CVBBDPrecInit(void* cvode_mem, sunindextype Nlocal, sunindextype mudq, CVodeMem cv_mem; CVLsMem cvls_mem; CVBBDPrecData pdata; - sunindextype muk, mlk, storage_mu; - long int lrw, liw, lrw1, liw1; + sunindextype muk, mlk, storage_mu, lrw1, liw1; + long int lrw, liw; int flag; if (cvode_mem == NULL) diff --git a/src/cvode/cvode_ls.c b/src/cvode/cvode_ls.c index 006c392ad8..50c60c6e8b 100644 --- a/src/cvode/cvode_ls.c +++ b/src/cvode/cvode_ls.c @@ -643,7 +643,7 @@ int CVodeGetLinWorkSpace(void* cvode_mem, long int* lenrwLS, long int* leniwLS) { CVodeMem cv_mem; CVLsMem cvls_mem; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index 41a620f23e..55399d7349 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -678,7 +678,7 @@ int CVodeInit(void* cvode_mem, CVRhsFn f, sunrealtype t0, N_Vector y0) { CVodeMem cv_mem; sunbooleantype nvectorOK, allocOK; - long int lrw1, liw1; + sunindextype lrw1, liw1; int i, k, retval; SUNNonlinearSolver NLS; diff --git a/src/cvodes/cvodes_bandpre.c b/src/cvodes/cvodes_bandpre.c index ac4c484eda..55dbe1afbb 100644 --- a/src/cvodes/cvodes_bandpre.c +++ b/src/cvodes/cvodes_bandpre.c @@ -216,7 +216,7 @@ int CVBandPrecGetWorkSpace(void* cvode_mem, long int* lenrwBP, long int* leniwBP CVodeMem cv_mem; CVLsMem cvls_mem; CVBandPrecData pdata; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int flag; diff --git a/src/cvodes/cvodes_bbdpre.c b/src/cvodes/cvodes_bbdpre.c index b31d135ad6..12eb1b7883 100644 --- a/src/cvodes/cvodes_bbdpre.c +++ b/src/cvodes/cvodes_bbdpre.c @@ -72,8 +72,8 @@ int CVBBDPrecInit(void* cvode_mem, sunindextype Nlocal, sunindextype mudq, CVodeMem cv_mem; CVLsMem cvls_mem; CVBBDPrecData pdata; - sunindextype muk, mlk, storage_mu; - long int lrw, liw, lrw1, liw1;; + sunindextype muk, mlk, storage_mu, lrw1, liw1; + long int lrw, liw; int flag; if (cvode_mem == NULL) diff --git a/src/cvodes/cvodes_ls.c b/src/cvodes/cvodes_ls.c index 8d52ba61ee..539a69a1d4 100644 --- a/src/cvodes/cvodes_ls.c +++ b/src/cvodes/cvodes_ls.c @@ -719,7 +719,7 @@ int CVodeGetLinWorkSpace(void* cvode_mem, long int* lenrwLS, long int* leniwLS) { CVodeMem cv_mem; CVLsMem cvls_mem; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/ida/ida.c b/src/ida/ida.c index eb6d3c5498..ea06a7a0b3 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -377,7 +377,7 @@ int IDAInit(void* ida_mem, IDAResFn res, sunrealtype t0, N_Vector yy0, int retval; IDAMem IDA_mem; sunbooleantype nvectorOK, allocOK; - long int lrw1, liw1; + sunindextype lrw1, liw1; SUNNonlinearSolver NLS; /* Check ida_mem */ diff --git a/src/ida/ida_bbdpre.c b/src/ida/ida_bbdpre.c index 7022fdd88a..8bce33eea7 100644 --- a/src/ida/ida_bbdpre.c +++ b/src/ida/ida_bbdpre.c @@ -62,8 +62,8 @@ int IDABBDPrecInit(void* ida_mem, sunindextype Nlocal, sunindextype mudq, IDAMem IDA_mem; IDALsMem idals_mem; IBBDPrecData pdata; - sunindextype muk, mlk, storage_mu; - long int lrw, liw, lrw1, liw1; + sunindextype muk, mlk, storage_mu, lrw1, liw1; + long int lrw, liw; int flag; if (ida_mem == NULL) diff --git a/src/ida/ida_ls.c b/src/ida/ida_ls.c index 9cddcb2e3d..a8e2707208 100644 --- a/src/ida/ida_ls.c +++ b/src/ida/ida_ls.c @@ -598,7 +598,8 @@ int IDAGetLinWorkSpace(void* ida_mem, long int* lenrwLS, long int* leniwLS) { IDAMem IDA_mem; IDALsMem idals_mem; - long int lrw, liw, lrw1, liw1; + sunindextype lrw1, liw1; + long int lrw, liw; int retval; /* access IDALsMem structure */ diff --git a/src/idas/idas.c b/src/idas/idas.c index 6312463188..3174660c12 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -568,7 +568,7 @@ int IDAInit(void* ida_mem, IDAResFn res, sunrealtype t0, N_Vector yy0, int retval; IDAMem IDA_mem; sunbooleantype nvectorOK, allocOK; - long int lrw1, liw1; + sunindextype lrw1, liw1; SUNNonlinearSolver NLS; /* Check ida_mem */ diff --git a/src/idas/idas_bbdpre.c b/src/idas/idas_bbdpre.c index b8b12fe197..25521a90d1 100644 --- a/src/idas/idas_bbdpre.c +++ b/src/idas/idas_bbdpre.c @@ -76,8 +76,8 @@ int IDABBDPrecInit(void* ida_mem, sunindextype Nlocal, sunindextype mudq, IDAMem IDA_mem; IDALsMem idals_mem; IBBDPrecData pdata; - sunindextype muk, mlk, storage_mu; - long int lrw, liw, lrw1, liw1; + sunindextype muk, mlk, storage_mu, lrw1, liw1; + long int lrw, liw; int flag; if (ida_mem == NULL) diff --git a/src/idas/idas_ls.c b/src/idas/idas_ls.c index 93489256fc..088bcbb015 100644 --- a/src/idas/idas_ls.c +++ b/src/idas/idas_ls.c @@ -639,7 +639,8 @@ int IDAGetLinWorkSpace(void* ida_mem, long int* lenrwLS, long int* leniwLS) { IDAMem IDA_mem; IDALsMem idals_mem; - long int lrw, liw, lrw1, liw1; + sunindextype lrw1, liw1; + long int lrw, liw; int retval; /* access IDALsMem structure */ diff --git a/src/kinsol/kinsol.c b/src/kinsol/kinsol.c index 43a27eca9c..acfe65fd9b 100644 --- a/src/kinsol/kinsol.c +++ b/src/kinsol/kinsol.c @@ -322,7 +322,7 @@ void* KINCreate(SUNContext sunctx) int KINInit(void* kinmem, KINSysFn func, N_Vector tmpl) { - long int liw1, lrw1; + sunindextype liw1, lrw1; KINMem kin_mem; sunbooleantype allocOK, nvectorOK, dotprodSB; diff --git a/src/kinsol/kinsol_bbdpre.c b/src/kinsol/kinsol_bbdpre.c index ec0eeb8678..7025f38a82 100644 --- a/src/kinsol/kinsol_bbdpre.c +++ b/src/kinsol/kinsol_bbdpre.c @@ -63,8 +63,8 @@ int KINBBDPrecInit(void* kinmem, sunindextype Nlocal, sunindextype mudq, KINMem kin_mem; KINLsMem kinls_mem; KBBDPrecData pdata; - sunindextype muk, mlk, storage_mu; - long int lrw, liw, lrw1, liw1; + sunindextype muk, mlk, storage_mu, lrw1, liw1; + long int lrw, liw; int flag; if (kinmem == NULL) diff --git a/src/kinsol/kinsol_ls.c b/src/kinsol/kinsol_ls.c index 27a9af4221..37c706e01d 100644 --- a/src/kinsol/kinsol_ls.c +++ b/src/kinsol/kinsol_ls.c @@ -414,7 +414,7 @@ int KINGetLinWorkSpace(void* kinmem, long int* lenrwLS, long int* leniwLS) { KINMem kin_mem; KINLsMem kinls_mem; - long int lrw1, liw1; + sunindextype lrw1, liw1; long int lrw, liw; int retval; diff --git a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c index 817493fe6f..39cc98fdf7 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c +++ b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.c @@ -328,14 +328,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_ManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_ManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 index bb95b47366..a9e0c7ea09 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 +++ b/src/nvector/manyvector/fmod_int32/fnvector_manyvector_mod.f90 @@ -748,8 +748,8 @@ subroutine FN_VDestroy_ManyVector(v) subroutine FN_VSpace_ManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c index aa0aada90b..b567955a3d 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c +++ b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.c @@ -356,14 +356,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_MPIManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_MPIManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 index 5ff68927de..2226643c27 100644 --- a/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 +++ b/src/nvector/manyvector/fmod_int32/fnvector_mpimanyvector_mod.f90 @@ -870,8 +870,8 @@ subroutine FN_VDestroy_MPIManyVector(v) subroutine FN_VSpace_MPIManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.c b/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.c index 7012d29bf1..3cd395bf66 100644 --- a/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.c +++ b/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.c @@ -328,14 +328,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_ManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_ManyVector(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_ManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.f90 b/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.f90 index 44e8019317..88587dc2f3 100644 --- a/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.f90 +++ b/src/nvector/manyvector/fmod_int64/fnvector_manyvector_mod.f90 @@ -748,8 +748,8 @@ subroutine FN_VDestroy_ManyVector(v) subroutine FN_VSpace_ManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.c b/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.c index bbf156e18c..2374d9a846 100644 --- a/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.c +++ b/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.c @@ -356,14 +356,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_MPIManyVector(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_MPIManyVector(arg1,arg2,arg3); } diff --git a/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.f90 b/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.f90 index 4c8500af82..39d48fa9be 100644 --- a/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.f90 +++ b/src/nvector/manyvector/fmod_int64/fnvector_mpimanyvector_mod.f90 @@ -870,8 +870,8 @@ subroutine FN_VDestroy_MPIManyVector(v) subroutine FN_VSpace_MPIManyVector(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/manyvector/nvector_manyvector.c b/src/nvector/manyvector/nvector_manyvector.c index e6c67cf1e7..31c74c78da 100644 --- a/src/nvector/manyvector/nvector_manyvector.c +++ b/src/nvector/manyvector/nvector_manyvector.c @@ -571,11 +571,10 @@ void MVAPPEND(N_VDestroy)(N_Vector v) /* Returns the space requirements for the ManyVector, by accumulating this information from all subvectors. */ -void MVAPPEND(N_VSpace)(N_Vector v, long int* lrw, long int* liw) +void MVAPPEND(N_VSpace)(N_Vector v, sunindextype* lrw, sunindextype* liw) { SUNFunctionBegin(v->sunctx); - sunindextype i; - long int lrw1, liw1; + sunindextype i, lrw1, liw1; *lrw = 0; *liw = 0; for (i = 0; i < MANYVECTOR_NUM_SUBVECS(v); i++) diff --git a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c index f3864aceba..ddf0295838 100644 --- a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c +++ b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_OpenMP(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_OpenMP(arg1,arg2,arg3); } diff --git a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 index 26a4daea6a..e5f7cdc3f2 100644 --- a/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 +++ b/src/nvector/openmp/fmod_int32/fnvector_openmp_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_OpenMP(v) subroutine FN_VSpace_OpenMP(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.c b/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.c index d173984a44..34f3b918df 100644 --- a/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.c +++ b/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_OpenMP(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_OpenMP(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_OpenMP(arg1,arg2,arg3); } diff --git a/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.f90 b/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.f90 index 50a2618282..bcdc99e1bf 100644 --- a/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.f90 +++ b/src/nvector/openmp/fmod_int64/fnvector_openmp_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_OpenMP(v) subroutine FN_VSpace_OpenMP(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/openmp/nvector_openmp.c b/src/nvector/openmp/nvector_openmp.c index e1ab30115c..bcb1f6d6b6 100644 --- a/src/nvector/openmp/nvector_openmp.c +++ b/src/nvector/openmp/nvector_openmp.c @@ -391,7 +391,7 @@ void N_VDestroy_OpenMP(N_Vector v) * Get storage requirement for N_Vector */ -void N_VSpace_OpenMP(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_OpenMP(N_Vector v, sunindextype* lrw, sunindextype* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/openmpdev/nvector_openmpdev.c b/src/nvector/openmpdev/nvector_openmpdev.c index 03ac83aed3..773feae94e 100644 --- a/src/nvector/openmpdev/nvector_openmpdev.c +++ b/src/nvector/openmpdev/nvector_openmpdev.c @@ -502,7 +502,7 @@ void N_VDestroy_OpenMPDEV(N_Vector v) * Get storage requirement for N_Vector */ -void N_VSpace_OpenMPDEV(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_OpenMPDEV(N_Vector v, sunindextype* lrw, sunindextype* liw) { *lrw = NV_LENGTH_OMPDEV(v); *liw = 1; diff --git a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c index 938f839b53..cdbd1f87c3 100644 --- a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c +++ b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.c @@ -380,14 +380,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Parallel(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_Parallel(arg1,arg2,arg3); } diff --git a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 index 7ac6ef1a1c..571b01856b 100644 --- a/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 +++ b/src/nvector/parallel/fmod_int32/fnvector_parallel_mod.f90 @@ -862,8 +862,8 @@ subroutine FN_VDestroy_Parallel(v) subroutine FN_VSpace_Parallel(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.c b/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.c index 3d0aa44e17..877640429b 100644 --- a/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.c +++ b/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.c @@ -380,14 +380,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Parallel(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Parallel(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_Parallel(arg1,arg2,arg3); } diff --git a/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.f90 b/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.f90 index 715a254c19..c4a036de7b 100644 --- a/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.f90 +++ b/src/nvector/parallel/fmod_int64/fnvector_parallel_mod.f90 @@ -862,8 +862,8 @@ subroutine FN_VDestroy_Parallel(v) subroutine FN_VSpace_Parallel(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/parallel/nvector_parallel.c b/src/nvector/parallel/nvector_parallel.c index 4c01be3769..eb278bc21d 100644 --- a/src/nvector/parallel/nvector_parallel.c +++ b/src/nvector/parallel/nvector_parallel.c @@ -398,7 +398,7 @@ void N_VDestroy_Parallel(N_Vector v) return; } -void N_VSpace_Parallel(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_Parallel(N_Vector v, sunindextype* lrw, sunindextype* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/parhyp/nvector_parhyp.c b/src/nvector/parhyp/nvector_parhyp.c index 4bb65921a4..aee1f08450 100644 --- a/src/nvector/parhyp/nvector_parhyp.c +++ b/src/nvector/parhyp/nvector_parhyp.c @@ -409,7 +409,7 @@ void N_VDestroy_ParHyp(N_Vector v) return; } -void N_VSpace_ParHyp(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_ParHyp(N_Vector v, sunindextype* lrw, sunindextype* liw) { MPI_Comm comm; int npes; diff --git a/src/nvector/petsc/nvector_petsc.c b/src/nvector/petsc/nvector_petsc.c index 63ca532073..f3accf46bd 100644 --- a/src/nvector/petsc/nvector_petsc.c +++ b/src/nvector/petsc/nvector_petsc.c @@ -383,7 +383,7 @@ void N_VDestroy_Petsc(N_Vector v) return; } -void N_VSpace_Petsc(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_Petsc(N_Vector v, sunindextype* lrw, sunindextype* liw) { MPI_Comm comm; int npes; diff --git a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c index 2cab775ca2..77ac40a163 100644 --- a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c +++ b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Pthreads(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_Pthreads(arg1,arg2,arg3); } diff --git a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 index 5ab77dd3ff..fb2af230a5 100644 --- a/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 +++ b/src/nvector/pthreads/fmod_int32/fnvector_pthreads_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_Pthreads(v) subroutine FN_VSpace_Pthreads(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.c b/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.c index 31aae83b2b..76af5ca784 100644 --- a/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.c +++ b/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.c @@ -332,14 +332,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Pthreads(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Pthreads(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_Pthreads(arg1,arg2,arg3); } diff --git a/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.f90 b/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.f90 index 5af51476e6..d3b92e8269 100644 --- a/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.f90 +++ b/src/nvector/pthreads/fmod_int64/fnvector_pthreads_mod.f90 @@ -718,8 +718,8 @@ subroutine FN_VDestroy_Pthreads(v) subroutine FN_VSpace_Pthreads(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/pthreads/nvector_pthreads.c b/src/nvector/pthreads/nvector_pthreads.c index 8243bbc1cb..5e5314afb3 100644 --- a/src/nvector/pthreads/nvector_pthreads.c +++ b/src/nvector/pthreads/nvector_pthreads.c @@ -466,7 +466,7 @@ void N_VDestroy_Pthreads(N_Vector v) * Get storage requirement for vector */ -void N_VSpace_Pthreads(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_Pthreads(N_Vector v, sunindextype* lrw, sunindextype* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/nvector/serial/fmod_int32/fnvector_serial_mod.c b/src/nvector/serial/fmod_int32/fnvector_serial_mod.c index e7217aa1ce..14ddfe38a0 100644 --- a/src/nvector/serial/fmod_int32/fnvector_serial_mod.c +++ b/src/nvector/serial/fmod_int32/fnvector_serial_mod.c @@ -326,14 +326,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Serial(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_Serial(arg1,arg2,arg3); } diff --git a/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 b/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 index 482c838c25..ac6df66be2 100644 --- a/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 +++ b/src/nvector/serial/fmod_int32/fnvector_serial_mod.f90 @@ -706,8 +706,8 @@ subroutine FN_VDestroy_Serial(v) subroutine FN_VSpace_Serial(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/serial/fmod_int64/fnvector_serial_mod.c b/src/nvector/serial/fmod_int64/fnvector_serial_mod.c index 191dd35b8c..7611d0b848 100644 --- a/src/nvector/serial/fmod_int64/fnvector_serial_mod.c +++ b/src/nvector/serial/fmod_int64/fnvector_serial_mod.c @@ -326,14 +326,14 @@ SWIGEXPORT void _wrap_FN_VDestroy_Serial(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace_Serial(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace_Serial(arg1,arg2,arg3); } diff --git a/src/nvector/serial/fmod_int64/fnvector_serial_mod.f90 b/src/nvector/serial/fmod_int64/fnvector_serial_mod.f90 index f789b7932b..bbdc76c8b7 100644 --- a/src/nvector/serial/fmod_int64/fnvector_serial_mod.f90 +++ b/src/nvector/serial/fmod_int64/fnvector_serial_mod.f90 @@ -706,8 +706,8 @@ subroutine FN_VDestroy_Serial(v) subroutine FN_VSpace_Serial(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/nvector/serial/nvector_serial.c b/src/nvector/serial/nvector_serial.c index 5a509c1cd9..255aca3fb6 100644 --- a/src/nvector/serial/nvector_serial.c +++ b/src/nvector/serial/nvector_serial.c @@ -366,7 +366,7 @@ void N_VDestroy_Serial(N_Vector v) return; } -void N_VSpace_Serial(N_Vector v, long int* lrw, long int* liw) +void N_VSpace_Serial(N_Vector v, sunindextype* lrw, sunindextype* liw) { SUNFunctionBegin(v->sunctx); diff --git a/src/sundials/fmod_int32/fsundials_core_mod.c b/src/sundials/fmod_int32/fsundials_core_mod.c index 378f417f03..ad1f31a295 100644 --- a/src/sundials/fmod_int32/fsundials_core_mod.c +++ b/src/sundials/fmod_int32/fsundials_core_mod.c @@ -902,14 +902,14 @@ SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int32_t *farg2, int32_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace(arg1,arg2,arg3); } diff --git a/src/sundials/fmod_int32/fsundials_core_mod.f90 b/src/sundials/fmod_int32/fsundials_core_mod.f90 index d5e2702b70..f47a3141f2 100644 --- a/src/sundials/fmod_int32/fsundials_core_mod.f90 +++ b/src/sundials/fmod_int32/fsundials_core_mod.f90 @@ -2750,8 +2750,8 @@ subroutine FN_VDestroy(v) subroutine FN_VSpace(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT32_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT32_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/sundials/fmod_int64/fsundials_core_mod.c b/src/sundials/fmod_int64/fsundials_core_mod.c index 18fed71ce7..9fa73f722b 100644 --- a/src/sundials/fmod_int64/fsundials_core_mod.c +++ b/src/sundials/fmod_int64/fsundials_core_mod.c @@ -902,14 +902,14 @@ SWIGEXPORT void _wrap_FN_VDestroy(N_Vector farg1) { } -SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, long *farg2, long *farg3) { +SWIGEXPORT void _wrap_FN_VSpace(N_Vector farg1, int64_t *farg2, int64_t *farg3) { N_Vector arg1 = (N_Vector) 0 ; - long *arg2 = (long *) 0 ; - long *arg3 = (long *) 0 ; + sunindextype *arg2 = (sunindextype *) 0 ; + sunindextype *arg3 = (sunindextype *) 0 ; arg1 = (N_Vector)(farg1); - arg2 = (long *)(farg2); - arg3 = (long *)(farg3); + arg2 = (sunindextype *)(farg2); + arg3 = (sunindextype *)(farg3); N_VSpace(arg1,arg2,arg3); } diff --git a/src/sundials/fmod_int64/fsundials_core_mod.f90 b/src/sundials/fmod_int64/fsundials_core_mod.f90 index 3661cacda1..c51487dd30 100644 --- a/src/sundials/fmod_int64/fsundials_core_mod.f90 +++ b/src/sundials/fmod_int64/fsundials_core_mod.f90 @@ -2750,8 +2750,8 @@ subroutine FN_VDestroy(v) subroutine FN_VSpace(v, lrw, liw) use, intrinsic :: ISO_C_BINDING type(N_Vector), target, intent(inout) :: v -integer(C_LONG), dimension(*), target, intent(inout) :: lrw -integer(C_LONG), dimension(*), target, intent(inout) :: liw +integer(C_INT64_T), dimension(*), target, intent(inout) :: lrw +integer(C_INT64_T), dimension(*), target, intent(inout) :: liw type(C_PTR) :: farg1 type(C_PTR) :: farg2 type(C_PTR) :: farg3 diff --git a/src/sundials/sundials_nvector.c b/src/sundials/sundials_nvector.c index bb249c77de..46791fa66c 100644 --- a/src/sundials/sundials_nvector.c +++ b/src/sundials/sundials_nvector.c @@ -327,7 +327,7 @@ void N_VDestroy(N_Vector v) return; } -void N_VSpace(N_Vector v, long int* lrw, long int* liw) +void N_VSpace(N_Vector v, sunindextype* lrw, sunindextype* liw) { v->ops->nvspace(v, lrw, liw); return; diff --git a/src/sunlinsol/pcg/sunlinsol_pcg.c b/src/sunlinsol/pcg/sunlinsol_pcg.c index bb3a162818..100183e82c 100644 --- a/src/sunlinsol/pcg/sunlinsol_pcg.c +++ b/src/sunlinsol/pcg/sunlinsol_pcg.c @@ -519,7 +519,7 @@ SUNErrCode SUNLinSolSpace_PCG(SUNLinearSolver S, long int* lenrwLS, long int* leniwLS) { SUNFunctionBegin(S->sunctx); - long int liw1, lrw1; + sunindextype liw1, lrw1; N_VSpace(PCG_CONTENT(S)->r, &lrw1, &liw1); SUNCheckLastErr(); *lenrwLS = 1 + lrw1 * 4; diff --git a/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c b/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c index 902d146c06..67df9bcdfe 100644 --- a/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c +++ b/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c @@ -755,7 +755,7 @@ SUNErrCode SUNLinSolSpace_SPBCGS(SUNLinearSolver S, long int* lenrwLS, long int* leniwLS) { SUNFunctionBegin(S->sunctx); - long int liw1, lrw1; + sunindextype liw1, lrw1; if (SPBCGS_CONTENT(S)->vtemp->ops->nvspace) { N_VSpace(SPBCGS_CONTENT(S)->vtemp, &lrw1, &liw1); diff --git a/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c b/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c index 700c7522ab..a1d3ea27ad 100644 --- a/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c +++ b/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c @@ -708,7 +708,7 @@ SUNErrCode SUNLinSolSpace_SPFGMR(SUNLinearSolver S, long int* lenrwLS, { SUNFunctionBegin(S->sunctx); int maxl; - long int liw1, lrw1; + sunindextype liw1, lrw1; maxl = SPFGMR_CONTENT(S)->maxl; if (SPFGMR_CONTENT(S)->vtemp->ops->nvspace) { diff --git a/src/sunlinsol/spgmr/sunlinsol_spgmr.c b/src/sunlinsol/spgmr/sunlinsol_spgmr.c index bc6a56d87b..6ef57661ae 100644 --- a/src/sunlinsol/spgmr/sunlinsol_spgmr.c +++ b/src/sunlinsol/spgmr/sunlinsol_spgmr.c @@ -785,7 +785,7 @@ SUNErrCode SUNLinSolSpace_SPGMR(SUNLinearSolver S, long int* lenrwLS, { SUNFunctionBegin(S->sunctx); int maxl; - long int liw1, lrw1; + sunindextype liw1, lrw1; maxl = SPGMR_CONTENT(S)->maxl; if (SPGMR_CONTENT(S)->vtemp->ops->nvspace) { diff --git a/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c b/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c index b177e1e067..28ad1ef883 100644 --- a/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c +++ b/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c @@ -949,7 +949,7 @@ SUNErrCode SUNLinSolSpace_SPTFQMR(SUNLinearSolver S, long int* lenrwLS, long int* leniwLS) { SUNFunctionBegin(S->sunctx); - long int liw1, lrw1; + sunindextype liw1, lrw1; if (SPTFQMR_CONTENT(S)->vtemp1->ops->nvspace) { N_VSpace(SPTFQMR_CONTENT(S)->vtemp1, &lrw1, &liw1); diff --git a/swig/Makefile b/swig/Makefile index 9a92008499..f874e06c22 100644 --- a/swig/Makefile +++ b/swig/Makefile @@ -14,7 +14,7 @@ # Makefile to generate SUNDIALS fortran interfaces with swig # --------------------------------------------------------------- -SWIG=swig +SWIG=~/.local/bin/swig ARKODE=farkode_mod farkode_arkstep_mod farkode_erkstep_mod farkode_sprkstep_mod farkode_mristep_mod CVODE=fcvode_mod From 30405216bc872e11617b249e5ddc4542a4709f84 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:19:45 -0700 Subject: [PATCH 039/101] turn of deprecated warnings --- .github/workflows/windows-latest-intel.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index 5d3eb0d6d1..1471a04e8d 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build (Shared) run: cmake --build ${{github.workspace}}/build_shared @@ -41,31 +41,31 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Shared + MPI) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - name: Build (Shared + MPI) - run: cmake --build ${{github.workspace}}/build_shared_mpi + run: cmake --build ${{github.workspace}}/build_shared_mpi - name: Test (Shared + MPI) - working-directory: ${{github.workspace}}/build_shared_mpi + working-directory: ${{github.workspace}}/build_shared_mpi run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build (Static) - run: cmake --build ${{github.workspace}}/build_static + run: cmake --build ${{github.workspace}}/build_static - name: Test (Static) - working-directory: ${{github.workspace}}/build_static + working-directory: ${{github.workspace}}/build_static run: ctest -C ${{env.BUILD_TYPE}} - name: Configure CMake (Static + MPI) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 + run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - name: Build (Static + MPI) - run: cmake --build ${{github.workspace}}/build_static_mpi + run: cmake --build ${{github.workspace}}/build_static_mpi - name: Test (Static + MPI) - working-directory: ${{github.workspace}}/build_static_mpi + working-directory: ${{github.workspace}}/build_static_mpi run: ctest -C ${{env.BUILD_TYPE}} From 717798fa6dbbd9940892c1092f025049b795032a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:19:53 -0700 Subject: [PATCH 040/101] use MSYS makefiles --- .github/workflows/windows-latest-mingw.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index b7249cea71..3e61c3dac8 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -50,7 +50,7 @@ jobs: # Configure CMake in a 'build' subdirectory run: | cmake \ - -G "MinGW Makefiles" + -G "MSYS Makefiles" -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ @@ -62,7 +62,7 @@ jobs: - name: Build # Build program - run: cmake --build ${GITHUB_WORKSPACE}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${GITHUB_WORKSPACE}/build - name: Test working-directory: ${{github.workspace}}/build From c1573beb5633bbeee4ccbce2a7f52d298d5f01d1 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:20:33 -0700 Subject: [PATCH 041/101] use a unique fortran module directory for each example --- examples/CMakeLists.txt | 14 ++++++++++---- examples/arkode/F2003_serial/CMakeLists.txt | 2 +- examples/nvector/C_openmp/CMakeLists.txt | 2 +- examples/nvector/manyvector/CMakeLists.txt | 2 +- examples/nvector/mpimanyvector/CMakeLists.txt | 2 +- examples/nvector/mpiplusx/CMakeLists.txt | 2 +- examples/nvector/parallel/CMakeLists.txt | 2 +- examples/nvector/pthreads/CMakeLists.txt | 2 +- examples/nvector/serial/CMakeLists.txt | 2 +- examples/sunlinsol/band/CMakeLists.txt | 2 +- examples/sunlinsol/dense/CMakeLists.txt | 2 +- examples/sunlinsol/klu/CMakeLists.txt | 2 +- examples/sunlinsol/lapackdense/CMakeLists.txt | 2 +- examples/sunlinsol/pcg/serial/CMakeLists.txt | 2 +- examples/sunlinsol/spbcgs/serial/CMakeLists.txt | 2 +- examples/sunlinsol/spfgmr/serial/CMakeLists.txt | 2 +- examples/sunlinsol/spgmr/serial/CMakeLists.txt | 2 +- examples/sunlinsol/sptfqmr/serial/CMakeLists.txt | 2 +- examples/sunmatrix/band/CMakeLists.txt | 2 +- examples/sunmatrix/dense/CMakeLists.txt | 2 +- examples/sunmatrix/sparse/CMakeLists.txt | 2 +- 21 files changed, 30 insertions(+), 24 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a342a109eb..55b1e52db4 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -17,9 +17,9 @@ # 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 -# =============================================================== +# =================================================================== foreach(lang ${_SUNDIALS_ENABLED_LANGS}) if(ENABLE_MPI) @@ -37,7 +37,13 @@ if(ENABLE_ALL_WARNINGS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") endif() +# Initialize CMAKE_Fortran_MODULE_DIRECTORY for examples +set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + +# =================================================================== # Set variables used in generating CMake and Makefiles for examples +# =================================================================== + if(EXAMPLES_INSTALL) set(SHELL "sh") @@ -95,9 +101,9 @@ if(EXAMPLES_INSTALL) endif() -#---------------------------------------- +# =================================================================== # Add specific examples -#---------------------------------------- +# =================================================================== # Add ARKode examples if(BUILD_ARKODE) diff --git a/examples/arkode/F2003_serial/CMakeLists.txt b/examples/arkode/F2003_serial/CMakeLists.txt index 2268891857..c54b72c6c7 100644 --- a/examples/arkode/F2003_serial/CMakeLists.txt +++ b/examples/arkode/F2003_serial/CMakeLists.txt @@ -129,7 +129,7 @@ if(BUILD_SUNLINSOL_KLU) add_executable(${example} ${example}.f90) set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # add example to regression tests sundials_add_test(${example} ${example} diff --git a/examples/nvector/C_openmp/CMakeLists.txt b/examples/nvector/C_openmp/CMakeLists.txt index cfdc518d93..309a22f4a9 100644 --- a/examples/nvector/C_openmp/CMakeLists.txt +++ b/examples/nvector/C_openmp/CMakeLists.txt @@ -115,7 +115,7 @@ foreach(example_tuple ${nvector_openmp_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/manyvector/CMakeLists.txt b/examples/nvector/manyvector/CMakeLists.txt index e76cd90cd9..973760be09 100644 --- a/examples/nvector/manyvector/CMakeLists.txt +++ b/examples/nvector/manyvector/CMakeLists.txt @@ -112,7 +112,7 @@ foreach(example_tuple ${nvector_manyvector_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/mpimanyvector/CMakeLists.txt b/examples/nvector/mpimanyvector/CMakeLists.txt index 32765aa29a..c91f5c6bf5 100644 --- a/examples/nvector/mpimanyvector/CMakeLists.txt +++ b/examples/nvector/mpimanyvector/CMakeLists.txt @@ -153,7 +153,7 @@ foreach(example_tuple ${nvector_mpimanyvector_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/mpiplusx/CMakeLists.txt b/examples/nvector/mpiplusx/CMakeLists.txt index 9b2c733540..6f4dd11f13 100644 --- a/examples/nvector/mpiplusx/CMakeLists.txt +++ b/examples/nvector/mpiplusx/CMakeLists.txt @@ -151,7 +151,7 @@ foreach(example_tuple ${nvector_mpiplusx_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/parallel/CMakeLists.txt b/examples/nvector/parallel/CMakeLists.txt index ff13f85ce5..9a75dc752b 100644 --- a/examples/nvector/parallel/CMakeLists.txt +++ b/examples/nvector/parallel/CMakeLists.txt @@ -140,7 +140,7 @@ foreach(example_tuple ${nvector_parallel_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/nvector/pthreads/CMakeLists.txt b/examples/nvector/pthreads/CMakeLists.txt index 586e1c3f06..3c53bed971 100644 --- a/examples/nvector/pthreads/CMakeLists.txt +++ b/examples/nvector/pthreads/CMakeLists.txt @@ -115,7 +115,7 @@ foreach(example_tuple ${nvector_pthreads_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/examples/nvector/serial/CMakeLists.txt b/examples/nvector/serial/CMakeLists.txt index ef92e58040..a5d5bbe01f 100644 --- a/examples/nvector/serial/CMakeLists.txt +++ b/examples/nvector/serial/CMakeLists.txt @@ -109,7 +109,7 @@ foreach(example_tuple ${nvector_serial_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # folder where fortran .mod files are - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/sunlinsol/band/CMakeLists.txt b/examples/sunlinsol/band/CMakeLists.txt index 1dd10759f5..37287f8379 100644 --- a/examples/sunlinsol/band/CMakeLists.txt +++ b/examples/sunlinsol/band/CMakeLists.txt @@ -106,7 +106,7 @@ foreach(example_tuple ${sunlinsol_band_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/dense/CMakeLists.txt b/examples/sunlinsol/dense/CMakeLists.txt index f751cd4760..f13e44adbb 100644 --- a/examples/sunlinsol/dense/CMakeLists.txt +++ b/examples/sunlinsol/dense/CMakeLists.txt @@ -106,7 +106,7 @@ foreach(example_tuple ${sunlinsol_dense_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/klu/CMakeLists.txt b/examples/sunlinsol/klu/CMakeLists.txt index 5932da7b07..c540f00800 100644 --- a/examples/sunlinsol/klu/CMakeLists.txt +++ b/examples/sunlinsol/klu/CMakeLists.txt @@ -107,7 +107,7 @@ foreach(example_tuple ${sunlinsol_klu_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/lapackdense/CMakeLists.txt b/examples/sunlinsol/lapackdense/CMakeLists.txt index ce5739b1b5..bd9b0d294c 100644 --- a/examples/sunlinsol/lapackdense/CMakeLists.txt +++ b/examples/sunlinsol/lapackdense/CMakeLists.txt @@ -112,7 +112,7 @@ foreach(example_tuple ${sunlinsol_lapackdense_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/pcg/serial/CMakeLists.txt b/examples/sunlinsol/pcg/serial/CMakeLists.txt index 4a014d11e7..42d59da8e9 100644 --- a/examples/sunlinsol/pcg/serial/CMakeLists.txt +++ b/examples/sunlinsol/pcg/serial/CMakeLists.txt @@ -113,7 +113,7 @@ foreach(example_tuple ${sunlinsol_pcg_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/spbcgs/serial/CMakeLists.txt b/examples/sunlinsol/spbcgs/serial/CMakeLists.txt index 81a7330259..c95abe1268 100644 --- a/examples/sunlinsol/spbcgs/serial/CMakeLists.txt +++ b/examples/sunlinsol/spbcgs/serial/CMakeLists.txt @@ -113,7 +113,7 @@ foreach(example_tuple ${sunlinsol_spbcgs_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/spfgmr/serial/CMakeLists.txt b/examples/sunlinsol/spfgmr/serial/CMakeLists.txt index beba6889fd..2e59fa1955 100644 --- a/examples/sunlinsol/spfgmr/serial/CMakeLists.txt +++ b/examples/sunlinsol/spfgmr/serial/CMakeLists.txt @@ -112,7 +112,7 @@ foreach(example_tuple ${sunlinsol_spfgmr_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/spgmr/serial/CMakeLists.txt b/examples/sunlinsol/spgmr/serial/CMakeLists.txt index 0ad67ecec1..f708630e6e 100644 --- a/examples/sunlinsol/spgmr/serial/CMakeLists.txt +++ b/examples/sunlinsol/spgmr/serial/CMakeLists.txt @@ -115,7 +115,7 @@ foreach(example_tuple ${sunlinsol_spgmr_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt b/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt index 2d3543ed5c..7817c84763 100644 --- a/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt +++ b/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt @@ -113,7 +113,7 @@ foreach(example_tuple ${sunlinsol_sptfqmr_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunmatrix/band/CMakeLists.txt b/examples/sunmatrix/band/CMakeLists.txt index 2502ecf508..c5a7fa6a20 100644 --- a/examples/sunmatrix/band/CMakeLists.txt +++ b/examples/sunmatrix/band/CMakeLists.txt @@ -107,7 +107,7 @@ foreach(example_tuple ${sunmatrix_band_fortran_examples}) set_target_properties(${example} PROPERTIES FOLDER "Examples") # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunmatrix/dense/CMakeLists.txt b/examples/sunmatrix/dense/CMakeLists.txt index 48365ac059..e14f0fce80 100644 --- a/examples/sunmatrix/dense/CMakeLists.txt +++ b/examples/sunmatrix/dense/CMakeLists.txt @@ -103,7 +103,7 @@ foreach(example_tuple ${sunmatrix_dense_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunmatrix/sparse/CMakeLists.txt b/examples/sunmatrix/sparse/CMakeLists.txt index daff9a61d4..2eb1f9114c 100644 --- a/examples/sunmatrix/sparse/CMakeLists.txt +++ b/examples/sunmatrix/sparse/CMakeLists.txt @@ -108,7 +108,7 @@ foreach(example_tuple ${sunmatrix_sparse_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} From 74d79fd64575b510b8d2d30be07679f176e5f64a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:32:14 -0700 Subject: [PATCH 042/101] minor doc update --- doc/shared/sundials/Install.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/shared/sundials/Install.rst b/doc/shared/sundials/Install.rst index f1ed3c80a8..f64b1084e9 100644 --- a/doc/shared/sundials/Install.rst +++ b/doc/shared/sundials/Install.rst @@ -294,8 +294,8 @@ default configuration: .. _Installation.CMake.Options: -Configuration options (Unix/Linux) ------------------------------------ +Configuration options +--------------------- A complete list of all available options for a CMake-based SUNDIALS configuration is provide below. Note that the default values shown @@ -669,7 +669,7 @@ illustration only. Default: "REF;OMP" - .. versionchanged: x.y.z + .. versionchanged: x.y.z The ``DPCPP`` option was changed to ``SYCL`` to align with Ginkgo's naming convention. @@ -1704,7 +1704,7 @@ header files. without any notice and relying on them may break your code. -Using SUNDIALS in your prpject +Using SUNDIALS in your project ------------------------------ After building and installing SUNDIALS, using SUNDIALS in your application involves From 9f7aa3f146e232562737e07b3837aa2b5e8b22c5 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:33:21 -0700 Subject: [PATCH 043/101] typo --- .github/workflows/windows-latest-mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 3e61c3dac8..8080be9795 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -50,7 +50,7 @@ jobs: # Configure CMake in a 'build' subdirectory run: | cmake \ - -G "MSYS Makefiles" + -G "MSYS Makefiles" \ -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ From 95dfe5fca66ea8df7f027a4743b3e5772fde8a12 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:34:06 -0700 Subject: [PATCH 044/101] remove on:push --- .github/workflows/windows-latest-intel.yml | 1 - .github/workflows/windows-latest-mingw.yml | 1 - .github/workflows/windows-latest.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index 1471a04e8d..12c3f55411 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -1,7 +1,6 @@ name: Build and Test - Windows/intel/ninja (short) on: - push: # temporary pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 8080be9795..a32287f420 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -1,7 +1,6 @@ name: Build and Test - Windows/mingw (short) on: - push: # temporary pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index d8ea4d9e6c..7a7b302612 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -1,7 +1,6 @@ name: Build and Test - Windows/MSVC (short) on: - push: # temporary pull_request: merge_group: workflow_dispatch: From ea66c0a4fa95c76166f0216aa6018773cc590cf7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:36:48 -0700 Subject: [PATCH 045/101] unintended change --- swig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swig/Makefile b/swig/Makefile index f874e06c22..9a92008499 100644 --- a/swig/Makefile +++ b/swig/Makefile @@ -14,7 +14,7 @@ # Makefile to generate SUNDIALS fortran interfaces with swig # --------------------------------------------------------------- -SWIG=~/.local/bin/swig +SWIG=swig ARKODE=farkode_mod farkode_arkstep_mod farkode_erkstep_mod farkode_sprkstep_mod farkode_mristep_mod CVODE=fcvode_mod From 948caa6e9db4e349d3a084d34b67c277f4389c4c Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:38:33 -0700 Subject: [PATCH 046/101] default SWIG variable --- swig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swig/Makefile b/swig/Makefile index 9a92008499..eb772623e9 100644 --- a/swig/Makefile +++ b/swig/Makefile @@ -14,7 +14,7 @@ # Makefile to generate SUNDIALS fortran interfaces with swig # --------------------------------------------------------------- -SWIG=swig +SWIG ?= swig ARKODE=farkode_mod farkode_arkstep_mod farkode_erkstep_mod farkode_sprkstep_mod farkode_mristep_mod CVODE=fcvode_mod From 476b4c12335d6388836164394c68e5f16da65c03 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:44:27 -0700 Subject: [PATCH 047/101] use CMake_Fortran_MODULE_DIRECTORY before creating executable --- examples/arkode/F2003_custom/CMakeLists.txt | 2 +- examples/arkode/F2003_serial/CMakeLists.txt | 9 +++++---- examples/nvector/C_openmp/CMakeLists.txt | 4 +++- examples/nvector/manyvector/CMakeLists.txt | 4 +++- examples/nvector/mpimanyvector/CMakeLists.txt | 4 +++- examples/nvector/mpiplusx/CMakeLists.txt | 4 +++- examples/nvector/parallel/CMakeLists.txt | 4 +++- examples/nvector/pthreads/CMakeLists.txt | 4 +++- examples/nvector/serial/CMakeLists.txt | 6 +++--- examples/sunlinsol/band/CMakeLists.txt | 6 +++--- examples/sunlinsol/dense/CMakeLists.txt | 6 +++--- examples/sunlinsol/klu/CMakeLists.txt | 6 +++--- examples/sunlinsol/lapackdense/CMakeLists.txt | 6 +++--- examples/sunlinsol/pcg/serial/CMakeLists.txt | 6 +++--- examples/sunlinsol/spbcgs/serial/CMakeLists.txt | 6 +++--- examples/sunlinsol/spfgmr/serial/CMakeLists.txt | 6 +++--- examples/sunlinsol/spgmr/serial/CMakeLists.txt | 6 +++--- examples/sunlinsol/sptfqmr/serial/CMakeLists.txt | 6 +++--- examples/sunmatrix/band/CMakeLists.txt | 6 +++--- examples/sunmatrix/dense/CMakeLists.txt | 4 +++- examples/sunmatrix/sparse/CMakeLists.txt | 4 +++- 21 files changed, 63 insertions(+), 46 deletions(-) diff --git a/examples/arkode/F2003_custom/CMakeLists.txt b/examples/arkode/F2003_custom/CMakeLists.txt index 7aac6173a6..98abe2d887 100644 --- a/examples/arkode/F2003_custom/CMakeLists.txt +++ b/examples/arkode/F2003_custom/CMakeLists.txt @@ -56,7 +56,7 @@ foreach(example_tuple ${FARKODE_examples}) list(GET example_tuple 0 example) list(GET example_tuple 1 example_type) - # Install fortran modules to a unique directory to avoid naming collisions + # build fortran modules into a unique directory to avoid naming collisions set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # example source files diff --git a/examples/arkode/F2003_serial/CMakeLists.txt b/examples/arkode/F2003_serial/CMakeLists.txt index c54b72c6c7..8062b44597 100644 --- a/examples/arkode/F2003_serial/CMakeLists.txt +++ b/examples/arkode/F2003_serial/CMakeLists.txt @@ -125,11 +125,12 @@ if(BUILD_SUNLINSOL_KLU) list(GET example_tuple 0 example) list(GET example_tuple 1 example_type) - # example source files - add_executable(${example} ${example}.f90) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # create the cmake executable target + add_executable(${example} ${example}.f90) set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # add example to regression tests sundials_add_test(${example} ${example} @@ -140,7 +141,7 @@ if(BUILD_SUNLINSOL_KLU) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS} ${SUNLINSOLKLU_LIBS}) - # install example source and out files + # install example source and out files if(EXAMPLES_INSTALL) install(FILES ${example}.f90 ${example}.out DESTINATION ${EXAMPLES_INSTALL_PATH}/arkode/F2003_serial) diff --git a/examples/nvector/C_openmp/CMakeLists.txt b/examples/nvector/C_openmp/CMakeLists.txt index 309a22f4a9..b332f20064 100644 --- a/examples/nvector/C_openmp/CMakeLists.txt +++ b/examples/nvector/C_openmp/CMakeLists.txt @@ -108,6 +108,9 @@ foreach(example_tuple ${nvector_openmp_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -115,7 +118,6 @@ foreach(example_tuple ${nvector_openmp_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/manyvector/CMakeLists.txt b/examples/nvector/manyvector/CMakeLists.txt index 973760be09..a43d1e4c15 100644 --- a/examples/nvector/manyvector/CMakeLists.txt +++ b/examples/nvector/manyvector/CMakeLists.txt @@ -105,6 +105,9 @@ foreach(example_tuple ${nvector_manyvector_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -112,7 +115,6 @@ foreach(example_tuple ${nvector_manyvector_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/mpimanyvector/CMakeLists.txt b/examples/nvector/mpimanyvector/CMakeLists.txt index c91f5c6bf5..66c7253bc9 100644 --- a/examples/nvector/mpimanyvector/CMakeLists.txt +++ b/examples/nvector/mpimanyvector/CMakeLists.txt @@ -146,6 +146,9 @@ foreach(example_tuple ${nvector_mpimanyvector_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -153,7 +156,6 @@ foreach(example_tuple ${nvector_mpimanyvector_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/mpiplusx/CMakeLists.txt b/examples/nvector/mpiplusx/CMakeLists.txt index 6f4dd11f13..195bcb6868 100644 --- a/examples/nvector/mpiplusx/CMakeLists.txt +++ b/examples/nvector/mpiplusx/CMakeLists.txt @@ -144,6 +144,9 @@ foreach(example_tuple ${nvector_mpiplusx_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -151,7 +154,6 @@ foreach(example_tuple ${nvector_mpiplusx_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) diff --git a/examples/nvector/parallel/CMakeLists.txt b/examples/nvector/parallel/CMakeLists.txt index 9a75dc752b..bfdf74eec8 100644 --- a/examples/nvector/parallel/CMakeLists.txt +++ b/examples/nvector/parallel/CMakeLists.txt @@ -133,6 +133,9 @@ foreach(example_tuple ${nvector_parallel_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -140,7 +143,6 @@ foreach(example_tuple ${nvector_parallel_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/nvector/pthreads/CMakeLists.txt b/examples/nvector/pthreads/CMakeLists.txt index 3c53bed971..e9fefd7191 100644 --- a/examples/nvector/pthreads/CMakeLists.txt +++ b/examples/nvector/pthreads/CMakeLists.txt @@ -108,6 +108,9 @@ foreach(example_tuple ${nvector_pthreads_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -115,7 +118,6 @@ foreach(example_tuple ${nvector_pthreads_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/examples/nvector/serial/CMakeLists.txt b/examples/nvector/serial/CMakeLists.txt index a5d5bbe01f..6807562188 100644 --- a/examples/nvector/serial/CMakeLists.txt +++ b/examples/nvector/serial/CMakeLists.txt @@ -100,6 +100,9 @@ foreach(example_tuple ${nvector_serial_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -108,9 +111,6 @@ foreach(example_tuple ${nvector_serial_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # folder where fortran .mod files are - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) endif() diff --git a/examples/sunlinsol/band/CMakeLists.txt b/examples/sunlinsol/band/CMakeLists.txt index 37287f8379..8a6d09997e 100644 --- a/examples/sunlinsol/band/CMakeLists.txt +++ b/examples/sunlinsol/band/CMakeLists.txt @@ -97,6 +97,9 @@ foreach(example_tuple ${sunlinsol_band_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -105,9 +108,6 @@ foreach(example_tuple ${sunlinsol_band_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/dense/CMakeLists.txt b/examples/sunlinsol/dense/CMakeLists.txt index f13e44adbb..03b6155811 100644 --- a/examples/sunlinsol/dense/CMakeLists.txt +++ b/examples/sunlinsol/dense/CMakeLists.txt @@ -97,6 +97,9 @@ foreach(example_tuple ${sunlinsol_dense_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -105,9 +108,6 @@ foreach(example_tuple ${sunlinsol_dense_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/klu/CMakeLists.txt b/examples/sunlinsol/klu/CMakeLists.txt index c540f00800..664ec266a1 100644 --- a/examples/sunlinsol/klu/CMakeLists.txt +++ b/examples/sunlinsol/klu/CMakeLists.txt @@ -98,6 +98,9 @@ foreach(example_tuple ${sunlinsol_klu_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -106,9 +109,6 @@ foreach(example_tuple ${sunlinsol_klu_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/lapackdense/CMakeLists.txt b/examples/sunlinsol/lapackdense/CMakeLists.txt index bd9b0d294c..0dd6ea947e 100644 --- a/examples/sunlinsol/lapackdense/CMakeLists.txt +++ b/examples/sunlinsol/lapackdense/CMakeLists.txt @@ -103,6 +103,9 @@ foreach(example_tuple ${sunlinsol_lapackdense_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -111,9 +114,6 @@ foreach(example_tuple ${sunlinsol_lapackdense_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/pcg/serial/CMakeLists.txt b/examples/sunlinsol/pcg/serial/CMakeLists.txt index 42d59da8e9..4d6be609ee 100644 --- a/examples/sunlinsol/pcg/serial/CMakeLists.txt +++ b/examples/sunlinsol/pcg/serial/CMakeLists.txt @@ -104,6 +104,9 @@ foreach(example_tuple ${sunlinsol_pcg_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -112,9 +115,6 @@ foreach(example_tuple ${sunlinsol_pcg_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/spbcgs/serial/CMakeLists.txt b/examples/sunlinsol/spbcgs/serial/CMakeLists.txt index c95abe1268..005f743cdf 100644 --- a/examples/sunlinsol/spbcgs/serial/CMakeLists.txt +++ b/examples/sunlinsol/spbcgs/serial/CMakeLists.txt @@ -104,6 +104,9 @@ foreach(example_tuple ${sunlinsol_spbcgs_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -112,9 +115,6 @@ foreach(example_tuple ${sunlinsol_spbcgs_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/spfgmr/serial/CMakeLists.txt b/examples/sunlinsol/spfgmr/serial/CMakeLists.txt index 2e59fa1955..daa7d9fca3 100644 --- a/examples/sunlinsol/spfgmr/serial/CMakeLists.txt +++ b/examples/sunlinsol/spfgmr/serial/CMakeLists.txt @@ -103,6 +103,9 @@ foreach(example_tuple ${sunlinsol_spfgmr_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -111,9 +114,6 @@ foreach(example_tuple ${sunlinsol_spfgmr_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/spgmr/serial/CMakeLists.txt b/examples/sunlinsol/spgmr/serial/CMakeLists.txt index f708630e6e..3353f2a829 100644 --- a/examples/sunlinsol/spgmr/serial/CMakeLists.txt +++ b/examples/sunlinsol/spgmr/serial/CMakeLists.txt @@ -106,6 +106,9 @@ foreach(example_tuple ${sunlinsol_spgmr_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -114,9 +117,6 @@ foreach(example_tuple ${sunlinsol_spgmr_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt b/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt index 7817c84763..c985445c51 100644 --- a/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt +++ b/examples/sunlinsol/sptfqmr/serial/CMakeLists.txt @@ -104,6 +104,9 @@ foreach(example_tuple ${sunlinsol_sptfqmr_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -112,9 +115,6 @@ foreach(example_tuple ${sunlinsol_sptfqmr_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunmatrix/band/CMakeLists.txt b/examples/sunmatrix/band/CMakeLists.txt index c5a7fa6a20..1db5a837a3 100644 --- a/examples/sunmatrix/band/CMakeLists.txt +++ b/examples/sunmatrix/band/CMakeLists.txt @@ -98,6 +98,9 @@ foreach(example_tuple ${sunmatrix_band_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 @@ -106,9 +109,6 @@ foreach(example_tuple ${sunmatrix_band_fortran_examples}) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - # set fortran module directory to avoid name collisions - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) - # libraries to link against target_link_libraries(${example} sundials_nvecserial diff --git a/examples/sunmatrix/dense/CMakeLists.txt b/examples/sunmatrix/dense/CMakeLists.txt index e14f0fce80..e5e5f9a346 100644 --- a/examples/sunmatrix/dense/CMakeLists.txt +++ b/examples/sunmatrix/dense/CMakeLists.txt @@ -97,13 +97,15 @@ foreach(example_tuple ${sunmatrix_dense_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 ${SUNDIALS_SOURCE_DIR}/examples/sunmatrix/test_sunmatrix.f90) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} diff --git a/examples/sunmatrix/sparse/CMakeLists.txt b/examples/sunmatrix/sparse/CMakeLists.txt index 2eb1f9114c..ee04a96b8d 100644 --- a/examples/sunmatrix/sparse/CMakeLists.txt +++ b/examples/sunmatrix/sparse/CMakeLists.txt @@ -102,13 +102,15 @@ foreach(example_tuple ${sunmatrix_sparse_fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90 ${SUNDIALS_SOURCE_DIR}/examples/sunmatrix/test_sunmatrix.f90) # folder to organize targets in an IDE set_target_properties(${example} PROPERTIES FOLDER "Examples") - set_target_properties(${example} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) # libraries to link against target_link_libraries(${example} From f37dc0b0bef023bebf10ecdf78637870bda33036 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 08:52:20 -0700 Subject: [PATCH 048/101] set CMake_Fortran_MODULE_DIRECTORY in examples that were missing it --- examples/sunnonlinsol/fixedpoint/CMakeLists.txt | 3 +++ examples/sunnonlinsol/newton/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/sunnonlinsol/fixedpoint/CMakeLists.txt b/examples/sunnonlinsol/fixedpoint/CMakeLists.txt index 4906cd1a31..834af69c2e 100644 --- a/examples/sunnonlinsol/fixedpoint/CMakeLists.txt +++ b/examples/sunnonlinsol/fixedpoint/CMakeLists.txt @@ -97,6 +97,9 @@ foreach(example_tuple ${fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90) diff --git a/examples/sunnonlinsol/newton/CMakeLists.txt b/examples/sunnonlinsol/newton/CMakeLists.txt index 08870d929f..2f3413bd0b 100644 --- a/examples/sunnonlinsol/newton/CMakeLists.txt +++ b/examples/sunnonlinsol/newton/CMakeLists.txt @@ -98,6 +98,9 @@ foreach(example_tuple ${fortran_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90 ${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90) From 0294b868cbae99454161fa5b73b15855c74b2dbd Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 09:42:14 -0700 Subject: [PATCH 049/101] add --output-on-failure to ctest --- .github/workflows/windows-latest-intel.yml | 10 +++++----- .github/workflows/windows-latest-mingw.yml | 2 +- .github/workflows/windows-latest.yml | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index 12c3f55411..9b3eac6f09 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -37,17 +37,17 @@ jobs: - name: Test (Shared) working-directory: ${{github.workspace}}/build_shared - run: ctest -C ${{env.BUILD_TYPE}} + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - name: Configure CMake (Shared + MPI) run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - name: Build (Shared + MPI) - run: cmake --build ${{github.workspace}}/build_shared_mpi + run: cmake --build ${{github.workspace}}/build_shared_mpi --output-on-failure - name: Test (Shared + MPI) working-directory: ${{github.workspace}}/build_shared_mpi - run: ctest -C ${{env.BUILD_TYPE}} + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - name: Configure CMake (Static) run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON @@ -57,7 +57,7 @@ jobs: - name: Test (Static) working-directory: ${{github.workspace}}/build_static - run: ctest -C ${{env.BUILD_TYPE}} + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - name: Configure CMake (Static + MPI) run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 @@ -67,4 +67,4 @@ jobs: - name: Test (Static + MPI) working-directory: ${{github.workspace}}/build_static_mpi - run: ctest -C ${{env.BUILD_TYPE}} + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index a32287f420..3cb67a7254 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -66,4 +66,4 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build # Execute tests - run: ctest + run: ctest --output-on-failure diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 7a7b302612..c7ef24e758 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -27,7 +27,7 @@ jobs: - name: Test (Shared) working-directory: ${{github.workspace}}/build_shared - run: ctest -C ${{env.BUILD_TYPE}} + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - name: Configure CMake (Static) run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON @@ -37,5 +37,4 @@ jobs: - name: Test (Static) working-directory: ${{github.workspace}}/build_static - run: ctest -C ${{env.BUILD_TYPE}} - + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure From f578cb09ddda04bcad0f7c9913000de739ff59b1 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 09:49:00 -0700 Subject: [PATCH 050/101] use msys gcc specifically --- .github/workflows/windows-latest-mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 3cb67a7254..859d786a81 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -41,7 +41,7 @@ jobs: install: >- base-devel ${{ matrix.target-prefix }}-cmake - ${{ matrix.target-prefix }}-cc + ${{ matrix.target-prefix }}-gcc ${{ matrix.target-prefix }}-openblas ${{ matrix.target-prefix }}-suitesparse From a4d7894b1faa3828b6f2c4acc9c5fe59e1d0a312 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 09:52:58 -0700 Subject: [PATCH 051/101] install gfortran --- .github/workflows/windows-latest-mingw.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 859d786a81..0032d0e5d1 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -42,6 +42,7 @@ jobs: base-devel ${{ matrix.target-prefix }}-cmake ${{ matrix.target-prefix }}-gcc + ${{ matrix.target-prefix }}-gcc-fortran ${{ matrix.target-prefix }}-openblas ${{ matrix.target-prefix }}-suitesparse From be29747d6e005dee0798efd2ead3ba9a84b41d36 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 10:01:26 -0700 Subject: [PATCH 052/101] ensure package fortran libraries link to the main library --- src/arkode/fmod_int32/CMakeLists.txt | 2 +- src/arkode/fmod_int64/CMakeLists.txt | 2 +- src/cvode/fmod_int32/CMakeLists.txt | 2 +- src/cvode/fmod_int64/CMakeLists.txt | 2 +- src/cvodes/fmod_int32/CMakeLists.txt | 2 +- src/cvodes/fmod_int64/CMakeLists.txt | 2 +- src/ida/fmod_int32/CMakeLists.txt | 2 +- src/ida/fmod_int64/CMakeLists.txt | 2 +- src/idas/fmod_int32/CMakeLists.txt | 2 +- src/idas/fmod_int64/CMakeLists.txt | 2 +- src/kinsol/fmod_int32/CMakeLists.txt | 2 +- src/kinsol/fmod_int64/CMakeLists.txt | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/arkode/fmod_int32/CMakeLists.txt b/src/arkode/fmod_int32/CMakeLists.txt index 32e5c935d7..4876f99f5e 100644 --- a/src/arkode/fmod_int32/CMakeLists.txt +++ b/src/arkode/fmod_int32/CMakeLists.txt @@ -31,7 +31,7 @@ sundials_add_f2003_library(sundials_farkode_mod SOURCES ${arkode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_arkode sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunadaptcontrollersoderlind_mod_obj diff --git a/src/arkode/fmod_int64/CMakeLists.txt b/src/arkode/fmod_int64/CMakeLists.txt index 32e5c935d7..4876f99f5e 100644 --- a/src/arkode/fmod_int64/CMakeLists.txt +++ b/src/arkode/fmod_int64/CMakeLists.txt @@ -31,7 +31,7 @@ sundials_add_f2003_library(sundials_farkode_mod SOURCES ${arkode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_arkode sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunadaptcontrollersoderlind_mod_obj diff --git a/src/cvode/fmod_int32/CMakeLists.txt b/src/cvode/fmod_int32/CMakeLists.txt index e27c43ae02..e6a1f246c7 100644 --- a/src/cvode/fmod_int32/CMakeLists.txt +++ b/src/cvode/fmod_int32/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fcvode_mod SOURCES ${cvode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_cvode sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/cvode/fmod_int64/CMakeLists.txt b/src/cvode/fmod_int64/CMakeLists.txt index e27c43ae02..e6a1f246c7 100644 --- a/src/cvode/fmod_int64/CMakeLists.txt +++ b/src/cvode/fmod_int64/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fcvode_mod SOURCES ${cvode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_cvode sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/cvodes/fmod_int32/CMakeLists.txt b/src/cvodes/fmod_int32/CMakeLists.txt index 031ac9c6f9..f0579b9cb5 100644 --- a/src/cvodes/fmod_int32/CMakeLists.txt +++ b/src/cvodes/fmod_int32/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fcvodes_mod SOURCES ${cvodes_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_cvodes sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/cvodes/fmod_int64/CMakeLists.txt b/src/cvodes/fmod_int64/CMakeLists.txt index 031ac9c6f9..f0579b9cb5 100644 --- a/src/cvodes/fmod_int64/CMakeLists.txt +++ b/src/cvodes/fmod_int64/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fcvodes_mod SOURCES ${cvodes_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_cvodes sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/ida/fmod_int32/CMakeLists.txt b/src/ida/fmod_int32/CMakeLists.txt index e305f237d0..c43bc3ced8 100644 --- a/src/ida/fmod_int32/CMakeLists.txt +++ b/src/ida/fmod_int32/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fida_mod SOURCES ${ida_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_ida sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/ida/fmod_int64/CMakeLists.txt b/src/ida/fmod_int64/CMakeLists.txt index e305f237d0..c43bc3ced8 100644 --- a/src/ida/fmod_int64/CMakeLists.txt +++ b/src/ida/fmod_int64/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fida_mod SOURCES ${ida_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_ida sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/idas/fmod_int32/CMakeLists.txt b/src/idas/fmod_int32/CMakeLists.txt index a6abe6516b..5807fc6174 100644 --- a/src/idas/fmod_int32/CMakeLists.txt +++ b/src/idas/fmod_int32/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fidas_mod SOURCES ${idas_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_idas sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/idas/fmod_int64/CMakeLists.txt b/src/idas/fmod_int64/CMakeLists.txt index a6abe6516b..5807fc6174 100644 --- a/src/idas/fmod_int64/CMakeLists.txt +++ b/src/idas/fmod_int64/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fidas_mod SOURCES ${idas_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_idas sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/kinsol/fmod_int32/CMakeLists.txt b/src/kinsol/fmod_int32/CMakeLists.txt index a154a8b865..e24bf54b9d 100644 --- a/src/kinsol/fmod_int32/CMakeLists.txt +++ b/src/kinsol/fmod_int32/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fkinsol_mod SOURCES ${kinsol_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_kinsol sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/kinsol/fmod_int64/CMakeLists.txt b/src/kinsol/fmod_int64/CMakeLists.txt index a154a8b865..e24bf54b9d 100644 --- a/src/kinsol/fmod_int64/CMakeLists.txt +++ b/src/kinsol/fmod_int64/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fkinsol_mod SOURCES ${kinsol_SOURCES} LINK_LIBRARIES - PUBLIC sundials_fcore_mod + PUBLIC sundials_kinsol sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj From d69a4f64c1b0f01ec6ec2e1b94c7f31a4e9d0a51 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 10:11:25 -0700 Subject: [PATCH 053/101] add missing SUNDIALS_EXPORT --- include/cvodes/cvodes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/cvodes/cvodes.h b/include/cvodes/cvodes.h index 813ded3c7f..8af98fc26c 100644 --- a/include/cvodes/cvodes.h +++ b/include/cvodes/cvodes.h @@ -579,7 +579,8 @@ SUNDIALS_EXPORT int CVodeGetAdjCheckPointsInfo(void* cvode_mem, CVadjCheckPointRec* ckpnt); /* CVLS interface function that depends on CVRhsFn */ -int CVodeSetJacTimesRhsFnB(void* cvode_mem, int which, CVRhsFn jtimesRhsFn); +SUNDIALS_EXPORT int CVodeSetJacTimesRhsFnB(void* cvode_mem, int which, + CVRhsFn jtimesRhsFn); /* Undocumented Optional Output Functions For Backward Problems */ From ba56a79828eb0edfadf76141a583a2905e8f6ac2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 10:11:36 -0700 Subject: [PATCH 054/101] turn off deprecated warnings in mingw build --- .github/workflows/windows-latest-mingw.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 0032d0e5d1..ff9eaa4cf3 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -53,6 +53,7 @@ jobs: -G "MSYS Makefiles" \ -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ -DSUNDIALS_BUILD_WITH_PROFILING=ON \ -DSUNDIALS_LOGGING_LEVEL=2 \ From 2b6df7466a4885d343a0d5674336ce8fddaf16ab Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 10:37:57 -0700 Subject: [PATCH 055/101] need to set CMAKE_Fortran_MODULE_DIRECTORY first --- examples/arkode/F2003_serial/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/arkode/F2003_serial/CMakeLists.txt b/examples/arkode/F2003_serial/CMakeLists.txt index 8062b44597..f755a4695b 100644 --- a/examples/arkode/F2003_serial/CMakeLists.txt +++ b/examples/arkode/F2003_serial/CMakeLists.txt @@ -73,6 +73,9 @@ foreach(example_tuple ${FARKODE_examples}) list(GET example_tuple 2 example_type) if (NOT TARGET ${example}) + # Install fortran modules to a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90) @@ -81,9 +84,6 @@ foreach(example_tuple ${FARKODE_examples}) # libraries to link against target_link_libraries(${example} ${SUNDIALS_LIBS}) - - # Install fortran modules to a unique directory to avoid naming collisions - set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) endif() # check if example args are provided and set the test name @@ -169,6 +169,9 @@ if(BUILD_SUNLINSOL_LAPACKDENSE) list(GET example_tuple 0 example) list(GET example_tuple 1 example_type) + # build fortran modules into a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90) From c7a0701b2caf204f953509919df4864dea268bdf Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 11:14:50 -0700 Subject: [PATCH 056/101] only set sunctx on clone if it is not null --- src/sundials/sundials_nvector.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sundials/sundials_nvector.c b/src/sundials/sundials_nvector.c index 46791fa66c..9b15332993 100644 --- a/src/sundials/sundials_nvector.c +++ b/src/sundials/sundials_nvector.c @@ -284,8 +284,8 @@ N_Vector N_VClone(N_Vector w) { N_Vector result = NULL; SUNDIALS_MARK_FUNCTION_BEGIN(getSUNProfiler(w)); - result = w->ops->nvclone(w); - result->sunctx = w->sunctx; + result = w->ops->nvclone(w); + if (result) { result->sunctx = w->sunctx; } SUNDIALS_MARK_FUNCTION_END(getSUNProfiler(w)); return result; } @@ -294,8 +294,8 @@ N_Vector N_VCloneEmpty(N_Vector w) { N_Vector result; SUNDIALS_MARK_FUNCTION_BEGIN(getSUNProfiler(w)); - result = w->ops->nvcloneempty(w); - result->sunctx = w->sunctx; + result = w->ops->nvcloneempty(w); + if (result) { result->sunctx = w->sunctx; } SUNDIALS_MARK_FUNCTION_END(getSUNProfiler(w)); return result; } From 16405c832e098a47761f1497f18ebbe8de89de6a Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 12:56:57 -0700 Subject: [PATCH 057/101] Revert "ensure package fortran libraries link to the main library" This reverts commit be29747d6e005dee0798efd2ead3ba9a84b41d36. --- src/arkode/fmod_int32/CMakeLists.txt | 2 +- src/arkode/fmod_int64/CMakeLists.txt | 2 +- src/cvode/fmod_int32/CMakeLists.txt | 2 +- src/cvode/fmod_int64/CMakeLists.txt | 2 +- src/cvodes/fmod_int32/CMakeLists.txt | 2 +- src/cvodes/fmod_int64/CMakeLists.txt | 2 +- src/ida/fmod_int32/CMakeLists.txt | 2 +- src/ida/fmod_int64/CMakeLists.txt | 2 +- src/idas/fmod_int32/CMakeLists.txt | 2 +- src/idas/fmod_int64/CMakeLists.txt | 2 +- src/kinsol/fmod_int32/CMakeLists.txt | 2 +- src/kinsol/fmod_int64/CMakeLists.txt | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/arkode/fmod_int32/CMakeLists.txt b/src/arkode/fmod_int32/CMakeLists.txt index 4876f99f5e..32e5c935d7 100644 --- a/src/arkode/fmod_int32/CMakeLists.txt +++ b/src/arkode/fmod_int32/CMakeLists.txt @@ -31,7 +31,7 @@ sundials_add_f2003_library(sundials_farkode_mod SOURCES ${arkode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_arkode sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunadaptcontrollersoderlind_mod_obj diff --git a/src/arkode/fmod_int64/CMakeLists.txt b/src/arkode/fmod_int64/CMakeLists.txt index 4876f99f5e..32e5c935d7 100644 --- a/src/arkode/fmod_int64/CMakeLists.txt +++ b/src/arkode/fmod_int64/CMakeLists.txt @@ -31,7 +31,7 @@ sundials_add_f2003_library(sundials_farkode_mod SOURCES ${arkode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_arkode sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunadaptcontrollersoderlind_mod_obj diff --git a/src/cvode/fmod_int32/CMakeLists.txt b/src/cvode/fmod_int32/CMakeLists.txt index e6a1f246c7..e27c43ae02 100644 --- a/src/cvode/fmod_int32/CMakeLists.txt +++ b/src/cvode/fmod_int32/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fcvode_mod SOURCES ${cvode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_cvode sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/cvode/fmod_int64/CMakeLists.txt b/src/cvode/fmod_int64/CMakeLists.txt index e6a1f246c7..e27c43ae02 100644 --- a/src/cvode/fmod_int64/CMakeLists.txt +++ b/src/cvode/fmod_int64/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fcvode_mod SOURCES ${cvode_SOURCES} LINK_LIBRARIES - PUBLIC sundials_cvode sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/cvodes/fmod_int32/CMakeLists.txt b/src/cvodes/fmod_int32/CMakeLists.txt index f0579b9cb5..031ac9c6f9 100644 --- a/src/cvodes/fmod_int32/CMakeLists.txt +++ b/src/cvodes/fmod_int32/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fcvodes_mod SOURCES ${cvodes_SOURCES} LINK_LIBRARIES - PUBLIC sundials_cvodes sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/cvodes/fmod_int64/CMakeLists.txt b/src/cvodes/fmod_int64/CMakeLists.txt index f0579b9cb5..031ac9c6f9 100644 --- a/src/cvodes/fmod_int64/CMakeLists.txt +++ b/src/cvodes/fmod_int64/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fcvodes_mod SOURCES ${cvodes_SOURCES} LINK_LIBRARIES - PUBLIC sundials_cvodes sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/ida/fmod_int32/CMakeLists.txt b/src/ida/fmod_int32/CMakeLists.txt index c43bc3ced8..e305f237d0 100644 --- a/src/ida/fmod_int32/CMakeLists.txt +++ b/src/ida/fmod_int32/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fida_mod SOURCES ${ida_SOURCES} LINK_LIBRARIES - PUBLIC sundials_ida sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/ida/fmod_int64/CMakeLists.txt b/src/ida/fmod_int64/CMakeLists.txt index c43bc3ced8..e305f237d0 100644 --- a/src/ida/fmod_int64/CMakeLists.txt +++ b/src/ida/fmod_int64/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fida_mod SOURCES ${ida_SOURCES} LINK_LIBRARIES - PUBLIC sundials_ida sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/idas/fmod_int32/CMakeLists.txt b/src/idas/fmod_int32/CMakeLists.txt index 5807fc6174..a6abe6516b 100644 --- a/src/idas/fmod_int32/CMakeLists.txt +++ b/src/idas/fmod_int32/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fidas_mod SOURCES ${idas_SOURCES} LINK_LIBRARIES - PUBLIC sundials_idas sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/idas/fmod_int64/CMakeLists.txt b/src/idas/fmod_int64/CMakeLists.txt index 5807fc6174..a6abe6516b 100644 --- a/src/idas/fmod_int64/CMakeLists.txt +++ b/src/idas/fmod_int64/CMakeLists.txt @@ -20,7 +20,7 @@ sundials_add_f2003_library(sundials_fidas_mod SOURCES ${idas_SOURCES} LINK_LIBRARIES - PUBLIC sundials_idas sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/kinsol/fmod_int32/CMakeLists.txt b/src/kinsol/fmod_int32/CMakeLists.txt index e24bf54b9d..a154a8b865 100644 --- a/src/kinsol/fmod_int32/CMakeLists.txt +++ b/src/kinsol/fmod_int32/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fkinsol_mod SOURCES ${kinsol_SOURCES} LINK_LIBRARIES - PUBLIC sundials_kinsol sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj diff --git a/src/kinsol/fmod_int64/CMakeLists.txt b/src/kinsol/fmod_int64/CMakeLists.txt index e24bf54b9d..a154a8b865 100644 --- a/src/kinsol/fmod_int64/CMakeLists.txt +++ b/src/kinsol/fmod_int64/CMakeLists.txt @@ -21,7 +21,7 @@ sundials_add_f2003_library(sundials_fkinsol_mod SOURCES ${kinsol_SOURCES} LINK_LIBRARIES - PUBLIC sundials_kinsol sundials_fcore_mod + PUBLIC sundials_fcore_mod OBJECT_LIBRARIES sundials_fnvecserial_mod_obj sundials_fsunmatrixband_mod_obj From 6cf34b8e2fd7ea21f4f63d8f381ed952925b7692 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 12:58:22 -0700 Subject: [PATCH 058/101] test static first --- .github/workflows/windows-latest-intel.yml | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index 9b3eac6f09..5aaf386a55 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -29,26 +29,6 @@ jobs: - uses: actions/checkout@v3 - - name: Configure CMake (Shared) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - - - name: Build (Shared) - run: cmake --build ${{github.workspace}}/build_shared - - - name: Test (Shared) - working-directory: ${{github.workspace}}/build_shared - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - - - name: Configure CMake (Shared + MPI) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - - - name: Build (Shared + MPI) - run: cmake --build ${{github.workspace}}/build_shared_mpi --output-on-failure - - - name: Test (Shared + MPI) - working-directory: ${{github.workspace}}/build_shared_mpi - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - - name: Configure CMake (Static) run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON @@ -68,3 +48,23 @@ jobs: - name: Test (Static + MPI) working-directory: ${{github.workspace}}/build_static_mpi run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure + + - name: Configure CMake (Shared) + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON + + - name: Build (Shared) + run: cmake --build ${{github.workspace}}/build_shared + + - name: Test (Shared) + working-directory: ${{github.workspace}}/build_shared + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure + + - name: Configure CMake (Shared + MPI) + run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 + + - name: Build (Shared + MPI) + run: cmake --build ${{github.workspace}}/build_shared_mpi --output-on-failure + + - name: Test (Shared + MPI) + working-directory: ${{github.workspace}}/build_shared_mpi + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure From 3391f0b71c234089e86bb31c8108d04e3b4d00ad Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 16:00:56 -0700 Subject: [PATCH 059/101] Update SundialsAddLibrary.cmake --- cmake/macros/SundialsAddLibrary.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index 3e3a3ac739..af460931ec 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -150,7 +150,7 @@ macro(sundials_add_library target) # -------------------------------------------------------------------------- # create the target for the object library - add_library(${obj_target} OBJECT ${sources}) + add_library(${obj_target} OBJECT ${sources} ${sundials_add_library_UNPARSED_ARGUMENTS}) set_target_properties(${obj_target} PROPERTIES FOLDER "obj") @@ -239,7 +239,7 @@ macro(sundials_add_library target) # set target name set(_actual_target_name ${target}${_lib_suffix}) - add_library(${_actual_target_name} ${_libtype} $) + add_library(${_actual_target_name} ${_libtype} $ ${sundials_add_library_UNPARSED_ARGUMENTS}) set_target_properties(${_actual_target_name} PROPERTIES FOLDER "src") @@ -433,7 +433,8 @@ macro(sundials_add_f2003_library target) $ $ ) - set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}") + set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}" + WINDOWS_EXPORT_ALL_SYMBOLS ON) # get the name of the C library which the fortran library interfaces to string(REPLACE "sundials_f" "sundials_" _clib_name "${target}") @@ -457,7 +458,6 @@ macro(sundials_add_f2003_library target) SOVERSION ${sundials_add_f2003_library_SOVERSION} ${sundials_add_f2003_library_UNPARSED_ARGUMENTS} ) - endmacro() From ae39cd7a960bd3e3300e11865fd010de69ec2e26 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 16:05:42 -0700 Subject: [PATCH 060/101] remove windows mpi builds for now setup-fortran does not install oneapi with the mpi compiler --- .github/workflows/windows-latest-intel.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index 5aaf386a55..bdfc5e9aac 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -39,16 +39,6 @@ jobs: working-directory: ${{github.workspace}}/build_static run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - - name: Configure CMake (Static + MPI) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - - - name: Build (Static + MPI) - run: cmake --build ${{github.workspace}}/build_static_mpi - - - name: Test (Static + MPI) - working-directory: ${{github.workspace}}/build_static_mpi - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - - name: Configure CMake (Shared) run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON @@ -58,13 +48,3 @@ jobs: - name: Test (Shared) working-directory: ${{github.workspace}}/build_shared run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - - - name: Configure CMake (Shared + MPI) - run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90 - - - name: Build (Shared + MPI) - run: cmake --build ${{github.workspace}}/build_shared_mpi --output-on-failure - - - name: Test (Shared + MPI) - working-directory: ${{github.workspace}}/build_shared_mpi - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure From ed2bf1116db0330cc287e80d2cbcb746197771e3 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 16:11:42 -0700 Subject: [PATCH 061/101] build shared and static at same time with msvc --- .github/workflows/windows-latest.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index c7ef24e758..9fa9096af7 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -19,22 +19,12 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Configure CMake (Shared) - run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_shared -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON + - name: Configure CMake + run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - - name: Build (Shared) - run: cmake --build ${{github.workspace}}/build_shared --config ${{env.BUILD_TYPE}} + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - name: Test (Shared) - working-directory: ${{github.workspace}}/build_shared - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure - - - name: Configure CMake (Static) - run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build_static -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - - - name: Build (Static) - run: cmake --build ${{github.workspace}}/build_static --config ${{env.BUILD_TYPE}} - - - name: Test (Static) - working-directory: ${{github.workspace}}/build_static + - name: Test + working-directory: ${{github.workspace}}/build run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure From b6b4303f59735a001371849684aa6e8fcc75457e Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 16:33:31 -0700 Subject: [PATCH 062/101] change how constants in sundials_types are treated by swig to avoid const style wrap that breaks on windows with dlls --- src/sundials/fmod_int32/fsundials_core_mod.c | 7 ------- src/sundials/fmod_int32/fsundials_core_mod.f90 | 9 +++------ src/sundials/fmod_int64/fsundials_core_mod.c | 7 ------- src/sundials/fmod_int64/fsundials_core_mod.f90 | 9 +++------ swig/sundials/fsundials_types.i | 10 ++++------ 5 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/sundials/fmod_int32/fsundials_core_mod.c b/src/sundials/fmod_int32/fsundials_core_mod.c index ad1f31a295..62e0215249 100644 --- a/src/sundials/fmod_int32/fsundials_core_mod.c +++ b/src/sundials/fmod_int32/fsundials_core_mod.c @@ -291,13 +291,6 @@ SWIGINTERN SwigArrayWrapper SwigArrayWrapper_uninitialized() { #include "sundials/sundials_adaptcontroller.h" - -SWIGEXPORT SWIGEXTERN int const _wrap_SUN_COMM_NULL = (int)(0); - -SWIGEXPORT SWIGEXTERN int const _wrap_SUNFALSE = (int)(0); - -SWIGEXPORT SWIGEXTERN int const _wrap_SUNTRUE = (int)(1); - SWIGEXPORT void _wrap_FSUNLogErrHandlerFn(int const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, int const *farg5, void *farg6, void *farg7) { int arg1 ; char *arg2 = (char *) 0 ; diff --git a/src/sundials/fmod_int32/fsundials_core_mod.f90 b/src/sundials/fmod_int32/fsundials_core_mod.f90 index f47a3141f2..2bda4cb0fe 100644 --- a/src/sundials/fmod_int32/fsundials_core_mod.f90 +++ b/src/sundials/fmod_int32/fsundials_core_mod.f90 @@ -44,14 +44,11 @@ module fsundials_core_mod include "mpif.h" integer(C_INT), protected, public :: SUN_COMM_NULL = MPI_COMM_NULL #else - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUN_COMM_NULL") :: SUN_COMM_NULL + integer(C_INT), parameter, public :: SUN_COMM_NULL = 0_C_INT #endif - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUNFALSE") :: SUNFALSE - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUNTRUE") :: SUNTRUE + integer(C_INT), parameter, public :: SUNFALSE = 0_C_INT + integer(C_INT), parameter, public :: SUNTRUE = 1_C_INT ! typedef enum SUNOutputFormat enum, bind(c) enumerator :: SUN_OUTPUTFORMAT_TABLE diff --git a/src/sundials/fmod_int64/fsundials_core_mod.c b/src/sundials/fmod_int64/fsundials_core_mod.c index 9fa73f722b..2478b92d68 100644 --- a/src/sundials/fmod_int64/fsundials_core_mod.c +++ b/src/sundials/fmod_int64/fsundials_core_mod.c @@ -291,13 +291,6 @@ SWIGINTERN SwigArrayWrapper SwigArrayWrapper_uninitialized() { #include "sundials/sundials_adaptcontroller.h" - -SWIGEXPORT SWIGEXTERN int const _wrap_SUN_COMM_NULL = (int)(0); - -SWIGEXPORT SWIGEXTERN int const _wrap_SUNFALSE = (int)(0); - -SWIGEXPORT SWIGEXTERN int const _wrap_SUNTRUE = (int)(1); - SWIGEXPORT void _wrap_FSUNLogErrHandlerFn(int const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, int const *farg5, void *farg6, void *farg7) { int arg1 ; char *arg2 = (char *) 0 ; diff --git a/src/sundials/fmod_int64/fsundials_core_mod.f90 b/src/sundials/fmod_int64/fsundials_core_mod.f90 index c51487dd30..7096d0c6ce 100644 --- a/src/sundials/fmod_int64/fsundials_core_mod.f90 +++ b/src/sundials/fmod_int64/fsundials_core_mod.f90 @@ -44,14 +44,11 @@ module fsundials_core_mod include "mpif.h" integer(C_INT), protected, public :: SUN_COMM_NULL = MPI_COMM_NULL #else - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUN_COMM_NULL") :: SUN_COMM_NULL + integer(C_INT), parameter, public :: SUN_COMM_NULL = 0_C_INT #endif - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUNFALSE") :: SUNFALSE - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUNTRUE") :: SUNTRUE + integer(C_INT), parameter, public :: SUNFALSE = 0_C_INT + integer(C_INT), parameter, public :: SUNTRUE = 1_C_INT ! typedef enum SUNOutputFormat enum, bind(c) enumerator :: SUN_OUTPUTFORMAT_TABLE diff --git a/swig/sundials/fsundials_types.i b/swig/sundials/fsundials_types.i index 248ec9d5e7..0f61838b50 100644 --- a/swig/sundials/fsundials_types.i +++ b/swig/sundials/fsundials_types.i @@ -15,6 +15,9 @@ // Swig interface file // --------------------------------------------------------------- +// By default, wrap all constants as native fortran PARAMETERs +%fortranconst; + %include #ifdef GENERATE_INT32 @@ -85,17 +88,12 @@ // (1) SWIG expands SUN_COMM_NULL to its value // (2) We need it to be equivalent to MPI_COMM_NULL when MPI is enabled -%insert("wrapper") %{ -SWIGEXPORT SWIGEXTERN int const _wrap_SUN_COMM_NULL = (int)(0); -%} - %insert("fdecl") %{ #if SUNDIALS_MPI_ENABLED include "mpif.h" integer(C_INT), protected, public :: SUN_COMM_NULL = MPI_COMM_NULL #else - integer(C_INT), protected, public, & - bind(C, name="_wrap_SUN_COMM_NULL") :: SUN_COMM_NULL + integer(C_INT), parameter, public :: SUN_COMM_NULL = 0_C_INT #endif %} From 73a7b00e7b66a1b5c1f3fcabbb60c750e420b100 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 16:46:39 -0700 Subject: [PATCH 063/101] increase max iterations in fortran fixedpoint test --- .../fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 index 90213440af..f084b816bf 100644 --- a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 +++ b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 @@ -22,7 +22,7 @@ module test_fsunnonlinsol_fixedpoint implicit none integer(kind=myindextype), parameter :: NEQ = 3 ! number of equations - integer(C_INT), parameter :: MAXIT = 10 ! max nonlinear iters. + integer(C_INT), parameter :: MAXIT = 50 ! max nonlinear iters. real(C_DOUBLE), parameter :: TOL = 1.0e-4 ! nonlinear solver tolerance real(C_DOUBLE), parameter :: PI = 3.1415926535898 From 9549256f48d991f58a0046450e8aabaaf48968b3 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 16:58:55 -0700 Subject: [PATCH 064/101] try msys with ninja --- .../{windows-latest-mingw.yml => windows-latest-msys.yml} | 1 - 1 file changed, 1 deletion(-) rename .github/workflows/{windows-latest-mingw.yml => windows-latest-msys.yml} (98%) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-msys.yml similarity index 98% rename from .github/workflows/windows-latest-mingw.yml rename to .github/workflows/windows-latest-msys.yml index ff9eaa4cf3..35c8fc374e 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-msys.yml @@ -50,7 +50,6 @@ jobs: # Configure CMake in a 'build' subdirectory run: | cmake \ - -G "MSYS Makefiles" \ -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ From a88887e1378c4137d376000ff34079ecc684a021 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 17:00:47 -0700 Subject: [PATCH 065/101] undo rename --- .../{windows-latest-msys.yml => windows-latest-mingw.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{windows-latest-msys.yml => windows-latest-mingw.yml} (100%) diff --git a/.github/workflows/windows-latest-msys.yml b/.github/workflows/windows-latest-mingw.yml similarity index 100% rename from .github/workflows/windows-latest-msys.yml rename to .github/workflows/windows-latest-mingw.yml From 07448eee45fadd7b5f4dc14240b3b8b57a942970 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Mon, 17 Jun 2024 17:05:29 -0700 Subject: [PATCH 066/101] do shared build with msys only --- .github/workflows/windows-latest-mingw.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 35c8fc374e..440e204cd4 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -46,14 +46,16 @@ jobs: ${{ matrix.target-prefix }}-openblas ${{ matrix.target-prefix }}-suitesparse - - name: Configure CMake + - name: Configure CMake (Static) # Configure CMake in a 'build' subdirectory run: | cmake \ + -G "MSYS Makefiles" \ -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ + -DBUILD_STATIC_LIBS=OFF \ -DSUNDIALS_BUILD_WITH_PROFILING=ON \ -DSUNDIALS_LOGGING_LEVEL=2 \ -DSUNDIALS_TEST_UNITTESTS=OFF \ From 510943b80382f3c2cae5638106a4bde05a3d68bc Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 20:47:15 -0700 Subject: [PATCH 067/101] try msys shared --- .github/workflows/windows-latest-mingw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 440e204cd4..7dfbf62c91 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -55,7 +55,7 @@ jobs: -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ - -DBUILD_STATIC_LIBS=OFF \ + -DBUILD_SHARED_LIBS=OFF \ -DSUNDIALS_BUILD_WITH_PROFILING=ON \ -DSUNDIALS_LOGGING_LEVEL=2 \ -DSUNDIALS_TEST_UNITTESTS=OFF \ From f251717162871236df2fe78fe2a72ef47fd17fbc Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 21:18:03 -0700 Subject: [PATCH 068/101] update ark_bruss_f2003 --- examples/arkode/F2003_serial/ark_bruss_f2003.f90 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/arkode/F2003_serial/ark_bruss_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss_f2003.f90 index 52a7121a88..d4b5185105 100644 --- a/examples/arkode/F2003_serial/ark_bruss_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss_f2003.f90 @@ -46,8 +46,18 @@ module bruss_mod !======= Declarations ========= implicit none + ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype + ! we set the integer kind used for indices in this example based + ! on the the index size SUNDIALS was compiled with so that it works + ! in both configurations. This is not a requirement for user codes. +#if defined(SUNDIALS_INT32_T) + integer, parameter :: myindextype = selected_int_kind(8) +#elif defined(SUNDIALS_INT64_T) + integer, parameter :: myindextype = selected_int_kind(16) +#endif + ! number of equations - integer(c_long), parameter :: neq = 3 + integer(kind=myindextype), parameter :: neq = 3 ! ODE parameters real(c_double), parameter, dimension(neq) :: y0 = (/ 3.9d0, 1.1d0, 2.8d0 /) From 00efdd20582386bb18f552e65ae2a8c8798aee93 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 22:52:01 -0700 Subject: [PATCH 069/101] add myindextype to arkode examples that didnt have it yet --- .../ark_bruss1D_FEM_klu_f2003.f90 | 42 ++++++++++++------- .../F2003_serial/ark_diurnal_kry_bp_f2003.f90 | 16 +++++-- .../arkode/F2003_serial/ark_kpr_mri_f2003.f90 | 12 +++++- .../F2003_serial/ark_roberts_dnsL_f2003.f90 | 12 +++++- .../F2003_serial/ark_roberts_dns_f2003.f90 | 12 +++++- 5 files changed, 72 insertions(+), 22 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index f272a56644..a236db5c77 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -70,20 +70,30 @@ module Bruss1DFEMKLU_UserData !======= Declarations ========= implicit none + ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype + ! we set the integer kind used for indices in this example based + ! on the the index size SUNDIALS was compiled with so that it works + ! in both configurations. This is not a requirement for user codes. +#if defined(SUNDIALS_INT32_T) + integer, parameter :: myindextype = selected_int_kind(8) +#elif defined(SUNDIALS_INT64_T) + integer, parameter :: myindextype = selected_int_kind(16) +#endif + ! number of equations integer(c_int), parameter :: neqreal = 3 ! ODE parameters - integer(c_int), parameter :: N = 201 ! number of intervals - integer(c_int), parameter :: neq = neqreal*N ! set overall problem size - integer(c_int), parameter :: nnz = 15*neq - 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 = 2.5d-2 ! diffusion coeff for u - real(c_double), parameter :: dv = 2.5d-2 ! diffusion coeff for v - real(c_double), parameter :: dw = 2.5d-2 ! diffusion coeff for w - real(c_double), parameter :: ep = 1.d-5 ! stiffness parameter - real(c_double), dimension(N) :: x ! mesh node locations + integer(kind=myindextype), parameter :: N = 201 ! number of intervals + integer(kind=myindextype), parameter :: neq = neqreal*N ! set overall problem size + integer(kind=myindextype), parameter :: nnz = 15*neq + 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 = 2.5d-2 ! diffusion coeff for u + real(c_double), parameter :: dv = 2.5d-2 ! diffusion coeff for v + real(c_double), parameter :: dw = 2.5d-2 ! diffusion coeff for w + real(c_double), parameter :: ep = 1.d-5 ! stiffness parameter + real(c_double), dimension(N) :: x ! mesh node locations contains @@ -413,7 +423,7 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & type(N_Vector) :: sunvec_t3 ! Local data - integer(c_int) :: ix, nz, Nint + integer(kind=myindextype) :: ix, nz, Nint real(c_double) :: ul, uc, ur, vl, vc, vr, wl, wc, wr, xl, xc, xr real(c_double) :: u1, u2, u3, v1, v2, v3, w1, w2, w3 real(c_double) :: df1, df2, df3, dQdf1, dQdf2, dQdf3 @@ -421,8 +431,8 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & real(c_double), dimension(3,-1:1) :: Ju, Jv, Jw ! pointers to data in SUNDIALS vectors - integer(c_long), pointer, dimension(nnz) :: Jcolvals(:) - integer(c_long), pointer, dimension(neq+1) :: Jrowptrs(:) + integer(kind=myindextype), pointer, dimension(nnz) :: Jcolvals(:) + integer(kind=myindextype), pointer, dimension(neq+1) :: Jrowptrs(:) real(c_double), pointer, dimension(nnz) :: Jdata(:) real(c_double), pointer, dimension(neqreal,N) :: yvec(:,:) real(c_double), pointer, dimension(neqreal,N) :: fvec(:,:) @@ -868,13 +878,13 @@ integer(c_int) function Mass(tn, sunmat_M, user_data, & type(N_Vector) :: sunvec_t3 ! Local data - integer(c_int) :: ix, nz, Nint + integer(kind=myindextype) :: ix, nz, Nint real(c_double) :: xl, xc, xr, Ml, Mc, Mr, ChiL1, ChiL2, ChiL3, ChiR1, ChiR2, ChiR3 logical :: left, right ! pointers to data in SUNDIALS vectors - integer(c_long), pointer, dimension(nnz) :: Mcolvals(:) - integer(c_long), pointer, dimension(neq+1) :: Mrowptrs(:) + integer(kind=myindextype), pointer, dimension(nnz) :: Mcolvals(:) + integer(kind=myindextype), pointer, dimension(neq+1) :: Mrowptrs(:) real(c_double), pointer, dimension(nnz) :: Mdata(:) !======= Internals ============ diff --git a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 index c87583eb23..9776f64396 100644 --- a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 @@ -52,10 +52,20 @@ module DiurnalKryBP_mod !======= Declarations ========= implicit none + ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype + ! we set the integer kind used for indices in this example based + ! on the the index size SUNDIALS was compiled with so that it works + ! in both configurations. This is not a requirement for user codes. +#if defined(SUNDIALS_INT32_T) + integer, parameter :: myindextype = selected_int_kind(8) +#elif defined(SUNDIALS_INT64_T) + integer, parameter :: myindextype = selected_int_kind(16) +#endif + ! setup and number of equations integer(c_int), parameter :: mx = 10, my = 10 - integer(c_long), parameter :: mm = mx*my - integer(c_long), parameter :: neq = 2*mm + integer(kind=myindextype), parameter :: mm = mx*my + integer(kind=myindextype), parameter :: neq = 2*mm ! ODE constant parameters real(c_double), parameter :: Kh = 4.0d-6 @@ -230,8 +240,8 @@ program main real(c_double) :: cx, cy ! initialization variables integer(c_int) :: ierr ! error flag from C functions integer(c_long) :: outstep ! output step - integer(c_long) :: mu, ml ! band preconditioner constants real(c_double) :: x, y ! initialization index variables + integer(kind=myindextype) :: mu, ml ! band preconditioner constants type(N_Vector), pointer :: sunvec_u ! sundials vector type(N_Vector), pointer :: sunvec_f ! sundials vector diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 index 929844e792..bf4fa8b12f 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 @@ -84,16 +84,26 @@ module kpr_mod implicit none + ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype + ! we set the integer kind used for indices in this example based + ! on the the index size SUNDIALS was compiled with so that it works + ! in both configurations. This is not a requirement for user codes. +#if defined(SUNDIALS_INT32_T) + integer, parameter :: myindextype = selected_int_kind(8) +#elif defined(SUNDIALS_INT64_T) + integer, parameter :: myindextype = selected_int_kind(16) +#endif + ! Constants real(c_double) :: ZERO = 0.0d0 real(c_double) :: ONE = 1.0d0 real(c_double) :: TWO = 2.0d0 ! general problem parameters + integer(kind=myindextype), parameter :: NEQ = 2 ! number of dependent vars. 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_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/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 b/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 index fb58aee07f..65e7b8e3ab 100644 --- a/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 @@ -41,7 +41,17 @@ module dnsL_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: neq = 3 + ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype + ! we set the integer kind used for indices in this example based + ! on the the index size SUNDIALS was compiled with so that it works + ! in both configurations. This is not a requirement for user codes. +#if defined(SUNDIALS_INT32_T) + integer, parameter :: myindextype = selected_int_kind(8) +#elif defined(SUNDIALS_INT64_T) + integer, parameter :: myindextype = selected_int_kind(16) +#endif + + integer(kind=myindextype), parameter :: neq = 3 integer(c_long), parameter :: nout = 12 contains diff --git a/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 b/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 index 379f7a23ea..1fcbe36089 100644 --- a/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 @@ -41,7 +41,17 @@ module dns_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: neq = 3 + ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype + ! we set the integer kind used for indices in this example based + ! on the the index size SUNDIALS was compiled with so that it works + ! in both configurations. This is not a requirement for user codes. +#if defined(SUNDIALS_INT32_T) + integer, parameter :: myindextype = selected_int_kind(8) +#elif defined(SUNDIALS_INT64_T) + integer, parameter :: myindextype = selected_int_kind(16) +#endif + + integer(kind=myindextype), parameter :: neq = 3 integer(c_long), parameter :: nout = 12 contains From 22e90862903a192f431cd61356a51838462e1086 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 22:58:15 -0700 Subject: [PATCH 070/101] fix idx function --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index a236db5c77..19e1046fc5 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -99,8 +99,8 @@ module Bruss1DFEMKLU_UserData ! function that maps 2D data into 1D address space ! (0-based since CSR matrix will be sent to C solver) - integer(c_int) function idx(ix, ivar) - integer(c_int) :: ivar, ix + integer(kind=myindextype) function idx(ix, ivar) + integer(kind=myindextype) :: ivar, ix idx = neqreal*(ix - 1) + ivar - 1 end function idx From ee5bb65185dbfb94174409c7e28b3f32419a4fb0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:01:59 -0700 Subject: [PATCH 071/101] add recent changes --- CHANGELOG.md | 2 ++ doc/shared/RecentChanges.rst | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d85d47def6..3b94e65798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,6 +117,8 @@ Fix bug on LLP64 platforms (like Windows 64-bit) where `KLU_INDEXTYPE` could be Check if size of `SuiteSparse_long` is 8 if the size of `sunindextype` is 8 when using KLU. +Fixed several build errors with the Fortran interfaces on Windows systems. + ### Deprecation Notices Numerous ARKODE stepper-specific functions are now deprecated in favor of diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index ef32fa2bbb..b36fd85eed 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -129,3 +129,5 @@ The unsupported implementations of ``N_VGetArrayPointer`` and ``N_VSetArrayPointer`` for the *hypre* and PETSc vectors are now deprecated. Users should access the underlying wrapped external library vector objects instead with ``N_VGetVector_ParHyp`` and ``N_VGetVector_Petsc``, respectively. + +Fixed several build errors with the Fortran interfaces on Windows systems. From 59d43cdd92eb663f34553c60baa3cdf37e391a89 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:18:07 -0700 Subject: [PATCH 072/101] use c_int64_t instead of c_long --- .../ark_analytic_complex_f2003.f90 | 2 +- .../F2003_custom/ark_brusselator1D_f2003.f90 | 12 +++++----- .../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_parallel/ark_diag_kry_bbd_f2003.f90 | 6 ++--- .../F2003_parallel/ark_diag_non_f2003.f90 | 4 ++-- .../F2003_parallel/ark_heat2D_f2003.f90 | 2 +- .../F2003_parallel/cv_diag_kry_bbd_f2003.f90 | 6 ++--- .../F2003_parallel/cv_diag_kry_f2003.f90 | 4 ++-- .../F2003_parallel/cv_diag_non_p_f2003.f90 | 4 ++-- .../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/cv_diurnal_kry_bp_f2003.f90 | 6 ++--- .../F2003_serial/cv_diurnal_kry_f2003.f90 | 10 ++++---- .../F2003_serial/cv_roberts_dnsL_f2003.f90 | 2 +- .../cv_roberts_dns_constraints_f2003.f90 | 2 +- .../F2003_serial/cv_roberts_dns_f2003.f90 | 2 +- .../F2003_serial/cv_roberts_klu_f2003.f90 | 8 +++---- .../F2003_openmp/idaHeat2D_kry_omp_f2003.f90 | 6 ++--- .../ida_heat2D_kry_bbd_f2003.f90 | 8 +++---- .../ida/F2003_serial/idaHeat2D_kry_f2003.f90 | 6 ++--- .../F2003_serial/idasHeat2D_kry_f2003.f90 | 6 ++--- .../F2003_parallel/kin_diagon_kry_f2003.f90 | 10 ++++---- .../F2003_serial/kinDiagon_kry_f2003.f90 | 2 +- .../F2003_serial/kinLaplace_bnd_f2003.f90 | 14 +++++------ .../kinLaplace_picard_kry_f2003.f90 | 14 +++++------ .../F2003_serial/kinRoboKin_dns_f2003.f90 | 4 ++-- 36 files changed, 128 insertions(+), 128 deletions(-) diff --git a/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 b/examples/arkode/F2003_custom/ark_analytic_complex_f2003.f90 index 4a0a8a5911..83e9ac1fbf 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 579d70479c..c195ce2d12 100644 --- a/examples/arkode/F2003_custom/ark_brusselator1D_f2003.f90 +++ b/examples/arkode/F2003_custom/ark_brusselator1D_f2003.f90 @@ -51,10 +51,10 @@ module ode_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: N = 201 ! number of intervals + integer(c_int64_t), 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 + 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 @@ -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..e762a3858d 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..3264f75a5d 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..9da06d3ea9 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..7d6b397e99 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_diag_kry_bbd_f2003.f90 b/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.f90 index 7cf6efd0f9..c7b25afe86 100644 --- a/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.f90 +++ b/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.f90 @@ -53,8 +53,8 @@ module DiagkryData ! Problem parameters integer(c_int), parameter :: iGStype = 1 integer(c_int), parameter :: iPretype0 = 1 - integer(c_long), parameter :: nlocal = 10 - integer(c_long) :: neq, mu, ml, mudq, mldq + integer(c_int64_t), parameter :: nlocal = 10 + integer(c_int64_t) :: neq, mu, ml, mudq, mldq integer(c_int) :: iPretype real(c_double) :: alpha @@ -118,7 +118,7 @@ integer(c_int) function LocalgFn(nnlocal, t, sunvec_y, sunvec_g, user_data) & ! calling variables real(c_double), value :: t ! current time - integer(c_long) :: nnlocal ! local space + integer(c_int64_t) :: nnlocal ! local space type(N_Vector) :: sunvec_y ! solution N_Vector type(N_Vector) :: sunvec_g ! output g N_Vector type(c_ptr), value :: user_data ! user-defined data diff --git a/examples/arkode/F2003_parallel/ark_diag_non_f2003.f90 b/examples/arkode/F2003_parallel/ark_diag_non_f2003.f90 index edfcf0d3b5..e05da275b0 100644 --- a/examples/arkode/F2003_parallel/ark_diag_non_f2003.f90 +++ b/examples/arkode/F2003_parallel/ark_diag_non_f2003.f90 @@ -46,8 +46,8 @@ module DiagnonData integer :: nprocs ! total number of MPI processes ! Problem parameters - integer(c_long), parameter :: nlocal = 2 - integer(c_long) :: neq + integer(c_int64_t), parameter :: nlocal = 2 + integer(c_int64_t) :: neq real(c_double) :: alpha contains diff --git a/examples/arkode/F2003_parallel/ark_heat2D_f2003.f90 b/examples/arkode/F2003_parallel/ark_heat2D_f2003.f90 index a58e0ad2d8..e8c53d66cd 100644 --- a/examples/arkode/F2003_parallel/ark_heat2D_f2003.f90 +++ b/examples/arkode/F2003_parallel/ark_heat2D_f2003.f90 @@ -671,7 +671,7 @@ program driver type(SUNLinearSolver), pointer :: sun_LS ! linear solver type(SUNMatrix), pointer :: sunmat_A ! sundials matrix type(c_ptr) :: arkode_mem ! ARKODE memory - integer(c_long) :: N, Ntot + integer(c_int64_t) :: N, Ntot integer(c_int) :: retval integer :: ierr logical :: outproc diff --git a/examples/cvode/F2003_parallel/cv_diag_kry_bbd_f2003.f90 b/examples/cvode/F2003_parallel/cv_diag_kry_bbd_f2003.f90 index 685d60784c..98d9110884 100644 --- a/examples/cvode/F2003_parallel/cv_diag_kry_bbd_f2003.f90 +++ b/examples/cvode/F2003_parallel/cv_diag_kry_bbd_f2003.f90 @@ -49,8 +49,8 @@ module DiagkrybbdData ! Problem parameters integer(c_int), parameter :: iGStype = 1 integer(c_int), parameter :: iPretype0 = 1 - integer(c_long), parameter :: nlocal = 10 - integer(c_long) :: neq, mu, ml, mudq, mldq + integer(c_int64_t), parameter :: nlocal = 10 + integer(c_int64_t) :: neq, mu, ml, mudq, mldq integer(c_int) :: iPretype real(c_double) :: alpha @@ -118,7 +118,7 @@ integer(c_int) function LocalgFn(nnlocal, t, sunvec_y, sunvec_g, user_data) & ! calling variables real(c_double), value :: t ! current time - integer(c_long) :: nnlocal ! local space + integer(c_int64_t) :: nnlocal ! local space type(N_Vector) :: sunvec_y ! solution N_Vector type(N_Vector) :: sunvec_g ! output g N_Vector type(c_ptr) :: user_data ! user-defined data diff --git a/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 b/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 index e1266fb522..6e3a9caab5 100644 --- a/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 +++ b/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 @@ -49,8 +49,8 @@ module DiagkryData ! Problem parameters integer(c_int), parameter :: iGStype = 1 integer(c_int), parameter :: iPretype0 = 1 - integer(c_long), parameter :: nlocal = 10 - integer(c_long) :: neq + integer(c_int64_t), parameter :: nlocal = 10 + integer(c_int64_t) :: neq integer(c_int) :: iPretype real(c_double) :: alpha diff --git a/examples/cvode/F2003_parallel/cv_diag_non_p_f2003.f90 b/examples/cvode/F2003_parallel/cv_diag_non_p_f2003.f90 index 39b8abf5dc..8f200c90c7 100644 --- a/examples/cvode/F2003_parallel/cv_diag_non_p_f2003.f90 +++ b/examples/cvode/F2003_parallel/cv_diag_non_p_f2003.f90 @@ -45,8 +45,8 @@ module DiagnonData integer :: nprocs ! total number of MPI processes ! Problem parameters - integer(c_long), parameter :: nlocal = 2 - integer(c_long) :: neq + integer(c_int64_t), parameter :: nlocal = 2 + integer(c_int64_t) :: neq real(c_double) :: alpha contains 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..f4360ff1c7 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/cvode/F2003_serial/cv_diurnal_kry_bp_f2003.f90 b/examples/cvode/F2003_serial/cv_diurnal_kry_bp_f2003.f90 index 69b4016927..fe69831f05 100644 --- a/examples/cvode/F2003_serial/cv_diurnal_kry_bp_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_diurnal_kry_bp_f2003.f90 @@ -55,8 +55,8 @@ module diurnal_bp_mod ! setup and number of equations integer(c_int), parameter :: mx = 10, my = 10 - integer(c_long), parameter :: mm = mx*my - integer(c_long), parameter :: neq = 2*mm + integer(c_int64_t), parameter :: mm = mx*my + integer(c_int64_t), parameter :: neq = 2*mm ! ODE constant parameters real(c_double), parameter :: Kh = 4.0d-6 @@ -227,7 +227,7 @@ program main real(c_double) :: cx, cy ! initialization variables integer(c_int) :: ierr ! error flag from C functions integer(c_long) :: outstep ! output step - integer(c_long) :: mu, ml ! band preconditioner constants + integer(c_int64_t) :: mu, ml ! band preconditioner constants real(c_double) :: x, y ! initialization index variables type(N_Vector), pointer :: sunvec_u ! sundials vector diff --git a/examples/cvode/F2003_serial/cv_diurnal_kry_f2003.f90 b/examples/cvode/F2003_serial/cv_diurnal_kry_f2003.f90 index d9267480ac..d087b60d99 100644 --- a/examples/cvode/F2003_serial/cv_diurnal_kry_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_diurnal_kry_f2003.f90 @@ -55,8 +55,8 @@ module diurnal_mod ! setup and number of equations integer(c_int), parameter :: mx = 10, my = 10 - integer(c_long), parameter :: mm = mx*my - integer(c_long), parameter :: neq = 2*mm + integer(c_int64_t), parameter :: mm = mx*my + integer(c_int64_t), parameter :: neq = 2*mm ! ODE constant parameters real(c_double), parameter :: Kh = 4.0d-6 @@ -375,11 +375,11 @@ subroutine Prec_LU(mmm, p, ierr) implicit none integer(c_int), intent(out) :: ierr - integer(c_long), intent(in) :: mmm + integer(c_int64_t), intent(in) :: mmm real(c_double), intent(inout) :: p(2,2,mmm) ! local variable - integer(c_long) :: i + integer(c_int64_t) :: i real(c_double) :: p11, p12, p21, p22, det ! initialize return value to success @@ -426,7 +426,7 @@ subroutine Prec_Sol(mx,my, p, z) real(c_double), dimension(2,mx,my), intent(inout) :: z(:,:,:) ! local variable - integer(c_long) :: i, j + integer(c_int64_t) :: i, j real(c_double) :: z1, z2 diff --git a/examples/cvode/F2003_serial/cv_roberts_dnsL_f2003.f90 b/examples/cvode/F2003_serial/cv_roberts_dnsL_f2003.f90 index 2563680cba..2ed0a8cbed 100644 --- a/examples/cvode/F2003_serial/cv_roberts_dnsL_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_roberts_dnsL_f2003.f90 @@ -45,7 +45,7 @@ module robertsDnsL_mod implicit none integer(c_int), parameter :: nout = 12 - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 contains diff --git a/examples/cvode/F2003_serial/cv_roberts_dns_constraints_f2003.f90 b/examples/cvode/F2003_serial/cv_roberts_dns_constraints_f2003.f90 index 3e6a9901ad..1eb2e504be 100644 --- a/examples/cvode/F2003_serial/cv_roberts_dns_constraints_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_roberts_dns_constraints_f2003.f90 @@ -49,7 +49,7 @@ module RobertsDnsConstr_mod implicit none integer(c_int), parameter :: nout = 12 - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 contains diff --git a/examples/cvode/F2003_serial/cv_roberts_dns_f2003.f90 b/examples/cvode/F2003_serial/cv_roberts_dns_f2003.f90 index 751a2f2807..3a07939e64 100644 --- a/examples/cvode/F2003_serial/cv_roberts_dns_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_roberts_dns_f2003.f90 @@ -45,7 +45,7 @@ module robertsDns_mod implicit none integer(c_int), parameter :: nout = 12 - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 contains diff --git a/examples/cvode/F2003_serial/cv_roberts_klu_f2003.f90 b/examples/cvode/F2003_serial/cv_roberts_klu_f2003.f90 index eef7aeab8e..785d3e7c63 100644 --- a/examples/cvode/F2003_serial/cv_roberts_klu_f2003.f90 +++ b/examples/cvode/F2003_serial/cv_roberts_klu_f2003.f90 @@ -45,8 +45,8 @@ module roberts_klu_mod implicit none integer(c_int), parameter :: nout = 12 - integer(c_long), parameter :: neq = 3 - integer(c_long), parameter :: nnz = neq * neq + integer(c_int64_t), parameter :: neq = 3 + integer(c_int64_t), parameter :: nnz = neq * neq contains @@ -164,8 +164,8 @@ integer(c_int) function jacrob(t, sunvec_y, sunvec_f, & ! pointers to data in SUNDIALS vector and matrix real(c_double), pointer, dimension(neq) :: yval(:) real(c_double), pointer, dimension(nnz) :: Jdata(:) - integer(c_long), pointer, dimension(nnz) :: Jrvals(:) - integer(c_long), pointer, dimension(neq+1) :: Jcptrs(:) + integer(c_int64_t), pointer, dimension(nnz) :: Jrvals(:) + integer(c_int64_t), pointer, dimension(neq+1) :: Jcptrs(:) !======= Internals ============ diff --git a/examples/ida/F2003_openmp/idaHeat2D_kry_omp_f2003.f90 b/examples/ida/F2003_openmp/idaHeat2D_kry_omp_f2003.f90 index 790b62326c..3e83d622e6 100644 --- a/examples/ida/F2003_openmp/idaHeat2D_kry_omp_f2003.f90 +++ b/examples/ida/F2003_openmp/idaHeat2D_kry_omp_f2003.f90 @@ -48,7 +48,7 @@ module idaHeat2DKryOMP_mod integer(c_int), parameter :: nout = 11 integer(c_int), parameter :: mgrid = 100 - integer(c_long), parameter :: neq = mgrid*mgrid + integer(c_int64_t), parameter :: neq = mgrid*mgrid real(c_double) :: dx real(c_double) :: coeff @@ -86,7 +86,7 @@ integer(c_int) function resHeat(tres, sunvec_u, sunvec_up, sunvec_r, user_data) real(c_double), pointer, dimension(mgrid,mgrid) :: r(:,:) ! local variables - integer(c_long) :: i, j + integer(c_int64_t) :: i, j !======= Internals ============ @@ -522,7 +522,7 @@ subroutine SetInitialProfile(sunvec_u, sunvec_up, sunvec_r) real(c_double), pointer, dimension(mgrid,mgrid) :: 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_parallel/ida_heat2D_kry_bbd_f2003.f90 b/examples/ida/F2003_parallel/ida_heat2D_kry_bbd_f2003.f90 index b718674c52..0f76650345 100644 --- a/examples/ida/F2003_parallel/ida_heat2D_kry_bbd_f2003.f90 +++ b/examples/ida/F2003_parallel/ida_heat2D_kry_bbd_f2003.f90 @@ -76,7 +76,7 @@ module Heat2DKryBBD_mod integer :: je integer :: nxl ! local number of x grid points integer :: nyl ! local number of y grid points - integer(c_long) :: N, Ntot + integer(c_int64_t) :: N, Ntot real(c_double) :: dx ! x-directional mesh spacing real(c_double) :: dy ! y-directional mesh spacing integer, target :: comm ! communicator object @@ -93,7 +93,7 @@ module Heat2DKryBBD_mod real(c_double), dimension(:), allocatable :: Ssend ! Problem parameters - integer(c_long) :: mudq, mldq, mu, ml + integer(c_int64_t) :: mudq, mldq, mu, ml integer(c_int) :: maxl real(c_double) :: kx ! x-directional diffusion coefficient real(c_double) :: ky ! y-directional diffusion coefficient @@ -442,7 +442,7 @@ integer(c_int) function Exchange(Nloc, t, sunvec_y, sunvec_ydot, & implicit none ! calling variables - integer(c_long), value :: Nloc + integer(c_int64_t), value :: Nloc real(c_double), value :: t ! current time type(N_Vector) :: sunvec_y ! solution N_Vector type(N_Vector) :: sunvec_ydot ! rhs N_Vector @@ -647,7 +647,7 @@ integer(c_int) function LocalFn(Nloc, t, sunvec_y, sunvec_ydot, sunvec_g, & implicit none ! calling variables - integer(c_long), value :: Nloc + integer(c_int64_t), value :: Nloc real(c_double), value :: t ! current time type(N_Vector) :: sunvec_y ! solution N_Vector type(N_Vector) :: sunvec_ydot ! rhs N_Vector diff --git a/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 b/examples/ida/F2003_serial/idaHeat2D_kry_f2003.f90 index 22c7d2d691..a8fd742d0e 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/idas/F2003_serial/idasHeat2D_kry_f2003.f90 b/examples/idas/F2003_serial/idasHeat2D_kry_f2003.f90 index 2c06761340..9ecad4f265 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_parallel/kin_diagon_kry_f2003.f90 b/examples/kinsol/F2003_parallel/kin_diagon_kry_f2003.f90 index 9c00556e7d..e0fba580a1 100644 --- a/examples/kinsol/F2003_parallel/kin_diagon_kry_f2003.f90 +++ b/examples/kinsol/F2003_parallel/kin_diagon_kry_f2003.f90 @@ -36,10 +36,10 @@ module kinDiagonKry_mod ! With MPI-3 use mpi_f08 is preferred include "mpif.h" - integer(c_long), parameter :: neq = 128 + integer(c_int64_t), parameter :: neq = 128 integer(c_int) :: ierr, retval, nprint - integer(c_long) :: i, nlocal + integer(c_int64_t) :: i, nlocal real(c_double), pointer, dimension(neq) :: u(:), scale(:), constr(:) real(c_double) :: p(neq) integer(c_int), parameter :: prectype = 2 @@ -73,7 +73,7 @@ subroutine init(sunvec_u, sunvec_s, sunvec_c) type(N_Vector) :: sunvec_c ! constraint N_Vector ! local variables - integer(c_long) :: ii + integer(c_int64_t) :: ii u(1:nlocal) => FN_VGetArrayPointer(sunvec_u) scale(1:nlocal) => FN_VGetArrayPointer(sunvec_s) @@ -118,7 +118,7 @@ integer(c_int) function func(sunvec_u, sunvec_f, user_data) & real(c_double), pointer, dimension(nlocal) :: uu(:), ff(:) ! local variables - integer(c_long) :: ii + integer(c_int64_t) :: ii !======= Internals ============ @@ -471,7 +471,7 @@ subroutine PrintOutput(uu) ! calling variable real(c_double), dimension(neq) :: uu - integer(c_long) :: ii + integer(c_int64_t) :: ii !======= Internals ============ diff --git a/examples/kinsol/F2003_serial/kinDiagon_kry_f2003.f90 b/examples/kinsol/F2003_serial/kinDiagon_kry_f2003.f90 index a69564fe1f..78c76cde4f 100644 --- a/examples/kinsol/F2003_serial/kinDiagon_kry_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinDiagon_kry_f2003.f90 @@ -47,7 +47,7 @@ module kinDiagonKry_mod integer(kind=myindextype), parameter :: neq = 128 integer(c_int) :: ierr, retval - integer(c_long) :: i + integer(c_int64_t) :: i real(c_double), pointer, dimension(neq) :: u(:), scale(:), constr(:) real(c_double) :: p(neq) integer(c_int), parameter :: prectype = 2 diff --git a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 index 823015cf9c..8604652b08 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 ============ @@ -131,7 +131,7 @@ program main ! local variables real(c_double) :: fnormtol, fnorm(1) integer(c_int) :: ierr - integer(c_long) :: mset, msubset + integer(c_int64_t) :: mset, msubset type(c_ptr) :: sunctx ! sundials context type(N_Vector), pointer :: sunvec_u ! sundials vectors @@ -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..9832ac97ff 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 From 6b12e495a4ecb37699ce04484b8d44f121fabee6 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:36:49 -0700 Subject: [PATCH 073/101] revert changes to vectors --- src/nvector/cuda/nvector_cuda.cu | 2 +- src/nvector/hip/nvector_hip.hip.cpp | 2 +- src/nvector/raja/nvector_raja.cpp | 2 +- src/nvector/trilinos/nvector_trilinos.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nvector/cuda/nvector_cuda.cu b/src/nvector/cuda/nvector_cuda.cu index 5c528b801d..5acd83c038 100644 --- a/src/nvector/cuda/nvector_cuda.cu +++ b/src/nvector/cuda/nvector_cuda.cu @@ -750,7 +750,7 @@ void N_VDestroy_Cuda(N_Vector v) return; } -void N_VSpace_Cuda(N_Vector X, long int* lrw, long int* liw) +void N_VSpace_Cuda(N_Vector X, sunindextype* lrw, sunindextype* liw) { *lrw = NVEC_CUDA_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/hip/nvector_hip.hip.cpp b/src/nvector/hip/nvector_hip.hip.cpp index 77546eb890..95f2d09f25 100644 --- a/src/nvector/hip/nvector_hip.hip.cpp +++ b/src/nvector/hip/nvector_hip.hip.cpp @@ -716,7 +716,7 @@ void N_VDestroy_Hip(N_Vector v) return; } -void N_VSpace_Hip(N_Vector X, long int* lrw, long int* liw) +void N_VSpace_Hip(N_Vector X, sunindextype* lrw, sunindextype* liw) { *lrw = NVEC_HIP_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/raja/nvector_raja.cpp b/src/nvector/raja/nvector_raja.cpp index 8c82c55c8e..5369a06f1a 100644 --- a/src/nvector/raja/nvector_raja.cpp +++ b/src/nvector/raja/nvector_raja.cpp @@ -748,7 +748,7 @@ void N_VDestroy_Raja(N_Vector v) return; } -void N_VSpace_Raja(N_Vector X, long int* lrw, long int* liw) +void N_VSpace_Raja(N_Vector X, sunindextype* lrw, sunindextype* liw) { *lrw = NVEC_RAJA_CONTENT(X)->length; *liw = 2; diff --git a/src/nvector/trilinos/nvector_trilinos.cpp b/src/nvector/trilinos/nvector_trilinos.cpp index 92487e115c..880bb33c95 100644 --- a/src/nvector/trilinos/nvector_trilinos.cpp +++ b/src/nvector/trilinos/nvector_trilinos.cpp @@ -225,7 +225,7 @@ void N_VDestroy_Trilinos(N_Vector v) return; } -void N_VSpace_Trilinos(N_Vector x, long int* lrw, long int* liw) +void N_VSpace_Trilinos(N_Vector x, sunindextype* lrw, sunindextype* liw) { Teuchos::RCP xv = N_VGetVector_Trilinos(x); const Teuchos::RCP>& comm = xv->getMap()->getComm(); From 49f26d7fa0611e203f5a7323f70033525a169f39 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:38:16 -0700 Subject: [PATCH 074/101] Revert "add myindextype to arkode examples that didnt have it yet" This reverts commit 00efdd20582386bb18f552e65ae2a8c8798aee93. --- .../ark_bruss1D_FEM_klu_f2003.f90 | 42 +++++++------------ .../F2003_serial/ark_diurnal_kry_bp_f2003.f90 | 16 ++----- .../arkode/F2003_serial/ark_kpr_mri_f2003.f90 | 12 +----- .../F2003_serial/ark_roberts_dnsL_f2003.f90 | 12 +----- .../F2003_serial/ark_roberts_dns_f2003.f90 | 12 +----- 5 files changed, 22 insertions(+), 72 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index 19e1046fc5..89d49f605e 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -70,30 +70,20 @@ module Bruss1DFEMKLU_UserData !======= Declarations ========= implicit none - ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype - ! we set the integer kind used for indices in this example based - ! on the the index size SUNDIALS was compiled with so that it works - ! in both configurations. This is not a requirement for user codes. -#if defined(SUNDIALS_INT32_T) - integer, parameter :: myindextype = selected_int_kind(8) -#elif defined(SUNDIALS_INT64_T) - integer, parameter :: myindextype = selected_int_kind(16) -#endif - ! number of equations integer(c_int), parameter :: neqreal = 3 ! ODE parameters - integer(kind=myindextype), parameter :: N = 201 ! number of intervals - integer(kind=myindextype), parameter :: neq = neqreal*N ! set overall problem size - integer(kind=myindextype), parameter :: nnz = 15*neq - 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 = 2.5d-2 ! diffusion coeff for u - real(c_double), parameter :: dv = 2.5d-2 ! diffusion coeff for v - real(c_double), parameter :: dw = 2.5d-2 ! diffusion coeff for w - real(c_double), parameter :: ep = 1.d-5 ! stiffness parameter - real(c_double), dimension(N) :: x ! mesh node locations + integer(c_int), parameter :: N = 201 ! number of intervals + integer(c_int), parameter :: neq = neqreal*N ! set overall problem size + integer(c_int), parameter :: nnz = 15*neq + 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 = 2.5d-2 ! diffusion coeff for u + real(c_double), parameter :: dv = 2.5d-2 ! diffusion coeff for v + real(c_double), parameter :: dw = 2.5d-2 ! diffusion coeff for w + real(c_double), parameter :: ep = 1.d-5 ! stiffness parameter + real(c_double), dimension(N) :: x ! mesh node locations contains @@ -423,7 +413,7 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & type(N_Vector) :: sunvec_t3 ! Local data - integer(kind=myindextype) :: ix, nz, Nint + integer(c_int) :: ix, nz, Nint real(c_double) :: ul, uc, ur, vl, vc, vr, wl, wc, wr, xl, xc, xr real(c_double) :: u1, u2, u3, v1, v2, v3, w1, w2, w3 real(c_double) :: df1, df2, df3, dQdf1, dQdf2, dQdf3 @@ -431,8 +421,8 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & real(c_double), dimension(3,-1:1) :: Ju, Jv, Jw ! pointers to data in SUNDIALS vectors - integer(kind=myindextype), pointer, dimension(nnz) :: Jcolvals(:) - integer(kind=myindextype), pointer, dimension(neq+1) :: Jrowptrs(:) + integer(c_long), pointer, dimension(nnz) :: Jcolvals(:) + integer(c_long), pointer, dimension(neq+1) :: Jrowptrs(:) real(c_double), pointer, dimension(nnz) :: Jdata(:) real(c_double), pointer, dimension(neqreal,N) :: yvec(:,:) real(c_double), pointer, dimension(neqreal,N) :: fvec(:,:) @@ -878,13 +868,13 @@ integer(c_int) function Mass(tn, sunmat_M, user_data, & type(N_Vector) :: sunvec_t3 ! Local data - integer(kind=myindextype) :: ix, nz, Nint + integer(c_int) :: ix, nz, Nint real(c_double) :: xl, xc, xr, Ml, Mc, Mr, ChiL1, ChiL2, ChiL3, ChiR1, ChiR2, ChiR3 logical :: left, right ! pointers to data in SUNDIALS vectors - integer(kind=myindextype), pointer, dimension(nnz) :: Mcolvals(:) - integer(kind=myindextype), pointer, dimension(neq+1) :: Mrowptrs(:) + integer(c_long), pointer, dimension(nnz) :: Mcolvals(:) + integer(c_long), pointer, dimension(neq+1) :: Mrowptrs(:) real(c_double), pointer, dimension(nnz) :: Mdata(:) !======= Internals ============ diff --git a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 index 9776f64396..c87583eb23 100644 --- a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 @@ -52,20 +52,10 @@ module DiurnalKryBP_mod !======= Declarations ========= implicit none - ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype - ! we set the integer kind used for indices in this example based - ! on the the index size SUNDIALS was compiled with so that it works - ! in both configurations. This is not a requirement for user codes. -#if defined(SUNDIALS_INT32_T) - integer, parameter :: myindextype = selected_int_kind(8) -#elif defined(SUNDIALS_INT64_T) - integer, parameter :: myindextype = selected_int_kind(16) -#endif - ! setup and number of equations integer(c_int), parameter :: mx = 10, my = 10 - integer(kind=myindextype), parameter :: mm = mx*my - integer(kind=myindextype), parameter :: neq = 2*mm + integer(c_long), parameter :: mm = mx*my + integer(c_long), parameter :: neq = 2*mm ! ODE constant parameters real(c_double), parameter :: Kh = 4.0d-6 @@ -240,8 +230,8 @@ program main real(c_double) :: cx, cy ! initialization variables integer(c_int) :: ierr ! error flag from C functions integer(c_long) :: outstep ! output step + integer(c_long) :: mu, ml ! band preconditioner constants real(c_double) :: x, y ! initialization index variables - integer(kind=myindextype) :: mu, ml ! band preconditioner constants type(N_Vector), pointer :: sunvec_u ! sundials vector type(N_Vector), pointer :: sunvec_f ! sundials vector diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 index bf4fa8b12f..929844e792 100644 --- a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 @@ -84,26 +84,16 @@ module kpr_mod implicit none - ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype - ! we set the integer kind used for indices in this example based - ! on the the index size SUNDIALS was compiled with so that it works - ! in both configurations. This is not a requirement for user codes. -#if defined(SUNDIALS_INT32_T) - integer, parameter :: myindextype = selected_int_kind(8) -#elif defined(SUNDIALS_INT64_T) - integer, parameter :: myindextype = selected_int_kind(16) -#endif - ! Constants real(c_double) :: ZERO = 0.0d0 real(c_double) :: ONE = 1.0d0 real(c_double) :: TWO = 2.0d0 ! general problem parameters - integer(kind=myindextype), parameter :: NEQ = 2 ! number of dependent vars. 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_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/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 b/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 index 65e7b8e3ab..fb58aee07f 100644 --- a/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 @@ -41,17 +41,7 @@ module dnsL_mod !======= Declarations ========= implicit none - ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype - ! we set the integer kind used for indices in this example based - ! on the the index size SUNDIALS was compiled with so that it works - ! in both configurations. This is not a requirement for user codes. -#if defined(SUNDIALS_INT32_T) - integer, parameter :: myindextype = selected_int_kind(8) -#elif defined(SUNDIALS_INT64_T) - integer, parameter :: myindextype = selected_int_kind(16) -#endif - - integer(kind=myindextype), parameter :: neq = 3 + integer(c_long), parameter :: neq = 3 integer(c_long), parameter :: nout = 12 contains diff --git a/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 b/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 index 1fcbe36089..379f7a23ea 100644 --- a/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 @@ -41,17 +41,7 @@ module dns_mod !======= Declarations ========= implicit none - ! Since SUNDIALS can be compiled with 32-bit or 64-bit sunindextype - ! we set the integer kind used for indices in this example based - ! on the the index size SUNDIALS was compiled with so that it works - ! in both configurations. This is not a requirement for user codes. -#if defined(SUNDIALS_INT32_T) - integer, parameter :: myindextype = selected_int_kind(8) -#elif defined(SUNDIALS_INT64_T) - integer, parameter :: myindextype = selected_int_kind(16) -#endif - - integer(kind=myindextype), parameter :: neq = 3 + integer(c_long), parameter :: neq = 3 integer(c_long), parameter :: nout = 12 contains From 946723c952471d8349185865714de2c75cd522c2 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:40:19 -0700 Subject: [PATCH 075/101] use c_int64_t --- .../arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 8 ++++---- examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 | 8 ++++---- examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 | 2 +- examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 | 2 +- examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index 89d49f605e..cfa39e7cc3 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -421,8 +421,8 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & real(c_double), dimension(3,-1:1) :: Ju, Jv, Jw ! pointers to data in SUNDIALS vectors - integer(c_long), pointer, dimension(nnz) :: Jcolvals(:) - integer(c_long), pointer, dimension(neq+1) :: Jrowptrs(:) + integer(c_int64_t), pointer, dimension(nnz) :: Jcolvals(:) + integer(c_int64_t), pointer, dimension(neq+1) :: Jrowptrs(:) real(c_double), pointer, dimension(nnz) :: Jdata(:) real(c_double), pointer, dimension(neqreal,N) :: yvec(:,:) real(c_double), pointer, dimension(neqreal,N) :: fvec(:,:) @@ -873,8 +873,8 @@ integer(c_int) function Mass(tn, sunmat_M, user_data, & logical :: left, right ! pointers to data in SUNDIALS vectors - integer(c_long), pointer, dimension(nnz) :: Mcolvals(:) - integer(c_long), pointer, dimension(neq+1) :: Mrowptrs(:) + integer(c_int64_t), pointer, dimension(nnz) :: Mcolvals(:) + integer(c_int64_t), pointer, dimension(neq+1) :: Mrowptrs(:) real(c_double), pointer, dimension(nnz) :: Mdata(:) !======= Internals ============ diff --git a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 index c87583eb23..4fa42e1025 100644 --- a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 @@ -54,8 +54,8 @@ module DiurnalKryBP_mod ! setup and number of equations integer(c_int), parameter :: mx = 10, my = 10 - integer(c_long), parameter :: mm = mx*my - integer(c_long), parameter :: neq = 2*mm + integer(c_int64_t), parameter :: mm = mx*my + integer(c_int64_t), parameter :: neq = 2*mm ! ODE constant parameters real(c_double), parameter :: Kh = 4.0d-6 @@ -84,7 +84,7 @@ module DiurnalKryBP_mod integer(c_int), parameter :: Jpretype = 1 integer(c_int), parameter :: iGStype = 1 integer(c_int), parameter :: maxL = 0 - integer(c_long), parameter :: mxsteps = 10000 + integer(c_int64_t), parameter :: mxsteps = 10000 ! ODE non-constant parameters real(c_double) :: q3 @@ -230,7 +230,7 @@ program main real(c_double) :: cx, cy ! initialization variables integer(c_int) :: ierr ! error flag from C functions integer(c_long) :: outstep ! output step - integer(c_long) :: mu, ml ! band preconditioner constants + integer(c_int64_t) :: mu, ml ! band preconditioner constants real(c_double) :: x, y ! initialization index variables type(N_Vector), pointer :: sunvec_u ! sundials vector diff --git a/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 b/examples/arkode/F2003_serial/ark_kpr_mri_f2003.f90 index 929844e792..cb0aa027d0 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 kpr_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/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 b/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 index fb58aee07f..c93a7dc06f 100644 --- a/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_roberts_dnsL_f2003.f90 @@ -41,7 +41,7 @@ module dnsL_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/arkode/F2003_serial/ark_roberts_dns_f2003.f90 b/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 index 379f7a23ea..f4ef7e1984 100644 --- a/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_roberts_dns_f2003.f90 @@ -41,7 +41,7 @@ module dns_mod !======= Declarations ========= implicit none - integer(c_long), parameter :: neq = 3 + integer(c_int64_t), parameter :: neq = 3 integer(c_long), parameter :: nout = 12 contains From 84ba6815a4bdef70e6e31b1e13b2befa4d4365bc Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:45:43 -0700 Subject: [PATCH 076/101] revert mxsteps --- examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 index 4fa42e1025..ab8fa486a8 100644 --- a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.f90 @@ -84,7 +84,7 @@ module DiurnalKryBP_mod integer(c_int), parameter :: Jpretype = 1 integer(c_int), parameter :: iGStype = 1 integer(c_int), parameter :: maxL = 0 - integer(c_int64_t), parameter :: mxsteps = 10000 + integer(c_long), parameter :: mxsteps = 10000 ! ODE non-constant parameters real(c_double) :: q3 From 11a3a1308295707e25d3180514394131239ef2e4 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:50:47 -0700 Subject: [PATCH 077/101] missed myindextype --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index cfa39e7cc3..cf74f3b540 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -89,8 +89,8 @@ module Bruss1DFEMKLU_UserData ! function that maps 2D data into 1D address space ! (0-based since CSR matrix will be sent to C solver) - integer(kind=myindextype) function idx(ix, ivar) - integer(kind=myindextype) :: ivar, ix + integer(c_int64_t) function idx(ix, ivar) + integer(c_int64_t) :: ivar, ix idx = neqreal*(ix - 1) + ivar - 1 end function idx From 2457a1a133121e89828f041539b4170ff148bf0f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Mon, 17 Jun 2024 23:58:13 -0700 Subject: [PATCH 078/101] more mismatch index --- .../F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index cf74f3b540..a1ab7544fb 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -71,12 +71,12 @@ module Bruss1DFEMKLU_UserData implicit none ! number of equations - integer(c_int), parameter :: neqreal = 3 + integer(c_int64_t), parameter :: neqreal = 3 ! ODE parameters - integer(c_int), parameter :: N = 201 ! number of intervals - integer(c_int), parameter :: neq = neqreal*N ! set overall problem size - integer(c_int), parameter :: nnz = 15*neq + integer(c_int64_t), parameter :: N = 201 ! number of intervals + integer(c_int64_t), parameter :: neq = neqreal*N ! set overall problem size + integer(c_int64_t), parameter :: nnz = 15*neq 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 = 2.5d-2 ! diffusion coeff for u @@ -210,7 +210,7 @@ integer(c_int) function ImpRhsFn(tn, sunvec_y, sunvec_f, user_data) & type(c_ptr), value :: user_data ! user-defined data ! Local data - integer(c_int) :: ix + integer(c_int64_t) :: ix logical :: left, right real(c_double) :: ul, ur, vl, vr, wl, wr, xl, xr, u, v, w, f1, f2, f3 @@ -413,7 +413,7 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & type(N_Vector) :: sunvec_t3 ! Local data - integer(c_int) :: ix, nz, Nint + integer(c_int64_t) :: ix, nz, Nint real(c_double) :: ul, uc, ur, vl, vc, vr, wl, wc, wr, xl, xc, xr real(c_double) :: u1, u2, u3, v1, v2, v3, w1, w2, w3 real(c_double) :: df1, df2, df3, dQdf1, dQdf2, dQdf3 @@ -868,7 +868,7 @@ integer(c_int) function Mass(tn, sunmat_M, user_data, & type(N_Vector) :: sunvec_t3 ! Local data - integer(c_int) :: ix, nz, Nint + integer(c_int64_t) :: ix, nz, Nint real(c_double) :: xl, xc, xr, Ml, Mc, Mr, ChiL1, ChiL2, ChiL3, ChiR1, ChiR2, ChiR3 logical :: left, right @@ -1050,7 +1050,7 @@ program main integer(c_int) :: outstep ! output loop counter integer(c_int) :: sparsetype ! CSR signal, here integer(c_long) :: mxsteps ! max num steps - integer :: i + integer(c_int64_t) :: i type(N_Vector), pointer :: sunvec_y ! sundials vector type(N_Vector), pointer :: sunvec_u ! sundials vector From d0158b11e538a98c00a91ac683651735816a0565 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 00:06:49 -0700 Subject: [PATCH 079/101] ivar, ix should be c_int --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index a1ab7544fb..b0b0800ccd 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -90,7 +90,7 @@ module Bruss1DFEMKLU_UserData ! function that maps 2D data into 1D address space ! (0-based since CSR matrix will be sent to C solver) integer(c_int64_t) function idx(ix, ivar) - integer(c_int64_t) :: ivar, ix + integer(c_int) :: ivar, ix idx = neqreal*(ix - 1) + ivar - 1 end function idx From 6059bcc1971c5fbe91fcc1b7509be6d495c0a4fb Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 00:28:33 -0700 Subject: [PATCH 080/101] idx --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index b0b0800ccd..e92a639a1e 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -90,7 +90,8 @@ module Bruss1DFEMKLU_UserData ! function that maps 2D data into 1D address space ! (0-based since CSR matrix will be sent to C solver) integer(c_int64_t) function idx(ix, ivar) - integer(c_int) :: ivar, ix + integer(c_int64_t):: ix + integer(c_int) :: ivar idx = neqreal*(ix - 1) + ivar - 1 end function idx From 6b6f525dea748101951f1accfb91610f638205c7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 00:38:20 -0700 Subject: [PATCH 081/101] specify kind --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index e92a639a1e..6d683d7b44 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -452,9 +452,9 @@ integer(c_int) function Jac(tn, sunvec_y, sunvec_f, sunmat_J, user_data, & nz = 0 ! Dirichlet boundary at left - Jrowptrs(idx(1,1)+1) = nz - Jrowptrs(idx(1,2)+1) = nz - Jrowptrs(idx(1,3)+1) = nz + Jrowptrs(idx(1_c_int64_t,1)+1) = nz + Jrowptrs(idx(1_c_int64_t,2)+1) = nz + Jrowptrs(idx(1_c_int64_t,3)+1) = nz ! iterate through nodes, filling in matrix by rows do ix=2,N-1 From 43b024fef6f970984b81f61fad808664839db678 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 00:42:58 -0700 Subject: [PATCH 082/101] just pass neq --- .../F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index 6d683d7b44..f04fc48ff6 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -1082,28 +1082,28 @@ program main nout = ceiling(tend/dtout) ! create and assign SUNDIALS N_Vectors - sunvec_y => FN_VNew_Serial(int(neq,c_long), ctx) + sunvec_y => FN_VNew_Serial(neq, ctx) if (.not. associated(sunvec_y)) then print *, 'ERROR: sunvec = NULL' stop 1 end if yvec(1:neqreal,1:N) => FN_VGetArrayPointer(sunvec_y) - sunvec_u => FN_VNew_Serial(int(neq,c_long), ctx) + sunvec_u => FN_VNew_Serial(neq, ctx) if (.not. associated(sunvec_u)) then print *, 'ERROR: sunvec = NULL' stop 1 end if umask(1:neqreal,1:N) => FN_VGetArrayPointer(sunvec_u) - sunvec_v => FN_VNew_Serial(int(neq,c_long), ctx) + sunvec_v => FN_VNew_Serial(neq, ctx) if (.not. associated(sunvec_v)) then print *, 'ERROR: sunvec = NULL' stop 1 end if vmask(1:neqreal,1:N) => FN_VGetArrayPointer(sunvec_v) - sunvec_w => FN_VNew_Serial(int(neq,c_long), ctx) + sunvec_w => FN_VNew_Serial(neq, ctx) if (.not. associated(sunvec_w)) then print *, 'ERROR: sunvec = NULL' stop 1 @@ -1149,13 +1149,13 @@ program main ! Tell ARKODE to use a sparse linear solver for both Newton and mass matrix systems. sparsetype = 1 - sunmat_A => FSUNSparseMatrix(int(neq,c_long), int(neq,c_long), int(nnz,c_long), sparsetype, ctx) + sunmat_A => FSUNSparseMatrix(neq, neq, int(nnz,c_long), sparsetype, ctx) if (.not. associated(sunmat_A)) then print *, 'ERROR: sunmat_A = NULL' stop 1 end if - sunmat_M => FSUNSparseMatrix(int(neq,c_long), int(neq,c_long), int(nnz,c_long), sparsetype, ctx) + sunmat_M => FSUNSparseMatrix(neq, neq, int(nnz,c_long), sparsetype, ctx) if (.not. associated(sunmat_M)) then print *, 'ERROR: sunmat_M = NULL' stop 1 From 70c46bff2a43e9e561b5035c3816e99668ef36e0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 00:49:57 -0700 Subject: [PATCH 083/101] more --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 index f04fc48ff6..80908e0127 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.f90 @@ -1149,13 +1149,13 @@ program main ! Tell ARKODE to use a sparse linear solver for both Newton and mass matrix systems. sparsetype = 1 - sunmat_A => FSUNSparseMatrix(neq, neq, int(nnz,c_long), sparsetype, ctx) + sunmat_A => FSUNSparseMatrix(neq, neq, nnz, sparsetype, ctx) if (.not. associated(sunmat_A)) then print *, 'ERROR: sunmat_A = NULL' stop 1 end if - sunmat_M => FSUNSparseMatrix(neq, neq, int(nnz,c_long), sparsetype, ctx) + sunmat_M => FSUNSparseMatrix(neq, neq, nnz, sparsetype, ctx) if (.not. associated(sunmat_M)) then print *, 'ERROR: sunmat_M = NULL' stop 1 From e1d14c890703ace5c59d6cd2ab774bcdc50e3167 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 00:56:47 -0700 Subject: [PATCH 084/101] missing mod directory --- examples/cvodes/F2003_serial/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/cvodes/F2003_serial/CMakeLists.txt b/examples/cvodes/F2003_serial/CMakeLists.txt index 667a6260c6..5e5bac8953 100644 --- a/examples/cvodes/F2003_serial/CMakeLists.txt +++ b/examples/cvodes/F2003_serial/CMakeLists.txt @@ -37,6 +37,9 @@ foreach(example_tuple ${FCVODES_examples}) # check if this example has already been added, only need to add # example source files once for testing with different inputs if(NOT TARGET ${example}) + # Install fortran modules to a unique directory to avoid naming collisions + set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir) + # example source files add_executable(${example} ${example}.f90) From 60c1621c93419fec1dd9948e70003af7b6807403 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 09:01:11 -0700 Subject: [PATCH 085/101] couple tweaks for literal sizes --- examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 | 2 +- examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 b/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 index 6e3a9caab5..38cf788bdc 100644 --- a/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 +++ b/examples/cvode/F2003_parallel/cv_diag_kry_f2003.f90 @@ -149,7 +149,7 @@ integer(c_int) function Psolve(t, sunvec_y, sunvec_f, sunvec_r, sunvec_z, & ! Calculate Jacobian here ibase = myid * nlocal - istart = max(1_8, 4 - ibase) + istart = max(1_c_int64_t, 4 - ibase) do i = istart,nlocal pj = dble(ibase + i) psubi = 1.d0 + gamma * alpha * pj diff --git a/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 b/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 index debacbf91a..d41404ff8f 100644 --- a/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 +++ b/examples/idas/F2003_serial/idasAkzoNob_ASAi_dns_f2003.f90 @@ -419,7 +419,7 @@ program main retval = FIDASStolerancesB(mem, indexB(1), RTOLB, ATOLB) call check_retval(retval, "FIDASStolerancesB") - retval = FIDASetMaxNumStepsB(mem, indexB(1), 1000_8) + retval = FIDASetMaxNumStepsB(mem, indexB(1), 1000_c_long) call check_retval(retval, "FIDASetMaxNumStepsB") ! Create dense SUNMatrix for use in linear solves From f3ef77c1da15db52eab51500d9964626d3e78c6f Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 09:16:31 -0700 Subject: [PATCH 086/101] fix kinsol mismatch --- examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 index 8604652b08..c53ef61f0e 100644 --- a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 @@ -131,7 +131,7 @@ program main ! local variables real(c_double) :: fnormtol, fnorm(1) integer(c_int) :: ierr - integer(c_int64_t) :: mset, msubset + integer(c_int) :: mset, msubset type(c_ptr) :: sunctx ! sundials context type(N_Vector), pointer :: sunvec_u ! sundials vectors From 841e14d00a45e9c675302469ca4773715f25cbc7 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 09:41:08 -0700 Subject: [PATCH 087/101] revert --- cmake/macros/SundialsAddLibrary.cmake | 28 ++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index af460931ec..cf01a27ba7 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -426,15 +426,25 @@ macro(sundials_add_f2003_library target) cmake_parse_arguments(sundials_add_f2003_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - # set target properties and target dependencies so that includes - # and links get passed on when this target is used - set(_includes - PUBLIC - $ - $ - ) - set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}" - WINDOWS_EXPORT_ALL_SYMBOLS ON) + if(CMAKE_Fortran_MODULE_DIRECTORY) + set(_includes + PUBLIC + $ + $ + ) + set(_properties PROPERTIES + Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}_{{libtype}}" + WINDOWS_EXPORT_ALL_SYMBOLS ON) + else() + set(_includes + PUBLIC + $ + $ + ) + set(_properties PROPERTIES + Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir" + WINDOWS_EXPORT_ALL_SYMBOLS ON) + endif() # get the name of the C library which the fortran library interfaces to string(REPLACE "sundials_f" "sundials_" _clib_name "${target}") From 64099f050a69af5b58de1af3676c2379405d37c8 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 10:11:29 -0700 Subject: [PATCH 088/101] add verbose flag for building --- .github/workflows/windows-latest-intel.yml | 4 ++-- .github/workflows/windows-latest-mingw.yml | 6 +++--- .github/workflows/windows-latest.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows-latest-intel.yml b/.github/workflows/windows-latest-intel.yml index bdfc5e9aac..88b263c6b9 100644 --- a/.github/workflows/windows-latest-intel.yml +++ b/.github/workflows/windows-latest-intel.yml @@ -33,7 +33,7 @@ jobs: run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build (Static) - run: cmake --build ${{github.workspace}}/build_static + run: cmake --build ${{github.workspace}}/build_static --verbose - name: Test (Static) working-directory: ${{github.workspace}}/build_static @@ -43,7 +43,7 @@ jobs: run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON - name: Build (Shared) - run: cmake --build ${{github.workspace}}/build_shared + run: cmake --build ${{github.workspace}}/build_shared --verbose - name: Test (Shared) working-directory: ${{github.workspace}}/build_shared diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 7dfbf62c91..8856d8b840 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -62,11 +62,11 @@ jobs: -DEXAMPLES_ENABLE_CXX=ON \ -DENABLE_KLU=ON - - name: Build + - name: Build (Static) # Build program - run: cmake --build ${GITHUB_WORKSPACE}/build + run: cmake --build ${GITHUB_WORKSPACE}/build --verbose - - name: Test + - name: Test (Static) working-directory: ${{github.workspace}}/build # Execute tests run: ctest --output-on-failure diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 9fa9096af7..aa45f757c0 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -23,7 +23,7 @@ jobs: run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=ON -DEXAMPLES_ENABLE_CXX=ON - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose - name: Test working-directory: ${{github.workspace}}/build From 0236011a4a28dce24db306dbb301e01f2eb3da52 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 10:12:44 -0700 Subject: [PATCH 089/101] turn shared mingw back on --- .github/workflows/windows-latest-mingw.yml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 8856d8b840..6b990c9250 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -70,3 +70,28 @@ jobs: working-directory: ${{github.workspace}}/build # Execute tests run: ctest --output-on-failure + + - name: Configure CMake (Shared) + # Configure CMake in a 'build' subdirectory + run: | + cmake \ + -G "MSYS Makefiles" \ + -B ${GITHUB_WORKSPACE}/build \ + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ + -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ + -DBUILD_STATIC_LIBS=OFF \ + -DSUNDIALS_BUILD_WITH_PROFILING=ON \ + -DSUNDIALS_LOGGING_LEVEL=2 \ + -DSUNDIALS_TEST_UNITTESTS=OFF \ + -DEXAMPLES_ENABLE_CXX=ON \ + -DENABLE_KLU=ON + + - name: Build (Shared) + # Build program + run: cmake --build ${GITHUB_WORKSPACE}/build --verbose + + - name: Test (Shared) + working-directory: ${{github.workspace}}/build + # Execute tests + run: ctest --output-on-failure From 45243ac284f8fe62dc85d58b5bfc4312ab6e736e Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 10:22:23 -0700 Subject: [PATCH 090/101] need separate build directories --- .github/workflows/windows-latest-mingw.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 6b990c9250..875e9f93f4 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -51,7 +51,7 @@ jobs: run: | cmake \ -G "MSYS Makefiles" \ - -B ${GITHUB_WORKSPACE}/build \ + -B ${GITHUB_WORKSPACE}/build_static \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ @@ -64,10 +64,10 @@ jobs: - name: Build (Static) # Build program - run: cmake --build ${GITHUB_WORKSPACE}/build --verbose + run: cmake --build ${GITHUB_WORKSPACE}/build_static --verbose - name: Test (Static) - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build_static # Execute tests run: ctest --output-on-failure @@ -76,7 +76,7 @@ jobs: run: | cmake \ -G "MSYS Makefiles" \ - -B ${GITHUB_WORKSPACE}/build \ + -B ${GITHUB_WORKSPACE}/build_shared \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ @@ -89,9 +89,9 @@ jobs: - name: Build (Shared) # Build program - run: cmake --build ${GITHUB_WORKSPACE}/build --verbose + run: cmake --build ${GITHUB_WORKSPACE}/build_shared --verbose - name: Test (Shared) - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build_shared # Execute tests run: ctest --output-on-failure From 4e37d37094260e0e6cecd537e44074600973d67d Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Tue, 18 Jun 2024 11:35:33 -0700 Subject: [PATCH 091/101] fix fixedpoint sunnonlinear solver fortran test --- .../test_fsunnonlinsol_fixedpoint_mod.f90 | 155 +++++++++++------- 1 file changed, 99 insertions(+), 56 deletions(-) diff --git a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 index f084b816bf..7b6cfd2322 100644 --- a/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 +++ b/examples/sunnonlinsol/fixedpoint/test_fsunnonlinsol_fixedpoint_mod.f90 @@ -22,15 +22,17 @@ module test_fsunnonlinsol_fixedpoint implicit none integer(kind=myindextype), parameter :: NEQ = 3 ! number of equations - integer(C_INT), parameter :: MAXIT = 50 ! max nonlinear iters. + integer(C_INT), parameter :: MAXIT = 20 ! max nonlinear iters. real(C_DOUBLE), parameter :: TOL = 1.0e-4 ! nonlinear solver tolerance real(C_DOUBLE), parameter :: PI = 3.1415926535898 ! approximate solution - real(C_DOUBLE) :: Y1 = 0.5d0 - real(C_DOUBLE) :: Y2 = 0.d0 - real(C_DOUBLE) :: Y3 = -PI/6.0d0 + real(C_DOUBLE) :: XTRUE = 0.5d0 + real(C_DOUBLE) :: YTRUE = 1.0d0 + real(C_DOUBLE) :: ZTRUE = -PI/6.0d0 + + type(N_Vector), pointer :: y0 contains @@ -43,26 +45,30 @@ integer(C_INT) function unit_tests() result(retval) implicit none type(SUNNonlinearSolver), pointer :: NLS ! test nonlinear solver - type(N_Vector), pointer :: x, y0, y, w ! test vectors - real(C_DOUBLE), pointer :: ydata(:) + type(N_Vector), pointer :: ycur, ycor, w ! test vectors + real(C_DOUBLE), pointer :: data(:) integer(C_LONG) :: niters(1) integer(C_INT) :: tmp - x => FN_VNew_Serial(NEQ, sunctx) - y0 => FN_VClone(x) - y => FN_VClone(x) - w => FN_VClone(x) + y0 => FN_VNew_Serial(NEQ, sunctx) + ycor => FN_VClone(y0) + ycur => FN_VClone(y0) + w => FN_VClone(y0) - ! set weights - ydata => FN_VGetArrayPointer(y0) - ydata(1) = 0.1d0 - ydata(2) = 0.1d0 - ydata(3) = -0.1d0 + ! set initial guess + data => FN_VGetArrayPointer(y0) + data(1) = 0.1d0 + data(2) = 0.1d0 + data(3) = -0.1d0 + + ! set initial correction + call FN_VConst(0.0d0, ycor) + ! set weights call FN_VConst(1.0d0, w) ! create and test NLS - NLS => FSUNNonlinsol_FixedPoint(y, 0, sunctx) + NLS => FSUNNonlinsol_FixedPoint(y0, 0, sunctx) retval = FSUNNonlinSolSetSysFn(NLS, c_funloc(FPFunction)) if (retval /= 0) then @@ -82,37 +88,35 @@ integer(C_INT) function unit_tests() result(retval) return end if - retval = FSUNNonlinSolSolve(NLS, y0, y, w, TOL, 1, c_loc(x)) + retval = FSUNNonlinSolSolve(NLS, y0, ycor, w, TOL, 1, c_loc(y0)) if (retval /= 0) then write(*,'(A,I0)') ' >>> FAIL: FSUNNonlinSolSolve returned ', retval return end if - ! extract and print solution - ydata => FN_VGetArrayPointer(y) - - write(*,*) 'Solution:' - write(*,'(A,E14.7)') 'y1 = ', ydata(1) - write(*,'(A,E14.7)') 'y2 = ', ydata(2) - write(*,'(A,E14.7)') 'y3 = ', ydata(3) - - write(*,*) 'Solution Error:' - write(*,'(A,E14.7)') 'e1 = ', ydata(1) - Y1 - write(*,'(A,E14.7)') 'e2 = ', ydata(2) - Y2 - write(*,'(A,E14.7)') 'e3 = ', ydata(3) - Y3 + ! update the initial guess with the final correction + call FN_VLinearSum(1.0d0, y0, 1.0d0, ycor, ycur); + ! print number of iterations retval = FSUNNonlinSolGetNumIters(NLS, niters) if (retval /= 0) then write(*,'(A,I0)') ' >>> FAIL: FSUNNonlinSolGetNumIters returned ', retval return end if - write(*,'(A,I0)') 'Number of nonlinear iterations:', niters(1) + write(*,'(A,I0)') 'Number of nonlinear iterations: ', niters(1) + + ! check answer + retval = check_ans(ycur, TOL) + if (retval /= 0) then + write(*,'(A,I0)') ' >>> FAIL: check_ans failed' + return + end if ! cleanup - call FN_VDestroy(x) call FN_VDestroy(y0) - call FN_VDestroy(y) + call FN_VDestroy(ycor) + call FN_VDestroy(ycur) call FN_VDestroy(w) tmp = FSUNNonlinSolFree(NLS) @@ -122,8 +126,6 @@ integer(C_INT) function ConvTest(NLS, y, del, tol, ewt, mem) & result(retval) bind(C) use, intrinsic :: iso_c_binding - - implicit none type(SUNNonlinearSolver) :: NLS @@ -144,46 +146,87 @@ integer(C_INT) function ConvTest(NLS, y, del, tol, ewt, mem) & end function ! ----------------------------------------------------------------------------- - ! Nonlinear system + ! Nonlinear system F(x,y,z): ! - ! 3x - cos(yz) - 1/2 = 0 - ! x^2 - 81(y+0.1)^2 + sin(z) + 1.06 = 0 - ! exp(-xy) + 20z + (10 pi - 3)/3 = 0 + ! 3x - cos((y-1)z) - 1/2 = 0 + ! x^2 - 81(y-0.9)^2 + sin(z) + 1.06 = 0 + ! exp(-x(y-1)) + 20z + (10 pi - 3)/3 = 0 ! - ! Nonlinear fixed point function + ! Nonlinear fixed point function G(x,y,z): ! - ! g1(x,y,z) = 1/3 cos(yz) + 1/6 - ! g2(x,y,z) = 1/9 sqrt(x^2 + sin(z) + 1.06) - 0.1 - ! g3(x,y,z) = -1/20 exp(-xy) - (10 pi - 3) / 60 + ! G1(x,y,z) = 1/3 cos((y-1)yz) + 1/6 + ! G2(x,y,z) = 1/9 sqrt(x^2 + sin(z) + 1.06) + 0.9 + ! G3(x,y,z) = -1/20 exp(-x(y-1)) - (10 pi - 3) / 60 + ! + ! Corrector form g(x,y,z): + ! + ! g1(x,y,z) = 1/3 cos((y-1)yz) + 1/6 - x0 + ! g2(x,y,z) = 1/9 sqrt(x^2 + sin(z) + 1.06) + 0.9 - y0 + ! g3(x,y,z) = -1/20 exp(-x(y-1)) - (10 pi - 3) / 60 - z0 ! ! ---------------------------------------------------------------------------- - integer(C_INT) function FPFunction(y, f, mem) & + integer(C_INT) function FPFunction(ycor, f, mem) & result(retval) bind(C) use, intrinsic :: iso_c_binding - - implicit none - type(N_Vector) :: y, f + type(N_Vector) :: ycor, f type(C_PTR), value :: mem - real(C_DOUBLE), pointer :: ydata(:), fdata(:) - real(C_DOUBLE) :: y1, y2, y3 + real(C_DOUBLE), pointer :: data(:), fdata(:) + real(C_DOUBLE) :: x, y, z - ydata => FN_VGetArrayPointer(y) + data => FN_VGetArrayPointer(ycor) fdata => FN_VGetArrayPointer(f) - y1 = ydata(1) - y2 = ydata(2) - y3 = ydata(3) + x = data(1) + y = data(2) + z = data(3) - fdata(1) = (1/3.0d0) * cos(y2*y3) + (1/6.0d0) - fdata(2) = (1/9.0d0) * sqrt(y1*y1 + sin(y3) + 1.06d0) - 0.1d0 - fdata(3) = -(1/20.d0) * exp(-y1*y2) - (10.d0 * PI - 3.0d0) / 60.d0 + fdata(1) = (1.0d0/3.0d0) * cos((y - 1.0d0) * z) + (1.0d0/6.0d0) + fdata(2) = (1.0d0/9.0d0) * sqrt(x*x + sin(z) + 1.06d0) + 0.9d0 + fdata(3) = -(1/20.d0) * exp(-x*(y-1.0d0)) - (10.d0 * PI - 3.0d0) / 60.0d0 + + call FN_VLinearSum(1.0d0, f, -1.0d0, y0, f) retval = 0 end function + integer(C_INT) function check_ans(ycor, tol) & + result(retval) bind(C) + use, intrinsic :: iso_c_binding + implicit none + + type(N_Vector) :: ycor + real(C_DOUBLE), value :: tol + real(C_DOUBLE) :: ex, ey, ez + real(C_DOUBLE), pointer :: data(:) + + ! extract and print solution + data => FN_VGetArrayPointer(ycor) + + write(*,*) 'Solution:' + write(*,'(A,E14.7)') ' x = ', data(1) + write(*,'(A,E14.7)') ' y = ', data(2) + write(*,'(A,E14.7)') ' z = ', data(3) + + ex = data(1) - XTRUE + ey = data(2) - YTRUE + ez = data(3) - ZTRUE + + write(*,*) 'Solution Error:' + write(*,'(A,E14.7)') ' ex = ', ex + write(*,'(A,E14.7)') ' ey = ', ey + write(*,'(A,E14.7)') ' ez = ', ez + + tol = tol * 10.0d0 + if (ex > tol .or. ey > tol .or. ez > tol) then + retval = 1 + end if + + retval = 0 + end function + end module program main @@ -198,7 +241,7 @@ program main integer(C_INT) :: fails = 0 !============== Introduction ============= - print *, 'fixedpoint SUNNonlinearSolver Fortran 2003 interface test' + write(*,*) 'SUNNonlinearSolver_FixedPoint Fortran 2003 interface test' call Test_Init(SUN_COMM_NULL) From 9f754598b22a09e2ebf555de712e12f72aed18b0 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jun 2024 10:42:09 -0700 Subject: [PATCH 092/101] remove object_lib_only from controllers --- src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt | 2 -- src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt | 2 -- src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt index 0c9fd4f2c2..b18a87e4b9 100644 --- a/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollerimexgus_mod fsunadaptcontroller_imexgus_mod.f90 fsunadaptcontroller_imexgus_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunadaptcontrollerimexgus_mod - OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_ImExGus F2003 interface") diff --git a/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt b/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt index 0c9fd4f2c2..b18a87e4b9 100644 --- a/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollerimexgus_mod fsunadaptcontroller_imexgus_mod.f90 fsunadaptcontroller_imexgus_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunadaptcontrollerimexgus_mod - OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_ImExGus F2003 interface") diff --git a/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt index 44aa8a4922..1d902274cb 100644 --- a/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt @@ -17,10 +17,8 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollersoderlind_mod fsunadaptcontroller_soderlind_mod.f90 fsunadaptcontroller_soderlind_mod.c LINK_LIBRARIES PUBLIC sundials_fcore_mod - OBJECT_LIBRARIES OUTPUT_NAME sundials_fsunadaptcontrollersoderlind_mod - OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_Soderlind F2003 interface") From ee805f307b701318812aa905a5c86966ec84dc00 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jun 2024 10:43:17 -0700 Subject: [PATCH 093/101] fix mset, msubset type --- examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 index c53ef61f0e..4cdf270c9b 100644 --- a/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 +++ b/examples/kinsol/F2003_serial/kinLaplace_bnd_f2003.f90 @@ -131,7 +131,7 @@ program main ! local variables real(c_double) :: fnormtol, fnorm(1) integer(c_int) :: ierr - integer(c_int) :: mset, msubset + integer(c_long) :: mset, msubset type(c_ptr) :: sunctx ! sundials context type(N_Vector), pointer :: sunvec_u ! sundials vectors From 3d3892f70a3a6b6fb14d40c43e979834740421b3 Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jun 2024 10:44:42 -0700 Subject: [PATCH 094/101] move note --- doc/shared/RecentChanges.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index b36fd85eed..adc2691e7b 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -116,6 +116,8 @@ Fix bug on LLP64 platforms (like Windows 64-bit) where ``KLU_INDEXTYPE`` could b Check if size of ``SuiteSparse_long`` is 8 if the size of ``sunindextype`` is 8 when using KLU. +Fixed several build errors with the Fortran interfaces on Windows systems. + **Deprecation Notices** Numerous ARKODE stepper-specific functions are now deprecated in favor of @@ -129,5 +131,3 @@ The unsupported implementations of ``N_VGetArrayPointer`` and ``N_VSetArrayPointer`` for the *hypre* and PETSc vectors are now deprecated. Users should access the underlying wrapped external library vector objects instead with ``N_VGetVector_ParHyp`` and ``N_VGetVector_Petsc``, respectively. - -Fixed several build errors with the Fortran interfaces on Windows systems. From f3205b7d73eb32d2d0c0cb991c971b482e4c708d Mon Sep 17 00:00:00 2001 From: "Balos, Cody, J" Date: Wed, 19 Jun 2024 10:58:26 -0700 Subject: [PATCH 095/101] document issue with msys shared libraries and disable fortran interfaces with shared libs on msys --- .github/workflows/windows-latest-mingw.yml | 4 +++- doc/shared/sundials/Fortran.rst | 3 +-- doc/shared/sundials/Install.rst | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-latest-mingw.yml b/.github/workflows/windows-latest-mingw.yml index 875e9f93f4..5a714b5133 100644 --- a/.github/workflows/windows-latest-mingw.yml +++ b/.github/workflows/windows-latest-mingw.yml @@ -71,6 +71,8 @@ jobs: # Execute tests run: ctest --output-on-failure + # TODO(CJB): shared libraries with the fortran interfaces turned on + # fail to link correctly with this toolchain see https://github.com/LLNL/sundials/issues/507. - name: Configure CMake (Shared) # Configure CMake in a 'build' subdirectory run: | @@ -79,7 +81,7 @@ jobs: -B ${GITHUB_WORKSPACE}/build_shared \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ - -DBUILD_FORTRAN_MODULE_INTERFACE=ON \ + -DBUILD_FORTRAN_MODULE_INTERFACE=OFF \ -DBUILD_STATIC_LIBS=OFF \ -DSUNDIALS_BUILD_WITH_PROFILING=ON \ -DSUNDIALS_LOGGING_LEVEL=2 \ diff --git a/doc/shared/sundials/Fortran.rst b/doc/shared/sundials/Fortran.rst index cb483b2733..fbb6fdc0c4 100644 --- a/doc/shared/sundials/Fortran.rst +++ b/doc/shared/sundials/Fortran.rst @@ -557,8 +557,7 @@ Important notes on portability ------------------------------ The SUNDIALS Fortran 2003 interface *should* be compatible with any compiler -supporting the Fortran 2003 ISO standard. However, it has only been tested and -confirmed to be working with GNU Fortran 4.9+ and Intel Fortran 18.0.1+. +supporting the Fortran 2003 ISO standard. Upon compilation of SUNDIALS, Fortran module (``.mod``) files are generated for each Fortran 2003 interface. These files are highly compiler specific, and thus diff --git a/doc/shared/sundials/Install.rst b/doc/shared/sundials/Install.rst index f64b1084e9..b11ecd9621 100644 --- a/doc/shared/sundials/Install.rst +++ b/doc/shared/sundials/Install.rst @@ -590,6 +590,11 @@ illustration only. Default: ``OFF`` + .. warning:: There is a known issue with MSYS/gfortran and SUNDIALS shared libraries + that causes linking the Fortran interfaces to fail when buidling SUNDIALS. For + now the work around is to only build with static libraries when using MSYS with + gfortran on Windows. + .. cmakeoption:: SUNDIALS_LOGGING_LEVEL Set the maximum logging level for the SUNLogger runtime API. The higher this is set, From cff922e75ce22ce37b0769bcb92a84820001a964 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 19 Jun 2024 12:15:04 -0700 Subject: [PATCH 096/101] make adapt controller object_lib_only --- src/sunadaptcontroller/imexgus/CMakeLists.txt | 1 + src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt | 1 + src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt | 1 + src/sunadaptcontroller/soderlind/CMakeLists.txt | 1 + src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt | 1 + src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt | 1 + 6 files changed, 6 insertions(+) diff --git a/src/sunadaptcontroller/imexgus/CMakeLists.txt b/src/sunadaptcontroller/imexgus/CMakeLists.txt index 46b1c201fc..8bbef68cdf 100644 --- a/src/sunadaptcontroller/imexgus/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/CMakeLists.txt @@ -22,6 +22,7 @@ sundials_add_library(sundials_sunadaptcontrollerimexgus PUBLIC sundials_core INCLUDE_SUBDIR sunadaptcontroller + OBJECT_LIB_ONLY ) # Add F2003 module if the interface is enabled diff --git a/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt index b18a87e4b9..0c4142417c 100644 --- a/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/fmod_int32/CMakeLists.txt @@ -19,6 +19,7 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollerimexgus_mod PUBLIC sundials_fcore_mod OUTPUT_NAME sundials_fsunadaptcontrollerimexgus_mod + OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_ImExGus F2003 interface") diff --git a/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt b/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt index b18a87e4b9..0c4142417c 100644 --- a/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt +++ b/src/sunadaptcontroller/imexgus/fmod_int64/CMakeLists.txt @@ -19,6 +19,7 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollerimexgus_mod PUBLIC sundials_fcore_mod OUTPUT_NAME sundials_fsunadaptcontrollerimexgus_mod + OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_ImExGus F2003 interface") diff --git a/src/sunadaptcontroller/soderlind/CMakeLists.txt b/src/sunadaptcontroller/soderlind/CMakeLists.txt index 0b625385c3..50cf7330bc 100644 --- a/src/sunadaptcontroller/soderlind/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/CMakeLists.txt @@ -22,6 +22,7 @@ sundials_add_library(sundials_sunadaptcontrollersoderlind PUBLIC sundials_core INCLUDE_SUBDIR sunadaptcontroller + OBJECT_LIB_ONLY ) # Add F2003 module if the interface is enabled diff --git a/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt b/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt index 1d902274cb..cdf9d3825e 100644 --- a/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/fmod_int32/CMakeLists.txt @@ -19,6 +19,7 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollersoderlind_mod PUBLIC sundials_fcore_mod OUTPUT_NAME sundials_fsunadaptcontrollersoderlind_mod + OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_Soderlind F2003 interface") diff --git a/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt b/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt index 1d902274cb..cdf9d3825e 100644 --- a/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt +++ b/src/sunadaptcontroller/soderlind/fmod_int64/CMakeLists.txt @@ -19,6 +19,7 @@ sundials_add_f2003_library(sundials_fsunadaptcontrollersoderlind_mod PUBLIC sundials_fcore_mod OUTPUT_NAME sundials_fsunadaptcontrollersoderlind_mod + OBJECT_LIB_ONLY ) message(STATUS "Added SUNAdaptController_Soderlind F2003 interface") From c8832eefca72fc03e2ae275d25157670cdc6c234 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 19 Jun 2024 12:53:37 -0700 Subject: [PATCH 097/101] duplicate linking to sundials_core --- src/sundials/fmod_int32/CMakeLists.txt | 2 -- src/sundials/fmod_int64/CMakeLists.txt | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/sundials/fmod_int32/CMakeLists.txt b/src/sundials/fmod_int32/CMakeLists.txt index 74fe6c96ee..957328e8ff 100644 --- a/src/sundials/fmod_int32/CMakeLists.txt +++ b/src/sundials/fmod_int32/CMakeLists.txt @@ -22,6 +22,4 @@ set(sundials_SOURCES sundials_add_f2003_library(sundials_fcore_mod SOURCES ${sundials_SOURCES} - LINK_LIBRARIES - PUBLIC sundials_core ) diff --git a/src/sundials/fmod_int64/CMakeLists.txt b/src/sundials/fmod_int64/CMakeLists.txt index 74fe6c96ee..957328e8ff 100644 --- a/src/sundials/fmod_int64/CMakeLists.txt +++ b/src/sundials/fmod_int64/CMakeLists.txt @@ -22,6 +22,4 @@ set(sundials_SOURCES sundials_add_f2003_library(sundials_fcore_mod SOURCES ${sundials_SOURCES} - LINK_LIBRARIES - PUBLIC sundials_core ) From 1ba6d10fb270ffd6a505689063b68c03f92eaedf Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 19 Jun 2024 12:59:55 -0700 Subject: [PATCH 098/101] fix for #410 --- cmake/macros/SundialsAddLibrary.cmake | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index cf01a27ba7..eb85a8f4cc 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -173,6 +173,11 @@ macro(sundials_add_library target) else() set(_all_libs ${sundials_add_library_LINK_LIBRARIES}) endif() + add_custom_target(fake_to_force_build_order_${obj_target}) + set(_stripped_all_libs ${_all_libs}) + list(FILTER _stripped_all_libs EXCLUDE REGEX "PUBLIC|INTERFACE|PRIVATE") + add_dependencies(fake_to_force_build_order_${obj_target} ${_stripped_all_libs}) + add_dependencies(${obj_target} fake_to_force_build_order_${obj_target}) target_link_libraries(${obj_target} ${_all_libs}) endif() @@ -239,11 +244,7 @@ macro(sundials_add_library target) # set target name set(_actual_target_name ${target}${_lib_suffix}) - add_library(${_actual_target_name} ${_libtype} $ ${sundials_add_library_UNPARSED_ARGUMENTS}) - - set_target_properties(${_actual_target_name} PROPERTIES FOLDER "src") - - # add any object library dependencies + set(_object_sources $) if(sundials_add_library_OBJECT_LIBRARIES) if(${_libtype} MATCHES "STATIC") append_static_suffix(sundials_add_library_OBJECT_LIBRARIES _all_objs) @@ -251,13 +252,14 @@ macro(sundials_add_library target) set(_all_objs ${sundials_add_library_OBJECT_LIBRARIES}) endif() foreach(_tmp ${_all_objs}) - # We use target_sources since target_link_libraries does not work - # as expected with CMake 3.12 (see CMake issues 18090 and 18692). - # TODO(DJG): Update whenever we require CMake 3.14 or newer - target_sources(${_actual_target_name} PRIVATE $) + list(APPEND _object_sources $) endforeach() endif() + add_library(${_actual_target_name} ${_libtype} ${_object_sources} ${sundials_add_library_UNPARSED_ARGUMENTS}) + + set_target_properties(${_actual_target_name} PROPERTIES FOLDER "src") + # add all link libraries if(SUNDIALS_MATH_LIBRARY) target_link_libraries(${_actual_target_name} PRIVATE "${SUNDIALS_MATH_LIBRARY}") @@ -449,12 +451,17 @@ macro(sundials_add_f2003_library target) # get the name of the C library which the fortran library interfaces to string(REPLACE "sundials_f" "sundials_" _clib_name "${target}") string(REPLACE "_mod" "" _clib_name "${_clib_name}") + if(TARGET ${_clib_name}) + set(_clib_target PUBLIC ${_clib_name}) + else() + set(_clib_target ) + endif() sundials_add_library(${target} SOURCES ${sundials_add_f2003_library_SOURCES} OBJECT_LIBRARIES ${sundials_add_f2003_library_OBJECT_LIBRARIES} LINK_LIBRARIES - PUBLIC ${_clib_name} # depend on the c library + PUBLIC ${_clib_target} # depend on the c library ${sundials_add_f2003_library_LINK_LIBRARIES} INCLUDE_DIRECTORIES ${sundials_add_f2003_library_INCLUDE_DIRECTORIES} From fb661b396f3df9ad2c914bf83081e36353ceb01b Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 19 Jun 2024 13:03:53 -0700 Subject: [PATCH 099/101] typo, andd comment --- cmake/macros/SundialsAddLibrary.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index eb85a8f4cc..3b276ef155 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -173,6 +173,9 @@ macro(sundials_add_library target) else() set(_all_libs ${sundials_add_library_LINK_LIBRARIES}) endif() + # Due to various issues in CMake, particularly https://gitlab.kitware.com/cmake/cmake/-/issues/25365 + # we create a fake custom target to enforce a build order. Without this, parallel + # builds might fail due with a missing '.mod' error when Fortran is enabled. add_custom_target(fake_to_force_build_order_${obj_target}) set(_stripped_all_libs ${_all_libs}) list(FILTER _stripped_all_libs EXCLUDE REGEX "PUBLIC|INTERFACE|PRIVATE") @@ -452,7 +455,7 @@ macro(sundials_add_f2003_library target) string(REPLACE "sundials_f" "sundials_" _clib_name "${target}") string(REPLACE "_mod" "" _clib_name "${_clib_name}") if(TARGET ${_clib_name}) - set(_clib_target PUBLIC ${_clib_name}) + set(_clib_target ${_clib_name}) else() set(_clib_target ) endif() From 8a4ac74c4020a7e554722bd1ac96d2d9fe761ca9 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 19 Jun 2024 13:05:58 -0700 Subject: [PATCH 100/101] typo --- cmake/macros/SundialsAddLibrary.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index 3b276ef155..5e5b73bbd4 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -173,9 +173,9 @@ macro(sundials_add_library target) else() set(_all_libs ${sundials_add_library_LINK_LIBRARIES}) endif() - # Due to various issues in CMake, particularly https://gitlab.kitware.com/cmake/cmake/-/issues/25365 - # we create a fake custom target to enforce a build order. Without this, parallel - # builds might fail due with a missing '.mod' error when Fortran is enabled. + # Due to various issues in CMake, particularly https://gitlab.kitware.com/cmake/cmake/-/issues/25365, + # we create a fake custom target to enforce a build order. Without this, parallel builds + # might fail with an error about a missing '.mod' file when Fortran is enabled (see GitHub #410). add_custom_target(fake_to_force_build_order_${obj_target}) set(_stripped_all_libs ${_all_libs}) list(FILTER _stripped_all_libs EXCLUDE REGEX "PUBLIC|INTERFACE|PRIVATE") From 4a1ab4b43d924000660f7eb26e71def34b5b506f Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 19 Jun 2024 13:18:18 -0700 Subject: [PATCH 101/101] guard against non targets --- cmake/macros/SundialsAddLibrary.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/macros/SundialsAddLibrary.cmake b/cmake/macros/SundialsAddLibrary.cmake index 5e5b73bbd4..199f790e66 100644 --- a/cmake/macros/SundialsAddLibrary.cmake +++ b/cmake/macros/SundialsAddLibrary.cmake @@ -176,9 +176,14 @@ macro(sundials_add_library target) # Due to various issues in CMake, particularly https://gitlab.kitware.com/cmake/cmake/-/issues/25365, # we create a fake custom target to enforce a build order. Without this, parallel builds # might fail with an error about a missing '.mod' file when Fortran is enabled (see GitHub #410). - add_custom_target(fake_to_force_build_order_${obj_target}) set(_stripped_all_libs ${_all_libs}) list(FILTER _stripped_all_libs EXCLUDE REGEX "PUBLIC|INTERFACE|PRIVATE") + foreach(_item ${_stripped_all_libs}) + if(NOT TARGET ${_item}) + list(REMOVE_ITEM _stripped_all_libs ${_item}) + endif() + endforeach() + add_custom_target(fake_to_force_build_order_${obj_target}) add_dependencies(fake_to_force_build_order_${obj_target} ${_stripped_all_libs}) add_dependencies(${obj_target} fake_to_force_build_order_${obj_target}) target_link_libraries(${obj_target} ${_all_libs})