Skip to content
8 changes: 8 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ function "vt_ldms" {
result = lookup(item, "vt_ldms", "")
}

function "vt_cmake_cxx_standard" {
params = [item]
result = lookup(item, "vt_cmake_cxx_standard", 17)
}

target "vt-build" {
target = "build"
context = "."
Expand Down Expand Up @@ -243,6 +248,7 @@ target "vt-build-all" {
VT_UNITY_BUILD_ENABLED = vt_unity_build(item)
VT_WERROR_ENABLED = vt_werror(item)
VT_ZOLTAN_ENABLED = vt_zoltan(item)
CMAKE_CXX_STANDARD = vt_cmake_cxx_standard(item)
}

# to get the list of available images from DARMA-tasking/workflows:
Expand Down Expand Up @@ -332,6 +338,8 @@ target "vt-build-all" {
},
{
image = "amd64-ubuntu-22.04-clang-15-cpp"
variant = "cxx20"
vt_cmake_cxx_standard = 20
},
{
image = "amd64-ubuntu-22.04-gcc-11-cpp"
Expand Down
2 changes: 1 addition & 1 deletion examples/collection/jacobi1d_vt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct LinearPb1DJacobi : vt::Collection<LinearPb1DJacobi,vt::Index1D> {
"\n Maximum Number of Iterations Reached. \n\n" :
fmt::format("\n Max-Norm Residual Reduced by {} \n\n", default_tol);

fmt::print(to_print);
fmt::print(fmt::runtime(to_print));

// Notify all nodes that computation is finished
objProxy_.broadcast<&NodeObj::workFinishedHandler>();
Expand Down
2 changes: 1 addition & 1 deletion examples/collection/jacobi2d_vt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct LinearPb2DJacobi : vt::Collection<LinearPb2DJacobi,vt::Index2D> {
"\n Maximum Number of Iterations Reached. \n\n" :
fmt::format("\n Max-Norm Residual Reduced by {} \n\n", default_tol);

fmt::print(to_print);
fmt::print(fmt::runtime(to_print));

// Notify all nodes that computation is finished
objProxy_.broadcast<&NodeObj::workFinishedHandler>();
Expand Down
2 changes: 1 addition & 1 deletion examples/collection/jacobi3d_vt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct LinearPb3DJacobi : vt::Collection<LinearPb3DJacobi,vt::Index3D> {
"\n Maximum Number of Iterations Reached. \n\n" :
fmt::format("\n Max-Norm Residual Reduced by {} \n\n", default_tol);

fmt::print(to_print);
fmt::print(fmt::runtime(to_print));

// Notify all nodes that computation is finished
objProxy_.broadcast<&NodeObj::workFinishedHandler>();
Expand Down
2 changes: 1 addition & 1 deletion src/vt/collective/basic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void output(
#if !vt_check_enabled(trace_only)
return CollectiveOps::output(str,code,error,decorate,formatted,abort_out);
#else
::fmt::print(str.c_str());
::fmt::print("{}", str);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion src/vt/collective/collective_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void CollectiveAnyOps<instance>::output(
if (myrt) {
myrt->output(str,code,error,decorate,formatted);
} else {
::fmt::print(str.c_str());
::fmt::print("{}", str);
}
if (error and abort_out) {
vt::abort("Assertion Failed", 129);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/collective/reduce/reduce.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Reduce::PendingSendType Reduce::reduce(
ReduceNumType num_contrib
) {
auto msg_ptr = promoteMsg(msg);
return PendingSendType{theMsg()->getEpochContextMsg(msg_ptr), [=](){
return PendingSendType{theMsg()->getEpochContextMsg(msg_ptr), [this, root, msg_ptr, id, num_contrib](){
reduceImmediate<f>(root, msg_ptr.get(), id, num_contrib);
} };
}
Expand Down
2 changes: 1 addition & 1 deletion src/vt/elm/elm_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct ElementIDStruct {
};

inline auto format_as(ElementIDStruct e) {
auto fmt_str = "({},{},{},{})";
auto constexpr fmt_str = "({},{},{},{})";
return fmt::format(
fmt_str, e.id, e.getHomeNode(), e.curr_node, e.isMigratable()
);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ void ActiveMessenger::finishPendingActiveMsgAsyncRecv(InProgressIRecv* irecv) {
} else {
/*bool const put_delivered = */recvDataMsg(
1, put_tag, sender,
[=](PtrLenPairType ptr, ActionType deleter){
[this, base, sender](PtrLenPairType ptr, ActionType deleter){
envelopeSetPutPtr(base->env, std::get<0>(ptr), std::get<1>(ptr));
processActiveMsg(base, sender, true, deleter);
}
Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/collection_chain_set.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ CollectionChainSet<Index>::CollectionChainSet(
auto const this_node = theContext()->getNode();
auto const proxy_bits = proxy.getProxy();

ListenerType l = [=](ElementEventEnum event, IndexT idx, NodeType home) {
ListenerType l = [this, p, layout, this_node](ElementEventEnum event, IndexT idx, NodeType home) {
switch (event) {
case ElementEventEnum::ElementCreated:
case ElementEventEnum::ElementMigratedIn:
Expand Down
4 changes: 2 additions & 2 deletions src/vt/rdma/rdma.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ void RDMAManager::createDirectChannelInternal(
);

auto cb = theCB()->makeFunc<GetInfoChannel>(
pipe::LifetimeEnum::Once, [=](GetInfoChannel* msg){
pipe::LifetimeEnum::Once, [this, type, han, non_target, action, unique_channel_tag, is_target, override_target](GetInfoChannel* msg){
auto const& my_num_bytes = msg->num_bytes;
createDirectChannelFinish(
type, han, non_target, action, unique_channel_tag, is_target, my_num_bytes,
Expand Down Expand Up @@ -1326,7 +1326,7 @@ void RDMAManager::removeDirectChannel(
auto const target = getTarget(han, override_target);

if (this_node != target) {
auto cb = theCB()->makeFunc(pipe::LifetimeEnum::Once, [=]{
auto cb = theCB()->makeFunc(pipe::LifetimeEnum::Once, [this, han, action, target, this_node]{
auto iter = channels_.find(
makeChannelLookup(han,RDMA_TypeType::Put,target,this_node)
);
Expand Down
6 changes: 3 additions & 3 deletions src/vt/rdmahandle/holder.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ RequestHolder Holder<T,E>::rget(
auto mpi_type_str = TypeMPI<T>::getTypeStr();
RequestHolder r;
if (mpi2_) {
r.add([=]{
r.add([this, l, node, ptr, offset, len, mpi_type, mpi_type_str]{
LockMPI _scope_lock(l, node, data_window_);
vt_debug_print(
verbose, rdma,
Expand Down Expand Up @@ -188,7 +188,7 @@ RequestHolder Holder<T,E>::rput(
auto mpi_type_str = TypeMPI<T>::getTypeStr();
RequestHolder r;
if (mpi2_) {
r.add([=]{
r.add([this, l, node, ptr, offset, len, mpi_type, mpi_type_str]{
LockMPI _scope_lock(l, node, data_window_);
vt_debug_print(
verbose, rdma,
Expand Down Expand Up @@ -245,7 +245,7 @@ RequestHolder Holder<T,E>::raccum(
auto mpi_type_str = TypeMPI<T>::getTypeStr();
RequestHolder r;
if (mpi2_) {
r.add([=]{
r.add([this, l, node, offset, ptr, len, mpi_type, mpi_type_str, op]{
LockMPI _scope_lock(l, node, data_window_);
vt_debug_print(
verbose, rdma,
Expand Down
14 changes: 7 additions & 7 deletions src/vt/runtime/component/diagnostic_value_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct DiagnosticFormatter {

if (multiplier == 0) {
return fmt::format(
default_spec + " {}", val, unitFormat(unit_name, align)
fmt::runtime(default_spec + " {}"), val, unitFormat(unit_name, align)
);
} else {
// Compute the new value with multiplier as a double
Expand All @@ -169,7 +169,7 @@ struct DiagnosticFormatter {

auto decimal = std::string{decimal_format};
return fmt::format(
decimal + " {}", new_value, unitFormat(unit_name, align)
fmt::runtime(decimal + " {}"), new_value, unitFormat(unit_name, align)
);
}
break;
Expand Down Expand Up @@ -206,7 +206,7 @@ struct DiagnosticFormatter {

if (multiplier == 0) {
return fmt::format(
default_spec + " {}", val, unitFormat(unit_name, align)
fmt::runtime(default_spec + " {}"), val, unitFormat(unit_name, align)
);
} else {
// Compute the new value with multiplier as a double
Expand All @@ -217,7 +217,7 @@ struct DiagnosticFormatter {

auto decimal = std::string{decimal_format};
return fmt::format(
decimal + " {}", new_value, unitFormat(unit_name, align)
fmt::runtime(decimal + " {}"), new_value, unitFormat(unit_name, align)
);
}

Expand Down Expand Up @@ -255,7 +255,7 @@ struct DiagnosticFormatter {

if (multiplier == 0) {
return fmt::format(
default_spec + " {}", val, unitFormat(unit_name, align)
fmt::runtime(default_spec + " {}"), val, unitFormat(unit_name, align)
);
} else {
// Compute the new value with multiplier as a double
Expand All @@ -264,15 +264,15 @@ struct DiagnosticFormatter {

auto decimal = std::string{decimal_format};
return fmt::format(
decimal + " {}", new_value, unitFormat(unit_name, align)
fmt::runtime(decimal + " {}"), new_value, unitFormat(unit_name, align)
);
}

break;
}
case DiagnosticUnit::UnitsPerSecond:
default:
return fmt::format(default_spec, val);
return fmt::format(fmt::runtime(default_spec), val);
break;
}
return "";
Expand Down
4 changes: 2 additions & 2 deletions src/vt/runtime/runtime_banner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ void Runtime::printStartupBanner() {
if (getAppConfig()->vt_lb_show_config) {
auto s = opt_on("--vt_lb_show_config", "Showing LB specification");
fmt::print("{}\t{}", vt_pre, s);
fmt::print(vrt::collection::balance::ReadLBConfig::toString());
fmt::print("{}", vrt::collection::balance::ReadLBConfig::toString());
}
} else {
auto a3 = fmt::format("Load balancer name: \"{}\"", getAppConfig()->vt_lb_name);
Expand Down Expand Up @@ -950,7 +950,7 @@ void Runtime::printStartupBanner() {
}

//fmt::print("{}\n", reset);
fmt::print(reset);
fmt::print("{}", reset);

// Enqueue a check for later in case arguments are modified before work
// actually executes
Expand Down
9 changes: 4 additions & 5 deletions src/vt/runtime/runtime_diagnostics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ struct FormatHelper {
using DF = component::detail::DiagnosticFormatter;
using component::detail::decimal_format;

bool const is_decimal =
constexpr bool is_decimal =
std::is_same<T, float>::value or std::is_same<T, double>::value;

std::string default_format = is_decimal ? decimal_format : std::string{"{}"};
std::string default_format = is_decimal ? decimal_format : "{}";

if (base_) {
return fmt::format(default_format, std::get<T>(eval));
return fmt::format(fmt::runtime(default_format), std::get<T>(eval));
} else {
return DF::getValueWithUnits(std::get<T>(eval), unit_, default_format, align_);
}
Expand Down Expand Up @@ -299,9 +299,8 @@ void Runtime::computeAndPrintDiagnostics() {
);

auto out = fmt::format("{}", table.to_string());

if (theConfig()->vt_diag_print_summary) {
fmt::print(out);
fmt::print("{}", out);
}

if (theConfig()->vt_diag_summary_file != "") {
Expand Down
6 changes: 3 additions & 3 deletions src/vt/topos/location/location.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ void EntityLocationCoord<EntityID>::routeMsgNode(

theTerm()->produce(epoch);

auto trigger_msg_handler_action = [=](EntityID const& hid) {
auto trigger_msg_handler_action = [this, msg, home_node](EntityID const& hid) {
bool const& has_handler = msg->hasHandler();
auto const& from = msg->getLocFromNode();
if (has_handler) {
Expand Down Expand Up @@ -662,7 +662,7 @@ void EntityLocationCoord<EntityID>::routeMsgNode(

EntityID id_ = id;
// buffer the message here, the entity will be registered in the future
insertPendingEntityAction(id_, [=](NodeType resolved) {
insertPendingEntityAction(id_, [this, id_, epoch, msg, home_node, trigger_msg_handler_action](NodeType resolved) {
auto const& my_node = theContext()->getNode();

vt_debug_print(
Expand Down Expand Up @@ -779,7 +779,7 @@ void EntityLocationCoord<EntityID>::routePreparedMsg(
} else {
theTerm()->produce(epoch);
// non-eager protocol: get location first then send message after resolution
getLocation(msg->getEntity(), msg->getHomeNode(), [=](NodeType node) {
getLocation(msg->getEntity(), msg->getHomeNode(), [this, epoch, msg](NodeType node){
theMsg()->pushEpoch(epoch);
routeMsgNode<MessageT>(
msg->getEntity(), msg->getHomeNode(), node, msg
Expand Down
4 changes: 4 additions & 0 deletions src/vt/vrt/collection/balance/lb_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ static constexpr ElementIDType const no_element_id = elm::no_element_id;
struct PhaseOffset {
PhaseOffset() = delete;

PhaseOffset(int in_phases, unsigned int in_subphase)
: phases(in_phases), subphase(in_subphase)
{}

int phases;
static constexpr unsigned int NEXT_PHASE = 0;

Expand Down
14 changes: 7 additions & 7 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {
auto phase = msg->phase;
auto proposed = std::make_shared<ProposedReassignment>(model_, reassignment);

runInEpochCollective("LBManager::runLB -> computeStats", [=] {
runInEpochCollective("LBManager::runLB -> computeStats", [this, proposed, phase] {
auto stats_cb = vt::theCB()->makeBcast<&LBManager::statsHandler>(proxy_);
before_lb_stats_ = false;
computeStatistics(proposed, false, phase, stats_cb);
Expand Down Expand Up @@ -228,7 +228,7 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {

void
LBManager::runLB(PhaseType phase, vt::Callback<ReassignmentMsg> cb) {
runInEpochCollective("LBManager::runLB -> updateLoads", [=] {
runInEpochCollective("LBManager::runLB -> updateLoads", [this, phase] {
model_->updateLoads(phase);
});

Expand All @@ -241,7 +241,7 @@ LBManager::runLB(PhaseType phase, vt::Callback<ReassignmentMsg> cb) {
);
}

runInEpochCollective("LBManager::runLB -> computeStats", [=] {
runInEpochCollective("LBManager::runLB -> computeStats", [this, phase] {
auto stats_cb = vt::theCB()->makeBcast<&LBManager::statsHandler>(proxy_);
before_lb_stats_ = true;
computeStatistics(model_, false, phase, stats_cb);
Expand Down Expand Up @@ -327,11 +327,11 @@ void LBManager::startLB(
last_phase_info_->migration_count = 0;
last_phase_info_->ran_lb = false;

runInEpochCollective("LBManager::noLB -> updateLoads", [=] {
runInEpochCollective("LBManager::noLB -> updateLoads", [this, phase] {
model_->updateLoads(phase);
});

runInEpochCollective("LBManager::noLB -> computeStats", [=] {
runInEpochCollective("LBManager::noLB -> computeStats", [this, phase] {
before_lb_stats_ = true;
auto stats_cb = vt::theCB()->makeBcast<&LBManager::statsHandler>(proxy_);
before_lb_stats_ = true;
Expand Down Expand Up @@ -372,13 +372,13 @@ void LBManager::startLB(
/*static*/
void LBManager::printLBArgsHelp(LBType lb) {
auto sep = fmt::format("{}{:-^120}{}\n", debug::bd_green(), "", debug::reset());
fmt::print(sep);
fmt::print("{}", sep);
fmt::print(
"{}{}LB arguments for {}{}{}:\n",
debug::vtPre(), debug::green(), debug::magenta(),
get_lb_names()[lb], debug::reset()
);
fmt::print(sep);
fmt::print("{}", sep);
fmt::print("\n");

std::unordered_map<std::string, std::string> help;
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/temperedlb/tempered_msgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ using ClusterSummaryType = std::unordered_map<SharedIDType, ClusterInfo>;
using RankSummaryType = std::tuple<BytesType, ClusterSummaryType>;

inline auto format_as(ClusterInfo const& e) {
auto fmt_str = "(load={},bytes={},intra=({},{})),home={},edge={}";
auto constexpr fmt_str = "(load={},bytes={},intra=({},{})),home={},edge={}";
return fmt::format(
fmt_str, e.load, e.bytes, e.intra_send_vol, e.intra_recv_vol,
e.home_node, e.edge_weight
Expand Down
6 changes: 3 additions & 3 deletions src/vt/vrt/collection/manager.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ CollectionManager::runConstructor(Args&&... args) {

template <typename ColT>
void CollectionManager::addCleanupFn(VirtualProxyType proxy) {
cleanup_fns_[proxy].push_back([=]{
cleanup_fns_[proxy].push_back([this, proxy]{
CollectionProxyWrapType<ColT> typed_proxy(proxy);
destroyMatching(typed_proxy);
});
Expand Down Expand Up @@ -1792,7 +1792,7 @@ MigrateStatus CollectionManager::migrate(

auto const epoch = theMsg()->getEpoch();
theTerm()->produce(epoch);
schedule([=]{
schedule([this, epoch, col_proxy, idx, dest]{
theMsg()->pushEpoch(epoch);
migrateOut<ColT,IndexT>(col_proxy, idx, dest);
theMsg()->popEpoch(epoch);
Expand Down Expand Up @@ -2342,7 +2342,7 @@ messaging::PendingSend CollectionManager::schedule(
) {
theTerm()->produce(cur_epoch);
return messaging::PendingSend(
msg, [=]([[maybe_unused]] MsgVirtualPtr<BaseMsgType> inner_msg
msg, [this, cur_epoch, action, execute_now]([[maybe_unused]] MsgVirtualPtr<BaseMsgType> inner_msg
){
auto fn = [=]{
theMsg()->pushEpoch(cur_epoch);
Expand Down
Loading
Loading