From 0259908205a165c1575b5628fce9ba93e4382115 Mon Sep 17 00:00:00 2001 From: "Mark F. Brown" Date: Fri, 18 Jul 2025 16:59:18 -0400 Subject: [PATCH 1/2] CI: Force Update Before Install * Ubuntu mirror list can become stale. Make sure mirrors are synced before package installation with "sudo apt-get -y update" * Added -y to apt-get install to prevent hangs waiting for user confirmation. Issue #1211 Signed-off-by: Mark F. Brown --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7aebd0f5..ff4795a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,6 +172,7 @@ jobs: submodules: 'true' - name: Install dependencies run: | + sudo apt-get -y update sudo apt-get install -y gfortran rpm mpich libmpich-dev libhwloc-dev gdb sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.randomize_va_space=0 @@ -219,7 +220,7 @@ jobs: if: ${{ matrix.xpmem_version }} run: | cd repos/xpmem - sudo apt-get install linux-headers-`uname -r` + sudo apt-get -y install linux-headers-`uname -r` ./autogen.sh ./configure --prefix=${XPMEM_INSTALL_DIR} make -j @@ -332,6 +333,7 @@ jobs: # - uses: actions/checkout@v2 # - name: Install dependencies # run: | +# sudo apt-get -y update # sudo apt-get install -y gfortran libhwloc-dev libev-dev libev-libevent-dev # # # LIBFABRIC @@ -531,6 +533,7 @@ jobs: submodules: 'true' - name: Install dependencies run: | + sudo apt-get -y update sudo apt-get install -y gfortran mpich libmpich-dev gdb sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.randomize_va_space=0 @@ -545,7 +548,7 @@ jobs: - name: Build XPMEM run: | cd repos/xpmem - sudo apt-get install linux-headers-`uname -r` + sudo apt-get -y install linux-headers-`uname -r` ./autogen.sh ./configure --prefix=/usr make -j @@ -648,6 +651,7 @@ jobs: submodules: 'true' - name: Install dependencies run: | + sudo apt-get -y update sudo apt-get install -y gfortran mpich libmpich-dev libev-dev libev-libevent-dev libhwloc-dev gdb sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.randomize_va_space=0 @@ -662,7 +666,7 @@ jobs: - name: Build XPMEM run: | cd repos/xpmem - sudo apt-get install linux-headers-`uname -r` + sudo apt-get -y install linux-headers-`uname -r` ./autogen.sh ./configure --prefix=/usr make -j @@ -744,6 +748,7 @@ jobs: submodules: 'true' - name: Install dependencies run: | + sudo apt-get -y update sudo apt-get install -y gfortran mpich libmpich-dev libev-dev libev-libevent-dev libhwloc-dev gdb sudo sysctl -w kernel.yama.ptrace_scope=0 sudo sysctl -w kernel.randomize_va_space=0 @@ -758,7 +763,7 @@ jobs: - name: Build XPMEM run: | cd repos/xpmem - sudo apt-get install linux-headers-`uname -r` + sudo apt-get -y install linux-headers-`uname -r` ./autogen.sh ./configure --prefix=/usr make -j From 31a58aadf825ce28002b0337a4c9c1a3678d7c1e Mon Sep 17 00:00:00 2001 From: "Mark F. Brown" Date: Thu, 17 Jul 2025 16:29:19 -0400 Subject: [PATCH 2/2] shmem_internal_counter: Added fadd routine An fetch and add operation is needed in the case where you need to trigger an event based on a specific value of the counter. Operation is atomic if multithreading is enabled Issue #1210 Signed-off-by: Mark F. Brown --- src/shmem_atomic.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/shmem_atomic.h b/src/shmem_atomic.h index 7fc35ccc..12a34599 100644 --- a/src/shmem_atomic.h +++ b/src/shmem_atomic.h @@ -164,6 +164,11 @@ shmem_internal_cntr_dec(shmem_internal_cntr_t *val) { return; } +static inline +uint64_t +shmem_internal_cntr_fadd(shmem_internal_cntr_t *ptr, uint64_t value) { + return __atomic_fetch_add(ptr, value, __ATOMIC_RELEASE); +} # else /* HAVE_STDATOMIC_H */ #include @@ -197,6 +202,11 @@ shmem_internal_cntr_dec(shmem_internal_cntr_t *val) { return; } +static inline +uint64_t +shmem_internal_cntr_fadd(shmem_internal_cntr_t *ptr, uint64_t value) { + return atomic_fetch_add(ptr, value); +} # endif # else /* !define( ENABLE_THREADS ) */ @@ -228,6 +238,14 @@ shmem_internal_cntr_dec(shmem_internal_cntr_t *val) { *val = *val-1; return; } + +static inline +uint64_t +shmem_internal_cntr_fadd(shmem_internal_cntr_t *ptr, uint64_t value) { + uint64_t orig_value = *ptr; + *ptr = *ptr + value; + return orig_value; +} # endif /* ENABLE_THREADS */ #endif