Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mari2895 committed Feb 24, 2024
1 parent 051e8c9 commit 4dc6796
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/phoebus_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ TaskCollection PhoebusDriver::RungeKuttaStage(const int stage) {
md.get(), t, stage, net_field_totals)
: none);
// Test the reduction until it completes
TaskID finish_reduce_1 =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_reduce_1, fixup::NetFieldCheckReduce,
md.get(), t, stage, net_field_totals);
TaskID finish_reduce_1 = tl.AddTask(
TaskQualifier::local_sync | TaskQualifier::once_per_region, start_reduce_1,
fixup::NetFieldCheckReduce, md.get(), t, stage, net_field_totals);

auto mod_net = tl.AddTask(finish_reduce_1, fixup::ModifyNetField, md.get(), t,
beta * dt, stage, true, 1.);
Expand All @@ -384,9 +384,9 @@ TaskCollection PhoebusDriver::RungeKuttaStage(const int stage) {
md.get(), t, stage, net_field_totals_2)
: none);
// Test the reduction until it completes
TaskID finish_reduce_2 =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_reduce_2, fixup::NetFieldCheckReduce,
md.get(), t, stage, net_field_totals_2);
TaskID finish_reduce_2 = tl.AddTask(
TaskQualifier::local_sync | TaskQualifier::once_per_region, start_reduce_2,
fixup::NetFieldCheckReduce, md.get(), t, stage, net_field_totals_2);

// Remove artificial contribution to net field
auto mod_net_2 = tl.AddTask(finish_reduce_2, fixup::ModifyNetField, md.get(), t,
Expand Down Expand Up @@ -454,10 +454,11 @@ TaskCollection PhoebusDriver::RungeKuttaStage(const int stage) {
MPI_SUM)
: none);
auto finish_reduce_matter =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_reduce_matter,
&MonoMatRed_t::CheckReduce, pmono_mat_red);
auto finish_reduce_vols = tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_reduce_vols,
&MonoVolRed_t::CheckReduce, pmono_vol_red);
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region,
start_reduce_matter, &MonoMatRed_t::CheckReduce, pmono_mat_red);
auto finish_reduce_vols =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region,
start_reduce_vols, &MonoVolRed_t::CheckReduce, pmono_vol_red);
auto finish_mono_reds = finish_reduce_matter | finish_reduce_vols;
auto divide_vols =
(ib == 0 ? tl.AddTask(finish_mono_reds, MonopoleGR::DivideVols, monopole.get())
Expand Down Expand Up @@ -615,9 +616,9 @@ TaskCollection PhoebusDriver::RungeKuttaStage(const int stage) {
tl.AddTask(update_count, &AllReduce<std::vector<Real>>::StartReduce,
particle_resolution, MPI_SUM);

auto finish_count_reduce =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_count_reduce,
&AllReduce<std::vector<Real>>::CheckReduce, particle_resolution);
auto finish_count_reduce = tl.AddTask(
TaskQualifier::local_sync | TaskQualifier::once_per_region, start_count_reduce,
&AllReduce<std::vector<Real>>::CheckReduce, particle_resolution);

// Report particle count
auto report_count =
Expand Down Expand Up @@ -704,8 +705,9 @@ TaskListStatus PhoebusDriver::RadiationPostStep() {
pdo_gain_reducer, MPI_LOR)
: none);
finish_gain_reducer =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_gain_reducer,
&parthenon::AllReduce<bool>::CheckReduce, pdo_gain_reducer);
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region,
start_gain_reducer, &parthenon::AllReduce<bool>::CheckReduce,
pdo_gain_reducer);
}
auto calculate_four_force =
tl.AddTask(finish_gain_reducer, radiation::CoolingFunctionCalculateFourForce,
Expand Down Expand Up @@ -931,8 +933,9 @@ TaskListStatus PhoebusDriver::MonteCarloStep() {
particle_resolution, MPI_SUM);

auto finish_resolution_reduce =
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region, start_resolution_reduce,
&AllReduce<std::vector<Real>>::CheckReduce, particle_resolution);
tl.AddTask(TaskQualifier::local_sync | TaskQualifier::once_per_region,
start_resolution_reduce, &AllReduce<std::vector<Real>>::CheckReduce,
particle_resolution);

// Report tuning
auto report_resolution =
Expand Down

0 comments on commit 4dc6796

Please sign in to comment.