Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ endif()

# vt includes magistrate and we must have magistrate for the MPI backend
if(NOT vt_FOUND)
set(vt_backend_feature_enabled 0)
find_package(magistrate REQUIRED)
else()
set(vt_backend_feature_enabled 1)
endif()

set(FMT_LIBRARY fmt)
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/baselb/baselb.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_BASELB_BASELB_H
#define INCLUDED_VT_LB_ALGO_BASELB_BASELB_H

#include <vt-lb/config/cmake_config.h>

#include <memory>
#include <vt-lb/model/PhaseData.h>

Expand Down
4 changes: 3 additions & 1 deletion src/vt-lb/algo/driver/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
#if !defined INCLUDED_VT_LB_ALGO_DRIVER_DRIVER_H
#define INCLUDED_VT_LB_ALGO_DRIVER_DRIVER_H

#include "vt-lb/model/PhaseData.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>

#include <memory>

Expand Down
4 changes: 3 additions & 1 deletion src/vt-lb/algo/driver/driver.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#if !defined INCLUDED_VT_LB_ALGO_DRIVER_DRIVER_IMPL_H
#define INCLUDED_VT_LB_ALGO_DRIVER_DRIVER_IMPL_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/algo/temperedlb/temperedlb.h>
#include "vt-lb/algo/driver/driver.h"
#include <vt-lb/algo/driver/driver.h>

namespace vt_lb {

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/basic_transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_BASIC_TRANSFER_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_BASIC_TRANSFER_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>
#include <vt-lb/comm/comm_traits.h>
#include <vt-lb/util/logging.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/cluster_summarizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_CLUSTER_SUMMARIZER_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_CLUSTER_SUMMARIZER_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Communication.h>
#include <vt-lb/algo/temperedlb/configuration.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/cluster_summarizer.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_CLUSTER_SUMMARIZER_IMPL_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_CLUSTER_SUMMARIZER_IMPL_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Communication.h>
#include <vt-lb/algo/temperedlb/cluster_summarizer.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/clustering.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_CLUSTERING_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_CLUSTERING_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/util/logging.h>

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_CONFIGURATION_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_CONFIGURATION_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/algo/temperedlb/work_model.h>
#include <vt-lb/algo/temperedlb/transfer_util.h>

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/full_graph_visualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_FULL_GRAPH_VISUALIZER_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_FULL_GRAPH_VISUALIZER_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Communication.h>
#include <vt-lb/algo/temperedlb/clustering.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/info_propagation.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_INFO_PROPAGATION_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_INFO_PROPAGATION_H

#include <vt-lb/config/cmake_config.h>

#include <random>
#include <unordered_map>
#include <unordered_set>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/relaxed_cluster_transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_RELAXED_CLUSTER_TRANSFER_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_RELAXED_CLUSTER_TRANSFER_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/algo/temperedlb/transfer.h>
#include <vt-lb/model/PhaseData.h>
#include <vt-lb/algo/temperedlb/statistics.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_STATISTICS_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_STATISTICS_H

#include <vt-lb/config/cmake_config.h>

#include <limits>

namespace vt_lb::algo::temperedlb {
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/symmetrize_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_SYMMETRIZE_COMM_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_SYMMETRIZE_COMM_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Communication.h>

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/task_cluster_summary_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_TASK_CLUSTER_SUMMARY_INFO_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_TASK_CLUSTER_SUMMARY_INFO_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Communication.h>

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/temperedlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_TEMPEREDLB_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_TEMPEREDLB_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/comm/comm_traits.h>
#include <vt-lb/algo/baselb/baselb.h>

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_TRANSFER_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_TRANSFER_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>
#include <vt-lb/comm/comm_traits.h>
#include <vt-lb/util/logging.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/transfer_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_TRANSFER_UTIL_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_TRANSFER_UTIL_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>
#include <vt-lb/model/PhaseData.h>
#include <vt-lb/algo/temperedlb/task_cluster_summary_info.h>
Expand Down
4 changes: 3 additions & 1 deletion src/vt-lb/algo/temperedlb/visualize.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Communication.h>
#include "clustering.h"
#include <vt-lb/algo/temperedlb/clustering.h>

#include <sstream>
#include <iomanip>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/algo/temperedlb/work_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_ALGO_TEMPEREDLB_WORK_MODEL_H
#define INCLUDED_VT_LB_ALGO_TEMPEREDLB_WORK_MODEL_H

#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/PhaseData.h>
#include <vt-lb/model/Task.h>
#include <vt-lb/algo/temperedlb/task_cluster_summary_info.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/MPI/class_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_CLASS_HANDLE_H
#define INCLUDED_VT_LB_COMM_CLASS_HANDLE_H

#include <vt-lb/config/cmake_config.h>

#include <mpi.h>

namespace vt_lb::comm {
Expand Down
6 changes: 4 additions & 2 deletions src/vt-lb/comm/MPI/class_handle.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#if !defined INCLUDED_VT_LB_COMM_CLASS_HANDLE_IMPL_H
#define INCLUDED_VT_LB_COMM_CLASS_HANDLE_IMPL_H

#include "class_handle.h"
#include "vt-lb/comm/MPI/comm_mpi.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/comm/MPI/class_handle.h>
#include <vt-lb/comm/MPI/comm_mpi.h>

namespace vt_lb::comm {

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/MPI/comm_mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_COMM_MPI_H
#define INCLUDED_VT_LB_COMM_COMM_MPI_H

#include <vt-lb/config/cmake_config.h>

#include <cstdint>
#include <memory>
#include <tuple>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/MPI/comm_mpi_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_COMM_MPI_DETAIL_H
#define INCLUDED_VT_LB_COMM_COMM_MPI_DETAIL_H

#include <vt-lb/config/cmake_config.h>

#include <vector>

namespace vt_lb::comm::detail {
Expand Down
4 changes: 3 additions & 1 deletion src/vt-lb/comm/MPI/termination.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
#if !defined INCLUDED_VT_LB_COMM_TERMINATION_H
#define INCLUDED_VT_LB_COMM_TERMINATION_H

#include "vt-lb/comm/MPI/class_handle.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/comm/MPI/class_handle.h>

#include <cstdint>
#include <memory>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/comm_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_COMM_TRAITS_H
#define INCLUDED_VT_LB_COMM_COMM_TRAITS_H

#include <vt-lb/config/cmake_config.h>

#include <cstddef>
#include <type_traits>
#include <utility>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/vt/comm_vt.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_COMM_VT_H
#define INCLUDED_VT_LB_COMM_COMM_VT_H

#include <vt-lb/config/cmake_config.h>

#if vt_backend_enabled

#include <vt/configs/types/types_type.h>
Expand Down
6 changes: 4 additions & 2 deletions src/vt-lb/comm/vt/comm_vt.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#if !defined INCLUDED_VT_LB_COMM_COMM_VT_IMPL_H
#define INCLUDED_VT_LB_COMM_COMM_VT_IMPL_H

#include "vt-lb/comm/vt/comm_vt.h"
#include "vt-lb/comm/vt/proxy_wrapper.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/comm/vt/comm_vt.h>
#include <vt-lb/comm/vt/proxy_wrapper.h>
#include <vt/transport.h>

namespace vt_lb::comm {
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/vt/proxy_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#ifndef INCLUDED_VT_LB_COMM_PROXY_WRAPPER_H
#define INCLUDED_VT_LB_COMM_PROXY_WRAPPER_H

#include <vt-lb/config/cmake_config.h>

#include <atomic>
#include <vt/transport.h>
#include <mpi.h>
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/comm/vt/proxy_wrapper.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_COMM_PROXY_WRAPPER_IMPL_H
#define INCLUDED_VT_LB_COMM_PROXY_WRAPPER_IMPL_H

#include <vt-lb/config/cmake_config.h>

#include <vt/transport.h>

#include <cstring>
Expand Down
2 changes: 1 addition & 1 deletion src/vt-lb/config/cmake_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
//@HEADER
*/

#define vt_backend_enabled @vt_backend_enabled@
#define vt_backend_enabled @vt_backend_feature_enabled@
4 changes: 3 additions & 1 deletion src/vt-lb/model/Communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
#if !defined INCLUDED_VT_LB_MODEL_COMMUNICATION_H
#define INCLUDED_VT_LB_MODEL_COMMUNICATION_H

#include "types.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>

namespace vt_lb::model {

Expand Down
10 changes: 6 additions & 4 deletions src/vt-lb/model/PhaseData.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@
#if !defined INCLUDED_VT_LB_MODEL_PHASE_DATA_H
#define INCLUDED_VT_LB_MODEL_PHASE_DATA_H

#include "types.h"
#include "SharedBlock.h"
#include "Task.h"
#include "Communication.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>
#include <vt-lb/model/SharedBlock.h>
#include <vt-lb/model/Task.h>
#include <vt-lb/model/Communication.h>

#include <unordered_map>
#include <vector>
Expand Down
6 changes: 4 additions & 2 deletions src/vt-lb/model/SharedBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#if !defined INCLUDED_VT_LB_MODEL_BLOCK_H
#define INCLUDED_VT_LB_MODEL_BLOCK_H

#include "types.h"
#include "Task.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>
#include <vt-lb/model/Task.h>

namespace vt_lb::model {

Expand Down
8 changes: 7 additions & 1 deletion src/vt-lb/model/Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
#if !defined INCLUDED_VT_LB_MODEL_TASK_H
#define INCLUDED_VT_LB_MODEL_TASK_H

#include "types.h"
#include <vt-lb/config/cmake_config.h>

#include <vt-lb/model/types.h>

#include <unordered_set>

Expand Down Expand Up @@ -75,6 +77,10 @@ struct TaskMemory {

struct Task {
Task() = default;
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding documentation for this constructor to clarify its intended use case and the default values that will be used for uninitialized fields (home_, current_, migratable_, memory_, shared_blocks_). This would help other developers understand when to use this simplified constructor versus the full constructor.

Suggested change
Task() = default;
Task() = default;
/**
* @brief Simplified constructor for Task.
*
* Initializes a Task with the given id and load.
* Other fields are set to their default values:
* - home_ = invalid_node
* - current_ = invalid_node
* - migratable_ = true
* - memory_ = default-constructed TaskMemory (all fields 0.0)
* - shared_blocks_ = empty set
*
* Use this constructor when only id and load are known, and other fields can be defaulted.
* For full control, use the more detailed constructor.
*/

Copilot uses AI. Check for mistakes.
Task(TaskType id, LoadType load)
: id_(id), load_(load)
{}

Task(TaskType id, RankType home, RankType current, bool migratable,
TaskMemory const& memory, LoadType load)
: id_(id),
Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/model/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_MODEL_TYPES_H
#define INCLUDED_VT_LB_MODEL_TYPES_H

#include <vt-lb/config/cmake_config.h>

#include <cstdint>
#include <functional>

Expand Down
2 changes: 2 additions & 0 deletions src/vt-lb/util/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#if !defined INCLUDED_VT_LB_UTIL_LOGGING_H
#define INCLUDED_VT_LB_UTIL_LOGGING_H

#include <vt-lb/config/cmake_config.h>

#include <fmt-lb/format.h>
#include <string_view>
#include <utility>
Expand Down
Loading
Loading