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

[Breaking Change] Tasking rewrite #987

Merged
merged 34 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
bee5684
trying to use new tasks
jdolence Dec 11, 2023
e881ad9
Merge branch 'lroberts36/bugfix-sparse-cache' into jdolence/new_tasking
jdolence Dec 14, 2023
90f3e59
remove debugging
jdolence Dec 14, 2023
92564e1
formatting
jdolence Dec 14, 2023
6fde57d
remove raw mpi.hpp include
jdolence Dec 14, 2023
2320c0e
style
jdolence Dec 14, 2023
95818ba
more style
jdolence Dec 14, 2023
d602a35
and more style
jdolence Dec 14, 2023
10a67f1
ok thats enough
jdolence Dec 14, 2023
23803d0
actually remove the old task stuff
jdolence Dec 14, 2023
a4db040
formatting
jdolence Dec 14, 2023
8b7d42a
maybe last style commit...
jdolence Dec 14, 2023
52f0d5a
oops, includes inside parthenon namespace
jdolence Dec 14, 2023
e6eb2e3
update TaskID unit test
jdolence Dec 14, 2023
ce7a6bb
missing header
jdolence Dec 14, 2023
1ddc2e0
port the poisson examples
jdolence Dec 15, 2023
0bd54cf
try to fix serial builds
jdolence Dec 15, 2023
6082812
clean up branching in `|` operator of TaskID
jdolence Dec 15, 2023
07ae71a
rename Queue ThreadQueue
jdolence Dec 15, 2023
c1dbcb3
formatting
jdolence Dec 15, 2023
fbbe02a
try to fix builds with threads
jdolence Dec 15, 2023
d39a31a
update tasking docs
jdolence Dec 18, 2023
b074ee6
formatting and update changelog
jdolence Dec 18, 2023
829e047
address review comments
jdolence Jan 9, 2024
fc16f0f
merge develop
jdolence Jan 9, 2024
b400c11
style
jdolence Jan 9, 2024
9957538
add a comment about the dependent variable in Task
jdolence Jan 9, 2024
6a33dd6
address review comments
jdolence Jan 19, 2024
bf290fc
Merge branch 'develop' into jdolence/new_tasking
jdolence Jan 19, 2024
6029f7d
add TaskQualifier to driver prelude
jdolence Jan 19, 2024
ae047de
move using statement
jdolence Jan 19, 2024
cf59020
fix bug in ThreadQueue
jdolence Jan 23, 2024
dc16a32
set final_residual in gmg and bicgstab even if they exit by reaching …
jdolence Jan 23, 2024
18628be
fix serial case for tasks marked completion and global_sync
jdolence Jan 24, 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
6 changes: 2 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,8 @@ add_library(parthenon
solvers/mg_solver.hpp
solvers/solver_utils.hpp

tasks/task_id.cpp
tasks/task_id.hpp
tasks/task_list.hpp
tasks/task_types.hpp
tasks/tasks.hpp
tasks/thread_pool.hpp

time_integration/butcher_integrator.cpp
time_integration/low_storage_integrator.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/basic_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using Real = double;
// X3DIR z, phi, etc...
enum CoordinateDirection { NODIR = -1, X0DIR = 0, X1DIR = 1, X2DIR = 2, X3DIR = 3 };
enum class BlockLocation { Left = 0, Center = 1, Right = 2 };
enum class TaskStatus { fail, complete, incomplete, iterate, skip, waiting };
enum class TaskStatus { complete, incomplete, iterate };
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍


enum class AmrTag : int { derefine = -1, same = 0, refine = 1 };
enum class RefinementOp_t { Prolongation, Restriction, None };
Expand Down
8 changes: 2 additions & 6 deletions src/bvals/comms/boundary_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include "mesh/mesh_refinement.hpp"
#include "mesh/meshblock.hpp"
#include "prolong_restrict/prolong_restrict.hpp"
#include "tasks/task_id.hpp"
#include "tasks/task_list.hpp"

#include "tasks/tasks.hpp"
#include "utils/error_checking.hpp"
#include "utils/loop_utils.hpp"

Expand Down Expand Up @@ -424,11 +424,7 @@ TaskID AddBoundaryExchangeTasks(TaskID dependency, TL_t &tl,
}
template TaskID AddBoundaryExchangeTasks<BoundaryType::any, TaskList>(
TaskID, TaskList &, std::shared_ptr<MeshData<Real>> &, bool);
jdolence marked this conversation as resolved.
Show resolved Hide resolved
template TaskID AddBoundaryExchangeTasks<BoundaryType::any, IterativeTasks>(
TaskID, IterativeTasks &, std::shared_ptr<MeshData<Real>> &, bool);

template TaskID AddBoundaryExchangeTasks<BoundaryType::gmg_same, TaskList>(
TaskID, TaskList &, std::shared_ptr<MeshData<Real>> &, bool);
template TaskID AddBoundaryExchangeTasks<BoundaryType::gmg_same, IterativeTasks>(
TaskID, IterativeTasks &, std::shared_ptr<MeshData<Real>> &, bool);
} // namespace parthenon
4 changes: 2 additions & 2 deletions src/bvals/comms/bvals_in_one.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "basic_types.hpp"
#include "bvals/bvals_interfaces.hpp"
#include "coordinates/coordinates.hpp"
#include "tasks/task_id.hpp"
#include "tasks/task_list.hpp"

