From bee85eb3d5815da8a499e89f85e29cbd995a897a Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Wed, 20 Mar 2019 11:04:29 +0100 Subject: [PATCH] added deprecated flag to all levelwise load balancing classes use the general classes instead. they support levelwise load balancing via a constructor parameter default is levelwise for backward compatibility --- apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp | 4 ++-- apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp | 8 ++++---- src/blockforest/loadbalancing/DynamicCurve.h | 2 +- src/blockforest/loadbalancing/DynamicDiffusive.h | 2 +- tests/pe/DynamicRefinement.cpp | 2 +- .../SettlingSphereMEMDynamicRefinement.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp b/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp index 68f90a8cf..59797ae78 100644 --- a/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp +++ b/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp @@ -777,14 +777,14 @@ void run( const shared_ptr< Config > & config, const LatticeModel_T & latticeMod if( dynamicLoadBalancingType == 0 ) { blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicLevelwiseCurveBalance< blockforest::NoPhantomData >( curveHilbert, curveAllGather ) ); + blockforest::DynamicCurveBalance< blockforest::NoPhantomData >( curveHilbert, curveAllGather ) ); loadBalanceLogging << "\n + type: " << ( curveHilbert ? "Hilbert order" : "Morton order" ) << "\n + parallelization: " << ( curveAllGather? "all gather" : "master-slave" ); } else { - using DLDB = blockforest::DynamicLevelwiseDiffusionBalance<blockforest::NoPhantomData>; + using DLDB = blockforest::DynamicDiffusionBalance<blockforest::NoPhantomData>; DLDB balancer( diffusionMaxIterations, diffusionFlowIterations ); if( diffusionMode == 0 ) balancer.setMode( DLDB::DIFFUSION_PUSH ); diff --git a/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp b/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp index d62fac032..d83409c4c 100644 --- a/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp +++ b/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp @@ -2553,11 +2553,11 @@ void run( const shared_ptr< Config > & config, const LatticeModel_T & latticeMod blockforest.setRefreshBlockStateDeterminationFunction( Pseudo2DBlockStateDetermination( blockforest, Empty ) ); blockforest.setRefreshPhantomBlockDataAssignmentFunction( Pseudo2DPhantomWeightAssignment( Empty ) ); blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicLevelwiseCurveBalance< Pseudo2DPhantomWeight >( hilbert, allGather ) ); + blockforest::DynamicCurveBalance< Pseudo2DPhantomWeight >( hilbert, allGather ) ); } else blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicLevelwiseCurveBalance< blockforest::NoPhantomData >( hilbert, allGather ) ); + blockforest::DynamicCurveBalance< blockforest::NoPhantomData >( hilbert, allGather ) ); } else { @@ -2571,11 +2571,11 @@ void run( const shared_ptr< Config > & config, const LatticeModel_T & latticeMod blockforest.setRefreshPhantomBlockDataPackFunction( Pseudo2DPhantomWeightPackUnpack() ); blockforest.setRefreshPhantomBlockDataUnpackFunction( Pseudo2DPhantomWeightPackUnpack() ); blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicLevelwiseDiffusionBalance< Pseudo2DPhantomWeight >( maxIterations, flowIterations ) ); + blockforest::DynamicDiffusionBalance< Pseudo2DPhantomWeight >( maxIterations, flowIterations ) ); } else blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicLevelwiseDiffusionBalance< blockforest::NoPhantomData >( maxIterations, flowIterations ) ); + blockforest::DynamicDiffusionBalance< blockforest::NoPhantomData >( maxIterations, flowIterations ) ); } // add callback functions which are executed after all block data was unpakced after the dynamic load balancing diff --git a/src/blockforest/loadbalancing/DynamicCurve.h b/src/blockforest/loadbalancing/DynamicCurve.h index 9bd79b536..c7984261d 100644 --- a/src/blockforest/loadbalancing/DynamicCurve.h +++ b/src/blockforest/loadbalancing/DynamicCurve.h @@ -937,7 +937,7 @@ void DynamicCurveBalance< PhantomData_T >::finalAssignment( const uint_t index, ///This class is deprecated use DynamicCurveBalance instead. template< typename PhantomData_T > -using DynamicLevelwiseCurveBalance = DynamicCurveBalance<PhantomData_T> ; +using DynamicLevelwiseCurveBalance [[deprecated]] = DynamicCurveBalance<PhantomData_T> ; } // namespace blockforest } // namespace walberla diff --git a/src/blockforest/loadbalancing/DynamicDiffusive.h b/src/blockforest/loadbalancing/DynamicDiffusive.h index d9037070b..a72328fdd 100644 --- a/src/blockforest/loadbalancing/DynamicDiffusive.h +++ b/src/blockforest/loadbalancing/DynamicDiffusive.h @@ -997,7 +997,7 @@ bool DynamicDiffusionBalance< PhantomData_T >::operator()( std::vector< std::pai ///This class is deprecated use DynamicDiffusionBalance instead. template< typename PhantomData_T > -using DynamicLevelwiseDiffusionBalance = DynamicDiffusionBalance<PhantomData_T> ; +using DynamicLevelwiseDiffusionBalance [[deprecated]] = DynamicDiffusionBalance<PhantomData_T> ; } // namespace blockforest } // namespace walberla diff --git a/tests/pe/DynamicRefinement.cpp b/tests/pe/DynamicRefinement.cpp index 07ce98b85..454e915a6 100644 --- a/tests/pe/DynamicRefinement.cpp +++ b/tests/pe/DynamicRefinement.cpp @@ -111,7 +111,7 @@ int main( int argc, char** argv ) blockforest.setRefreshMinTargetLevelDeterminationFunction( regrid ); blockforest.setRefreshPhantomBlockMigrationPreparationFunction( - blockforest::DynamicLevelwiseCurveBalance< blockforest::NoPhantomData >( true, true ) ); + blockforest::DynamicCurveBalance< blockforest::NoPhantomData >( true, true ) ); real_t spacing(2.5); for (auto blkIt = forest->begin(); blkIt != forest->end(); ++blkIt) diff --git a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp index 558747d90..c7be45528 100644 --- a/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp +++ b/tests/pe_coupling/momentum_exchange_method/SettlingSphereMEMDynamicRefinement.cpp @@ -589,7 +589,7 @@ int main( int argc, char **argv ) bool curveHilbert = false; bool curveAllGather = true; - blockforest.setRefreshPhantomBlockMigrationPreparationFunction( blockforest::DynamicLevelwiseCurveBalance< blockforest::NoPhantomData >( curveHilbert, curveAllGather ) ); + blockforest.setRefreshPhantomBlockMigrationPreparationFunction( blockforest::DynamicCurveBalance< blockforest::NoPhantomData >( curveHilbert, curveAllGather ) ); ///////////////// // PE COUPLING // -- GitLab