From e8b7acd0663dcb0864644607003873c12cf94187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 15 May 2024 23:48:27 +0200 Subject: [PATCH 1/2] Use `int64_t` for `KLU_INDEXTYPE` if `SUNDIALS_INT64_T` is true. (#477) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `long int` is 32 bits wide on systems that use an LLP64 data model (e.g., Windows). Use a type for which the C standard guarantees that it is 64-bit instead (i.e., `int64_t`). See the error in CI for PR #432. Signed-off-by: Markus Mützel Co-authored-by: Cody Balos --- CHANGELOG.md | 3 +++ doc/shared/RecentChanges.rst | 3 +++ src/sunlinsol/klu/sunlinsol_klu.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59ffc7a35d..40706c1649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,9 @@ Fixed a CMake bug that caused an MPI linking error for our C++ examples in some Fixed a bug in `ARKodeSPRKTable_Create` where the coefficient arrays where not allocated. +Fix bug on LLP64 platforms (like Windows 64-bit) where `KLU_INDEXTYPE` could be +32 bits wide even if `SUNDIALS_INT64_T` is defined. + ## Changes to SUNDIALS in release v7.0.0 ### Major Feature diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index a6eef5064e..4f1e6dbe92 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -65,3 +65,6 @@ Fixed a CMake bug that caused an MPI linking error for our C++ examples in some Fixed a bug in :c:func:`ARKodeSPRKTable_Create` where the coefficient arrays where not allocated. + +Fix bug on LLP64 platforms (like Windows 64-bit) where ``KLU_INDEXTYPE`` could be +32 bits wide even if ``SUNDIALS_INT64_T`` is defined. diff --git a/src/sunlinsol/klu/sunlinsol_klu.c b/src/sunlinsol/klu/sunlinsol_klu.c index cbdaa54135..568dc1d549 100644 --- a/src/sunlinsol/klu/sunlinsol_klu.c +++ b/src/sunlinsol/klu/sunlinsol_klu.c @@ -16,6 +16,7 @@ * the SUNLINSOL package. * -----------------------------------------------------------------*/ +#include #include #include #include @@ -49,7 +50,7 @@ */ #if defined(SUNDIALS_INT64_T) -#define KLU_INDEXTYPE long int +#define KLU_INDEXTYPE int64_t #else #define KLU_INDEXTYPE int #endif From c0318842fd4b63cece7d34e47c13832ff6774089 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Wed, 15 May 2024 16:22:47 -0700 Subject: [PATCH 2/2] CI: Use LC template for gitlab id tokens and limit github actions push events (#479) Addresses https://hpc.llnl.gov/technical-bulletins/bulletin-568 and also limits our github action workflows to only run on push to certain branches. --- .github/workflows/double-precision.yml | 3 +++ .github/workflows/extended-precision.yml | 4 ++++ .github/workflows/single-precision.yml | 4 ++++ .gitlab-ci.yml | 2 ++ 4 files changed, 13 insertions(+) diff --git a/.github/workflows/double-precision.yml b/.github/workflows/double-precision.yml index b0ca087ef4..cda708a4a9 100644 --- a/.github/workflows/double-precision.yml +++ b/.github/workflows/double-precision.yml @@ -3,6 +3,9 @@ name: Build and Test - Ubuntu/gcc double precision (TPLs, no GPUs) on: push: + branches: + - main + - develop pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/extended-precision.yml b/.github/workflows/extended-precision.yml index 51678b6e70..2c521b2fad 100644 --- a/.github/workflows/extended-precision.yml +++ b/.github/workflows/extended-precision.yml @@ -2,6 +2,10 @@ name: Build and Test - Ubuntu/gcc extended precision (TPLs, no GPUs) on: + push: + branches: + - main + - develop pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/single-precision.yml b/.github/workflows/single-precision.yml index 30a53b0402..d986643256 100644 --- a/.github/workflows/single-precision.yml +++ b/.github/workflows/single-precision.yml @@ -2,6 +2,10 @@ name: Build and Test - Ubuntu/gcc single precision (TPLs, no GPUs) on: + push: + branches: + - main + - develop pull_request: merge_group: workflow_dispatch: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63622ebb08..c02b239373 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,6 +126,8 @@ stages: # This is where jobs are included. include: + - project: 'lc-templates/id_tokens' + file: 'id_tokens.yml' - local: .gitlab/quartz-templates.yml - local: .gitlab/quartz-jobs.yml - local: .gitlab/lassen-templates.yml