Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 18 additions & 0 deletions src/shmem_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdatomic.h>
Expand Down Expand Up @@ -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 ) */

Expand Down Expand Up @@ -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