diff --git a/src/backends/extrae/extrae_type_stack.cpp b/src/backends/extrae/extrae_type_stack.cpp index bf8f5d291fe9bbee8a0f8c7e6ac8ed7a43b68967..a5b5c49e4f3dd0a03a6f10e573ec2a9ce12666fd 100644 --- a/src/backends/extrae/extrae_type_stack.cpp +++ b/src/backends/extrae/extrae_type_stack.cpp @@ -36,8 +36,10 @@ const std::string ExtraeTypeStackStrategy::paraverConfigOverviewWindow = R"( ################################################################################ window_name neSmiK Annotation Overview window_type single +window_position_x 400 +window_position_y 150 window_width 600 -window_height 114 +window_height NESMIK_REPLACE_WINDOW_HEIGHT window_comm_lines_enabled false window_flags_enabled false window_noncolor_mode true @@ -73,8 +75,10 @@ const std::string ExtraeTypeStackStrategy::paraverConfigLevelWindow = R"( ################################################################################ window_name NESMIK_REPLACE_WINDOW_NAME window_type single +window_position_x 400 +window_position_y NESMIK_REPLACE_WINDOW_Y_POSITION window_width 600 -window_height 114 +window_height NESMIK_REPLACE_WINDOW_HEIGHT window_comm_lines_enabled false window_flags_enabled false window_noncolor_mode true @@ -220,8 +224,11 @@ void ExtraeTypeStackStrategy::Finalize() noexcept { auto overviewReplacedNumLevels = std::regex_replace( paraverConfigOverviewWindow, std::regex("NESMIK_REPLACE_NUM_LEVELS"), std::to_string(numberOfEventTypes)); + auto replacedWindowHeightOverview = std::regex_replace( + overviewReplacedNumLevels, std::regex("NESMIK_REPLACE_WINDOW_HEIGHT"), + std::to_string(paraverConfigWindowHeight_)); auto overviewReplacedAllTypes = - std::regex_replace(overviewReplacedNumLevels, + std::regex_replace(replacedWindowHeightOverview, std::regex("NESMIK_REPLACE_LEVELS"), allTypesString); // write Overview @@ -237,8 +244,16 @@ void ExtraeTypeStackStrategy::Finalize() noexcept { auto replacedEventType = std::regex_replace( paraverConfigLevelWindow, std::regex("NESMIK_REPLACE_EVENT_TYPE"), std::to_string(baseType + level)); + auto replacedWindowHeight = std::regex_replace( + replacedEventType, std::regex("NESMIK_REPLACE_WINDOW_HEIGHT"), + std::to_string(paraverConfigWindowHeight_)); + auto replacedWindowYPosition = std::regex_replace( + replacedWindowHeight, std::regex("NESMIK_REPLACE_WINDOW_Y_POSITION"), + std::to_string( + (paraverConfigWindowHeight_ + paraverConfigWindowHeightPad_) * + (level + 2 /* offset with overview window */))); auto replacedWindowName = std::regex_replace( - replacedEventType, std::regex("NESMIK_REPLACE_WINDOW_NAME"), + replacedWindowYPosition, std::regex("NESMIK_REPLACE_WINDOW_NAME"), windowName); // write Overview diff --git a/src/backends/extrae/extrae_type_stack.hpp b/src/backends/extrae/extrae_type_stack.hpp index 207894a5342c1bc5fef0f34069f0e918be718a19..616766f74b6511976214f57ef8489a5cfb66eb17 100644 --- a/src/backends/extrae/extrae_type_stack.hpp +++ b/src/backends/extrae/extrae_type_stack.hpp @@ -29,6 +29,9 @@ class ExtraeTypeStackStrategy : public ProperlyNestedAnnotationStrategy { "EXTRAE_WRITE_CONFIG_FILE", "Write corresponding Paraver .cfg file if set to True", false); + inline static const int paraverConfigWindowHeight_ = 115; + inline static const int paraverConfigWindowHeightPad_ = 35; + inline static bool didInitialize{false}; inline static thread_local RegionStackData regionStackData;