Skip to content

Commit 57d71a4

Browse files
authored
Merge branch 'main' into dockersUMF
2 parents 19a6ead + c67d32e commit 57d71a4

File tree

11 files changed

+36
-34
lines changed

11 files changed

+36
-34
lines changed

.github/workflows/nightly.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ env:
1616

1717
jobs:
1818
fuzz-test:
19-
name: Fuzz test
2019
strategy:
2120
fail-fast: false
2221
matrix:
2322
build_type: [Debug, Release]
2423
compiler: [{c: clang, cxx: clang++}]
25-
24+
name: Fuzz test (ubuntu-latest, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}})
2625
runs-on: ubuntu-latest
2726

2827
steps:
@@ -59,22 +58,22 @@ jobs:
5958

6059
- name: Run regular tests
6160
working-directory: ${{github.workspace}}/build
62-
run: ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"
61+
run: ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz"
6362

6463
- name: Run regular tests with proxy library
6564
working-directory: ${{env.BUILD_DIR}}
66-
run: LD_PRELOAD=./lib/libumf_proxy.so ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"
65+
run: LD_PRELOAD=./lib/libumf_proxy.so ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz"
6766

6867
- name: Fuzz long test
6968
working-directory: ${{github.workspace}}/build
7069
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose -L "fuzz-long"
7170

7271
valgrind:
73-
name: Valgrind
7472
strategy:
7573
fail-fast: false
7674
matrix:
7775
tool: ['memcheck', 'drd', 'helgrind']
76+
name: Valgrind (${{matrix.tool}})
7877
runs-on: ubuntu-latest
7978

8079
steps:
@@ -108,7 +107,6 @@ jobs:
108107
run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
109108

