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

Commit1f6c027

Browse files
authored
Merge pull request#321 from LLNL/release/v0.28
Release/v0.28
2 parentsd40ae14 +e5a07ce commit1f6c027

File tree

74 files changed

+4079
-2330
lines changed

Some content is hidden

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

74 files changed

+4079
-2330
lines changed

‎CMakeLists.txt

Lines changed: 60 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ include(FetchContent)
55
# -------------------------------------------------------------------------------- #
66
# CMake policy
77
# -------------------------------------------------------------------------------- #
8-
if(${CMAKE_VERSION}VERSION_GREATER_EQUAL"3.13")
8+
if(${CMAKE_VERSION}VERSION_GREATER_EQUAL"3.13")
99
cmake_policy(SETCMP0077NEW)
10-
endif()
10+
endif()
1111

12-
if(${CMAKE_VERSION}VERSION_GREATER_EQUAL"3.24")
12+
if(${CMAKE_VERSION}VERSION_GREATER_EQUAL"3.24")
1313
cmake_policy(SETCMP0135NEW)
14-
endif()
14+
endif()
1515

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

@@ -92,6 +92,7 @@ set(COMPILER_DEFS "" CACHE STRING "A list of Metall compile definitions to be ad
9292

9393
# ---------- Experimental options ---------- #
9494
set(UMAP_ROOT""CACHEPATH"UMap installed root directory")
95+
set(PRIVATEER_ROOT""CACHEPATH"Privateer installed root directory")
9596

9697
option(ONLY_DOWNLOAD_GTEST"Only downloading Google Test"OFF)
9798
option(SKIP_DOWNLOAD_GTEST"Skip downloading Google Test"OFF)
@@ -113,11 +114,11 @@ endif ()
113114
# -------------------------------------------------------------------------------- #
114115
if (INSTALL_HEADER_ONLY)
115116
message(WARNING"INSTALL_HEADER_ONLY option has been replaced with JUST_INSTALL_METALL_HEADER.")
116-
endif()
117+
endif()
117118

118119
if (JUST_INSTALL_METALL_HEADER)
119120
return()
120-
endif()
121+
endif()
121122
# -------------------------------------------------------------------------------- #
122123

123124
# -------------------------------------------------------------------------------- #
@@ -138,7 +139,7 @@ endif ()
138139
# -------------------------------------------------------------------------------- #
139140

140141
# -------------------------------------------------------------------------------- #
141-
#Executables
142+
#Set up for building executables
142143
# -------------------------------------------------------------------------------- #
143144

144145
# Requirements for GCC
@@ -151,9 +152,9 @@ if (NOT RUN_BUILD_AND_TEST_WITH_CI)
151152
endif ()
152153

153154
# ---------- Metall Macros ---------- #
154-
foreach(X${COMPILER_DEFS})
155+
foreach(X${COMPILER_DEFS})
155156
message(STATUS"Metall compile definition:${X}")
156-
endforeach()
157+
endforeach()
157158

158159

159160
# ---------- CMAKE_BUILD_TYPE ---------- #
@@ -168,12 +169,8 @@ find_package(Threads REQUIRED)
168169

169170

170171
# ---------- filesystem ---------- #
171-
include(include_cxx_filesystem_library)
172-
include_cxx_filesystem_library()
173-
174-
# Xcode 11 Beta Release Notes
175-
# Clang now supports the C++17 <filesystem> library for iOS 13, macOS 10.15, watchOS 6, and tvOS 13. (50988273)
176-
# https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_release_notes?language=objc
172+
include(check_cxx_filesystem_library)
173+
check_cxx_filesystem_library()
177174

178175

179176
# ---------- UMap ---------- #
@@ -183,6 +180,11 @@ if (UMAP_ROOT)
183180
endif ()
184181
endif ()
185182

183+
# ---------- Privateer ---------- #
184+
if (PRIVATEER_ROOT)
185+
message(STATUS"Privateer Root is:${PRIVATEER_ROOT}")
186+
find_library(LIBPRIVATEERNAMESprivateerPATHS${PRIVATEER_ROOT}/lib)
187+
endif ()
186188

187189
# ---------- Boost ---------- #
188190
# Disable the boost-cmake feature (BoostConfig.cmake or boost-config.cmake) since
@@ -192,7 +194,7 @@ set(Boost_NO_BOOST_CMAKE ON)
192194
find_package(Boost1.64QUIET)
193195
if (NOTBoost_FOUND)
194196
FetchContent_Declare(Boost
195-
URLhttps://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2)
197+
URLhttps://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2)
196198
FetchContent_GetProperties(Boost)
197199
if (NOTBoost_POPULATED)
198200
FetchContent_Populate(Boost)
@@ -212,7 +214,7 @@ function(add_common_compile_options name)
212214
target_compile_options(${name}PRIVATE$<$<CONFIG:Debug>:-Og>)
213215
target_compile_options(${name}PRIVATE$<$<CONFIG:Debug>:-g3>)
214216
target_compile_options(${name}PRIVATE$<$<CONFIG:Debug>:-Wextra>)
215-
if (Linux)
217+
if (CMAKE_SYSTEM_NAMESTREQUAL"Linux")
216218
target_compile_options(${name}PRIVATE$<$<CONFIG:Debug>:-pg>)
217219
endif ()
218220

@@ -223,7 +225,7 @@ function(add_common_compile_options name)
223225
# Release with debug info
224226
target_compile_options(${name}PRIVATE$<$<CONFIG:RelWithDebInfo>:-Ofast>)
225227
target_compile_options(${name}PRIVATE$<$<CONFIG:RelWithDebInfo>:-g3>)
226-
if (Linux)
228+
if (CMAKE_SYSTEM_NAMESTREQUAL"Linux")
227229
target_compile_options(${name}PRIVATE$<$<CONFIG:RelWithDebInfo>:-pg>)
228230
endif ()
229231
endfunction()
@@ -246,20 +248,18 @@ function(common_setup_for_metall_executable name)
246248
# --------------------
247249

248250
# ----- Compile Definitions ----- #
249-
foreach(X${COMPILER_DEFS})
250-
target_compile_definitions(${name}PRIVATE${X})
251-
endforeach()
251+
foreach(X${COMPILER_DEFS})
252+
target_compile_definitions(${name}PRIVATE${X})
253+
endforeach()
252254
# --------------------
253255

254256
# ----- CXX17 Filesystem Lib----- #
255-
#include_cxx_filesystem_library module must be executed first
256-
if (FOUND_CXX17_FILESYSTEM_LIB)
257-
if (REQUIRE_LIB_STDCXX_FS)
257+
#GNU compilers prior to 9.1 requires linking with stdc++fs
258+
if (("${CMAKE_C_COMPILER_ID}"STREQUAL"GNU")OR("${CMAKE_CXX_COMPILER_ID}"STREQUAL"GNU"))
259+
if (CMAKE_CXX_COMPILER_VERSIONVERSION_LESS9.1)
258260
target_link_libraries(${name}PRIVATEstdc++fs)
259-
endif()
260-
elseif()
261-
target_compile_definitions(${name}PRIVATE"METALL_DISABLE_CXX17_FILESYSTEM_LIB")
262-
endif()
261+
endif ()
262+
endif ()
263263
# --------------------
264264

265265
# ----- Umap----- #
@@ -271,6 +271,37 @@ function(common_setup_for_metall_executable name)
271271
endif ()
272272
endif ()
273273
# --------------------
274+
275+
# ----- Privateer----- #
276+
if (PRIVATEER_ROOT)
277+
target_include_directories(${name}PRIVATE${PRIVATEER_ROOT}/include)
278+
if (LIBPRIVATEER)
279+
# 1) Privateer Dependencies
280+
FIND_PACKAGE(OpenSSL)
281+
if (OpenSSL_FOUND)
282+
target_link_libraries(${name}PRIVATEOpenSSL::SSL)
283+
target_link_libraries(${name}PRIVATEOpenSSL::Crypto)
284+
endif ()
285+
target_link_libraries(${name}PRIVATErt)
286+
FIND_PACKAGE(OpenMPREQUIRED)
287+
if (OpenMP_CXX_FOUND)
288+
target_link_libraries(${name}PRIVATEOpenMP::OpenMP_CXX)
289+
else ()
290+
message(FATAL_ERROR"OpenMP is required to build Metall with Privateer")
291+
endif ()
292+
if (ZSTD_ROOT)
293+
find_library(LIBZSTDNAMESzstdPATHS${ZSTD_ROOT}/lib)
294+
target_include_directories(${name}PRIVATE${ZSTD_ROOT}/lib)
295+
target_link_libraries(${name}PRIVATE${LIBZSTD})
296+
target_compile_definitions(${name}PRIVATEUSE_COMPRESSION)
297+
endif ()
298+
299+
# 2) Link Privateer
300+
target_link_libraries(${name}PRIVATE${LIBPRIVATEER})
301+
target_compile_definitions(${name}PRIVATEMETALL_USE_PRIVATEER)
302+
endif ()
303+
endif ()
304+
# --------------------
274305
endfunction()
275306

276307
function(add_metall_executablenamesource)

‎bench/bfs/run_bfs_bench_metall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
2929
// metall::logger::set_log_level(metall::logger::level::verbose);
3030

3131
metall::managermanager(metall::open_read_only,
32-
option.graph_file_name_list[0].c_str());
32+
option.graph_file_name_list[0]);
3333
auto adj_list =
3434
manager.find<adjacency_list_type>(option.graph_key_name.c_str()).first;
3535

‎bench/bfs/run_bfs_bench_metall_multiple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
3333
std::vector<metall::manager *> managers;
3434
for (constauto &file_name : option.graph_file_name_list) {
3535
managers.emplace_back(
36-
newmetall::manager(metall::open_read_only, file_name.c_str()));
36+
newmetall::manager(metall::open_read_only, file_name));
3737
}
3838

3939
auto adj_list =adjacency_list_type(option.graph_key_name, managers.begin(),

‎bench/simple_alloc/run_simple_allocation_bench_metall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
intmain(int argc,char *argv[]) {
1414
constauto option =simple_alloc_bench::parse_option(argc, argv);
1515
{
16-
metall::managermanager(metall::create_only, option.datastore_path.c_str());
16+
metall::managermanager(metall::create_only, option.datastore_path);
1717
simple_alloc_bench::run_bench(option, manager.get_allocator<std::byte>());
1818
}
1919
metall::manager::remove(option.datastore_path.c_str());
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Checks if the C++17 <filesystem> library is available.
2+
function(check_cxx_filesystem_library)
3+
4+
set(FOUND_CXX17_FILESYSTEM_LIBFALSEPARENT_SCOPE)
5+
set(REQUIRE_LIB_STDCXX_FSFALSEPARENT_SCOPE)
6+
7+
# Check if C++17 <filesystem> header files are available
8+
# If not, uses our own implementation.
9+
include(CheckIncludeFileCXX)
10+
CHECK_INCLUDE_FILE_CXX(filesystemFOUND_FILESYSTEM_HEADER)
11+
if (NOTFOUND_FILESYSTEM_HEADER)
12+
message(FATAL_ERROR"Cannot find the C++17 <filesystem> library.")
13+
endif ()
14+
15+
if (CMAKE_CXX_COMPILER_IDMATCHES"Clang")# Clang or AppleClang
16+
if (${CMAKE_HOST_SYSTEM_NAME}MATCHES"Darwin")# macOS
17+
include(get_macos_version)
18+
get_macos_version()# Get macOS version
19+
message(VERBOSE"Detected macOS version${MACOS_VERSION}")
20+
if (MACOS_VERSIONVERSION_LESS10.15)# macOS < 10.15
21+
message(FATAL_ERROR"macOS >= 10.15 is required to use the C++17 <filesystem> library.")
22+
endif ()
23+
endif ()
24+
endif ()
25+
endfunction()

‎cmake/include_cxx_filesystem_library.cmake

Lines changed: 0 additions & 40 deletions
This file was deleted.

‎cmake/setup_mpi.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (MPI_CXX_FOUND)
1+
if (NOTMPI_CXX_FOUND)
22
find_package(MPI)
33
endif ()
44

‎docs/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Metall"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v0.27
41+
PROJECT_NUMBER = v0.28
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

‎docs/readthedocs/basics/getting_started.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,11 @@ g++ -std=c++17 your_program.cpp -lstdc++fs -I${BOOST_ROOT}/include -I${METALL_RO
6969

7070
Clang (or Apple clang) could be used instead of GCC to build Metall.
7171
However, we haven't tested it intensively.
72+
To run on macOS, Metall requires macOS >= 10.15.
73+
7274
Also, Boost C++ Libraries 1.69 or more may be required
7375
if one wants to build Metall with Clang + CUDA.
7476

75-
**On macOS >= 10.15 or Linux**
76-
7777
```bash
78-
# Remove "-lstdc++fs" option
7978
clang++ -std=c++17 [tutorial_program.cpp] -I../../include -I${BOOST_ROOT}
80-
```
81-
82-
**On macOS < 10.15**
83-
84-
The C++17 <filesystem> library is not available on macOS < 10.15.
85-
One has to stop using C++17 <filesystem> library in Metall.
86-
If METALL_DISABLE_CXX17_FILESYSTEM_LIB macro is defined, Metall uses its own file system operation implementation.
87-
88-
```bash
89-
clang++ -std=c++17 [tutorial_program.cpp] -I../../include -I${BOOST_ROOT} -DMETALL_DISABLE_CXX17_FILESYSTEM_LIB
90-
```
79+
```

‎example/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ add_metall_executable(snapshot snapshot.cpp)
1414

1515
add_metall_executable(csr_graphcsr_graph.cpp)
1616

17-
add_metall_executable(fallback_allocator_adaptorfallback_allocator_adaptor.cpp)
17+
add_metall_executable(fallback_allocatorfallback_allocator.cpp)
1818

1919
add_metall_executable(datastore_descriptiondatastore_description.cpp)
2020

@@ -38,6 +38,9 @@ add_metall_executable(logger logger.cpp)
3838

3939
add_metall_executable(concurrentconcurrent.cpp)
4040

41+
add_metall_executable(custom_loggercustom_logger.cpp)
42+
target_compile_definitions(custom_loggerPRIVATEMETALL_LOGGER_EXTERN_C=1)
43+
4144
if (BUILD_C)
4245
add_c_executable(c_apic_api.c)
4346
target_link_libraries(c_apiPRIVATEmetall_c)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp