39 AddHelp(
"help",
"Prints this long version of help.");
40 AddHelp(
"verb",
"Makes the test more verbose. Default level is 1.");
41 AddHelp(
"config",
"Specifies the name of the configuration file.");
42 AddHelp(
"out",
"Specifies the name of the output file.");
43 AddArgHelp(
"input_files",
"Space delimited list of input profiles.");
44 std::ostringstream Ostr;
45 Ostr <<
"Use fixed problem size in scalability analysis. Only makes" 46 <<
"\n\t\tsense when scalability mode is enabled.";
48 AddHelp(
"scalability",
"Enable scalability mode.");
50 Ostr <<
"Performance analysis tool for analyzing profiles produced" 51 <<
"\nby the Profiler utility.";
66 std::string cfname = comline.
GetOption(
"config");
67 std::string sverb = comline.
GetOption(
"verb");
68 bool scalamode = !comline.
GetOption(
"scalability").empty();
69 std::string stat_summary_name = comline.
GetOption(
"out");
70 bool write_summary_outfile = !stat_summary_name.empty();
71 bool is_fixed = !comline.
GetOption(
"fixed").empty();
73 std::cout << comline.
LongUsage() << std::endl;
78 << std::endl << comline.
ShortUsage() << std::endl;
82 if(!sverb.empty() && sverb !=
".true."){
83 std::istringstream Istr(sverb);
87 if(write_summary_outfile){
88 Ouf.open(stat_summary_name.c_str());
90 std::cerr << comline.
ProgramName() <<
"::Error: Could not" 91 <<
" open output file, " << stat_summary_name
92 <<
", for output. Continuing with stdout." 96 std::vector<std::string> infiles = comline.
GetArgs();
97 if(infiles.size()==0) {
98 std::cerr <<
"Profane::Error: No input files specified." << std::endl
99 << std::endl << comline.
ShortUsage() << std::endl;
104 profiler.
SetOut(&std::cout);
105 profiler.
SetErr(&std::cerr);
108 std::string::size_type
x = infiles[0].find(
"prof_");
109 cfname.assign(infiles[0].substr(0,x));
110 cfname +=
"rpconfig";
112 Inf.open(cfname.c_str());
114 cfname.assign(
"profiler.rpconfig");
118 if(profiler.
ReadConfig(cfname) && !cfname.empty())
120 <<
"::Warning: unable to read config file, " << cfname
121 <<
". Continuing without configuration." << std::endl;
123 if(infiles.size() == 1){
144 std::cerr << comline.
ProgramName() <<
": Error: Could not process " 145 <<
"summary files." << std::endl;
151 <<
": Error: Unable to calculate scalability information." 157 <<
": Error: Unabled to perform scalability summary." int ProcessOptions()
Processes all command line tokens.
std::string ErrorReport()
Error reporting.
std::string GetOption(const char &s)
Get the value of an option.
int ReadEventsFromFile(const std::string &filename)
Read serial event file.
std::string ProgramName() const
Program name access.
Performance profiling object.
int ReadParallelEventFiles(const std::vector< std::string > &infiles, PEventList &par_event_list)
Read event files from parallel run.
int ScalabilitySummary(ScalaStatMap &scala_statmap, std::ostream &Out)
Scalability analysis output for multiple parallel runs.
void SetErr(std::ostream *Oe)
Set errstream.
Defines MPI-specific parallel global and program classes.
void SetOut(std::ostream *Os)
Set outstream.
void const size_t const size_t const size_t const double const double * x
Performance Profiling interface definition.
void SummarizeSerialExecution(std::ostream &Ostr)
Profiling output for serial application.
std::vector< std::string > GetArgs() const
Argument access.
std::string _description
application description.
void Initialize()
virtual function for program specific Initialization.
int PopulateScalaMap(ScalaMap &scala_map, ScalaStatMap &scala_statmap, bool is_scaled)
Build scalability stats for multiple parallel runs.
int main(int argc, char *argv[])
std::map< unsigned int, scalability_stats > ScalaStatMap
void AddOption(char s, const std::string &l, int=0)
User interface to describe simple option.
ComLineObject for profane.
ProfaneComLine(const char *args[])
int Profane(int argc, char *argv[])
The performance analysis post processor.
std::string LongUsage()
Generate long usage string.
std::list< std::pair< unsigned int, std::list< Event > > > PEventList
int SummarizeParallelExecution(std::ostream &Ostr, std::ostream &Ouf, PEventList ¶llel_event_list)
Profiling output for single parallel run.
void AddArgument(const std::string &a, int reqd=0)
User interface to describe an application argument.
int ReadConfig(const std::string &fname)
Read configuration from file.
std::map< unsigned int, PStatMap > ScalaMap
ComLineObject()
Default constructor.
void AddHelp(char s, const std::string &help)
Specify usage for an option.
void AddArgHelp(const std::string &a, const std::string &help)
Specify the usage info for application argument.
int ReadSummaryFiles(const std::vector< std::string > &input_files, ScalaMap &scala_map)
Read summary files from multiple parallel runs.
std::string ShortUsage()
Generate short usage string.