Skip to content

Commit

Permalink
Merge pull request #259 from sandialabs/release-1.20-pre
Browse files Browse the repository at this point in the history
1.20 release.
  • Loading branch information
insertinterestingnamehere authored May 2, 2024
2 parents 619afe9 + 07ad1fd commit 2e651fd
Show file tree
Hide file tree
Showing 67 changed files with 1,335 additions and 1,128 deletions.
34 changes: 18 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
make -j2
- run:
command: timeout --foreground -k 10s 2m make check
no_output_timeout: 30s
no_output_timeout: 60s

arm_clang:
parameters:
Expand All @@ -39,8 +39,8 @@ jobs:
image: ubuntu-2204:2023.10.1
resource_class: arm.medium
environment:
CC: clang-17
CXX: clang++-17
CC: clang-18
CXX: clang++-18
steps:
- checkout
- run: |
Expand All @@ -49,15 +49,15 @@ jobs:
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y hwloc libhwloc-dev
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo apt-get install -y clang-17
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
sudo apt-get install -y clang-18
- run: |
./autogen.sh
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
- run:
command: timeout --foreground -k 10s 2m make check
no_output_timeout: 30s
no_output_timeout: 60s

arm_sanitizers:
parameters:
Expand All @@ -71,11 +71,13 @@ jobs:
image: ubuntu-2204:2023.10.1
resource_class: arm.medium
environment:
CC: clang-17
CXX: clang++-17
CFLAGS: "-fsanitize=<< parameters.sanitizer >>"
CXXFLAGS: "-fsanitize=<< parameters.sanitizer >>"
LDFLAGS: "-fsanitize=<< parameters.sanitizer >>"
CC: clang-18
CXX: clang++-18
CFLAGS: "-fsanitize=<< parameters.sanitizer >> -fno-sanitize-recover=all"
CXXFLAGS: "-fsanitize=<< parameters.sanitizer >> -fno-sanitize-recover=all"
LDFLAGS: "-fsanitize=<< parameters.sanitizer >> -fno-sanitize-recover=all"
QTHREAD_STACK_SIZE: 524288
ASAN_OPTIONS: "check_initialization_order=1"
steps:
- checkout
- run: |
Expand All @@ -84,15 +86,15 @@ jobs:
sudo apt-get install -y autoconf automake libtool
sudo apt-get install -y hwloc libhwloc-dev
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo apt-get install -y clang-17
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
sudo apt-get install -y clang-18
- run: |
./autogen.sh
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
make -j2
- run:
command: timeout --foreground -k 10s 4m make check
no_output_timeout: 30s
no_output_timeout: 120s

arm_acfl:
parameters:
Expand Down Expand Up @@ -129,7 +131,7 @@ jobs:
command: |
export PATH=$PATH:/opt/arm/arm-linux-compiler-23.10_Ubuntu-22.04/bin
timeout --foreground -k 10s 4m make check
no_output_timeout: 30s
no_output_timeout: 60s

musl:
parameters:
Expand All @@ -152,7 +154,7 @@ jobs:
make -j2
- run:
command: make check
no_output_timeout: 30s
no_output_timeout: 60s

workflows:
build_and_test:
Expand Down
39 changes: 22 additions & 17 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ freebsd_task:
arm_linux_task:
arm_container:
image: gcc:latest
image: gcc:13-bookworm
timeout_in: 5m
matrix:
env:
Expand Down Expand Up @@ -76,45 +76,50 @@ arm_linux_task:
arm_linux_clang_task:
arm_container:
image: gcc:latest
image: gcc:13-bookworm
timeout_in: 5m
matrix:
env:
CC: clang
CXX: clang++
CC: clang-18
CXX: clang++-18
QTHREADS_SCHEDULER: nemesis
QTHREADS_TOPOLOGY: no
env:
CC: clang
CXX: clang++
CC: clang-18
CXX: clang++-18
QTHREADS_SCHEDULER: nemesis
QTHREADS_TOPOLOGY: hwloc
env:
CC: clang
CXX: clang++
CC: clang-18
CXX: clang++-18
QTHREADS_SCHEDULER: sherwood
QTHREADS_TOPOLOGY: no
env:
CC: clang
CXX: clang++
CC: clang-18
CXX: clang++-18
QTHREADS_SCHEDULER: sherwood
QTHREADS_TOPOLOGY: hwloc
env:
CC: clang
CXX: clang++
CC: clang-18
CXX: clang++-18
QTHREADS_SCHEDULER: distrib
QTHREADS_TOPOLOGY: no
env:
CC: clang
CXX: clang++
CC: clang-18
CXX: clang++-18
QTHREADS_SCHEDULER: distrib
QTHREADS_TOPOLOGY: hwloc
install_deps_script: |
apt-get update -y
apt-get install -y software-properties-common
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
apt-get install -y clang
wget https://apt.llvm.org/llvm-snapshot.gpg.key
gpg --no-default-keyring --keyring ./tmp.gpg --import llvm-snapshot.gpg.key
gpg --no-default-keyring --keyring ./tmp.gpg --export --output llvm-snapshot.gpg
rm tmp.gpg
cp llvm-snapshot.gpg /etc/apt/trusted.gpg.d/llvm-snapshot.gpg # This is for CI so no need to do something more complicated to restrict key use to a specific repo.
apt-add-repository -y 'deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-18 main'
apt-add-repository -y 'deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-18 main' # Something's buggy upstream but running this twice fixes it.
apt-get install -y clang-18
apt-get install -y autoconf automake libtool
apt-get install -y hwloc libhwloc-dev
build_script: |
Expand Down
77 changes: 56 additions & 21 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
on: [push, pull_request]

jobs:
linux-gcc:
Expand Down Expand Up @@ -40,7 +36,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
clang_version: [11, 12, 13, 14, 15, 16]
clang_version: [11, 12, 13, 14, 15, 16, 17]
scheduler: [nemesis, sherwood, distrib]
topology: [hwloc, binders, no]
include:
Expand All @@ -56,16 +52,18 @@ jobs:
gcc_version: 12
- clang_version: 16
gcc_version: 13
- clang_version: 17
gcc_version: 13
env:
CC: clang-${{ matrix.clang_version }}
CXX: clang++-${{ matrix.clang_version }}
steps:
- uses: actions/checkout@v3
- if: ${{ matrix.clang_version == '16' }}
- if: ${{ matrix.clang_version == '16' || matrix.clang_version == '17' }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.clang_version }} main' && break || sleep 1
- if: ${{ matrix.gcc_version == '13' && ! matrix.use_libcxx }}
- if: ${{ matrix.gcc_version == '13' }}
run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
- name: install gcc
run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }}
Expand Down Expand Up @@ -163,6 +161,41 @@ jobs:
timeout -k 10s --foreground 6m make check
timeout-minutes: 7

linux-aocc:
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
scheduler: [nemesis, sherwood, distrib]
topology: [hwloc, binders, no]
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v3
- if: ${{ matrix.topology != 'no' }}
run: |
sudo apt-get install hwloc libhwloc-dev
hwloc-ls --version
- name: install gcc
run: |
sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
sudo apt-get install gcc-13 g++-13
- name: install aocc
run: |
wget -nv -O aocc.deb https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0_1_amd64.deb
sudo apt install -y ./aocc.deb
clang -v
- name: build qthreads
run: |
./autogen.sh
./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} || cat config.log
make -j2
- name: make check
run: |
timeout -k 10s --foreground 6m make check
timeout-minutes: 7

mac:
runs-on: macos-latest
continue-on-error: true
Expand Down Expand Up @@ -201,11 +234,13 @@ jobs:
topology: [hwloc, binders, no]
use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now.
env:
CC: clang-17
CXX: clang++-17
CFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0}', matrix.sanitizer) || format('-fsanitize={0}', matrix.sanitizer) }}
LDFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
CC: clang-18
CXX: clang++-18
CFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all"
CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0} -fno-sanitize-recover=all', matrix.sanitizer) || format('-fsanitize={0} -fno-sanitize-recover=all', matrix.sanitizer) }}
LDFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all"
QTHREAD_STACK_SIZE: 2097152
ASAN_OPTIONS: "check_initialization_order=1"
steps:
- uses: actions/checkout@v3
- if: ${{ ! matrix.use_libcxx }}
Expand All @@ -215,10 +250,10 @@ jobs:
- name: install compiler
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1
sudo apt-get install clang-17
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' && break || sleep 1
sudo apt-get install clang-18
- if: ${{ matrix.use_libcxx }}
run: sudo apt-get install libc++-17-dev libc++abi-17-dev
run: sudo apt-get install libc++-18-dev libc++abi-18-dev
- if: ${{ matrix.topology != 'no' }}
run: |
sudo apt-get install hwloc libhwloc-dev
Expand Down Expand Up @@ -246,8 +281,8 @@ jobs:
- compiler: gcc
use_libcxx: true
env:
CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-17' }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-17' }}
CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-18' }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-18' }}
CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }}
QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }}
steps:
Expand All @@ -258,10 +293,10 @@ jobs:
- if: ${{ matrix.compiler == 'clang' }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1
sudo apt-get install clang-17
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' && break || sleep 1
sudo apt-get install clang-18
- if: ${{ matrix.use_libcxx }}
run: sudo apt-get install libc++-17-dev libc++abi-17-dev
run: sudo apt-get install libc++-18-dev libc++abi-18-dev
- if: ${{ matrix.topology != 'no' }}
run: |
sudo apt-get install hwloc libhwloc-dev
Expand Down
9 changes: 8 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
--- 1.19 (current) ---
--- 1.20 (current) ---
Improvements:
- Improve and expand CI testing
- Fix compilation and testing for an expanded range of platforms, compilers, and operating systems
- Fix numerous sanitizer errors
- Remove some unused/outdated code

--- 1.19 ---

New Features:
- Add a mechanism to reset the default task spawn order
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ int main() {

AS_IF([test "x$with_default_stack_size" != "x"],
[qthread_cv_stack_size=$with_default_stack_size],
[qthread_cv_stack_size=16384])
[qthread_cv_stack_size=32768])

AC_DEFINE_UNQUOTED([QTHREAD_DEFAULT_STACK_SIZE],[$qthread_cv_stack_size], [What size stacks to use by default])

Expand Down
4 changes: 2 additions & 2 deletions include/qloop_innards.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include "qthread/qtimer.h"

typedef struct qqloop_iteration_queue {
saligned_t start;
_Atomic saligned_t start;
saligned_t stop;
saligned_t step;
qt_loop_queue_type type;
union {
saligned_t phase;
_Atomic saligned_t phase;
struct {
qtimer_t *timers;
saligned_t *lastblocks;
Expand Down
25 changes: 13 additions & 12 deletions include/qt_addrstat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@
* keeping track of the FEB status of an address. It expects a shepherd pointer
* to use to find the right memory pool to use. */
static QINLINE qthread_addrstat_t *qthread_addrstat_new(void)
{ /*{{{ */
{ /*{{{ */
qthread_addrstat_t *ret = ALLOC_ADDRSTAT();
QTHREAD_FASTLOCK_INIT_PTR(&ret->lock);
QTHREAD_FASTLOCK_LOCK(&ret->lock);
ret->full = 1;
ret->valid = 1;
ret->EFQ = NULL;
ret->FEQ = NULL;
ret->FFQ = NULL;
ret->FFWQ = NULL;
QTHREAD_EMPTY_TIMER_INIT(ret);
QTHREAD_FASTLOCK_UNLOCK(&ret->lock);

if (ret != NULL) {
QTHREAD_FASTLOCK_INIT(ret->lock);
ret->full = 1;
ret->valid = 1;
ret->EFQ = NULL;
ret->FEQ = NULL;
ret->FFQ = NULL;
ret->FFWQ = NULL;
QTHREAD_EMPTY_TIMER_INIT(ret);
}
return ret;
} /*}}} */

/* this function is for maintenance of the FEB hashtables. SHOULD only be
* necessary for things left over when qthread_finalize is called */
static void qthread_addrstat_delete(qthread_addrstat_t *m)
static void qthread_addrstat_delete(void *m_void)
{ /*{{{ */
qthread_addrstat_t *m = (qthread_addrstat_t*)m_void;
#ifdef QTHREAD_FEB_PROFILING
qtimer_destroy(m->empty_timer);
#endif
Expand Down
Loading

0 comments on commit 2e651fd

Please sign in to comment.