110109
Windows-generators:
111-
name: Windows ${{matrix.generator}} generator
112110
strategy:
113111
matrix:
114112
build_type: [Debug, Release]
@@ -117,6 +115,7 @@ jobs:
117115
static_hwloc: ['ON', 'OFF']
118116
generator: ['Ninja', 'NMake Makefiles']
119117
umfd_lib: ['ON', 'OFF']
118+
name: Windows (generator=${{matrix.generator}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, build_type=${{matrix.build_type}}, shared_library=${{matrix.shared_library}}, static_hwloc=${{matrix.static_hwloc}}, umfd_lib=${{matrix.umfd_lib}})
120119

121120
runs-on: windows-latest
122121

@@ -201,7 +200,6 @@ jobs:
201200
${{ matrix.static_hwloc == 'ON' && '--hwloc' || '' }}
202201
203202
icx:
204-
name: ICX
205203
env:
206204
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
207205
strategy:
@@ -215,7 +213,7 @@ jobs:
215213
build_type: Release
216214
compiler: {c: icx, cxx: icx}
217215
shared_library: 'ON'
218-
216+
name: ICX (${{matrix.os}}, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, shared_library=${{matrix.shared_library}})
219217
runs-on: ${{matrix.os}}
220218

221219
steps:
@@ -288,7 +286,7 @@ jobs:
288286
# Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
289287
# The hwloc library is fetched implicitly
290288
hwloc-fallback:
291-
name: "Fallback to static hwloc build"
289+
292290
strategy:
293291
matrix:
294292
include:
@@ -298,7 +296,7 @@ jobs:
298296
- os: 'windows-latest'
299297
build_type: Release
300298
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'
301-
299+
name: "Fallback to static hwloc build (${{matrix.os}}), build_type=${{matrix.build_type}})"
302300
runs-on: ${{matrix.os}}
303301

304302
steps:

.github/workflows/reusable_basic.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ jobs:
230230
${{ matrix.shared_library == 'ON' && '--shared-library' || '' }}
231231
232232
windows-build:
233-
name: Windows
234233
env:
235234
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
236235
VCPKG_PATH_BIN: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows/bin;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows/bin;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows/bin"
@@ -268,7 +267,7 @@ jobs:
268267
level_zero_provider: 'OFF'
269268
cuda_provider: 'OFF'
270269
cmake_ver: 'default'
271-
270+
name: Basic (${{matrix.os}}, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, shared_library=${{matrix.shared_library}}, level_zero_provider=${{matrix.level_zero_provider}}, cuda_provider=${{matrix.cuda_provider}}, cmake_ver=${{matrix.cmake_ver}})
272271
runs-on: ${{matrix.os}}
273272

274273
steps:
@@ -507,15 +506,15 @@ jobs:
507506
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
508507

509508
macos-build:
510-
name: MacOS
511509
strategy:
512510
matrix:
513511
os: ['macos-13', 'macos-14']
514512
include:
515513
- os: macos-14
516-
static_hwloc: '-DUMF_LINK_HWLOC_STATICALLY=ON'
514+
static_hwloc: 'ON'
517515
env:
518516
BUILD_TYPE : "Release"
517+
name: Basic (${{matrix.os}}, static_hwloc=${{matrix.static_hwloc}})
519518
runs-on: ${{matrix.os}}
520519

521520
steps:
@@ -556,6 +555,7 @@ jobs:
556555
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
557556
-DUMF_BUILD_SHARED_LIBRARY=ON
558557
-DUMF_TESTS_FAIL_ON_SKIP=ON
558+
-DUMF_LINK_HWLOC_STATICALLY=${{matrix.static_hwloc}}
559559
${{matrix.static_hwloc}}
560560
561561
- name: Build UMF

.github/workflows/reusable_dax.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ env:
3535

3636
jobs:
3737
dax:
38-
name: Build
3938
# run only on upstream; forks may not have a DAX device
4039
if: github.repository == 'oneapi-src/unified-memory-framework'
4140
strategy:
4241
matrix:
4342
build_type: [Debug, Release]
4443
shared_library: ['ON', 'OFF']
45-
44+
name: DAX (ubuntu, build_type=${{matrix.build_type}}, shared_library=${{matrix.shared_library}})
4645
runs-on: ["DSS-DEVDAX", "DSS-Ubuntu"]
46+
4747
steps:
4848
- name: Check configuration of the DEVDAX
4949
run: |

.github/workflows/reusable_gpu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ env:
3636

3737
jobs:
3838
gpu:
39-
name: "${{matrix.os}}, ${{matrix.build_type}}, shared=${{matrix.shared_library}}"
4039
env:
4140
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows;"
4241
COVERAGE_NAME : "exports-coverage-${{inputs.provider}}-${{inputs.runner}}"
@@ -48,8 +47,9 @@ jobs:
4847
shared_library: ${{ fromJSON(inputs.shared_lib)}}
4948
os: ${{ fromJSON(inputs.os)}}
5049
build_type: ${{ fromJSON(inputs.build_type)}}
51-
50+
name: GPU (${{matrix.os}}, build_type=${{matrix.build_type}}, shared=${{matrix.shared_library}})
5251
runs-on: ["DSS-${{inputs.runner}}", "DSS-${{matrix.os}}"]
52+
5353
steps:
5454
# Set various build params based on OS
5555
- name: "[Win] Establish build params"

.github/workflows/reusable_multi_numa.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ env:
1414

1515
jobs:
1616
multi_numa:
17-
name: "${{matrix.os}}, ${{matrix.build_type}}, shared=${{matrix.shared_library}}"
1817
# run only on upstream; forks will not have the HW
1918
if: github.repository == 'oneapi-src/unified-memory-framework'
20-
2119
strategy:
2220
matrix:
2321
os: [ubuntu-22.04, rhel-9.1, sles-15]
2422
build_type: [Debug, Release]
2523
shared_library: ['ON', 'OFF']
24+
name: Multi NUMA (${{matrix.os}}, build_type=${{matrix.build_type}}, shared=${{matrix.shared_library}})
2625
runs-on: ["DSS-MULTI-NUMA", "DSS-${{matrix.os}}"]
2726

2827
steps:
@@ -57,12 +56,11 @@ jobs:
5756
# On RHEL/SLES, hwloc version is just a little too low.
5857
# Skip some tests until we upgrade hwloc and update CMake to properly handle local hwloc installation.
5958
# TODO: fix issue #560
60-
# TODO: add issue for -E test_init_teardown - it is not clear why it fails
6159
- name: Run tests (on RHEL/SLES)
6260
if: (matrix.os == 'rhel-9.1') || (matrix.os == 'sles-15')
6361
working-directory: ${{github.workspace}}/build
6462
run: |
65-
ctest --output-on-failure --test-dir test -E "test_provider_os_memory_multiple_numa_nodes|test_init_teardown"
63+
ctest --output-on-failure --test-dir test -E "test_provider_os_memory_multiple_numa_nodes"
6664
./test/test_provider_os_memory_multiple_numa_nodes \
6765
--gtest_filter="-*checkModeLocal/*:*checkModePreferredEmptyNodeset/*:testNuma.checkModeInterleave"
6866

.github/workflows/reusable_proxy_lib.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ env:
1414

1515
jobs:
1616
proxy-ubuntu:
17-
name: Ubuntu
18-
1917
strategy:
2018
matrix:
2119
build_type: [Release, Debug]
2220
compiler: [{c: gcc, cxx: g++}]
2321
proxy_lib_pool: ['SCALABLE', 'JEMALLOC']
22+
name: Proxy Library (ubuntu-22.04, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, proxy_lib_pool=${{matrix.proxy_lib_pool}})
2423
runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-22.04' }}
2524

2625
steps:

.github/workflows/reusable_qemu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ permissions:
1818

1919
jobs:
2020
qemu-build:
21-
name: QEMU
2221
strategy:
2322
matrix:
2423
os: ${{ fromJson(inputs.os) }}
24+
name: QEMU (${{ matrix.os }})
2525

2626
# Host QEMU on any Linux platform
2727
runs-on: ubuntu-22.04

.github/workflows/reusable_sanitizers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ permissions:
1212

1313
jobs:
1414
ubuntu-build:
15-
name: Ubuntu
1615
strategy:
1716
matrix:
1817
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}, {c: icx, cxx: icpx}]
1918
# TSAN is mutually exclusive with other sanitizers
2019
sanitizers: [{asan: ON, ubsan: ON, tsan: OFF}, {asan: OFF, ubsan: OFF, tsan: ON}]
20+
name: Sanitizers (ubuntu-22.04, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, asan=${{matrix.sanitizers.asan}}, ubsan=${{matrix.sanitizers.ubsan}}, tsan=${{matrix.sanitizers.tsan}})
2121
runs-on: ubuntu-22.04
2222

2323
steps:
@@ -75,14 +75,14 @@ jobs:
7575
ctest --output-on-failure
7676
7777
windows-build:
78-
name: cl and clang-cl on Windows
7978
env:
8079
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
8180
strategy:
8281
matrix:
8382
compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}]
8483
# Only ASAN is supported
8584
sanitizers: [{asan: ON}]
85+
name: Sanitizers (windows-2022, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, asan=${{matrix.sanitizers.asan}})
8686
runs-on: windows-2022
8787

8888
steps:

src/base_alloc/base_alloc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,14 @@ void umf_ba_destroy(umf_ba_pool_t *pool) {
304304
#ifndef NDEBUG
305305
ba_debug_checks(pool);
306306
if (pool->metadata.n_allocs) {
307-
LOG_ERR("number of base allocator memory leaks: %zu",
308-
pool->metadata.n_allocs);
309-
310307
#ifdef UMF_DEVELOPER_MODE
308+
LOG_FATAL("number of base allocator memory leaks: %zu",
309+
pool->metadata.n_allocs);
311310
assert(pool->metadata.n_allocs == 0 &&
312311
"memory leaks in base allocator occurred");
312+
#else
313+
LOG_ERR("number of base allocator memory leaks: %zu",
314+
pool->metadata.n_allocs);
313315
#endif
314316
}
315317
#endif /* NDEBUG */

src/base_alloc/base_alloc_global.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct base_alloc_t {
4141
static struct base_alloc_t BASE_ALLOC = {.ac_sizes = ALLOCATION_CLASSES};
4242

4343
void umf_ba_destroy_global(void) {
44+
LOG_DEBUG("destroying global base allocator");
4445
ba_is_destroyed = true;
4546

4647
for (int i = 0; i < NUM_ALLOCATION_CLASSES; i++) {
@@ -73,7 +74,8 @@ static void umf_ba_create_global(void) {
7374
size_t smallestSize = BASE_ALLOC.ac_sizes[0];
7475
BASE_ALLOC.smallest_ac_size_log2 = utils_msb64(smallestSize);
7576

76-
LOG_DEBUG("UMF base allocator created");
77+
LOG_DEBUG("global base allocator created");
78+
ba_is_destroyed = false;
7779
}
7880

7981
// returns index of the allocation class for a given size

0 commit comments

Comments
 (0)