Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.28 #321

Merged
merged 43 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c4c44da
Merge pull request #300 from LLNL/release/v0.27
KIwabuchi Nov 23, 2023
35b12d1
Merge pull request #301 from LLNL/hotfix/docs
KIwabuchi Nov 23, 2023
797358c
Merge pull request #303 from LLNL/hotfix/docs
KIwabuchi Nov 23, 2023
57c7180
Merge pull request #304 from LLNL/hotfix/docs
KIwabuchi Nov 23, 2023
c57f0a6
Merge pull request #307 from LLNL/hotfix/object_cache_free
KIwabuchi Nov 29, 2023
7e312f1
Remove own file operation implementation
Dec 18, 2023
4669446
Use std::filesystem::path
Dec 19, 2023
bce467c
Bugfix
KIwabuchi Dec 19, 2023
7b53023
Use std::filesystem::path
Dec 19, 2023
acf81c8
backup
Dec 22, 2023
30c1302
Bugfix in documentations
KIwabuchi Nov 23, 2023
3ea1c22
Bugfix in read the docs
KIwabuchi Nov 23, 2023
95e57c8
Bugfix in read the docs
KIwabuchi Nov 23, 2023
06cbc2b
Bugfix in freeing object cache data
KIwabuchi Nov 28, 2023
96e322e
Brush up on comments
KIwabuchi Nov 28, 2023
ce90027
Add code for running Sanitizers
KIwabuchi Nov 28, 2023
08886d2
Major refactoring in segment storage for custom segment storage
KIwabuchi Nov 30, 2023
3a0ae6f
Merge pull request #310 from LLNL/feature/segment_storage
KIwabuchi Jan 16, 2024
5b56d15
Remove own file operation implementation
Dec 18, 2023
f24face
Merge remote-tracking branch 'origin/feature/stdfs' into feature/stdfs
Jan 16, 2024
a698e98
Merge remote-tracking branch 'origin/develop' into feature/stdfs
Jan 16, 2024
feb31e0
Merge pull request #311 from LLNL/feature/stdfs
KIwabuchi Jan 16, 2024
92c7005
implement linux copy algorithms using syscalls
liss-h Jan 22, 2024
7573633
rename files to not confuse git
liss-h Jan 22, 2024
de4d48a
add ability to implement custom loggers
liss-h Jan 23, 2024
85fdc45
use backslash for comments
liss-h Jan 30, 2024
e7289b6
only build linux sparse copy verification on linux
liss-h Jan 30, 2024
481576b
Merge pull request #312 from dice-group/feature/sparse-copy
KIwabuchi Jan 30, 2024
bb2f85a
Bugfix: detect Linux in CMake
Jan 30, 2024
a62a322
Merge pull request #315 from LLNL/feature/cmake_detect_linux
KIwabuchi Jan 31, 2024
e0a73ea
new c api
liss-h Jan 31, 2024
571ac94
Merge pull request #316 from dice-group/feature/new-c-interface
KIwabuchi Feb 2, 2024
98fcc95
Merge pull request #313 from dice-group/feature/custom-loggers
KIwabuchi Feb 5, 2024
881239a
Remove propagate_on_* types and is_always_equal
Feb 14, 2024
16b09d3
Merge pull request #317 from LLNL/feature/update_fb_allocator
KIwabuchi Feb 14, 2024
6b204d0
Reorganize fallback allocator.
Feb 15, 2024
b21169e
implement metall::manager::read_only
liss-h Mar 12, 2024
6b01cff
Merge pull request #318 from dice-group/feature/is-read-only-func
KIwabuchi Mar 13, 2024
cdf1608
Minor comment fix
Apr 14, 2024
2aca049
Bugfix in MPI adaptor build
Apr 14, 2024
e79f58c
Merge pull request #319 from LLNL/feature/update_fb_allocator
KIwabuchi Apr 14, 2024
9d0f2a8
Merge pull request #320 from LLNL/feature/bugfix_mpi_build
KIwabuchi Apr 14, 2024
e5a07ce
Release v0.28
Apr 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 60 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ include(FetchContent)
# -------------------------------------------------------------------------------- #
# CMake policy
# -------------------------------------------------------------------------------- #
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
cmake_policy(SET CMP0077 NEW)
endif()
endif ()

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
cmake_policy(SET CMP0135 NEW)
endif()
endif ()

