HPCToolkit
main.cpp File Reference
#include <mpi.h>
#include <iostream>
#include <fstream>
#include <typeinfo>
#include <signal.h>
#include <unistd.h>
#include <string>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cctype>
#include <cstring>
#include <include/uint.h>
#include "Args.hpp"
#include "ParallelAnalysis.hpp"
#include <lib/analysis/CallPath.hpp>
#include <lib/analysis/Util.hpp>
#include <lib/binutils/VMAInterval.hpp>
#include <lib/prof/FileError.hpp>
#include <lib/prof-lean/hpcrun-fmt.h>
#include <lib/support/diagnostics.h>
#include <lib/support/FileUtil.hpp>
#include <lib/support/Logic.hpp>
#include <lib/support/RealPathMgr.hpp>
#include <lib/support/StrUtil.hpp>
Include dependency graph for main.cpp:

Go to the source code of this file.

Macros

#define DBG_PROF_MPI   0
 

Functions

static int realmain (int argc, char *const *argv)
 
static Analysis::Util::NormalizeProfileArgs_t myNormalizeProfileArgs (const Analysis::Util::StringVec &profileFiles, vector< uint > &groupIdToGroupSizeMap, int myRank, int numRanks)
 
static void makeSummaryMetrics (Prof::CallPath::Profile &profGbl, const Analysis::Args &args, const Analysis::Util::NormalizeProfileArgs_t &nArgs, const vector< uint > &groupIdToGroupSizeMap, int myRank, int numRanks)
 
static void makeThreadMetrics (Prof::CallPath::Profile &profGbl, const Analysis::Args &args, const Analysis::Util::NormalizeProfileArgs_t &nArgs, const vector< uint > &groupIdToGroupSizeMap, int myRank, int numRanks)
 
static uint makeDerivedMetricDescs (Prof::CallPath::Profile &profGbl, const Analysis::Args &args, uint &mDrvdBeg, uint &mDrvdEnd, uint &mXDrvdBeg, uint &mXDrvdEnd, vector< VMAIntervalSet *> &groupIdToGroupMetricsMap, const vector< uint > &groupIdToGroupSizeMap, int myRank)
 
static void makeSummaryMetrics_Lcl (Prof::CallPath::Profile &profGbl, const string &profileFile, const Analysis::Args &args, uint groupId, uint groupMax, vector< VMAIntervalSet *> &groupIdToGroupMetricsMap, int myRank)
 
static void makeThreadMetrics_Lcl (Prof::CallPath::Profile &profGbl, const string &profileFile, const Analysis::Args &args, uint groupId, uint groupMax, int myRank)
 
static string makeDBFileName (const string &dbDir, uint groupId, const string &profileFile)
 
static void writeMetricsDB (Prof::CallPath::Profile &profGbl, uint mBegId, uint mEndId, const string &metricDBFnm)
 
static void writeStructure (const Prof::Struct::Tree &structure, const char *baseNm, int myRank) __attribute__((unused))
 
static void writeProfile (const Prof::CallPath::Profile &prof, const char *baseNm, int myRank) __attribute__((unused))
 
static std::string makeFileName (const char *baseNm, const char *ext, int myRank)
 
void prof_abort (int error_code)
 
int main (int argc, char *const *argv)
 
static void abort_timeout_handler (int sig, siginfo_t *siginfo, void *context)
 
static void hpcprof_set_abort_timeout ()
 

Macro Definition Documentation

◆ DBG_PROF_MPI

#define DBG_PROF_MPI   0

Definition at line 105 of file main.cpp.

Function Documentation

◆ abort_timeout_handler()

static void abort_timeout_handler ( int  sig,
siginfo_t *  siginfo,
void *  context 
)
static

Definition at line 216 of file main.cpp.

Here is the caller graph for this function:

◆ hpcprof_set_abort_timeout()

static void hpcprof_set_abort_timeout ( )
static

Definition at line 222 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

Definition at line 187 of file main.cpp.

Here is the call graph for this function:

◆ makeDBFileName()

static string makeDBFileName ( const string &  dbDir,
uint  groupId,
const string &  profileFile 
)
static

Definition at line 977 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeDerivedMetricDescs()

static uint makeDerivedMetricDescs ( Prof::CallPath::Profile profGbl,
const Analysis::Args args,
uint mDrvdBeg,
uint mDrvdEnd,
uint mXDrvdBeg,
uint mXDrvdEnd,
vector< VMAIntervalSet *> &  groupIdToGroupMetricsMap,
const vector< uint > &  groupIdToGroupSizeMap,
int  myRank 
)
static

Definition at line 690 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeFileName()

static std::string makeFileName ( const char *  baseNm,
const char *  ext,
int  myRank 
)
static

Definition at line 1094 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeSummaryMetrics()

static void makeSummaryMetrics ( Prof::CallPath::Profile profGbl,
const Analysis::Args args,
const Analysis::Util::NormalizeProfileArgs_t nArgs,
const vector< uint > &  groupIdToGroupSizeMap,
int  myRank,
int  numRanks 
)
static

Definition at line 585 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeSummaryMetrics_Lcl()

static void makeSummaryMetrics_Lcl ( Prof::CallPath::Profile profGbl,
const string &  profileFile,
const Analysis::Args args,
uint  groupId,
uint  groupMax,
vector< VMAIntervalSet *> &  groupIdToGroupMetricsMap,
int  myRank 
)
static

Definition at line 791 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeThreadMetrics()

static void makeThreadMetrics ( Prof::CallPath::Profile profGbl,
const Analysis::Args args,
const Analysis::Util::NormalizeProfileArgs_t nArgs,
const vector< uint > &  groupIdToGroupSizeMap,
int  myRank,
int  numRanks 
)
static

Definition at line 675 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeThreadMetrics_Lcl()

static void makeThreadMetrics_Lcl ( Prof::CallPath::Profile profGbl,
const string &  profileFile,
const Analysis::Args args,
uint  groupId,
uint  groupMax,
int  myRank 
)
static

Definition at line 892 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ myNormalizeProfileArgs()

static Analysis::Util::NormalizeProfileArgs_t myNormalizeProfileArgs ( const Analysis::Util::StringVec profileFiles,
vector< uint > &  groupIdToGroupSizeMap,
int  myRank,
int  numRanks 
)
static

Definition at line 468 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prof_abort()

void prof_abort ( int  error_code)

Definition at line 178 of file main.cpp.

◆ realmain()

static int realmain ( int  argc,
char *const *  argv 
)
static

Definition at line 239 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeMetricsDB()

static void writeMetricsDB ( Prof::CallPath::Profile profGbl,
uint  mBegId,
uint  mEndId,
const string &  metricDBFnm 
)
static

Definition at line 992 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeProfile()

static void writeProfile ( const Prof::CallPath::Profile prof,
const char *  baseNm,
int  myRank 
)
static

Definition at line 1077 of file main.cpp.

Here is the call graph for this function:

◆ writeStructure()

static void writeStructure ( const Prof::Struct::Tree structure,
const char *  baseNm,
int  myRank 
)
static

Definition at line 1066 of file main.cpp.

Here is the call graph for this function: