Commit 8059e66a authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

add memory consumption test

parent 1ccea414
Pipeline #41106 failed with stages
in 34 minutes and 34 seconds
......@@ -554,6 +554,8 @@ waLBerla_execute_test(NAME PrimitiveDataTest)
waLBerla_compile_test(FILES LevelinfoTest.cpp DEPENDS hyteg core)
waLBerla_execute_test(NAME LevelinfoTest)
waLBerla_compile_test(FILES MemoryConsumption.cpp DEPENDS hyteg core)
waLBerla_compile_test(FILES PrimitiveStorageTest.cpp DEPENDS hyteg core)
waLBerla_execute_test(NAME PrimitiveStorageTest1 COMMAND $<TARGET_FILE:PrimitiveStorageTest>)
waLBerla_execute_test(NAME PrimitiveStorageTest3 COMMAND $<TARGET_FILE:PrimitiveStorageTest> PROCESSES 3)
......
/*
* Copyright (c) 2017-2021 Dominik Thoennes.
*
* This file is part of HyTeG
* (see https://i10git.cs.fau.de/hyteg/hyteg).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "core/Environment.h"
#include "hyteg/memory/MemoryAllocation.hpp"
#include "hyteg/mesh/MeshInfo.hpp"
#include "hyteg/primitivestorage/SetupPrimitiveStorage.hpp"
namespace hyteg {
void printMemory()
{
walberla::uint_t N = 1;
auto meshInfo = MeshInfo::meshRectangle( Point2D( { 0, 0 } ), Point2D( { 1, 1 } ), MeshInfo::CRISS, N, N );
printCurrentMemoryUsage();
SetupPrimitiveStorage setupStorage( meshInfo, uint_c( walberla::mpi::MPIManager::instance()->numProcesses() ) );
printCurrentMemoryUsage();
std::stringstream ss;
setupStorage.toStream( ss, false );
WALBERLA_LOG_INFO_ON_ROOT( ss.str() );
}
} // namespace hyteg
int main( int argc, char* argv[] )
{
walberla::Environment walberlaEnv( argc, argv );
walberla::MPIManager::instance()->useWorldComm();
hyteg::printMemory();
return 1;
}
......@@ -67,14 +67,20 @@ int main( int argc, char* argv[] )
walberla::MPIManager::instance()->useWorldComm();
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/tri_1el.msh", 2, 15, 3 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/tri_1el.msh", 3, 45, 21 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/tri_1el.msh", 20, 549757386753, 549754241025 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/tri_2el.msh", 2, 25, 9 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/tri_2el.msh", 3, 81, 49 );
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 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/3D/tet_1el.msh", 17, 375317149057025, 375282789318655 );
hyteg::testFunctionProperties< hyteg::P1FunctionTag >( "../../data/meshes/3D/cube_6el.msh", 17, 375317149057025, 375282789318655 );
/// 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 );
hyteg::testFunctionProperties< hyteg::P2FunctionTag >( "../../data/meshes/tri_1el.msh", 19, 549757386753, 549754241025 );
hyteg::testFunctionProperties< hyteg::P2FunctionTag >( "../../data/meshes/3D/tet_1el.msh", 16, 375317149057025, 375282789318655 );
return EXIT_SUCCESS;
}
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