Skip to content

Commit 72758ed

Browse files
committed
set custom name for hwloc lib
1 parent 19c67d1 commit 72758ed

File tree

10 files changed

+121
-207
lines changed

10 files changed

+121
-207
lines changed

.github/workflows/basic.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,49 @@ jobs:
348348
-DUMF_TESTS_FAIL_ON_SKIP=ON
349349
-DUMF_LINK_HWLOC_STATICALLY=ON
350350
351+
- name: Build UMF
352+
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS -v
353+
354+
- name: Run tests
355+
working-directory: ${{env.BUILD_DIR}}
356+
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
357+
358+
windows-dynamic_mingw_hwloc:
359+
name: "Windows dynamic UMF + mingw libhwloc"
360+
strategy:
361+
matrix:
362+
build_type: [Release]
363+
364+
runs-on: 'windows-2022'
365+
366+
steps:
367+
- name: Checkout
368+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
369+
with:
370+
fetch-depth: 0
371+
372+
- name: Get hwloc from offitial repo (mingw version)
373+
run: |
374+
curl https://download.open-mpi.org/release/hwloc/v2.10/hwloc-win64-build-2.10.0.zip -o ${{github.workspace}}\hwloc-win64-build-2.10.0.zip
375+
Expand-Archive ${{github.workspace}}\hwloc-win64-build-2.10.0.zip -DestinationPath ${{github.workspace}}
376+
377+
- name: Get TBB from github
378+
run: |
379+
curl https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-win.zip -o ${{github.workspace}}\oneapi-tbb-2021.12.0-win.zip
380+
Expand-Archive ${{github.workspace}}\oneapi-tbb-2021.12.0-win.zip -DestinationPath ${{github.workspace}}
381+
382+
- name: Configure build
383+
run: >
384+
cmake
385+
-B ${{env.BUILD_DIR}}
386+
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}};${{github.workspace}}\hwloc-win64-build-2.10.0;${{github.workspace}}\oneapi-tbb-2021.12.0"
387+
-DUMF_BUILD_SHARED_LIBRARY=ON
388+
-DUMF_BUILD_EXAMPLES=ON
389+
-DUMF_FORMAT_CODE_STYLE=ON
390+
-DUMF_DEVELOPER_MODE=ON
391+
-DUMF_TESTS_FAIL_ON_SKIP=ON
392+
-DUMF_HWLOC_NAME=libhwloc
393+
351394
- name: Build UMF
352395
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
353396

.github/workflows/fast.yml

Lines changed: 21 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -11,141 +11,45 @@ env:
1111
INSTL_DIR : "${{github.workspace}}/../install-dir"
1212

1313
jobs:
14-
FastBuild:
15-
name: Fast builds
16-
env:
17-
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"
14+
windows-dynamic_mingw_hwloc:
15+
name: "Windows dynamic UMF + mingw libhwloc"
1816
strategy:
1917
matrix:
20-
include:
21-
- os: windows-latest
22-
disjoint: 'OFF'
23-
build_tests: 'ON'
24-
simple_cmake: 'OFF'
25-
# pure C build (Windows)
26-
- os: windows-latest
27-
disjoint: 'OFF'
28-
# Tests' building is off for a pure C build
29-
build_tests: 'OFF'
30-
simple_cmake: 'OFF'
31-
- os: ubuntu-latest
32-
disjoint: 'ON'
33-
build_tests: 'ON'
34-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
35-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
36-
simple_cmake: 'OFF'
37-
# pure C build (Linux)
38-
- os: ubuntu-latest
39-
disjoint: 'OFF'
40-
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
41-
# Tests' building is off for a pure C build
42-
build_tests: 'OFF'
43-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
44-
simple_cmake: 'OFF'
45-
# simplest CMake on ubuntu-latest
46-
- os: ubuntu-latest
47-
disjoint: 'OFF'
48-
build_tests: 'ON'
49-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
50-
simple_cmake: 'ON'
51-
# simplest CMake ubuntu-20.04
52-
- os: ubuntu-20.04
53-
disjoint: 'OFF'
54-
build_tests: 'ON'
55-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
56-
simple_cmake: 'ON'
57-
runs-on: ${{ (matrix.os == 'ubuntu-latest' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }}
18+
build_type: [Release]
19+
20+
runs-on: 'windows-2022'
5821

5922
steps:
60-
- name: Checkout repository
23+
- name: Checkout
6124
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6225
with:
6326
fetch-depth: 0
6427

65-
- name: Initialize vcpkg
66-
if: matrix.os == 'windows-latest'
67-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
68-
with:
69-
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
70-
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
71-
vcpkgJsonGlob: '**/vcpkg.json'
72-
73-
- name: Install dependencies
74-
if: matrix.os == 'windows-latest'
75-
run: vcpkg install
76-
shell: pwsh # Specifies PowerShell as the shell for running the script.
77-
78-
- name: Install apt packages (ubuntu-latest)
79-
if: matrix.os == 'ubuntu-latest'
28+
- name: Get hwloc from offitial repo (mingw version)
8029
run: |
81-
sudo apt-get update
82-
sudo apt-get install -y cmake libjemalloc-dev libhwloc-dev libnuma-dev libtbb-dev
30+
curl https://download.open-mpi.org/release/hwloc/v2.10/hwloc-win64-build-2.10.0.zip -o ${{github.workspace}}\hwloc-win64-build-2.10.0.zip
31+
Expand-Archive ${{github.workspace}}\hwloc-win64-build-2.10.0.zip -DestinationPath ${{github.workspace}}
8332
84-
- name: Install apt packages (ubuntu-20.04)
85-
if: matrix.os == 'ubuntu-20.04'
33+
- name: Get TBB from github
8634
run: |
87-
sudo apt-get update
88-
sudo apt-get install -y cmake libjemalloc-dev libnuma-dev libtbb-dev
89-
.github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package
90-
91-
- name: Set ptrace value for IPC test (on Linux only)
92-
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }}
93-
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
35+
curl https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-win.zip -o ${{github.workspace}}\oneapi-tbb-2021.12.0-win.zip
36+
Expand-Archive ${{github.workspace}}\oneapi-tbb-2021.12.0-win.zip -DestinationPath ${{github.workspace}}
9437
95-
- name: Configure CMake
96-
if: matrix.simple_cmake == 'OFF'
38+
- name: Configure build
9739
run: >
9840
cmake
9941
-B ${{env.BUILD_DIR}}
100-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
101-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
102-
-DUMF_FORMAT_CODE_STYLE=OFF
103-
-DUMF_DEVELOPER_MODE=ON
104-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
105-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
106-
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
107-
-DUMF_BUILD_EXAMPLES=ON
108-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
109-
-DUMF_TESTS_FAIL_ON_SKIP=ON
110-
-DUMF_BUILD_SHARED_LIBRARY=ON
111-
${{matrix.extra_build_options}}
112-
113-
- name: Configure CMake (simple)
114-
if: matrix.simple_cmake == 'ON'
115-
run: >
116-
cmake
117-
-B ${{env.BUILD_DIR}}
118-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
42+
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}};${{github.workspace}}\hwloc-win64-build-2.10.0;${{github.workspace}}\oneapi-tbb-2021.12.0"
11943
-DUMF_BUILD_SHARED_LIBRARY=ON
44+
-DUMF_BUILD_EXAMPLES=ON
45+
-DUMF_FORMAT_CODE_STYLE=ON
46+
-DUMF_DEVELOPER_MODE=ON
12047
-DUMF_TESTS_FAIL_ON_SKIP=ON
121-
${{matrix.extra_build_options}}
122-
123-
- name: Build
124-
run: cmake --build ${{env.BUILD_DIR}} --config Release -j
48+
-DUMF_HWLOC_NAME=libhwloc
12549
126-
- name: Run examples
127-
working-directory: ${{env.BUILD_DIR}}
128-
run: ctest --output-on-failure --test-dir examples -C Release
50+
- name: Build UMF
51+
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
12952

13053
- name: Run tests
131-
if: matrix.build_tests == 'ON'
13254
working-directory: ${{env.BUILD_DIR}}
133-
run: ctest --output-on-failure --test-dir test -C Release
134-
135-
- name: check /DEPENDENTLOADFLAG (Windows only)
136-
if: matrix.os == 'windows-latest'
137-
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/Release/umf.dll
138-
shell: pwsh
139-
140-
- name: check /DEPENDENTLOADFLAG in umf_proxy.dll
141-
if: matrix.os == 'windows-latest'
142-
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/src/proxy_lib/Release/umf_proxy.dll
143-
shell: pwsh
144-
145-
# TODO: We could add some script to verify metadata of dll's (selected fields, perhaps)
146-
# ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details
147-
- name: Print metadata of our dll's
148-
if: matrix.os == 'windows-latest'
149-
run: |
150-
get-command ${{github.workspace}}/build/bin/Release/umf.dll | format-list
151-
get-command ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll | format-list
55+
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test

.github/workflows/pr_push.yml

Lines changed: 42 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -14,95 +14,58 @@ concurrency:
1414
permissions:
1515
contents: read
1616

17+
env:
18+
BUILD_DIR : "${{github.workspace}}/build"
19+
INSTL_DIR : "${{github.workspace}}/../install-dir"
20+
1721
jobs:
18-
CodeStyle:
19-
name: Coding style
20-
runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }}
2122

22-
steps:
23-
- name: Checkout repository
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25-
with:
26-
fetch-depth: 0
23+
windows-dynamic_mingw_hwloc:
24+
env:
25+
HWLOC_PACKAGE_NAME: hwloc-win64-build-2.10.0
26+
TBB_PACKAGE_NAME: oneapi-tbb-2021.12.0
27+
TBB_LIB_DIR: lib\intel64\vc14
28+
TBB_BIN_DIR: redist\intel64\vc14
2729

28-
- name: Install apt packages
29-
run: |
30-
sudo apt-get update
31-
sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev
30+
name: "Windows dynamic UMF + mingw libhwloc"
31+
strategy:
32+
matrix:
33+
build_type: [Release]
3234

33-
- name: Configure CMake
34-
run: >
35-
cmake
36-
-B ${{github.workspace}}/build
37-
-DUMF_FORMAT_CODE_STYLE=ON
38-
-DUMF_BUILD_TESTS=OFF
39-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
40-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=OFF
41-
42-
- name: Check C/C++ formatting
43-
run: cmake --build build --target clang-format-check
44-
45-
- name: Check CMake formatting
46-
run: |
47-
cmake --build build --target cmake-format-apply
48-
git diff --exit-code
49-
50-
- name: Check Python formatting
51-
run: cmake --build build --target black-format-check
52-
53-
DocsBuild:
54-
name: Build docs
55-
runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }}
35+
runs-on: 'windows-2022'
5636

5737
steps:
58-
- name: Checkout repository
38+
- name: Checkout
5939
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6040
with:
6141
fetch-depth: 0
6242

63-
- name: Install doxygen
43+
- name: Get hwloc from official repo (mingw version)
6444
run: |
65-
sudo apt-get update
66-
sudo apt-get install -y doxygen
67-
68-
- name: Install pip requirements
69-
run: python3 -m pip install -r third_party/requirements.txt
45+
Invoke-WebRequest -Uri https://download.open-mpi.org/release/hwloc/v2.10/${{env.HWLOC_PACKAGE_NAME}}.zip -OutFile ${{github.workspace}}\${{env.HWLOC_PACKAGE_NAME}}.zip -TimeoutSec 360
46+
Expand-Archive ${{github.workspace}}\${{env.HWLOC_PACKAGE_NAME}}.zip -DestinationPath ${{github.workspace}}
7047
71-
- name: Setup PATH for python
72-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
73-
74-
- name: Build the documentation
75-
working-directory: scripts
76-
run: python3 generate_docs.py
48+
- name: Get TBB from github
49+
run: |
50+
Invoke-WebRequest -Uri https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/${{env.TBB_PACKAGE_NAME}}-win.zip -OutFile "${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}-win.zip" -TimeoutSec 360
51+
Expand-Archive "${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}-win.zip" -DestinationPath ${{github.workspace}}
7752
78-
Spellcheck:
79-
uses: ./.github/workflows/spellcheck.yml
80-
FastBuild:
81-
name: Fast builds
82-
needs: [Spellcheck, CodeStyle]
83-
uses: ./.github/workflows/fast.yml
84-
Build:
85-
name: Basic builds
86-
needs: [FastBuild]
87-
uses: ./.github/workflows/basic.yml
88-
Sanitizers:
89-
needs: [FastBuild]
90-
uses: ./.github/workflows/sanitizers.yml
91-
Qemu:
92-
needs: [FastBuild]
93-
uses: ./.github/workflows/qemu.yml
94-
Benchmarks:
95-
needs: [Build]
96-
uses: ./.github/workflows/benchmarks.yml
97-
ProxyLib:
98-
needs: [Build]
99-
uses: ./.github/workflows/proxy_lib.yml
100-
GPU:
101-
needs: [Build]
102-
uses: ./.github/workflows/gpu.yml
103-
Valgrind:
104-
needs: [Build]
105-
uses: ./.github/workflows/valgrind.yml
106-
MultiNuma:
107-
needs: [Build]
108-
uses: ./.github/workflows/multi_numa.yml
53+
- name: Configure build
54+
run: >
55+
cmake
56+
-B ${{env.BUILD_DIR}}
57+
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
58+
-DCMAKE_PREFIX_PATH="${{github.workspace}}\${{env.HWLOC_PACKAGE_NAME}};${{github.workspace}}\${{env.TBB_PACKAGE_NAME}};${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}\${{env.TBB_LIB_DIR}};${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}\${{env.TBB_BIN_DIR}}"
59+
-DUMF_BUILD_SHARED_LIBRARY=ON
60+
-DUMF_BUILD_EXAMPLES=ON
61+
-DUMF_FORMAT_CODE_STYLE=OFF
62+
-DUMF_DEVELOPER_MODE=ON
63+
-DUMF_TESTS_FAIL_ON_SKIP=ON
64+
-DUMF_HWLOC_NAME=libhwloc
65+
66+
- name: Build UMF
67+
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
68+
69+
- name: Run tests
70+
working-directory: ${{env.BUILD_DIR}}
71+
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ option(
5959
option(UMF_FORMAT_CODE_STYLE
6060
"Add clang, cmake, and black -format-check and -format-apply targets"
6161
OFF)
62+
set(UMF_HWLOC_NAME
63+
"hwloc"
64+
CACHE STRING "Custom name for hwloc library w/o extension")
65+
6266
# Only a part of skips is treated as a failure now. TODO: extend to all tests
6367
option(UMF_TESTS_FAIL_ON_SKIP "Treat skips in tests as fail" OFF)
6468
option(UMF_USE_ASAN "Enable AddressSanitizer checks" OFF)
@@ -120,7 +124,7 @@ else()
120124

121125
# add PATH to DLL on Windows
122126
set(DLL_PATH_LIST
123-
"${DLL_PATH_LIST};PATH=path_list_append:${LIBHWLOC_LIBRARY_DIRS}/../bin"
127+
"${DLL_PATH_LIST};PATH=path_list_append:${LIBHWLOC_DLL_DIRS}"
124128
)
125129
elseif(WINDOWS)
126130
include(FetchContent)
@@ -322,7 +326,7 @@ endif()
322326
if(TBB_FOUND OR TBB_LIBRARY_DIRS)
323327
# add PATH to DLL on Windows
324328
set(DLL_PATH_LIST
325-
"${DLL_PATH_LIST};PATH=path_list_append:${TBB_LIBRARY_DIRS}/../bin")
329+
"${DLL_PATH_LIST};PATH=path_list_append:${TBB_DLL_DIRS}")
326330
set(UMF_POOL_SCALABLE_ENABLED TRUE)
327331
else()
328332
message(
@@ -339,7 +343,7 @@ if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
339343
endif()
340344
# add PATH to DLL on Windows
341345
set(DLL_PATH_LIST
342-
"${DLL_PATH_LIST};PATH=path_list_append:${JEMALLOC_LIBRARY_DIRS}/../bin"
346+
"${DLL_PATH_LIST};PATH=path_list_append:${JEMALLOC_DLL_DIRS}"
343347
)
344348
endif()
345349

cmake/FindJEMALLOC.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ else()
2828
endif()
2929

3030
if(WINDOWS)
31-
find_file(JEMALLOC_DLL NAMES "bin/jemalloc.dll")
31+
find_file(JEMALLOC_DLL NAMES "bin/jemalloc.dll" "jemalloc.dll")
3232
get_filename_component(JEMALLOC_DLL_DIR ${JEMALLOC_DLL} DIRECTORY)
3333
set(JEMALLOC_DLL_DIRS ${JEMALLOC_DLL_DIR})
3434
endif()

0 commit comments

Comments
 (0)