Commit 311643e2 authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

Merge branch 'applyBenchupdates' into 'master'

Apply-bench updates

See merge request !312
parents c9344b16 31480a09
Pipeline #22197 passed with stages
in 205 minutes and 19 seconds
......@@ -98,9 +98,14 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/doc/images)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/doc/images")
endif()
if(NOT EXISTS ${CMAKE_BINARY_DIR}/data/kerncraftMachineFiles)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/data/kerncraftMachineFiles")
endif()
waLBerla_link_files_to_builddir(data/meshes/*.msh)
waLBerla_link_files_to_builddir(data/meshes/3D/*.msh)
waLBerla_link_files_to_builddir(data/param/*.prm)
waLBerla_link_files_to_builddir(data/kerncraftMachineFiles/*.yml)
waLBerla_link_files_to_builddir(doc/images/*.png)
add_subdirectory( src )
......
......@@ -51,7 +51,7 @@ bool benchEdgeToVertex = true;
bool benchEdgeToEdge = true;
bool benchVertextoEdge = true;
static void registerLikwidRegion( std::string regionName )
static void registerLikwidRegion( const std::string& regionName )
{
WALBERLA_UNUSED( regionName );
/// register, start and stop to avoid warning in RESET
......@@ -86,15 +86,10 @@ static void performBenchmark( hyteg::P2Function< double >& src,
eename = "Edge-to-Edge-Apply-" + benchInfoString;
vename = "Vertex-to-Edge-Apply-" + benchInfoString;
registerLikwidRegion( vvname );
registerLikwidRegion( evname );
registerLikwidRegion( eename );
registerLikwidRegion( vename );
uint_t innerIterationsVertex =
levelinfo::num_microvertices_per_face_from_width( levelinfo::num_microvertices_per_edge( level ) - 3 );
WALBERLA_LOG_INFO_ON_ROOT(
walberla::format( "%18s|%10s|%10s|%10s|%6s|%5s", "kernel", "Time (s)", "MLUPs", "MFLOPs", " Iter", " Level" ) );
walberla::format( "%18s|%10s|%10s|%10s|%6s|%5s", "kernel", "Time (s)", "MLUPs", "MFLOPs", " Iter", " Level" ) )
typedef edgedof::EdgeDoFOrientation eo;
std::map< eo, uint_t > firstIdx;
......@@ -105,6 +100,7 @@ static void performBenchmark( hyteg::P2Function< double >& src,
if ( benchVertexToVertex )
{
registerLikwidRegion( vvname );
do
{
timingTree.start( vvname );
......@@ -151,13 +147,13 @@ static void performBenchmark( hyteg::P2Function< double >& src,
mflops = real_t( innerIterationsVertex * iterations * 13 ) / time / 1e6;
WALBERLA_LOG_INFO_ON_ROOT(
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "vertex to vertex", time, mlups, mflops, iterations, level ) );
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "vertex to vertex", time, mlups, mflops, iterations, level ) )
}
/// Edge to Vertex
if ( benchEdgeToVertex )
{
registerLikwidRegion( evname );
iterations = startIterations;
do
{
timingTree.start( evname );
......@@ -202,13 +198,13 @@ static void performBenchmark( hyteg::P2Function< double >& src,
mflops = real_t( innerIterationsVertex * iterations * 23 ) / time / 1e6;
WALBERLA_LOG_INFO_ON_ROOT(
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "edge to vertex", time, mlups, mflops, iterations, level ) );
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "edge to vertex", time, mlups, mflops, iterations, level ) )
}
/// Edge to Edge
if ( benchEdgeToEdge )
{
registerLikwidRegion( eename );
iterations = startIterations;
do
{
timingTree.start( eename );
......@@ -257,13 +253,13 @@ static void performBenchmark( hyteg::P2Function< double >& src,
mflops = real_t( innerIterationsVertex * iterations * 27 ) / time / 1e6;
WALBERLA_LOG_INFO_ON_ROOT(
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "edge to edge", time, mlups, mflops, iterations, level ) );
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "edge to edge", time, mlups, mflops, iterations, level ) )
}
/// Vertex to Edge
if ( benchVertextoEdge )
{
registerLikwidRegion( vename );
iterations = startIterations;
do
{
timingTree.start( vename );
......@@ -313,7 +309,7 @@ static void performBenchmark( hyteg::P2Function< double >& src,
mflops = real_t( innerIterationsVertex * iterations * 21 ) / time / 1e6;
WALBERLA_LOG_INFO_ON_ROOT(
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "vertex to edge", time, mlups, mflops, iterations, level ) );
walberla::format( "%18s|%10.3e|%10.3e|%10.3e|%6u|%5u", "vertex to edge", time, mlups, mflops, iterations, level ) )
}
}
......@@ -334,7 +330,7 @@ int main( int argc, char* argv[] )
if ( env.config() == nullptr )
{
auto defaultFile = "./ApplyPerformanceAnalysis-2D-P2.prm";
WALBERLA_LOG_PROGRESS_ON_ROOT( "No Parameter file given loading default parameter file: " << defaultFile );
WALBERLA_LOG_PROGRESS_ON_ROOT( "No Parameter file given loading default parameter file: " << defaultFile )
cfg->readParameterFile( defaultFile );
}
else
......@@ -375,7 +371,7 @@ int main( int argc, char* argv[] )
///// Apply benchmarks /////
std::vector< PrimitiveID > macroFaces = storage->getFaceIDs();
WALBERLA_CHECK_EQUAL( macroFaces.size(), 1 );
WALBERLA_CHECK_EQUAL( macroFaces.size(), 1 )
auto face = storage->getFace( macroFaces.front() );
performBenchmark( src, dst, laplace, level, *face, wcTimingTreeApp, useGeneratedKernels, startIterations );
......@@ -383,11 +379,11 @@ int main( int argc, char* argv[] )
if ( mainConf.getParameter< bool >( "printTiming" ) )
{
auto wcTPReduced = wcTimingTreeApp.getReduced();
WALBERLA_LOG_INFO_ON_ROOT( wcTPReduced );
WALBERLA_LOG_INFO_ON_ROOT( wcTPReduced )
walberla::WcTimingTree tt = timingTree->getReduced();
auto tt2 = tt.getCopyWithRemainder();
WALBERLA_LOG_INFO_ON_ROOT( tt2 );
WALBERLA_LOG_INFO_ON_ROOT( tt2 )
nlohmann::json ttJson;
walberla::timing::to_json( ttJson, wcTPReduced );
......@@ -399,7 +395,7 @@ int main( int argc, char* argv[] )
if ( mainConf.getParameter< bool >( "VTKOutput" ) )
{
WALBERLA_LOG_INFO_ON_ROOT( "Writing VTK output" );
WALBERLA_LOG_INFO_ON_ROOT( "Writing VTK output" )
hyteg::VTKOutput vtkOutput( "./output", "ApplyPerformanceAnalysis-2D-P2.cpp", storage );
vtkOutput.add( src );
vtkOutput.add( dst );
......
This diff is collapsed.
......@@ -29,15 +29,15 @@
#ifdef LIKWID_PERFMON
#include <likwid.h>
#else
#define LIKWID_MARKER_INIT
#define LIKWID_MARKER_THREADINIT
#define LIKWID_MARKER_SWITCH
#define LIKWID_MARKER_REGISTER(regionTag)
#define LIKWID_MARKER_START(regionTag)
#define LIKWID_MARKER_STOP(regionTag)
#define LIKWID_MARKER_CLOSE
#define LIKWID_MARKER_GET(regionTag, nevents, events, time, count)
#define LIKWID_MARKER_RESET(regionTag)
#define LIKWID_MARKER_INIT (void)0
#define LIKWID_MARKER_THREADINIT (void)0
#define LIKWID_MARKER_SWITCH (void)0
#define LIKWID_MARKER_REGISTER(regionTag) (void)0
#define LIKWID_MARKER_START(regionTag) (void)0
#define LIKWID_MARKER_STOP(regionTag) (void)0
#define LIKWID_MARKER_CLOSE (void)0
#define LIKWID_MARKER_GET(regionTag, nevents, events, time, count) (void)0
#define LIKWID_MARKER_RESET(regionTag) (void)0
#endif // LIKWID_PERFMON
......
......@@ -61,5 +61,9 @@ int main( int argc, char* argv[] )
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/3D/tet_1el.msh", 2, 35, 1 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/3D/tet_1el.msh", 3, 165, 35 );
/// EdgeDofFunction
hyteg::testFunctionProperties< hyteg::EdgeDoFFunctionTag >( "../../data/meshes/tri_1el.msh", 2, 12 + 6 * 3, 6 * 3 );
hyteg::testFunctionProperties< hyteg::EdgeDoFFunctionTag >( "../../data/meshes/tri_1el.msh", 3, 24 + 28 * 3, 28 * 3 );
return EXIT_SUCCESS;
}
\ No newline at end of file
Subproject commit 48bd19800b0c46030ae7f5e510e896a9154d78b8
Subproject commit ff1a3a46be8bfc09c5ab4fc3cb54007faadf8e55
Markdown is supported
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