Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb49d865

Browse files
authored
Merge pull request#299 from LLNL/release/v0.27
Release/v0.27
2 parentse98ff94 +2b4e766 commitb49d865

File tree

44 files changed

+1659
-833
lines changed

Some content is hidden

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

44 files changed

+1659
-833
lines changed

‎.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ install_boost:
3737
script:
3838
-echo "=== build section ==="
3939
-module load gcc/${GCC_VERSION}
40-
-spack load boost@${BOOST_VERSION} arch=$(spack arch)
40+
-spack load--firstboost@${BOOST_VERSION} arch=$(spack arch)
4141
-export METALL_TEST_DIR="/dev/shm/metall_test-${CI_CONCURRENT_ID}-${CI_PIPELINE_IID}"
4242
-srun -N1 -ppdebug bash ./scripts/CI/build_and_test.sh
4343

‎CMakeLists.txt

Lines changed: 20 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION3.10)
1+
cmake_minimum_required(VERSION3.12)
22
list(APPENDCMAKE_MODULE_PATH"${CMAKE_CURRENT_SOURCE_DIR}/cmake")
33
include(FetchContent)
44

@@ -17,7 +17,7 @@ endif()
1717
# Metall general configuration
1818
# -------------------------------------------------------------------------------- #
1919
project(Metall
20-
VERSION0.26
20+
VERSION0.27
2121
DESCRIPTION"A persistent memory allocator for data-centric analytics"
2222
HOMEPAGE_URL"https://github.com/LLNL/metall")
2323