#include "tasks/tasks.hpp"
#include "utils/object_pool.hpp"

namespace parthenon {
Expand Down
2 changes: 1 addition & 1 deletion src/defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct RegionSize {
// TODO(felker): C++ Core Guidelines Enum.5: Don’t use ALL_CAPS for enumerators
// (avoid clashes with preprocessor macros). Enumerated type definitions in this file and:
// io_wrapper.hpp, bvals.hpp, field_diffusion.hpp,
// task_list.hpp, ???
// tasks.hpp, ???
Yurlungur marked this conversation as resolved.
Show resolved Hide resolved

// identifiers for all 6 faces of a MeshBlock
constexpr int BOUNDARY_NFACES = 6;
Expand Down
2 changes: 1 addition & 1 deletion src/driver/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "mesh/mesh.hpp"
#include "outputs/outputs.hpp"
#include "parameter_input.hpp"
#include "tasks/task_list.hpp"
#include "tasks/tasks.hpp"

namespace parthenon {

Expand Down
2 changes: 1 addition & 1 deletion src/driver/multistage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "driver/driver.hpp"
#include "mesh/mesh.hpp"
#include "parameter_input.hpp"
#include "tasks/task_list.hpp"
#include "tasks/tasks.hpp"
#include "time_integration/staged_integrator.hpp"

namespace parthenon {
Expand Down
4 changes: 1 addition & 3 deletions src/parthenon/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
#include <mesh/meshblock_pack.hpp>
#include <outputs/outputs.hpp>
#include <parameter_input.hpp>
#include <tasks/task_id.hpp>
#include <tasks/task_list.hpp>
#include <tasks/task_types.hpp>
#include <tasks/tasks.hpp>
#include <utils/partition_stl_containers.hpp>
#include <utils/reductions.hpp>
#include <utils/unique_id.hpp>
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/bicgstab_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "kokkos_abstraction.hpp"
#include "solvers/mg_solver.hpp"
#include "solvers/solver_utils.hpp"
#include "tasks/task_id.hpp"
#include "tasks/task_list.hpp"

#include "tasks/tasks.hpp"

namespace parthenon {

Expand Down
4 changes: 2 additions & 2 deletions src/solvers/mg_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "interface/state_descriptor.hpp"
#include "kokkos_abstraction.hpp"
#include "solvers/solver_utils.hpp"
#include "tasks/task_id.hpp"
#include "tasks/task_list.hpp"

#include "tasks/tasks.hpp"

namespace parthenon {

Expand Down
157 changes: 0 additions & 157 deletions src/tasks/task_id.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions src/tasks/task_id.hpp

This file was deleted.

Loading
Loading