# -------------------------------------------------------------------------------- #
# Metall general configuration
# -------------------------------------------------------------------------------- #
project(Metall
VERSION 0.27
VERSION 0.28
DESCRIPTION "A persistent memory allocator for data-centric analytics"
HOMEPAGE_URL "https://github.com/LLNL/metall")

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

# ---------- Experimental options ---------- #
set(UMAP_ROOT "" CACHE PATH "UMap installed root directory")
set(PRIVATEER_ROOT "" CACHE PATH "Privateer installed root directory")

option(ONLY_DOWNLOAD_GTEST "Only downloading Google Test" OFF)
option(SKIP_DOWNLOAD_GTEST "Skip downloading Google Test" OFF)
Expand All @@ -113,11 +114,11 @@ endif ()
# -------------------------------------------------------------------------------- #
if (INSTALL_HEADER_ONLY)
message(WARNING "INSTALL_HEADER_ONLY option has been replaced with JUST_INSTALL_METALL_HEADER.")
endif()
endif ()

if (JUST_INSTALL_METALL_HEADER)
return()
endif()
endif ()
# -------------------------------------------------------------------------------- #

# -------------------------------------------------------------------------------- #
Expand All @@ -138,7 +139,7 @@ endif ()
# -------------------------------------------------------------------------------- #

# -------------------------------------------------------------------------------- #
# Executables
# Set up for building executables
# -------------------------------------------------------------------------------- #

# Requirements for GCC
Expand All @@ -151,9 +152,9 @@ if (NOT RUN_BUILD_AND_TEST_WITH_CI)
endif ()

# ---------- Metall Macros ---------- #
foreach(X ${COMPILER_DEFS})
foreach (X ${COMPILER_DEFS})
message(STATUS "Metall compile definition: ${X}")
endforeach()
endforeach ()


# ---------- CMAKE_BUILD_TYPE ---------- #
Expand All @@ -168,12 +169,8 @@ find_package(Threads REQUIRED)


# ---------- filesystem ---------- #
include(include_cxx_filesystem_library)
include_cxx_filesystem_library()

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


# ---------- UMap ---------- #
Expand All @@ -183,6 +180,11 @@ if (UMAP_ROOT)
endif ()
endif ()

# ---------- Privateer ---------- #
if (PRIVATEER_ROOT)
message(STATUS "Privateer Root is: ${PRIVATEER_ROOT}")
find_library(LIBPRIVATEER NAMES privateer PATHS ${PRIVATEER_ROOT}/lib)
endif ()

# ---------- Boost ---------- #
# Disable the boost-cmake feature (BoostConfig.cmake or boost-config.cmake) since
Expand All @@ -192,7 +194,7 @@ set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost 1.64 QUIET)
if (NOT Boost_FOUND)
FetchContent_Declare(Boost
URL https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2)
URL https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2)
FetchContent_GetProperties(Boost)
if (NOT Boost_POPULATED)
FetchContent_Populate(Boost)
Expand All @@ -212,7 +214,7 @@ function(add_common_compile_options name)
target_compile_options(${name} PRIVATE $<$<CONFIG:Debug>:-Og>)
target_compile_options(${name} PRIVATE $<$<CONFIG:Debug>:-g3>)
target_compile_options(${name} PRIVATE $<$<CONFIG:Debug>:-Wextra>)
if (Linux)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_options(${name} PRIVATE $<$<CONFIG:Debug>:-pg>)
endif ()

Expand All @@ -223,7 +225,7 @@ function(add_common_compile_options name)
# Release with debug info
target_compile_options(${name} PRIVATE $<$<CONFIG:RelWithDebInfo>:-Ofast>)
target_compile_options(${name} PRIVATE $<$<CONFIG:RelWithDebInfo>:-g3>)
if (Linux)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_options(${name} PRIVATE $<$<CONFIG:RelWithDebInfo>:-pg>)
endif ()
endfunction()
Expand All @@ -246,20 +248,18 @@ function(common_setup_for_metall_executable name)
# --------------------

# ----- Compile Definitions ----- #
foreach(X ${COMPILER_DEFS})
target_compile_definitions(${name} PRIVATE ${X})
endforeach()
foreach (X ${COMPILER_DEFS})
target_compile_definitions(${name} PRIVATE ${X})
endforeach ()
# --------------------

# ----- CXX17 Filesystem Lib----- #
# include_cxx_filesystem_library module must be executed first
if (FOUND_CXX17_FILESYSTEM_LIB)
if (REQUIRE_LIB_STDCXX_FS)
# GNU compilers prior to 9.1 requires linking with stdc++fs
if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"))
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.1)
target_link_libraries(${name} PRIVATE stdc++fs)
endif()
elseif()
target_compile_definitions(${name} PRIVATE "METALL_DISABLE_CXX17_FILESYSTEM_LIB")
endif()
endif ()
endif ()
# --------------------

# ----- Umap----- #
Expand All @@ -271,6 +271,37 @@ function(common_setup_for_metall_executable name)
endif ()
endif ()
# --------------------

# ----- Privateer----- #
if (PRIVATEER_ROOT)
target_include_directories(${name} PRIVATE ${PRIVATEER_ROOT}/include)
if (LIBPRIVATEER)
# 1) Privateer Dependencies
FIND_PACKAGE(OpenSSL)
if (OpenSSL_FOUND)
target_link_libraries(${name} PRIVATE OpenSSL::SSL)
target_link_libraries(${name} PRIVATE OpenSSL::Crypto)
endif ()
target_link_libraries(${name} PRIVATE rt)
FIND_PACKAGE(OpenMP REQUIRED)
if (OpenMP_CXX_FOUND)
target_link_libraries(${name} PRIVATE OpenMP::OpenMP_CXX)
else ()
message(FATAL_ERROR "OpenMP is required to build Metall with Privateer")
endif ()
if (ZSTD_ROOT)
find_library(LIBZSTD NAMES zstd PATHS ${ZSTD_ROOT}/lib)
target_include_directories(${name} PRIVATE ${ZSTD_ROOT}/lib)
target_link_libraries(${name} PRIVATE ${LIBZSTD})
target_compile_definitions(${name} PRIVATE USE_COMPRESSION)
endif ()

# 2) Link Privateer
target_link_libraries(${name} PRIVATE ${LIBPRIVATEER})
target_compile_definitions(${name} PRIVATE METALL_USE_PRIVATEER)
endif ()
endif ()
# --------------------
endfunction()

function(add_metall_executable name source)
Expand Down
2 changes: 1 addition & 1 deletion bench/bfs/run_bfs_bench_metall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
// metall::logger::set_log_level(metall::logger::level::verbose);

metall::manager manager(metall::open_read_only,
option.graph_file_name_list[0].c_str());
option.graph_file_name_list[0]);
auto adj_list =
manager.find<adjacency_list_type>(option.graph_key_name.c_str()).first;

Expand Down
2 changes: 1 addition & 1 deletion bench/bfs/run_bfs_bench_metall_multiple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
std::vector<metall::manager *> managers;
for (const auto &file_name : option.graph_file_name_list) {
managers.emplace_back(
new metall::manager(metall::open_read_only, file_name.c_str()));
new metall::manager(metall::open_read_only, file_name));
}

