Skip to content
Snippets Groups Projects
Commit b5f3bec0 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[ADD] added load balancing benchmark

parent 9686169b
Branches
Tags
No related merge requests found
...@@ -2,13 +2,17 @@ waLBerla_link_files_to_builddir( *.cfg ) ...@@ -2,13 +2,17 @@ waLBerla_link_files_to_builddir( *.cfg )
waLBerla_link_files_to_builddir( *.py ) waLBerla_link_files_to_builddir( *.py )
waLBerla_add_executable ( NAME PE_GranularGas waLBerla_add_executable ( NAME PE_GranularGas
FILES PE_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp FILES PE_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp
DEPENDS blockforest core pe postprocessing ) DEPENDS blockforest core pe postprocessing )
waLBerla_add_executable ( NAME MESA_PD_LoadBalancing
FILES MESA_PD_LoadBalancing.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk )
waLBerla_add_executable ( NAME MESA_PD_GranularGas waLBerla_add_executable ( NAME MESA_PD_GranularGas
FILES MESA_PD_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp FILES MESA_PD_GranularGas.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk ) DEPENDS blockforest core pe mesa_pd postprocessing vtk )
waLBerla_add_executable ( NAME MESA_PD_KernelBenchmark waLBerla_add_executable ( NAME MESA_PD_KernelBenchmark
FILES MESA_PD_KernelBenchmark.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp FILES MESA_PD_KernelBenchmark.cpp SQLProperties.cpp Parameters.cpp NodeTimings.cpp sortParticleStorage.cpp CreateParticles.cpp
DEPENDS blockforest core pe mesa_pd postprocessing vtk ) DEPENDS blockforest core pe mesa_pd postprocessing vtk )
This diff is collapsed.
...@@ -71,6 +71,33 @@ void loadFromConfig(Parameters& params, const Config::BlockHandle& cfg) ...@@ -71,6 +71,33 @@ void loadFromConfig(Parameters& params, const Config::BlockHandle& cfg)
params.sqlFile = cfg.getParameter<std::string>("sqlFile", "benchmark.sqlite" ); params.sqlFile = cfg.getParameter<std::string>("sqlFile", "benchmark.sqlite" );
WALBERLA_LOG_INFO_ON_ROOT("sqlFile: " << params.sqlFile); WALBERLA_LOG_INFO_ON_ROOT("sqlFile: " << params.sqlFile);
params.regridMin = cfg.getParameter<uint_t>("regridMin", uint_c(100) );
WALBERLA_LOG_INFO_ON_ROOT("regridMin: " << params.regridMin);
params.regridMax = cfg.getParameter<uint_t>("regridMax", uint_c(1000) );
WALBERLA_LOG_INFO_ON_ROOT("regridMax: " << params.regridMax);
params.maxBlocksPerProcess = cfg.getParameter<int>("maxBlocksPerProcess", int_c(1000) );
WALBERLA_LOG_INFO_ON_ROOT("maxBlocksPerProcess: " << params.maxBlocksPerProcess);
params.baseWeight = cfg.getParameter<real_t>("baseWeight", real_t(10.0) );
WALBERLA_LOG_INFO_ON_ROOT("baseWeight: " << params.baseWeight);
params.metisipc2redist = cfg.getParameter<real_t>("metisipc2redist", real_t(1000.0) );
WALBERLA_LOG_INFO_ON_ROOT("metisipc2redist: " << params.metisipc2redist);
params.LBAlgorithm = cfg.getParameter<std::string>("LBAlgorithm", "Hilbert" );
WALBERLA_LOG_INFO_ON_ROOT("LBAlgorithm: " << params.LBAlgorithm);
params.metisAlgorithm = cfg.getParameter<std::string>("metisAlgorithm", "PART_GEOM_KWAY" );
WALBERLA_LOG_INFO_ON_ROOT("metisAlgorithm: " << params.metisAlgorithm);
params.metisWeightsToUse = cfg.getParameter<std::string>("metisWeightsToUse", "BOTH_WEIGHTS" );
WALBERLA_LOG_INFO_ON_ROOT("metisWeightsToUse: " << params.metisWeightsToUse);
params.metisEdgeSource = cfg.getParameter<std::string>("metisEdgeSource", "EDGES_FROM_EDGE_WEIGHTS" );
WALBERLA_LOG_INFO_ON_ROOT("metisEdgeSource: " << params.metisEdgeSource);
} }
void saveToSQL(const Parameters& params, void saveToSQL(const Parameters& params,
...@@ -101,6 +128,21 @@ void saveToSQL(const Parameters& params, ...@@ -101,6 +128,21 @@ void saveToSQL(const Parameters& params,
stringProperties["sqlFile"] = params.sqlFile; stringProperties["sqlFile"] = params.sqlFile;
realProperties["baseWeight"] = double_c(params.baseWeight);
realProperties["metisipc2redist"] = double_c(params.metisipc2redist);
stringProperties["LBAlgorithm"] = params.LBAlgorithm;
stringProperties["metisAlgorithm"] = params.metisAlgorithm;
stringProperties["metisWeightsToUse"] = params.metisWeightsToUse;
stringProperties["metisEdgeSource"] = params.metisEdgeSource;
} }
} //namespace walberla } //namespace walberla
\ No newline at end of file
...@@ -48,6 +48,15 @@ struct Parameters ...@@ -48,6 +48,15 @@ struct Parameters
int64_t visSpacing = 1000; int64_t visSpacing = 1000;
std::string path = "vtk_out"; std::string path = "vtk_out";
std::string sqlFile = "benchmark.sqlite"; std::string sqlFile = "benchmark.sqlite";
uint_t regridMin = uint_c(100);
uint_t regridMax = uint_c(1000);
int maxBlocksPerProcess = int_c(1000);
real_t baseWeight = real_t(10.0);
real_t metisipc2redist = real_t(1000.0);
std::string LBAlgorithm = "Hilbert";
std::string metisAlgorithm = "PART_GEOM_KWAY";
std::string metisWeightsToUse = "BOTH_WEIGHTS";
std::string metisEdgeSource = "EDGES_FROM_EDGE_WEIGHTS";
}; };
void loadFromConfig(Parameters& params, void loadFromConfig(Parameters& params,
......
...@@ -18,4 +18,15 @@ cfg.addParameter("visSpacing", "int64_t", "1000") ...@@ -18,4 +18,15 @@ cfg.addParameter("visSpacing", "int64_t", "1000")
cfg.addParameter("path", "std::string", '"vtk_out"') cfg.addParameter("path", "std::string", '"vtk_out"')
cfg.addParameter("sqlFile", "std::string", '"benchmark.sqlite"') cfg.addParameter("sqlFile", "std::string", '"benchmark.sqlite"')
cfg.addParameter("regridMin", "uint_t", 'uint_c(100)')
cfg.addParameter("regridMax", "uint_t", 'uint_c(1000)')
cfg.addParameter("maxBlocksPerProcess", "int", 'int_c(1000)')
cfg.addParameter("baseWeight", "real_t", 'real_t(10.0)')
cfg.addParameter("metisipc2redist", "real_t", 'real_t(1000.0)')
cfg.addParameter("LBAlgorithm", "std::string", '"Hilbert"')
cfg.addParameter("metisAlgorithm", "std::string", '"PART_GEOM_KWAY"' );
cfg.addParameter("metisWeightsToUse", "std::string", '"BOTH_WEIGHTS"' );
cfg.addParameter("metisEdgeSource", "std::string", '"EDGES_FROM_EDGE_WEIGHTS"' );
cfg.generate() cfg.generate()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment