Skip to content

Commit 2e651fd

Browse files
Merge pull request #259 from sandialabs/release-1.20-pre
1.20 release.
2 parents 619afe9 + 07ad1fd commit 2e651fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1335
-1128
lines changed

.circleci/config.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
make -j2
2828
- run:
2929
command: timeout --foreground -k 10s 2m make check
30-
no_output_timeout: 30s
30+
no_output_timeout: 60s
3131

3232
arm_clang:
3333
parameters:
@@ -39,8 +39,8 @@ jobs:
3939
image: ubuntu-2204:2023.10.1
4040
resource_class: arm.medium
4141
environment:
42-
CC: clang-17
43-
CXX: clang++-17
42+
CC: clang-18
43+
CXX: clang++-18
4444
steps:
4545
- checkout
4646
- run: |
@@ -49,15 +49,15 @@ jobs:
4949
sudo apt-get install -y autoconf automake libtool
5050
sudo apt-get install -y hwloc libhwloc-dev
5151
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
52-
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
53-
sudo apt-get install -y clang-17
52+
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
53+
sudo apt-get install -y clang-18
5454
- run: |
5555
./autogen.sh
5656
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
5757
make -j2
5858
- run:
5959
command: timeout --foreground -k 10s 2m make check
60-
no_output_timeout: 30s
60+
no_output_timeout: 60s
6161

6262
arm_sanitizers:
6363
parameters:
@@ -71,11 +71,13 @@ jobs:
7171
image: ubuntu-2204:2023.10.1
7272
resource_class: arm.medium
7373
environment:
74-
CC: clang-17
75-
CXX: clang++-17
76-
CFLAGS: "-fsanitize=<< parameters.sanitizer >>"
77-
CXXFLAGS: "-fsanitize=<< parameters.sanitizer >>"
78-
LDFLAGS: "-fsanitize=<< parameters.sanitizer >>"
74+
CC: clang-18
75+
CXX: clang++-18
76+
CFLAGS: "-fsanitize=<< parameters.sanitizer >> -fno-sanitize-recover=all"
77+
CXXFLAGS: "-fsanitize=<< parameters.sanitizer >> -fno-sanitize-recover=all"
78+
LDFLAGS: "-fsanitize=<< parameters.sanitizer >> -fno-sanitize-recover=all"
79+
QTHREAD_STACK_SIZE: 524288
80+
ASAN_OPTIONS: "check_initialization_order=1"
7981
steps:
8082
- checkout
8183
- run: |
@@ -84,15 +86,15 @@ jobs:
8486
sudo apt-get install -y autoconf automake libtool
8587
sudo apt-get install -y hwloc libhwloc-dev
8688
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
87-
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
88-
sudo apt-get install -y clang-17
89+
sudo apt-add-repository -y 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
90+
sudo apt-get install -y clang-18
8991
- run: |
9092
./autogen.sh
9193
./configure --enable-picky --with-scheduler=<< parameters.scheduler >> -with-topology=<< parameters.topology >>
9294
make -j2
9395
- run:
9496
command: timeout --foreground -k 10s 4m make check
95-
no_output_timeout: 30s
97+
no_output_timeout: 120s
9698

9799
arm_acfl:
98100
parameters:
@@ -129,7 +131,7 @@ jobs:
129131
command: |
130132
export PATH=$PATH:/opt/arm/arm-linux-compiler-23.10_Ubuntu-22.04/bin
131133
timeout --foreground -k 10s 4m make check
132-
no_output_timeout: 30s
134+
no_output_timeout: 60s
133135

134136
musl:
135137
parameters:
@@ -152,7 +154,7 @@ jobs:
152154
make -j2
153155
- run:
154156
command: make check
155-
no_output_timeout: 30s
157+
no_output_timeout: 60s
156158

157159
workflows:
158160
build_and_test:

.cirrus.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ freebsd_task:
4242
4343
arm_linux_task:
4444
arm_container:
45-
image: gcc:latest
45+
image: gcc:13-bookworm
4646
timeout_in: 5m
4747
matrix:
4848
env:
@@ -76,45 +76,50 @@ arm_linux_task:
7676
7777
arm_linux_clang_task:
7878
arm_container:
79-
image: gcc:latest
79+
image: gcc:13-bookworm
8080
timeout_in: 5m
8181
matrix:
8282
env:
83-
CC: clang
84-
CXX: clang++
83+
CC: clang-18
84+
CXX: clang++-18
8585
QTHREADS_SCHEDULER: nemesis
8686
QTHREADS_TOPOLOGY: no
8787
env:
88-
CC: clang
89-
CXX: clang++
88+
CC: clang-18
89+
CXX: clang++-18
9090
QTHREADS_SCHEDULER: nemesis
9191
QTHREADS_TOPOLOGY: hwloc
9292
env:
93-
CC: clang
94-
CXX: clang++
93+
CC: clang-18
94+
CXX: clang++-18
9595
QTHREADS_SCHEDULER: sherwood
9696
QTHREADS_TOPOLOGY: no
9797
env:
98-
CC: clang
99-
CXX: clang++
98+
CC: clang-18
99+
CXX: clang++-18
100100
QTHREADS_SCHEDULER: sherwood
101101
QTHREADS_TOPOLOGY: hwloc
102102
env:
103-
CC: clang
104-
CXX: clang++
103+
CC: clang-18
104+
CXX: clang++-18
105105
QTHREADS_SCHEDULER: distrib
106106
QTHREADS_TOPOLOGY: no
107107
env:
108-
CC: clang
109-
CXX: clang++
108+
CC: clang-18
109+
CXX: clang++-18
110110
QTHREADS_SCHEDULER: distrib
111111
QTHREADS_TOPOLOGY: hwloc
112112
install_deps_script: |
113113
apt-get update -y
114114
apt-get install -y software-properties-common
115-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
116-
apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
117-
apt-get install -y clang
115+
wget https://apt.llvm.org/llvm-snapshot.gpg.key
116+
gpg --no-default-keyring --keyring ./tmp.gpg --import llvm-snapshot.gpg.key
117+
gpg --no-default-keyring --keyring ./tmp.gpg --export --output llvm-snapshot.gpg
118+
rm tmp.gpg
119+
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.
120+
apt-add-repository -y 'deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-18 main'
121+
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.
122+
apt-get install -y clang-18
118123
apt-get install -y autoconf automake libtool
119124
apt-get install -y hwloc libhwloc-dev
120125
build_script: |

.github/workflows/CI.yml

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: CI
22

3-
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
3+
on: [push, pull_request]
84

95
jobs:
106
linux-gcc:
@@ -40,7 +36,7 @@ jobs:
4036
continue-on-error: true
4137
strategy:
4238
matrix:
43-
clang_version: [11, 12, 13, 14, 15, 16]
39+
clang_version: [11, 12, 13, 14, 15, 16, 17]
4440
scheduler: [nemesis, sherwood, distrib]
4541
topology: [hwloc, binders, no]
4642
include:
@@ -56,16 +52,18 @@ jobs:
5652
gcc_version: 12
5753
- clang_version: 16
5854
gcc_version: 13
55+
- clang_version: 17
56+
gcc_version: 13
5957
env:
6058
CC: clang-${{ matrix.clang_version }}
6159
CXX: clang++-${{ matrix.clang_version }}
6260
steps:
6361
- uses: actions/checkout@v3
64-
- if: ${{ matrix.clang_version == '16' }}
62+
- if: ${{ matrix.clang_version == '16' || matrix.clang_version == '17' }}
6563
run: |
6664
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
6765
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.clang_version }} main' && break || sleep 1
68-
- if: ${{ matrix.gcc_version == '13' && ! matrix.use_libcxx }}
66+
- if: ${{ matrix.gcc_version == '13' }}
6967
run: sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
7068
- name: install gcc
7169
run: sudo apt-get install gcc-${{ matrix.gcc_version }} g++-${{ matrix.gcc_version }}
@@ -163,6 +161,41 @@ jobs:
163161
timeout -k 10s --foreground 6m make check
164162
timeout-minutes: 7
165163

164+
linux-aocc:
165+
runs-on: ubuntu-22.04
166+
continue-on-error: true
167+
strategy:
168+
matrix:
169+
scheduler: [nemesis, sherwood, distrib]
170+
topology: [hwloc, binders, no]
171+
env:
172+
CC: clang
173+
CXX: clang++
174+
steps:
175+
- uses: actions/checkout@v3
176+
- if: ${{ matrix.topology != 'no' }}
177+
run: |
178+
sudo apt-get install hwloc libhwloc-dev
179+
hwloc-ls --version
180+
- name: install gcc
181+
run: |
182+
sudo apt-add-repository 'ppa:ubuntu-toolchain-r/test' && break || sleep 1
183+
sudo apt-get install gcc-13 g++-13
184+
- name: install aocc
185+
run: |
186+
wget -nv -O aocc.deb https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0_1_amd64.deb
187+
sudo apt install -y ./aocc.deb
188+
clang -v
189+
- name: build qthreads
190+
run: |
191+
./autogen.sh
192+
./configure --enable-picky --with-scheduler=${{ matrix.scheduler }} --with-topology=${{ matrix.topology }} || cat config.log
193+
make -j2
194+
- name: make check
195+
run: |
196+
timeout -k 10s --foreground 6m make check
197+
timeout-minutes: 7
198+
166199
mac:
167200
runs-on: macos-latest
168201
continue-on-error: true
@@ -201,11 +234,13 @@ jobs:
201234
topology: [hwloc, binders, no]
202235
use_libcxx: [false] # disable testing on libcxx since its effect seems very limited for now.
203236
env:
204-
CC: clang-17
205-
CXX: clang++-17
206-
CFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
207-
CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0}', matrix.sanitizer) || format('-fsanitize={0}', matrix.sanitizer) }}
208-
LDFLAGS: "-fsanitize=${{ matrix.sanitizer }}"
237+
CC: clang-18
238+
CXX: clang++-18
239+
CFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all"
240+
CXXFLAGS: ${{ matrix.use_libcxx && format('-stdlib=libc++ -fsanitize={0} -fno-sanitize-recover=all', matrix.sanitizer) || format('-fsanitize={0} -fno-sanitize-recover=all', matrix.sanitizer) }}
241+
LDFLAGS: "-fsanitize=${{ matrix.sanitizer }} -fno-sanitize-recover=all"
242+
QTHREAD_STACK_SIZE: 2097152
243+
ASAN_OPTIONS: "check_initialization_order=1"
209244
steps:
210245
- uses: actions/checkout@v3
211246
- if: ${{ ! matrix.use_libcxx }}
@@ -215,10 +250,10 @@ jobs:
215250
- name: install compiler
216251
run: |
217252
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
218-
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1
219-
sudo apt-get install clang-17
253+
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' && break || sleep 1
254+
sudo apt-get install clang-18
220255
- if: ${{ matrix.use_libcxx }}
221-
run: sudo apt-get install libc++-17-dev libc++abi-17-dev
256+
run: sudo apt-get install libc++-18-dev libc++abi-18-dev
222257
- if: ${{ matrix.topology != 'no' }}
223258
run: |
224259
sudo apt-get install hwloc libhwloc-dev
@@ -246,8 +281,8 @@ jobs:
246281
- compiler: gcc
247282
use_libcxx: true
248283
env:
249-
CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-17' }}
250-
CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-17' }}
284+
CC: ${{ matrix.compiler == 'gcc' && 'gcc-13' || 'clang-18' }}
285+
CXX: ${{ matrix.compiler == 'gcc' && 'g++-13' || 'clang++-18' }}
251286
CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }}
252287
QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }}
253288
steps:
@@ -258,10 +293,10 @@ jobs:
258293
- if: ${{ matrix.compiler == 'clang' }}
259294
run: |
260295
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
261-
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && break || sleep 1
262-
sudo apt-get install clang-17
296+
sudo apt-add-repository 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' && break || sleep 1
297+
sudo apt-get install clang-18
263298
- if: ${{ matrix.use_libcxx }}
264-
run: sudo apt-get install libc++-17-dev libc++abi-17-dev
299+
run: sudo apt-get install libc++-18-dev libc++abi-18-dev
265300
- if: ${{ matrix.topology != 'no' }}
266301
run: |
267302
sudo apt-get install hwloc libhwloc-dev

NEWS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
--- 1.19 (current) ---
1+
--- 1.20 (current) ---
2+
Improvements:
3+
- Improve and expand CI testing
4+
- Fix compilation and testing for an expanded range of platforms, compilers, and operating systems
5+
- Fix numerous sanitizer errors
6+
- Remove some unused/outdated code
7+
8+
--- 1.19 ---
29

310
New Features:
411
- Add a mechanism to reset the default task spawn order

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ int main() {
937937

938938
AS_IF([test "x$with_default_stack_size" != "x"],
939939
[qthread_cv_stack_size=$with_default_stack_size],
940-
[qthread_cv_stack_size=16384])
940+
[qthread_cv_stack_size=32768])
941941

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

include/qloop_innards.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#include "qthread/qtimer.h"
55

66
typedef struct qqloop_iteration_queue {
7-
saligned_t start;
7+
_Atomic saligned_t start;
88
saligned_t stop;
99
saligned_t step;
1010
qt_loop_queue_type type;
1111
union {
12-
saligned_t phase;
12+
_Atomic saligned_t phase;
1313
struct {
1414
qtimer_t *timers;
1515
saligned_t *lastblocks;

include/qt_addrstat.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@
77
* keeping track of the FEB status of an address. It expects a shepherd pointer
88
* to use to find the right memory pool to use. */
99
static QINLINE qthread_addrstat_t *qthread_addrstat_new(void)
10-
{ /*{{{ */
10+
{ /*{{{ */
1111
qthread_addrstat_t *ret = ALLOC_ADDRSTAT();
12+
QTHREAD_FASTLOCK_INIT_PTR(&ret->lock);
13+
QTHREAD_FASTLOCK_LOCK(&ret->lock);
14+
ret->full = 1;
15+
ret->valid = 1;
16+
ret->EFQ = NULL;
17+
ret->FEQ = NULL;
18+
ret->FFQ = NULL;
19+
ret->FFWQ = NULL;
20+
QTHREAD_EMPTY_TIMER_INIT(ret);
21+
QTHREAD_FASTLOCK_UNLOCK(&ret->lock);
1222

13-
if (ret != NULL) {
14-
QTHREAD_FASTLOCK_INIT(ret->lock);
15-
ret->full = 1;
16-
ret->valid = 1;
17-
ret->EFQ = NULL;
18-
ret->FEQ = NULL;
19-
ret->FFQ = NULL;
20-
ret->FFWQ = NULL;
21-
QTHREAD_EMPTY_TIMER_INIT(ret);
22-
}
2323
return ret;
2424
} /*}}} */
2525

2626
/* this function is for maintenance of the FEB hashtables. SHOULD only be
2727
* necessary for things left over when qthread_finalize is called */
28-
static void qthread_addrstat_delete(qthread_addrstat_t *m)
28+
static void qthread_addrstat_delete(void *m_void)
2929
{ /*{{{ */
30+
qthread_addrstat_t *m = (qthread_addrstat_t*)m_void;
3031
#ifdef QTHREAD_FEB_PROFILING
3132
qtimer_destroy(m->empty_timer);
3233
#endif

0 commit comments

Comments
 (0)