Skip to content

Commit af9195e

Browse files
Merge pull request #361 from insertinterestingnamehere/gcc15
Gcc 15
2 parents 1a93ede + 045b782 commit af9195e

File tree

7 files changed

+93
-66
lines changed

7 files changed

+93
-66
lines changed

.circleci/config.yml

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,35 @@ jobs:
88
type: string
99
topology:
1010
type: string
11-
machine:
12-
image: ubuntu-2404:edge
11+
#machine:
12+
# image: ubuntu-2504:edge
13+
docker:
14+
- image: ubuntu:25.04
1315
resource_class: arm.medium
1416
environment:
15-
CC: gcc-14
16-
CXX: g++-14
17+
CC: gcc-15
18+
CXX: g++-15
1719
steps:
1820
- run: |
21+
apt-get update --quiet=2 || apt-get update --quiet=2 || apt-get update --quiet=2
22+
apt-get install -y sudo
23+
sudo apt-get install -y git # Updating and installing sudo and git is only neccesary in a container.
24+
# Installing sudo is just so that the later commands using sudo can be the same whether in a container or not.
1925
export REPO_HTTPS=`echo "$CIRCLE_REPOSITORY_URL" | sed "s|[email protected]:|https://github.com/|g"`
2026
git clone -b "$CIRCLE_BRANCH" "$REPO_HTTPS" . --depth=1
2127
- run: |
22-
sudo apt-add-repository -y universe
23-
sudo apt-get install -y gcc-14 g++-14
28+
sudo apt-get install -y gcc-15 g++-15
2429
sudo apt-get install -y cmake
2530
sudo apt-get install -y hwloc libhwloc-dev
2631
- run: |
2732
mkdir build
28-
pushd build
33+
cd build
2934
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
3035
make -j2 VERBOSE=1
31-
popd
3236
- run:
3337
command: |
34-
pushd build
38+
cd build
3539
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 2m make test VERBOSE=1
36-
popd
3740
no_output_timeout: 180s
3841

3942
arm_clang:
@@ -42,35 +45,40 @@ jobs:
4245
type: string
4346
topology:
4447
type: string
45-
machine:
46-
image: ubuntu-2404:edge
48+
#machine:
49+
# image: ubuntu-2504:edge
50+
docker:
51+
- image: ubuntu:25.04
4752
resource_class: arm.medium
4853
environment:
4954
CC: clang-20
5055
CXX: clang++-20
5156
steps:
5257
- run: |
58+
apt-get update --quiet=2 || apt-get update --quiet=2 || apt-get update --quiet=2
59+
apt-get install -y sudo
60+
sudo apt-get install -y git # Updating and installing sudo and git is only neccesary in a container.
61+
# Installing sudo is just so that the later commands using sudo can be the same whether in a container or not.
5362
export REPO_HTTPS=`echo "$CIRCLE_REPOSITORY_URL" | sed "s|[email protected]:|https://github.com/|g"`
5463
git clone -b "$CIRCLE_BRANCH" "$REPO_HTTPS" . --depth=1
5564
- run: |
56-
sudo apt-add-repository -y universe
57-
sudo apt-get install -y gcc-14 g++-14
65+
sudo apt-get install -y gnupg wget # Only needed in container.
66+
sudo apt-get install -y gcc-15 g++-15
5867
sudo apt-get install -y cmake
5968
sudo apt-get install -y hwloc libhwloc-dev
60-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
61-
sudo apt-add-repository -y 'deb https://apt.llvm.org/noble/ llvm-toolchain-noble-20 main'
69+
# tzdata is required by clang and has to be installed carefully to avoid user prompts stalling the script.
70+
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
71+
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends tzdata
6272
sudo apt-get install -y clang-20
6373
- run: |
6474
mkdir build
65-
pushd build
75+
cd build
6676
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
6777
make -j2 VERBOSE=1
68-
popd
6978
- run:
7079
command: |
71-
pushd build
80+
cd build
7281
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 2m make test VERBOSE=1
73-
popd
7482
no_output_timeout: 180s
7583