@@ -82,33 +82,20 @@ option(JUST_INSTALL_METALL_HEADER "Just install Metall header files (do not buil
8282
option(BUILD_UTILITY"Build utility programs"OFF)
8383
option(BUILD_DOC"Build API documentation"OFF)
8484
option(BUILD_C"Build C examples and libraries"OFF)
85-
option(VERBOSE_SYSTEM_SUPPORT_WARNING"Show compile time warning regarding system support"OFF)
86-
option(DISABLE_FREE_FILE_SPACE"Disable freeing file space"OFF)
87-
option(DISABLE_SMALL_OBJECT_CACHE"Disable small object cache"OFF)
8885
option(BUILD_EXAMPLE"Build the examples"OFF)
89-
option(BUILD_BENCH"Build the benchmark"OFF)
9086
option(BUILD_TEST"Build the test"OFF)
9187
option(RUN_LARGE_SCALE_TEST"Run large scale tests"OFF)
9288
option(RUN_BUILD_AND_TEST_WITH_CI"Perform build and basic test with CI"OFF)
93-
option(BUILD_VERIFICATION"Build verification directory"OFF)
94-
option(USE_SORTED_BIN"Use VM space aware algorithm in the bin directory"OFF)
95-
96-
set(DEFAULT_VM_RESERVE_SIZE"0"CACHESTRING
97-
"Set the default VM reserve size (use the internally defined value if 0 is specified)")
98-
set(MAX_SEGMENT_SIZE"0"CACHESTRING
99-
"Set the max segment size (use the internally defined value if 0 is specified)")
100-
set(INITIAL_SEGMENT_SIZE"0"CACHESTRING
101-
"Set the initial segment size (use the internally defined value if 0 is specified)")
89+
option(BUILD_BENCH"Build the benchmark"OFF)
90+
option(BUILD_VERIFICATION"Build verification programs"OFF)
91+
set(COMPILER_DEFS""CACHESTRING"A list of Metall compile definitions to be added to all targets")
10292

10393
# ---------- Experimental options ---------- #
104-
option(USE_ANONYMOUS_NEW_MAP"Use the anonymous map when creating a new map region"OFF)
10594
set(UMAP_ROOT""CACHEPATH"UMap installed root directory")
10695

10796
option(ONLY_DOWNLOAD_GTEST"Only downloading Google Test"OFF)
10897
option(SKIP_DOWNLOAD_GTEST"Skip downloading Google Test"OFF)
10998
option(BUILD_NUMA"Build programs that require the NUMA policy library (numa.h)"OFF)
110-
set(FREE_SMALL_OBJECT_SIZE_HINT"0"CACHESTRING
111-
"Try to free the associated pages and file space when objects equal to or larger than that is deallocated")
11299

113100
# -------------------------------------------------------------------------------- #
114101

@@ -153,63 +140,6 @@ endif ()
153140
# -------------------------------------------------------------------------------- #
154141
# Executables
155142
# -------------------------------------------------------------------------------- #
156-
if (NOTCMAKE_BUILD_TYPE)
157-
set(CMAKE_BUILD_TYPERelease)
158-
message(STATUS"CMAKE_BUILD_TYPE is set as Release")
159-
endif ()
160-
161-
# ---------- MPI ---------- #
162-
find_package(MPI)
163-
164-
# ---------- Configure Metall ---------- #
165-
if (FREE_SMALL_OBJECT_SIZE_HINTGREATER0)
166-
list(APPENDMETALL_DEFS"METALL_FREE_SMALL_OBJECT_SIZE_HINT=${FREE_SMALL_OBJECT_SIZE_HINT}")
167-
message(STATUS"Try to free space for objects >=${FREE_SMALL_OBJECT_SIZE_HINT} bytes")
168-
endif ()
169-
170-
if (VERBOSE_SYSTEM_SUPPORT_WARNING)
171-
list(APPENDMETALL_DEFS"METALL_VERBOSE_SYSTEM_SUPPORT_WARNING")
172-
message(STATUS"Show compile time warning regarding system support")
173-
endif ()
174-
175-
if (DISABLE_FREE_FILE_SPACE)
176-
list(APPENDMETALL_DEFS"METALL_DISABLE_FREE_FILE_SPACE")
177-
message(STATUS"Disable freeing file space in Metall")
178-
endif ()
179-
180-
if (DISABLE_SMALL_OBJECT_CACHE)
181-
list(APPENDMETALL_DEFS"METALL_DISABLE_OBJECT_CACHE")
182-
message(STATUS"Disable small object cache")
183-
endif ()
184-
185-
if (DEFAULT_VM_RESERVE_SIZEGREATER0)
186-
list(APPENDMETALL_DEFS"METALL_DEFAULT_VM_RESERVE_SIZE=${DEFAULT_VM_RESERVE_SIZE}")
187-
message(STATUS"METALL_DEFAULT_VM_RESERVE_SIZE=${DEFAULT_VM_RESERVE_SIZE}")
188-
endif ()
189-
190-
if (MAX_SEGMENT_SIZEGREATER0)
191-
list(APPENDMETALL_DEFS"METALL_MAX_SEGMENT_SIZE=${MAX_SEGMENT_SIZE}")
192-
message(STATUS"METALL_MAX_SEGMENT_SIZE=${MAX_SEGMENT_SIZE}")
193-
endif ()
194-
195-
if (INITIAL_SEGMENT_SIZEGREATER0)
196-
list(APPENDMETALL_DEFS"METALL_INITIAL_SEGMENT_SIZE=${INITIAL_SEGMENT_SIZE}")
197-
message(STATUS"METALL_INITIAL_SEGMENT_SIZE=${INITIAL_SEGMENT_SIZE}")
198-
endif ()
199-
200-
if (USE_SORTED_BIN)
201-
list(APPENDMETALL_DEFS"METALL_USE_SORTED_BIN")
202-
message(STATUS"Use VM space aware algorithm in the bin directory")
203-
endif ()
204-
205-
if (USE_ANONYMOUS_NEW_MAP)
206-
if (USE_ANONYMOUS_NEW_MAPANDUMAP_ROOT)
207-
message(FATAL_ERROR"USE_ANONYMOUS_NEW_MAP and UMAP_ROOT options cannot coexist")
208-
endif ()
209-
210-
list(APPENDMETALL_DEFS"METALL_USE_ANONYMOUS_NEW_MAP")
211-
message(STATUS"Use the anonymous map for new map region")
212-
endif ()
213143

214144
# Requirements for GCC
215145
if (NOTRUN_BUILD_AND_TEST_WITH_CI)
@@ -220,6 +150,18 @@ if (NOT RUN_BUILD_AND_TEST_WITH_CI)
220150
endif ()
221151
endif ()
222152

153+
# ---------- Metall Macros ---------- #
154+
foreach(X${COMPILER_DEFS})
155+
message(STATUS"Metall compile definition:${X}")
156+
endforeach()
157+
158+
159+
# ---------- CMAKE_BUILD_TYPE ---------- #
160+
if (NOTCMAKE_BUILD_TYPE)
161+
set(CMAKE_BUILD_TYPERelease)
162+
message(STATUS"CMAKE_BUILD_TYPE is set as Release")
163+
endif ()
164+
223165

224166
# ---------- Threads ---------- #
225167
find_package(ThreadsREQUIRED)
@@ -304,8 +246,8 @@ function(common_setup_for_metall_executable name)
304246
# --------------------
305247

306248
# ----- Compile Definitions ----- #
307-
foreach(XINLISTSMETALL_DEFS)
308-
target_compile_definitions(${name}PRIVATE${X})
249+
foreach(X${COMPILER_DEFS})
250+
target_compile_definitions(${name}PRIVATE${X})
309251
endforeach()
310252
# --------------------
311253

@@ -325,7 +267,7 @@ function(common_setup_for_metall_executable name)
325267
target_include_directories(${name}PRIVATE${UMAP_ROOT}/include)
326268
if (LIBUMAP)
327269
target_link_libraries(${name}PRIVATE${LIBUMAP})
328-
target_compile_definitions(${name}PRIVATEMETALL_USE_UMAP)
270+
target_compile_definitions(${name}PRIVATE"METALL_USE_UMAP")
329271
endif ()
330272
endif ()
331273
# --------------------

‎bench/adjacency_list/CMakeLists.txt

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,19 @@
1-
find_package(OpenMP)
2-
if (NOTOpenMP_CXX_FOUND)
3-
MESSAGE(STATUS"OpenMP is not found. Use single thread in adjacency_list.")
4-
endif ()
1+
include(setup_omp)
52

63
add_metall_executable(run_adj_list_bench_stlrun_adj_list_bench_stl.cpp)
7-
if (OpenMP_CXX_FOUND)
8-
target_link_libraries(run_adj_list_bench_stlPRIVATEOpenMP::OpenMP_CXX)
9-
endif ()
4+
setup_omp_target(run_adj_list_bench_stl)
105

116
add_metall_executable(run_adj_list_bench_biprun_adj_list_bench_bip.cpp)
12-
if (OpenMP_CXX_FOUND)
13-
target_link_libraries(run_adj_list_bench_bipPRIVATEOpenMP::OpenMP_CXX)
14-
endif ()
7+
setup_omp_target(run_adj_list_bench_bip)
158

169
add_metall_executable(run_adj_list_bench_bip_extendrun_adj_list_bench_bip_extend.cpp)
17-
if (OpenMP_CXX_FOUND)
18-
target_link_libraries(run_adj_list_bench_bip_extendPRIVATEOpenMP::OpenMP_CXX)
19-
endif ()
10+
setup_omp_target(run_adj_list_bench_bip_extend)
2011

2112
add_metall_executable(run_adj_list_bench_metallrun_adj_list_bench_metall.cpp)
22-
if (OpenMP_CXX_FOUND)
23-
target_link_libraries(run_adj_list_bench_metallPRIVATEOpenMP::OpenMP_CXX)
24-
endif ()
13+
setup_omp_target(run_adj_list_bench_metall)
2514

2615
add_metall_executable(run_adj_list_bench_reflink_snapshotrun_adj_list_bench_reflink_snapshot.cpp)
27-
if (OpenMP_CXX_FOUND)
28-
target_link_libraries(run_adj_list_bench_reflink_snapshotPRIVATEOpenMP::OpenMP_CXX)
29-
endif ()
16+
setup_omp_target(run_adj_list_bench_reflink_snapshot)
3017

3118
if (MEMKIND_ROOT)
3219
add_metall_executable(run_adj_list_bench_pmemrun_adj_list_bench_pmem.cpp)
@@ -39,9 +26,7 @@ if (MEMKIND_ROOT)
3926
message(FATAL_ERROR"Cannot find memkind library")
4027
endif ()
4128
endif ()
42-
if (OpenMP_CXX_FOUND)
43-
target_link_libraries(run_adj_list_bench_pmemPRIVATEOpenMP::OpenMP_CXX)
44-
endif ()
29+
setup_omp_target(run_adj_list_bench_pmem)
4530
endif ()
4631

4732
configure_file(run_bench.shrun_bench.shCOPYONLY)
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
add_metall_executable(generate_rmat_edge_listgenerate_rmat_edge_list.cpp)
2-
if (OpenMP_CXX_FOUND)
3-
target_link_libraries(generate_rmat_edge_listPRIVATEOpenMP::OpenMP_CXX)
4-
endif ()
2+
setup_omp_target(generate_rmat_edge_list)

‎bench/adjacency_list/edge_generator/rmat_edge_generator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class rmat_edge_generator_iterator {
9494
constuint64_t mask = (1ULL << m_ptr_parent->m_vertex_scale) -1;
9595
// Assume utility::hash is a good hash function
9696
m_current_edge.first =
97-
metall::utility::hash<uint64_t>()(m_current_edge.first) & mask;
97+
metall::utility::hash<>()(m_current_edge.first) & mask;
9898
m_current_edge.second =
99-
metall::utility::hash<uint64_t>()(m_current_edge.second) & mask;
99+
metall::utility::hash<>()(m_current_edge.second) & mask;
100100
}
101101
++m_num_generated_edges;
102102
}

