15 AddHelp(
'c',
"Set the configuration file.");
17 AddArgHelp(
"restartFile",
"HDF5 restart file.");
19 AddArgHelp(
"targetFile",
"HDF5 file with target data.");
28 std::ostringstream outStream;
29 outStream <<
"*******************************" << std::endl
30 <<
"* XPACC PlasCom2 *" << std::endl
31 <<
"* Alpha development *" << std::endl
32 <<
"*******************************" << std::endl;
33 return(outStream.str());
37 int application::InitializeApplication()
41 ErrOut(
"Parallel program failed to initialize.\n");
43 }
else if (error > 0){
49 globalCommunicator.Barrier();
102 int application::FinalizeApplication()
107 int numProcs = NProc();
122 std::ostringstream timerReportStream;
123 timerReportStream <<
"#Number of procs: " 124 << numProcs << std::endl
125 <<
"#Number of threads: " 126 << numThreads << std::endl
127 <<
"#Number of steps: " 128 << numSteps << std::endl
129 <<
"#Number of grids: " 130 << numGrids << std::endl;
132 timerReportStream <<
"#Number of points: ";
133 for(
int iGrid = 0;iGrid < numGrids;iGrid++)
134 timerReportStream << numPointsGrid[iGrid] <<
" ";
135 timerReportStream << std::endl;
138 Report(timerReportStream);
139 std::ostringstream timingFileNameStream;
140 timingFileNameStream <<
"PlasCom2Timing_";
141 int nZeros = (numProcs > 99999 ? 0 :
142 numProcs > 9999 ? 1 :
145 numProcs > 9 ? 4 : 5);
147 while(zeroCount++ < nZeros)
148 timingFileNameStream <<
"0";
149 timingFileNameStream << numProcs <<
".txt";
150 std::ofstream timingFile;
152 timingFile.open(timingFileNameStream.str().c_str());
153 timingFile << timerReportStream.str() << std::endl;
155 }
else if(OutStreamReady()) {
156 OutStream() << timerReportStream.str() << std::endl;
159 ErrOut(
"Failed to finalize parallel program.\n");
161 DumpErrors(ErrStream());
164 StdOut(
"Program finished - goodbye.\n",1);
virtual void Initialize()
defines PlasCom2-specific command-line arguments
virtual int Finalize()
Finalizes the global object, and it's profiler object.
void SetDescription(const std::string &desc)
Set description string.
void AddOption(char s, const std::string &l, int=0)
User interface to describe simple option.
void SetNotes(const std::string ¬es)
Set notes string.
void AddArgument(const std::string &a, int reqd=0)
User interface to describe an application argument.
virtual int Initialize()
Populates native data structures from commandline.
void InitializeDefaults()
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.