auto adj_list = adjacency_list_type(option.graph_key_name, managers.begin(),
Expand Down
2 changes: 1 addition & 1 deletion bench/simple_alloc/run_simple_allocation_bench_metall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
int main(int argc, char *argv[]) {
const auto option = simple_alloc_bench::parse_option(argc, argv);
{
metall::manager manager(metall::create_only, option.datastore_path.c_str());
metall::manager manager(metall::create_only, option.datastore_path);
simple_alloc_bench::run_bench(option, manager.get_allocator<std::byte>());
}
metall::manager::remove(option.datastore_path.c_str());
Expand Down
25 changes: 25 additions & 0 deletions cmake/check_cxx_filesystem_library.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Checks if the C++17 <filesystem> library is available.
function(check_cxx_filesystem_library)

set(FOUND_CXX17_FILESYSTEM_LIB FALSE PARENT_SCOPE)
set(REQUIRE_LIB_STDCXX_FS FALSE PARENT_SCOPE)

# Check if C++17 <filesystem> header files are available
# If not, uses our own implementation.
include(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX(filesystem FOUND_FILESYSTEM_HEADER)
if (NOT FOUND_FILESYSTEM_HEADER)
message(FATAL_ERROR "Cannot find the C++17 <filesystem> library.")
endif ()

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # Clang or AppleClang
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin") # macOS
include(get_macos_version)
get_macos_version() # Get macOS version
message(VERBOSE "Detected macOS version ${MACOS_VERSION}")
if (MACOS_VERSION VERSION_LESS 10.15) # macOS < 10.15
message(FATAL_ERROR "macOS >= 10.15 is required to use the C++17 <filesystem> library.")
endif ()
endif ()
endif ()
endfunction()
40 changes: 0 additions & 40 deletions cmake/include_cxx_filesystem_library.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/setup_mpi.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (MPI_CXX_FOUND)
if (NOT MPI_CXX_FOUND)
find_package(MPI)
endif ()

Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Metall"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.27
PROJECT_NUMBER = v0.28

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
17 changes: 3 additions & 14 deletions docs/readthedocs/basics/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,11 @@ g++ -std=c++17 your_program.cpp -lstdc++fs -I${BOOST_ROOT}/include -I${METALL_RO

Clang (or Apple clang) could be used instead of GCC to build Metall.
However, we haven't tested it intensively.
To run on macOS, Metall requires macOS >= 10.15.

Also, Boost C++ Libraries 1.69 or more may be required
if one wants to build Metall with Clang + CUDA.

**On macOS >= 10.15 or Linux**

```bash
# Remove "-lstdc++fs" option
clang++ -std=c++17 [tutorial_program.cpp] -I../../include -I${BOOST_ROOT}
```

**On macOS < 10.15**

The C++17 <filesystem> library is not available on macOS < 10.15.
One has to stop using C++17 <filesystem> library in Metall.
If METALL_DISABLE_CXX17_FILESYSTEM_LIB macro is defined, Metall uses its own file system operation implementation.

```bash
clang++ -std=c++17 [tutorial_program.cpp] -I../../include -I${BOOST_ROOT} -DMETALL_DISABLE_CXX17_FILESYSTEM_LIB
```
```
5 changes: 4 additions & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_metall_executable(snapshot snapshot.cpp)

add_metall_executable(csr_graph csr_graph.cpp)

add_metall_executable(fallback_allocator_adaptor fallback_allocator_adaptor.cpp)
add_metall_executable(fallback_allocator fallback_allocator.cpp)

add_metall_executable(datastore_description datastore_description.cpp)

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

add_metall_executable(concurrent concurrent.cpp)

add_metall_executable(custom_logger custom_logger.cpp)
target_compile_definitions(custom_logger PRIVATE METALL_LOGGER_EXTERN_C=1)

if (BUILD_C)
add_c_executable(c_api c_api.c)
target_link_libraries(c_api PRIVATE metall_c)
Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ Therefore, the data structures in the examples below are more like how to use ST

### Fallback Allocator

* [fallback_allocator_adaptor.cpp](fallback_allocator_adaptor.cpp)
* [fallback_allocator.cpp](fallback_allocator.cpp)

* How to use [fallback_allocator_adaptor](../include/metall/utility/fallback_allocator_adaptor.hpp)
* How to use [fallback_allocator](../include/metall/container/fallback_allocator.hpp)


### MPI (experimental implementation)
Expand Down
Loading
Loading