7684
arm_sanitizers:
@@ -81,8 +89,10 @@ jobs:
8189
type: string
8290
sanitizer:
8391
type: string
84-
machine:
85-
image: ubuntu-2404:edge
92+
#machine:
93+
# image: ubuntu-2504:edge
94+
docker:
95+
- image: ubuntu:25.04
8696
resource_class: arm.medium
8797
environment:
8898
CC: clang-20
@@ -94,25 +104,29 @@ jobs:
94104
ASAN_OPTIONS: "check_initialization_order=1"
95105
steps:
96106
- run: |
107+
apt-get update --quiet=2 || apt-get update --quiet=2 || apt-get update --quiet=2
108+
apt-get install -y sudo
109+
sudo apt-get install -y git # Updating and installing sudo and git is only neccesary in a container.
110+
# Installing sudo is just so that the later commands using sudo can be the same whether in a container or not.
97111
export REPO_HTTPS=`echo "$CIRCLE_REPOSITORY_URL" | sed "s|[email protected]:|https://github.com/|g"`
98112
git clone -b "$CIRCLE_BRANCH" "$REPO_HTTPS" . --depth=1
99113
- run: |
100-
sudo apt-add-repository -y universe
101-
sudo apt-get install -y gcc-14 g++-14
114+
sudo apt-get install -y gnupg wget # Only needed in container.
115+
sudo apt-get install -y gcc-15 g++-15
102116
sudo apt-get install -y cmake
103117
sudo apt-get install -y hwloc libhwloc-dev
104-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
105-
sudo apt-add-repository -y 'deb https://apt.llvm.org/noble/ llvm-toolchain-noble-20 main'
118+
# tzdata is required by clang and has to be installed carefully to avoid user prompts stalling the script.
119+
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
120+
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends tzdata
106121
sudo apt-get install -y clang-20
107122
- run: |
108123
mkdir build
109-
pushd build
124+
cd build
110125
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=<< parameters.scheduler >> -DQTHREADS_TOPOLOGY=<< parameters.topology >> ..
111126
make -j2 VERBOSE=1
112-
popd
113127
- run:
114128
command: |
115-
pushd build
129+
cd build
116130
if [[ "<< parameters.sanitizer >>" == "thread" ]]; then cd test/basics; fi
117131
CTEST_OUTPUT_ON_FAILURE=1 timeout --foreground -k 10s 4m make test VERBOSE=1
118132
no_output_timeout: 180s
@@ -190,13 +204,13 @@ jobs:
190204
if [ ${MACHINE_TYPE} == 'x86_64' ]; then echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list; fi
191205
if [ ${MACHINE_TYPE} == 'aarch64' ]; then echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/arm64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list; fi
192206
sudo apt-get update -y
193-
sudo apt-get install -y nvhpc-24-9
207+
sudo apt-get install -y nvhpc-25-3
194208
sudo apt-get install -y cmake
195209
sudo apt-get install -y hwloc libhwloc-dev
196210
- run: |
197211
export MACHINE_TYPE=`uname -m`
198-
if [ ${MACHINE_TYPE} == 'x86_64' ]; then export PATH="$PATH:/opt/nvidia/hpc_sdk/Linux_x86_64/24.9/compilers/bin"; fi
199-
if [ ${MACHINE_TYPE} == 'aarch64' ]; then export PATH="$PATH:/opt/nvidia/hpc_sdk/Linux_aarch64/24.9/compilers/bin"; fi
212+
if [ ${MACHINE_TYPE} == 'x86_64' ]; then export PATH="$PATH:/opt/nvidia/hpc_sdk/Linux_x86_64/25.3/compilers/bin"; fi
213+
if [ ${MACHINE_TYPE} == 'aarch64' ]; then export PATH="$PATH:/opt/nvidia/hpc_sdk/Linux_aarch64/25.3/compilers/bin"; fi
200214
nvc --version
201215
mkdir build
202216
pushd build

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ freebsd_task:
7474
7575
arm_linux_task:
7676
arm_container:
77-
image: gcc:14-bookworm
77+
image: gcc:15-bookworm
7878
timeout_in: 5m
7979
matrix:
8080
env:
@@ -109,7 +109,7 @@ arm_linux_task:
109109
110110
arm_linux_clang_task:
111111
arm_container:
112-
image: gcc:14-bookworm
112+
image: gcc:15-bookworm
113113
timeout_in: 5m
114114
matrix:
115115
env:

.github/workflows/CI.yml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
continue-on-error: true
1515
strategy:
1616
matrix:
17-
gcc_version: [9, 10, 11, 12, 13]
17+
gcc_version: [9, 10, 11, 12, 13, 14]
1818
scheduler: [nemesis, sherwood, distrib]
1919
topology: [hwloc, binders, no]
2020
env:
@@ -113,7 +113,7 @@ jobs:
113113
run: |
114114
wget -O - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add - && break || sleep 1
115115
sudo apt-add-repository 'deb https://apt.repos.intel.com/oneapi all main' && break || sleep 1
116-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2024.2
116+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2025.1
117117
source /opt/intel/oneapi/setvars.sh
118118
icx -v
119119
- name: build qthreads
@@ -197,7 +197,7 @@ jobs:
197197
sudo apt-get install gcc-13 g++-13
198198
- name: install aocc
199199
run: |
200-
wget -nv -O aocc.deb https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0_1_amd64.deb
200+
wget -nv -O aocc.deb https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0_1_amd64.deb
201201
sudo apt install -y ./aocc.deb
202202
clang -v
203203
- name: build qthreads
@@ -259,6 +259,7 @@ jobs:
259259

260260
sanitizers:
261261
runs-on: ubuntu-24.04
262+
container: ubuntu:25.04
262263
continue-on-error: true
263264
strategy:
264265
matrix:
@@ -291,35 +292,39 @@ jobs:
291292
- uses: actions/checkout@v4
292293
- if: ${{ ! matrix.use_libcxx }}
293294
run: |
294-
sudo apt-get install gcc-14 g++-14
295+
apt-get update
296+
apt-get install -y sudo # Updating and installing sudo is only neccesary in a container.
297+
# Installing sudo is just so that the later commands using sudo can be the same whether in a container or not.
298+
sudo apt-get install -y gcc-15 g++-15
299+
sudo apt-get install -y cmake # Only needed in a container. Cmake is installed by default on VM images.
295300
- name: install compiler
296301
run: |
302+
sudo apt-get install -y software-properties-common # Only needed in container.
297303
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
298-
sudo apt-add-repository 'deb https://apt.llvm.org/noble/ llvm-toolchain-noble-20 main' && break || sleep 1
299-
sudo apt-get install clang-20
304+
sudo apt-add-repository 'deb https://apt.llvm.org/oracular/ llvm-toolchain-oracular-20 main' && break || sleep 1
305+
sudo apt-get install -y clang-20
300306
- if: ${{ matrix.use_libcxx }}
301-
run: sudo apt-get install libc++-20-dev libc++abi-20-dev
307+
run: sudo apt-get install -y libc++-20-dev libc++abi-20-dev
302308
- if: ${{ matrix.topology != 'no' }}
303309
run: |
304-
sudo apt-get install hwloc libhwloc-dev
310+
sudo apt-get install -y hwloc libhwloc-dev
305311
hwloc-ls --version
306312
- name: build qthreads
307313
run: |
308314
mkdir build
309-
pushd build
315+
cd build
310316
cmake -DCMAKE_BUILD_TYPE=Release -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} ..
311317
make -j2 VERBOSE=1
312-
popd
313318
- name: run tests
314319
run: |
315-
pushd build
316-
if [[ "${{ matrix.sanitizer }}" == "thread" ]]; then cd test/basics; fi
320+
cd build
321+
if [ "${{ matrix.sanitizer }}" = "thread" ]; then cd test/basics; fi
317322
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 18m make test VERBOSE=1
318-
popd
319323
timeout-minutes: 19
320324

321325
linux-thorough:
322326
runs-on: ubuntu-24.04
327+
container: ubuntu:25.04
323328
continue-on-error: true
324329
strategy:
325330
matrix:
@@ -332,37 +337,40 @@ jobs:
332337
- compiler: gcc
333338
use_libcxx: true
334339
env:
335-
CC: ${{ matrix.compiler == 'gcc' && 'gcc-14' || 'clang-20' }}
336-
CXX: ${{ matrix.compiler == 'gcc' && 'g++-14' || 'clang++-20' }}
340+
CC: ${{ matrix.compiler == 'gcc' && 'gcc-15' || 'clang-20' }}
341+
CXX: ${{ matrix.compiler == 'gcc' && 'g++-15' || 'clang++-20' }}
337342
CXXFLAGS: ${{ matrix.use_libcxx && '-stdlib=libc++' || '' }}
338343
QTHREADS_ENABLE_ASSERTS: ${{ matrix.use_asserts && '--enable-asserts' || '' }}
339344
steps:
340345
- uses: actions/checkout@v4
341346
- run: |
342-
sudo apt-get install gcc-14 g++-14
347+
apt-get update
348+
apt-get install -y sudo # Updating and installing sudo is only neccesary in a container.
349+
# Installing sudo is just so that the later commands using sudo can be the same whether in a container or not.
350+
sudo apt-get install -y gcc-15 g++-15
351+
sudo apt-get install -y cmake # Only needed in a container. Cmake is installed by default on VM images.
343352
- if: ${{ matrix.compiler == 'clang' }}
344353
run: |
354+
sudo apt-get install -y software-properties-common # Only needed in container.
345355
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && break || sleep 1
346-
sudo apt-add-repository 'deb https://apt.llvm.org/noble/ llvm-toolchain-noble-20 main' && break || sleep 1
347-
sudo apt-get install clang-20
356+
sudo apt-add-repository 'deb https://apt.llvm.org/oracular/ llvm-toolchain-oracular-20 main' && break || sleep 1
357+
sudo apt-get install -y clang-20
348358
- if: ${{ matrix.use_libcxx }}
349-
run: sudo apt-get install libc++-20-dev libc++abi-20-dev
359+
run: sudo apt-get install -y libc++-20-dev libc++abi-20-dev
350360
- if: ${{ matrix.topology != 'no' }}
351361
run: |
352-
sudo apt-get install hwloc libhwloc-dev
362+
sudo apt-get install -y hwloc libhwloc-dev
353363
hwloc-ls --version
354364
- name: build qthreads
355365
run: |
356366
mkdir build
357-
pushd build
367+
cd build
358368
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DQTHREADS_SCHEDULER=${{ matrix.scheduler }} -DQTHREADS_TOPOLOGY=${{ matrix.topology }} ..
359369
make -j2 VERBOSE=1
360-
popd
361370
- name: run tests
362371
run: |
363-
pushd build
372+
cd build
364373
CTEST_OUTPUT_ON_FAILURE=1 timeout -k 10s --foreground 18m make test VERBOSE=1
365-
popd
366374
timeout-minutes: 19
367375

368376
clang-format:

src/ds/qlfqueue.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,16 @@ API_FUNC int qlfqueue_enqueue(qlfqueue_t *q, void *elem) {
100100

101101
next = tail->next;
102102
if (next != NULL) { /* tail not pointing to last node */
103-
(void)qthread_cas_ptr((void **)&(q->tail), (void *)tail, next);
103+
atomic_store_explicit(
104+
(void *_Atomic *)&q->tail, next, memory_order_relaxed);
104105
continue;
105106
}
106107
/* tail must be pointing to the last node */
107108
if (qthread_cas_ptr((void **)&(tail->next), (void *)next, node) == next) {
108109
break; /* success! */
109110
}
110111
}
111-
(void)qthread_cas_ptr((void **)&(q->tail), (void *)tail, node);
112+
atomic_store_explicit((void *_Atomic *)&q->tail, node, memory_order_relaxed);
112113
hazardous_ptr(0,
113114
NULL); // release the ptr (avoid hazardptr resource exhaustion)
114115
return QTHREAD_SUCCESS;
@@ -139,7 +140,8 @@ API_FUNC void *qlfqueue_dequeue(qlfqueue_t *q) {
139140
if (next_ptr == NULL) { return NULL; } /* queue is empty */
140141
if (head == tail) { /* tail is falling behind! */
141142
/* advance tail ptr... */
142-
(void)qthread_cas_ptr((void **)&(q->tail), (void *)tail, next_ptr);
143+
atomic_store_explicit(
144+
(void *_Atomic *)&q->tail, next_ptr, memory_order_relaxed);
143145
continue;
144146
}
145147
/* read value before CAS, otherwise another dequeue might free the next node

src/qthread.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,8 @@ void API_FUNC qthread_finalize(void) {
999999
qt_threadqueue_enqueue(qlib->shepherds[i].ready, t);
10001000
if (!atomic_load_explicit(&qlib->shepherds[i].workers[j].active,
10011001
memory_order_relaxed)) {
1002-
(void)QT_CAS(qlib->shepherds[i].workers[j].active, 0, 1);
1002+
atomic_store_explicit(
1003+
&qlib->shepherds[i].workers[j].active, 1, memory_order_relaxed);
10031004
}
10041005
}
10051006
}

src/shepherds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int API_FUNC qthread_disable_shepherd(qthread_shepherd_id_t const shep) {
155155
}
156156
qthread_internal_incr(
157157
&(qlib->nshepherds_active), &(qlib->nshepherds_active_lock), (aligned_t)-1);
158-
(void)QT_CAS(qlib->shepherds[shep].active, 1, 0);
158+
atomic_store_explicit(&qlib->shepherds[shep].active, 0, memory_order_relaxed);
159159
return QTHREAD_SUCCESS;
160160
}
161161

@@ -164,7 +164,7 @@ void API_FUNC qthread_enable_shepherd(qthread_shepherd_id_t const shep) {
164164
assert(shep < qlib->nshepherds);
165165
qthread_internal_incr(
166166
&(qlib->nshepherds_active), &(qlib->nshepherds_active_lock), 1);
167-
(void)QT_CAS(qlib->shepherds[shep].active, 0, 1);
167+
atomic_store_explicit(&qlib->shepherds[shep].active, 1, memory_order_relaxed);
168168
}
169169

170170
/***************************************************************************

src/workers.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ int API_FUNC qthread_disable_worker(qthread_worker_id_t const w) {
3232
return QTHREAD_NOT_ALLOWED;
3333
}
3434

35-
(void)QT_CAS(qlib->shepherds[shep].workers[worker].active, 1, 0);
35+
atomic_store_explicit(
36+
&qlib->shepherds[shep].workers[worker].active, 0, memory_order_relaxed);
3637
qlib->nworkers_active--; // decrement active count
3738

3839
if (worker == 0) { qthread_disable_shepherd(shep); }
@@ -52,7 +53,8 @@ void API_FUNC qthread_enable_worker(qthread_worker_id_t const w) {
5253
if (worker < qlib->nworkerspershep) {
5354
qthread_internal_incr(
5455
&(qlib->nworkers_active), &(qlib->nworkers_active_lock), 1);
55-
(void)QT_CAS(qlib->shepherds[shep].workers[worker].active, 0, 1);
56+
atomic_store_explicit(
57+
&qlib->shepherds[shep].workers[worker].active, 1, memory_order_relaxed);
5658
}
5759
}
5860

0 commit comments

Comments
 (0)