‎bench/adjacency_list/test/compare_key_value_lists.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
using key_type =uint64_t;
1818
using value_type =uint64_t;
1919
using item_type = std::pair<key_type, value_type>;
20-
using table_type = std::unordered_map<item_type, std::size_t,
21-
metall::utility::hash<item_type>>;
20+
using table_type =
21+
std::unordered_map<item_type, std::size_t,metall::utility::hash<>>;
2222

2323
voidingest_item(const std::string& file_name, table_type* table) {
2424
std::ifstreamifs(file_name);

‎bench/adjacency_list/test/test_large.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ a=0.57
1111
b=0.19
1212
c=0.19
1313
seed=123
14-
e=$((2**$((${v}+4))))# The number of edges to generate
1514

1615
# The default path to store data.
1716
# This value is overwritten if '-d' option is specified
@@ -78,6 +77,8 @@ main() {
7877
ref_edge_dump_file1="${out_dir_path}/ref_edge_list1"
7978
ref_edge_dump_file2="${out_dir_path}/ref_edge_list2"
8079

80+
local e=$((2**$((${v}+4))))# The number of edges to generate
81+
8182
./run_adj_list_bench_metall -o${data_store_path} -d${adj_list_dump_file} -s${seed} -v${v} -e${e} -a${a} -b${b} -c${c} -r 1 -u 1 -D${ref_edge_dump_file1}
8283
check_program_exit_status
8384
echo""

‎bench/bfs/CMakeLists.txt

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
find_package(OpenMP)
2-
if (NOTOpenMP_CXX_FOUND)
3-
MESSAGE(STATUS"OpenMP is not found. Use single thread in BFS")
4-
endif()
1+
include(setup_omp)
52

63
add_metall_executable(run_bfs_bench_metallrun_bfs_bench_metall.cpp)
7-
if (OpenMP_CXX_FOUND)
8-
target_link_libraries(run_bfs_bench_metallPRIVATEOpenMP::OpenMP_CXX)
9-
endif ()
4+
setup_omp_target(run_bfs_bench_metall)
105

116
add_metall_executable(run_bfs_bench_metall_multiplerun_bfs_bench_metall_multiple.cpp)
12-
if (OpenMP_CXX_FOUND)
13-
target_link_libraries(run_bfs_bench_metall_multiplePRIVATEOpenMP::OpenMP_CXX)
14-
endif ()
7+
setup_omp_target(run_bfs_bench_metall_multiple)
158

169
add_metall_executable(run_bfs_bench_biprun_bfs_bench_bip.cpp)
17-
if (OpenMP_CXX_FOUND)
18-
target_link_libraries(run_bfs_bench_bipPRIVATEOpenMP::OpenMP_CXX)
19-
endif ()
10+
setup_omp_target(run_bfs_bench_bip)
2011

2112
configure_file(run_bench.shrun_bench.shCOPYONLY)

‎bench/data_structure/multithread_adjacency_list.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ class multithread_adjacency_list {
4848

4949
using key_table_allocator_type = container::scoped_allocator_adaptor<
5050
other_allocator_type<std::pair<const key_type, list_type>>>;
51-
using key_table_type = container::unordered_map<
52-
key_type, list_type, metall::utility::hash<key_type>,
53-
std::equal_to<key_type>, key_table_allocator_type>;
51+
using key_table_type =
52+
container::unordered_map<key_type, list_type, metall::utility::hash<>,
53+
std::equal_to<key_type>,
54+
key_table_allocator_type>;
5455

5556
using bank_table_allocator_type =
5657
container::scoped_allocator_adaptor<other_allocator_type<key_table_type>>;
@@ -81,9 +82,9 @@ class multithread_adjacency_list {
8182
m_bank_table[bank_index(key)][key].emplace_back(std::move(value));
8283
#else
8384
m_bank_table[bank_index(key)][key].emplace_back(std::move(value));
84-
// m_bank_table[bank_index(key)].try_emplace(key,
85-
// list_allocator_type(m_bank_table.get_allocator()));
86-
// m_bank_table[bank_index(key)].at(key).emplace_back(std::move(value));
85+
// m_bank_table[bank_index(key)].try_emplace(key,
86+
// list_allocator_type(m_bank_table.get_allocator()));
87+
// m_bank_table[bank_index(key)].at(key).emplace_back(std::move(value));
8788
#endif
8889
#else
8990
// MEMO: GCC does not work with STL Containers (tested with GCC 10.2.0 on

‎cmake/setup_mpi.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
if (MPI_CXX_FOUND)
2+
find_package(MPI)
3+
endif ()
4+
5+
function(setup_mpi_targettarget)
6+
if (MPI_CXX_FOUND)
7+
target_link_libraries(${target}PRIVATEMPI::MPI_CXX)
8+
if (${CMAKE_HOST_SYSTEM_NAME}MATCHES"Linux")
9+
target_link_libraries(${target}PRIVATErt)
10+
endif ()
11+
else ()
12+
message(SEND_ERROR"MPI not found,${target} will not be built")
13+
endif ()
14+
endfunction()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp