Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 650ce0a8 authored by DE MOOR Florestan's avatar DE MOOR Florestan
Browse files

ITT calls to analyze some sections with VTune

parent dc9264e2
Branches
No related tags found
No related merge requests found
......@@ -84,12 +84,23 @@ add_definitions (${gatb-core-flags})
include_directories (${gatb-core-includes})
# VTune
include_directories(/opt/intel/oneapi/vtune/latest/sdk/include)
link_directories (/opt/intel/oneapi/vtune/latest/sdk/lib64)
link_directories (/opt/intel/oneapi/vtune/latest/sdk/lib32)
find_package (Threads)
add_library (gatbcore-static STATIC ${ComponentFiles} )
#add_library (gatbcore-dynamic SHARED ${ComponentFiles} )
set_target_properties (gatbcore-static PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
#set_target_properties (gatbcore-dynamic PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
# VTune
target_link_libraries(gatbcore-static /opt/intel/oneapi/vtune/latest/sdk/lib64/libittnotify.a)
target_link_libraries(gatbcore-static /opt/intel/oneapi/vtune/latest/sdk/lib32/libittnotify.a)
target_link_libraries(gatbcore-static ${CMAKE_THREAD_LIBS_INIT})
################################################################################
# INSTALLATION
################################################################################
......
......@@ -51,6 +51,8 @@
#include <gatb/debruijn/impl/Simplifications.hpp>
#include <ittnotify.h>
using namespace std;
using namespace gatb::core::system::impl;
......@@ -88,6 +90,11 @@ using namespace gatb::core::tools::misc::impl;
namespace gatb { namespace core { namespace debruijn { namespace impl {
/********************************************************************************/
const string ITT_SECTION_DSK = "dsk";
const string ITT_SECTION_BLOOM = "bloom";
const string ITT_SECTION_CFP = "cfp";
const string ITT_SECTION_BRANCHING = "branching";
template<size_t span, typename Node_in>
unsigned long getNodeIndex (const GraphData<span>& data, Node_in& node);
......@@ -296,6 +303,8 @@ void build_visitor_solid<Node,Edge,GraphDataVariant>::operator() (GraphData<span
size_t compressLevel = props->get(STR_COMPRESS_LEVEL) ? props->getInt(STR_COMPRESS_LEVEL) : 0;
bool configOnly = props->get(STR_CONFIG_ONLY) != 0;
string itt_section = props->get(STR_ITT_SECTION) ? props->getStr(STR_ITT_SECTION) : "";
string output = props->get(STR_URI_OUTPUT) ?
props->getStr(STR_URI_OUTPUT) :
(props->getStr(STR_URI_OUTPUT_DIR) + "/" + system::impl::System::file().getBaseName (bank->getId()));
......@@ -395,6 +404,8 @@ void build_visitor_solid<Node,Edge,GraphDataVariant>::operator() (GraphData<span
/************************************************************/
DEBUG ((cout << "build_visitor : SortingCountAlgorithm BEGIN\n"));
if (itt_section == ITT_SECTION_DSK) { __itt_resume(); }
/** We create a DSK instance and execute it. */
SortingCountAlgorithm<span> sortingCount (
bank,
......@@ -424,6 +435,8 @@ void build_visitor_solid<Node,Edge,GraphDataVariant>::operator() (GraphData<span
// also set _nbSolidKmers here, as for example, _kmerSize was set at startup since we knew it already
graph._nbSolidKmers = solidCounts->getNbItems();
if (itt_section == ITT_SECTION_DSK) { __itt_pause(); }
}
......@@ -448,6 +461,8 @@ void build_visitor_postsolid<Node,Edge,GraphDataVariant>::operator() (GraphData<
// todo: see remark in build_visitor_solid, we should be able to get that info from elsewhere
size_t minimizerSize = props->get(STR_MINIMIZER_SIZE) ? props->getInt(STR_MINIMIZER_SIZE) : 8;
string itt_section = props->get(STR_ITT_SECTION) ? props->getStr(STR_ITT_SECTION) : "";
/** We create the kmer model. */
data.setModel (new typename Kmer<span>::ModelCanonical (kmerSize));
......@@ -507,6 +522,7 @@ void build_visitor_postsolid<Node,Edge,GraphDataVariant>::operator() (GraphData<
/************************************************************/
/* Bloom */
/************************************************************/
if (itt_section == ITT_SECTION_BLOOM) { __itt_resume(); }
if (graph.checkState(GraphTemplate<Node, Edge, GraphDataVariant>::STATE_SORTING_COUNT_DONE) && !(graph.checkState(GraphTemplate<Node, Edge, GraphDataVariant>::STATE_BLOOM_DONE)))
{
DEBUG ((cout << "build_visitor : BloomAlgorithm BEGIN\n"));
......@@ -527,10 +543,12 @@ void build_visitor_postsolid<Node,Edge,GraphDataVariant>::operator() (GraphData<
DEBUG ((cout << "build_visitor : BloomAlgorithm END\n"));
}
if (itt_section == ITT_SECTION_BLOOM) { __itt_pause(); }
/************************************************************/
/* Debloom */
/************************************************************/
if (itt_section == ITT_SECTION_CFP) { __itt_resume(); }
if (graph.checkState(GraphTemplate<Node, Edge, GraphDataVariant>::STATE_BLOOM_DONE) && !(graph.checkState(GraphTemplate<Node, Edge, GraphDataVariant>::STATE_DEBLOOM_DONE)))
{
DEBUG ((cout << "build_visitor : DebloomAlgorithm BEGIN\n"));
......@@ -562,10 +580,12 @@ void build_visitor_postsolid<Node,Edge,GraphDataVariant>::operator() (GraphData<
DEBUG ((cout << "build_visitor : DebloomAlgorithm END\n"));
}
if (itt_section == ITT_SECTION_CFP) { __itt_pause(); }
/************************************************************/
/* Branching */
/************************************************************/
if (itt_section == ITT_SECTION_BRANCHING) { __itt_resume(); }
if (graph.checkState(GraphTemplate<Node, Edge, GraphDataVariant>::STATE_DEBLOOM_DONE) && !(graph.checkState(GraphTemplate<Node, Edge, GraphDataVariant>::STATE_BRANCHING_DONE)))
{
DEBUG ((cout << "build_visitor : BranchingAlgorithm BEGIN\n"));
......@@ -590,6 +610,7 @@ void build_visitor_postsolid<Node,Edge,GraphDataVariant>::operator() (GraphData<
DEBUG ((cout << "build_visitor : BranchingAlgorithm END\n"));
}
if (itt_section == ITT_SECTION_BRANCHING) { __itt_pause(); }
/************************************************************/
......@@ -661,6 +682,8 @@ IOptionsParser* GraphTemplate<Node, Edge, GraphDataVariant>::getOptionsParser (b
parserGeneral->push_front (new OptionNoParam (STR_ALL_ABUNDANCE_COUNTS, "output all k-mer abundance counts instead of mean" ));
parserGeneral->push_front (new OptionOneParam (STR_NB_CORES, "number of cores", false, "0" ));
parserGeneral->push_front (new OptionNoParam (STR_CONFIG_ONLY, "dump config only"));
parserGeneral->push_front (new OptionOneParam (STR_ITT_SECTION, "section to resume and pause VTune collection", false, "dsk"));
parser->push_back (parserGeneral);
......
......@@ -131,6 +131,8 @@ public:
const char* attr_kmer_abundance () { return "abundance"; }
const char* attr_bloom_type () { return "bloom_kind"; }
const char* attr_debloom_type () { return "debloom_kind"; }
const char* itt_section () { return "-itt-section"; }
};
/********************************************************************************/
......@@ -183,6 +185,7 @@ public:
#define STR_CONFIG_ONLY gatb::core::tools::misc::StringRepository::singleton().config_only()
#define STR_STORAGE_TYPE gatb::core::tools::misc::StringRepository::singleton().storage_type ()
#define STR_KFF gatb::core::tools::misc::StringRepository::singleton().kff()
#define STR_ITT_SECTION gatb::core::tools::misc::StringRepository::singleton().itt_section()
/********************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment