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

Commitdbb6e98

Browse files
authored
Merge pull request#344 from LLNL/release/v0.30
Release/v0.30
2 parentsdf60411 +2a26b84 commitdbb6e98

File tree

10 files changed

+74
-54
lines changed

10 files changed

+74
-54
lines changed

‎.github/workflows/ci-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI Test
33
on:[push, pull_request]
44

55
jobs:
6-
bst1-86-0:
6+
bst1-87-0:
77
runs-on:ubuntu-latest
88
env:
99
METALL_LIMIT_MAKE_PARALLELS:8
@@ -12,9 +12,9 @@ jobs:
1212
-name:Test
1313
run:|
1414
pushd /dev/shm
15-
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.gz
15+
wget -q https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz
1616
mkdir boost
17-
tar xfboost_1_86_0.tar.gz -C boost --strip-components 1
17+
tar xfboost_1_87_0.tar.gz -C boost --strip-components 1
1818
export BOOST_ROOT=${PWD}/boost
1919
popd
2020
export METALL_TEST_DIR=${GITHUB_JOB}
@@ -32,7 +32,7 @@ jobs:
3232
-name:Test
3333
run:|
3434
pushd /dev/shm
35-
wget -q https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
35+
wget -q https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz
3636
mkdir boost
3737
tar xf boost_1_80_0.tar.gz -C boost --strip-components 1
3838
export BOOST_ROOT=${PWD}/boost

‎.gitlab-ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
# GitLab CI YML file dedicated for LC environment (Quartz)
1+
# GitLab CI YML file dedicated for LC environment (Ruby)
22
#
33
# Spack must be available
44
# It would be better to install all Boost versions manually,
55
# as it causes errors often and could exceed the timelimit of the system.
66

7+
# For '--reserv=ci' option in Slurm, see:
8+
# https://lc.llnl.gov/confluence/spaces/GITLAB/pages/785285769/Special+partitions+for+CI+batch+jobs
9+
710
include:[component: $CI_SERVER_FQDN/lc-components/id_tokens/id_tokens-component@main]
811

912
stages:
@@ -25,21 +28,20 @@ install_boost:
2528
-shell
2629
script:
2730
-hostname
28-
-srun -N1 -ppci spack install boost@1.86.0 boost@1.85.0 boost@1.84.0 boost@1.83.0 boost@1.82.0 boost@1.81.0 boost@1.80.0
29-
-spack clean
31+
-srun -N1 --reserv=ci -A seq sh -c 'for p in "boost@1.86.0" "boost@1.85.0" "boost@1.84.0" "boost@1.83.0" "boost@1.82.0" "boost@1.81.0" "boost@1.80.0"; do spack install --reuse $p; done; spack clean'
3032

3133

3234
.build:
3335
stage:build
3436
tags:
35-
-quartz
37+
-ruby
3638
-shell
3739
script:
3840
-echo "=== build section ==="
3941
-module load gcc/${GCC_VERSION}
4042
-spack load --first boost@${BOOST_VERSION} arch=$(spack arch)
4143
-export METALL_TEST_DIR="/dev/shm/metall_test-${CI_CONCURRENT_ID}-${CI_PIPELINE_IID}"
42-
-srun -N1 -ppci bash ./scripts/CI/build_and_test.sh
44+
-srun -N1 --reserv=ci -A seq bash ./scripts/CI/build_and_test.sh
4345

4446
build_gcc12.1.1_bst1.86.0:
4547
extends:.build

‎CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif ()
3131
# Metall general configuration
3232
# -------------------------------------------------------------------------------- #
3333
project(Metall
34-
VERSION0.29
34+
VERSION0.30
3535
DESCRIPTION"A persistent memory allocator for data-centric analytics"
3636
HOMEPAGE_URL"https://github.com/LLNL/metall")
3737

@@ -207,7 +207,8 @@ find_boost_headers(1.80 FALSE)
207207
if (NOTBoost_FOUND)
208208
message(STATUS"Fetching Boost")
209209
FetchContent_Declare(Boost
210-
URLhttps://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2)
210+
URLhttps://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.bz2
211+
SYSTEM)
211212
FetchContent_MakeAvailable(Boost)
212213
set(BOOST_ROOT${boost_SOURCE_DIR})
213214
find_package(Boost1.80REQUIRED)

‎cmake/find_boost_headers.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ function(find_boost_headers min_version required)
1717
if (Boost_FOUND)
1818
set(Boost_INCLUDE_DIRS${Boost_INCLUDE_DIRS}PARENT_SCOPE)
1919
set(Boost_FOUND${Boost_FOUND}PARENT_SCOPE)
20+
message(STATUS"Found Boost at${Boost_INCLUDE_DIRS}")
21+
message(STATUS"Boost version:${Boost_VERSION}")
2022
return()
2123
endif ()
2224

‎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.29
41+
PROJECT_NUMBER = v0.30
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

‎include/metall/detail/in_place_interface.hpp

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

‎include/metall/detail/named_proxy.hpp

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
// Copyright2019 Lawrence Livermore National Security, LLC and other Metall
1+
// Copyright2024 Lawrence Livermore National Security, LLC and other Metall
22
// Project Developers. See the top-level COPYRIGHT file for details.
33
//
44
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6+
// This file contains some code from Boost.Interprocess.
7+
// Here is the original license:
8+
// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
9+
// Software License, Version 1.0. (See accompanying file
10+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11+
612
#ifndef METALL_UTILITY_DETAIL_NAMED_PROXY_HPP
713
#defineMETALL_UTILITY_DETAIL_NAMED_PROXY_HPP
814

@@ -12,13 +18,47 @@
1218
/// \brief Namespace for implementation details
1319
namespacemetall::mtlldetail {
1420

21+
template<typename T,bool is_iterator,typename... Args>
22+
using CtorArgN =
23+
boost::interprocess::ipcdetail::CtorArgN<T, is_iterator, Args...>;
24+
1525
/// \brief Proxy class that implements named allocation syntax.
1626
/// \tparam segment_manager segment manager to construct the object
1727
/// \tparam T type of object to build
1828
/// \tparam is_iterator passing parameters are normal object or iterators?
1929
template<typename segment_manager,typename T,bool is_iterator>
20-
using named_proxy = boost::interprocess::ipcdetail::named_proxy<segment_manager,
21-
T, is_iterator>;
30+
classnamed_proxy {
31+
public:
32+
using char_type =typename segment_manager::char_type;
33+
34+
named_proxy(segment_manager *mngr,const char_type *name,bool find,
35+
bool dothrow)
36+
: m_name(name),
37+
m_mngr(mngr),
38+
m_num(1),
39+
m_find(find),
40+
m_dothrow(dothrow) {}
41+
42+
template<typename... Args>
43+
T *operator()(Args &&...args)const {
44+
CtorArgN<T, is_iterator, Args...>ctor_obj(std::forward<Args>(args)...);
45+
return m_mngr->templategeneric_construct<T>(
46+
m_name, m_num, m_find, m_dothrow, ctor_obj);
47+
}
48+
49+
// This operator allows --> named_new("Name")[3]; <-- syntax
50+
const named_proxy &operator[](const std::size_t num)const {
51+
m_num *= num;
52+
return *this;
53+
}
54+
55+
private:
56+
const char_type *const m_name;
57+
segment_manager *const m_mngr;
58+
mutable std::size_t m_num;
59+
constbool m_find;
60+
constbool m_dothrow;
61+
};
2262

2363
}// namespace metall::mtlldetail
2464

‎include/metall/kernel/manager_kernel.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include<metall/kernel/attributed_object_directory.hpp>
2929
#include<metall/object_attribute_accessor.hpp>
3030
#include<metall/detail/utilities.hpp>
31-
#include<metall/detail/in_place_interface.hpp>
3231
#include<metall/detail/file.hpp>
3332
#include<metall/detail/file_clone.hpp>
3433
#include<metall/detail/char_ptr_holder.hpp>
@@ -328,11 +327,11 @@ class manager_kernel {
328327
/// the same name. \param do_throw Ignored. This method does not throw its own
329328
/// exception --- this function throws an exception thrown by the constructor
330329
/// of the object. This is how Boost.Interprocess treats this parameter.
331-
/// \paramtable Reference toan in_place_interface object.
330+
/// \parampr Reference toa CtorArgN object.
332331
/// \return Returns a pointer to the constructed object(s).
333-
template<typename T>
332+
template<typename T,typename proxy>
334333
T *generic_construct(char_ptr_holder_type name, size_type num,bool try2find,
335-
bool do_throw,mdtl::in_place_interface &table);
334+
bool do_throw,proxy &pr);
336335

337336
/// \brief Return a reference to the segment header.
338337
/// \return A reference to the segment header.
@@ -500,9 +499,9 @@ class manager_kernel {
500499
staticboolpriv_unmark_properly_closed(const path_type &base_path);
501500

502501
// ---------- For constructed objects ---------- //
503-
template<typename T>
502+
template<typename T,typename proxy>
504503
T *priv_generic_construct(char_ptr_holder_type name, size_type length,
505-
bool try2find,mdtl::in_place_interface &table);
504+
bool try2find,proxy &pr);
506505

507506
template<typename T>
508507
boolpriv_register_attr_object_no_mutex(char_ptr_holder_type name,

‎include/metall/kernel/manager_kernel_impl.ipp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,12 @@ manager_kernel<st, sst, cn, cs>::anonymous_end() const {
419419
}
420420

421421
template<typename st,typename sst,typename cn, std::size_t cs>
422-
template<typename T>
422+
template<typename T,typename proxy>
423423
T *manager_kernel<st, sst, cn, cs>::generic_construct(
424424
char_ptr_holder_type name,const size_type num,constbool try2find,
425-
[[maybe_unused]]constbool do_throw,mdtl::in_place_interface &table) {
425+
[[maybe_unused]]constbool do_throw,proxy &pr) {
426426
priv_check_sanity();
427-
return priv_generic_construct<T>(name, num, try2find,table);
427+
return priv_generic_construct<T>(name, num, try2find,pr);
428428
}
429429

430430
template<typename st,typename sst,typename cn, std::size_t cs>
@@ -694,15 +694,9 @@ bool manager_kernel<st, sst, cn, cs>::priv_unmark_properly_closed(
694694
}
695695

696696
template<typename st,typename sst,typename cn, std::size_t cs>
697-
template<typename T>
697+
template<typename T,typename proxy>
698698
T *manager_kernel<st, sst, cn, cs>::priv_generic_construct(
699-
char_ptr_holder_type name, size_type length,bool try2find,
700-
mdtl::in_place_interface &table) {
701-
// Check overflow for security
702-
if (length > ((std::size_t)-1) / table.size) {
703-
returnnullptr;
704-
}
705-
699+
char_ptr_holder_type name, size_type length,bool try2find, proxy &pr) {
706700
void *ptr =nullptr;
707701
try {
708702
#ifdef METALL_ENABLE_MUTEX_IN_MANAGER_KERNEL
@@ -754,18 +748,18 @@ T *manager_kernel<st, sst, cn, cs>::priv_generic_construct(
754748
});
755749

756750
#if BOOST_VERSION >= 108500
757-
table.construct_n(ptr, length);
751+
pr.construct_n(ptr, length);
758752
#else
759753
// Constructs each object in the allocated memory
760754
// When one of objects of T in the array throws exception,
761755
// this function calls T's destructor for successfully constructed objects and
762756
// rethrows the exception
763757
std::size_t constructed =0;
764758
try {
765-
table.construct_n(ptr, length, constructed);
759+
pr.construct_n(ptr, length, constructed);
766760
}catch (...) {
767761
std::size_t destroyed =0;
768-
table.destroy_n(ptr, constructed, destroyed);
762+
pr.destroy_n(ptr, constructed, destroyed);
769763
throw;
770764
}
771765
#endif

‎include/metall/version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/// METALL_VERSION / 100 % 1000 // the minor version.
1515
/// METALL_VERSION % 100 // the patch level.
1616
/// \endcode
17-
#defineMETALL_VERSION2900
17+
#defineMETALL_VERSION3000
1818

1919
namespacemetall {
2020
/// \brief Variable type to handle a version data.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp