SST  10.1.0
StructuralSimulationToolkit
output.h
1 // Copyright 2009-2020 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2020, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 
13 
14 #ifndef SST_CORE_OUTPUT_H
15 #define SST_CORE_OUTPUT_H
16 
17 #include <string.h>
18 
19 // UNCOMMENT OUT THIS LINE TO ENABLE THE DEBUG METHOD -OR_
20 // CHOOSE THE --enable-debug OPTION DURING SST CONFIGURATION
21 //#define __SST_DEBUG_OUTPUT__
22 
23 //This must be defined before inclusion of intttypes.h
24 #ifndef __STDC_FORMAT_MACROS
25 #define __STDC_FORMAT_MACROS
26 #endif
27 #include <cinttypes>
28 #include <cstdio>
29 #include <thread>
30 #include <unordered_map>
31 
32 #include <stdarg.h>
33 
34 #include "sst/core/rankInfo.h"
35 
36 extern int main(int argc, char **argv);
37 
38 namespace SST {
39 
40 // MACROS TO HELP BUILD THE CALLING FUNCTIONS INFORMATION
41 #define CALL_INFO __LINE__, __FILE__, __FUNCTION__
42 
43 #if defined(__GNUC__) || defined(__clang__)
44 #define CALL_INFO_LONG __LINE__, __FILE__, __PRETTY_FUNCTION__
45 #else
46 #define CALL_INFO_LONG __LINE__, __FILE__, __FUNCTION__
47 #endif
48 
49 /**
50  * Output object provides consistent method for outputting data to
51  * stdout, stderr and/or sst debug file. All components should
52  * use this class to log any information.
53  */
54 class Output
55 {
56 public:
57  /** Choice of output location
58  */
60  NONE, /*!< No output */
61  STDOUT, /*!< Print to stdout */
62  STDERR, /*!< Print to stderr */
63  FILE /*!< Print to a file */
64  };
65 
66  static constexpr uint32_t PrintAll = std::numeric_limits<uint32_t>::max();
67 
68  /** Constructor. Set up output configuration.
69  @param prefix Prefix to be prepended to all strings emitted by calls to
70  debug(), verbose(), fatal() and possibly output().
71  NOTE: No space will be inserted between the prepended prefix
72  string and the normal output string.
73  Prefix can contain the following escape codes:
74  - \@f Name of the file in which output call was made.
75  - \@l Line number in the file in which output call was made.
76  - \@p Name of the function from which output call was made.
77  - \@r MPI rank of the calling process. Will be empty if
78  MPI_COMM_WORLD size is 1.
79  - \@R MPI rank of the calling process. Will be 0 if
80  MPI_COMM_WORLD size is 1.
81  - \@i Thread Id of the calling process. Will be empty if
82  number of threads is 1.
83  - \@I Thread Id of the calling process. Will be 0 if
84  number of threads is 1.
85  - \@x Rank information of the calling process. Will be empty if
86  number of MPI ranks and number of threads are both 1
87  Same as [\@r:\@i]
88  - \@X Rank information of the calling process. Will be [0.0] if
89  number of MPI ranks and number of threads are both 1
90  Same as [\@R:\@I]
91  - \@t Simulation time. Will be the raw simulation cycle time
92  retrieved from the SST Core.
93  @param verbose_level Debugging output level. Calls to debug(),
94  verbose() and fatal() are only output if their output_level
95  parameter is less than or equal to the verbose_level currently
96  set for the object
97  @param verbose_mask Bitmask of allowed message types for debug(),
98  verbose() and fatal(). The Output object will only output the
99  message if the set bits of the output_bits parameter
100  are set in the verbose_mask of the object. It uses this logic:
101  if (~verbose_mask & output_bits == 0) then output is enabled.
102  @param location Output location. Output will be directed to STDOUT,
103  STDERR, FILE, or NONE. If FILE output is selected, the
104  output will be directed to the file defined by the
105  --debug runtime parameter, or to the file 'sst_output' if the
106  --debug parameter is not defined. If the size of MPI_COMM_WORLD
107  is > 1, then the rank process will be appended to the file name.
108  @param localoutputfilename. Send the output of this class to the
109  file identified in localoutputfilename instead of the of the
110  normal output file set by the run time parameter --debug-file.
111  location parameter must be set to FILE. This parameter is
112  intended for special case debug purposes only.
113  */
114  // CONSTRUCTION / DESTRUCTION
115  Output(const std::string& prefix, uint32_t verbose_level,
116  uint32_t verbose_mask, output_location_t location,
117  const std::string& localoutputfilename = "");
118 
119  /** Default Constructor. User must call init() to properly initialize obj.
120  Until init() is called, no output will occur.
121  */
122  Output(); // Default constructor
123 
124  virtual ~Output();
125 
126 
127  /** Initialize the object after construction
128  @param prefix Prefix to be prepended to all strings emitted by calls to
129  debug(), verbose(), fatal() and possibly output().
130  NOTE: No space will be inserted between the prepended prefix
131  string and the normal output string.
132  Prefix can contain the following escape codes:
133  - \@f Name of the file in which output call was made.
134  - \@l Line number in the file in which output call was made.
135  - \@p Name of the function from which output call was made.
136  - \@r MPI rank of the calling process. Will be empty if
137  MPI_COMM_WORLD size is 1.
138  - \@R MPI rank of the calling process. Will be 0 if
139  MPI_COMM_WORLD size is 1.
140  - \@i Thread Id of the calling process. Will be empty if
141  number of threads is 1.
142  - \@I Thread Id of the calling process. Will be 0 if
143  number of threads is 1.
144  - \@x Rank information of the calling process. Will be empty if
145  number of MPI ranks and number of threads are both 1
146  Same as [\@r:\@i]
147  - \@X Rank information of the calling process. Will be [0.0] if
148  number of MPI ranks and number of threads are both 1
149  Same as [\@R:\@I]
150  - \@t Simulation time. Will be the raw simulation cycle time
151  retrieved from the SST Core.
152  @param verbose_level Debugging output level. Calls to debug(),
153  verbose() and fatal() are only output if their output_level
154  parameter is less than or equal to the verbose_level currently
155  set for the object
156  @param verbose_mask Bitmask of allowed message types for debug(),
157  verbose() and fatal(). The Output object will only output the
158  message if the set bits of the output_bits parameter
159  are set in the verbose_mask of the object. It uses this logic:
160  if (~verbose_mask & output_bits == 0) then output is enabled.
161  @param location Output location. Output will be directed to STDOUT,
162  STDERR, FILE, or NONE. If FILE output is selected, the
163  output will be directed to the file defined by the
164  --debug runtime parameter, or to the file 'sst_output' if the
165  --debug parameter is not defined. If the size of MPI_COMM_WORLD
166  is > 1, then the rank process will be appended to the file name.
167  @param localoutputfilename. Send the output of this class to the
168  file identified in localoutputfilename instead of the of the
169  normal output file set by the run time parameter --debug-file.
170  location parameter must be set to FILE. This parameter is
171  intended for special case debug purposes only.
172  */
173  // INITIALIZATION
174  void init(const std::string& prefix, uint32_t verbose_level,
175  uint32_t verbose_mask, output_location_t location,
176  const std::string& localoutputfilename = "");
177 
178  /** Output the message with formatting as specified by the format parameter.
179  The output will be prepended with the expanded prefix set in the object.
180  @param line Line number of calling function (use CALL_INFO macro)
181  @param file File name calling function (use CALL_INFO macro)
182  @param func Function name calling function (use CALL_INFO macro)
183  @param format Format string. All valid formats for printf are available.
184  @param ... Argument strings for format.
185  */
186  void output(uint32_t line, const char* file, const char* func,
187  const char* format, ...) const
188  __attribute__ ((format (printf, 5, 6)))
189  {
190  va_list arg;
191  if (true == m_objInitialized && NONE != m_targetLoc ) {
192  // Get the argument list and then print it out
193  va_start(arg, format);
194  outputprintf(line, file, func, format, arg);
195  va_end(arg);
196  }
197  }
198 
199  /** Output the message with formatting as specified by the format parameter.
200  @param format Format string. All valid formats for printf are available.
201  @param ... Arguments for format.
202  */
203  void output(const char* format, ...) const
204  __attribute__ ((format (printf, 2, 3)))
205  {
206  va_list arg;
207  if (true == m_objInitialized && NONE != m_targetLoc) {
208  // Get the argument list and then print it out
209  va_start(arg, format);
210  outputprintf(format, arg);
211  va_end(arg);
212  }
213  }
214 
215  /** Output the verbose message with formatting as specified by the format
216  parameter. Output will only occur if specified output_level and
217  output_bits meet criteria defined by object. The output will be
218  prepended with the expanded prefix set in the object.
219  @param line Line number of calling function (use CALL_INFO macro)
220  @param file File name calling function (use CALL_INFO macro)
221  @param func Function name calling function (use CALL_INFO macro)
222  @param output_level For output to occur, output_level must be less than
223  or equal to verbose_level set in object
224  @param output_bits The Output object will only output the
225  message if the set bits of the output_bits parameter are set in
226  the verbose_mask of the object. It uses this logic:
227  if (~verbose_mask & output_bits == 0) then output is enabled.
228  @param format Format string. All valid formats for printf are available.
229  @param ... Arguments for format.
230  */
231  void verbose(uint32_t line, const char* file, const char* func,
232  uint32_t output_level, uint32_t output_bits,
233  const char* format, ...) const
234  __attribute__ ((format (printf, 7, 8)))
235  {
236  va_list arg;
237 
238  if (true == m_objInitialized && NONE != m_targetLoc ) {
239  // First check to see if we are allowed to send output based upon the
240  // verbose_mask and verbose_level checks
241  if (((output_bits & ~m_verboseMask) == 0) &&
242  (output_level <= m_verboseLevel)){
243  // Get the argument list and then print it out
244  va_start(arg, format);
245  outputprintf(line, file, func, format, arg);
246  va_end(arg);
247  }
248  }
249  }
250 
251  /** Output the verbose message with formatting as specified by the format
252  parameter. Output will only occur if specified output_level and
253  output_bits meet criteria defined by object. The output will be
254  prepended with the expanded prefix set in the object.
255  @param tempPrefix For just this call use this prefix
256  @param line Line number of calling function (use CALL_INFO macro)
257  @param file File name calling function (use CALL_INFO macro)
258  @param func Function name calling function (use CALL_INFO macro)
259  @param output_level For output to occur, output_level must be less than
260  or equal to verbose_level set in object
261  @param output_bits The Output object will only output the
262  message if the set bits of the output_bits parameter are set in
263  the verbose_mask of the object. It uses this logic:
264  if (~verbose_mask & output_bits == 0) then output is enabled.
265  @param format Format string. All valid formats for printf are available.
266  @param ... Arguments for format.
267  */
268  void verbosePrefix(const char* tempPrefix, uint32_t line, const char* file, const char* func,
269  uint32_t output_level, uint32_t output_bits,
270  const char* format, ...)
271  __attribute__ ((format (printf, 8, 9)))
272  {
273 
274  va_list arg;
275 
276  if (true == m_objInitialized && NONE != m_targetLoc ) {
277  const std::string normalPrefix = m_outputPrefix;
278  m_outputPrefix = tempPrefix;
279 
280  // First check to see if we are allowed to send output based upon the
281  // verbose_mask and verbose_level checks
282  if (((output_bits & ~m_verboseMask) == 0) &&
283  (output_level <= m_verboseLevel)){
284  // Get the argument list and then print it out
285  va_start(arg, format);
286  outputprintf(line, file, func, format, arg);
287  va_end(arg);
288  }
289 
290  m_outputPrefix = normalPrefix;
291  }
292  }
293 
294  /** Output the debug message with formatting as specified by the format
295  parameter. Output will only occur if specified output_level and
296  output_bits meet criteria defined by object. The output will be
297  prepended with the expanded prefix set in the object.
298  @param tempPrefix For just this call use this prefix
299  @param line Line number of calling function (use CALL_INFO macro)
300  @param file File name calling function (use CALL_INFO macro)
301  @param func Function name calling function (use CALL_INFO macro)
302  @param output_level For output to occur, output_level must be less than
303  or equal to verbose_level set in object
304  @param output_bits The Output object will only output the
305  message if the set bits of the output_bits parameter are set in
306  the verbose_mask of the object. It uses this logic:
307  if (~verbose_mask & output_bits == 0) then output is enabled.
308  @param format Format string. All valid formats for printf are available.
309  @param ... Arguments for format.
310  */
311  void debugPrefix(const char* tempPrefix, uint32_t line, const char* file, const char* func,
312  uint32_t output_level, uint32_t output_bits,
313  const char* format, ...)
314  __attribute__ ((format (printf, 8, 9)))
315  {
316 
317 #ifdef __SST_DEBUG_OUTPUT__
318  va_list arg;
319 
320  if (true == m_objInitialized && NONE != m_targetLoc ) {
321  const std::string normalPrefix = m_outputPrefix;
322  m_outputPrefix = tempPrefix;
323 
324  // First check to see if we are allowed to send output based upon the
325  // verbose_mask and verbose_level checks
326  if (((output_bits & ~m_verboseMask) == 0) &&
327  (output_level <= m_verboseLevel)){
328  // Get the argument list and then print it out
329  va_start(arg, format);
330  outputprintf(line, file, func, format, arg);
331  va_end(arg);
332  }
333 
334  m_outputPrefix = normalPrefix;
335  }
336 #else
337  /* When debug is disabled, silence warnings of unused parameters */
338  (void)tempPrefix;
339  (void)line;
340  (void)file;
341  (void)func;
342  (void)output_level;
343  (void)output_bits;
344  (void)format;
345 #endif
346  }
347 
348  /** Output the debug message with formatting as specified by the format
349  parameter. Output will only occur if specified output_level and
350  output_bits meet criteria defined by object. The output will be
351  prepended with the expanded prefix set in the object.
352  NOTE: Debug outputs will only occur if the __SST_DEBUG_OUTPUT__ is defined.
353  this define can be set in source code or by setting the
354  --enable-debug option during SST configuration.
355  @param line Line number of calling function (use CALL_INFO macro)
356  @param file File name calling function (use CALL_INFO macro)
357  @param func Function name calling function (use CALL_INFO macro)
358  @param output_level For output to occur, output_level must be less than
359  or equal to verbose_level set in object
360  @param output_bits The Output object will only output the
361  message if the set bits of the output_bits parameter are set in
362  the verbose_mask of the object. It uses this logic:
363  if (~verbose_mask & output_bits == 0) then output is enabled.
364  @param format Format string. All valid formats for printf are available.
365  @param ... Arguments for format.
366  */
367  void debug(uint32_t line, const char* file, const char* func,
368  uint32_t output_level, uint32_t output_bits,
369  const char* format, ...) const
370  __attribute__ ((format (printf, 7, 8)))
371  {
372 #ifdef __SST_DEBUG_OUTPUT__
373  va_list arg;
374  if (true == m_objInitialized && NONE != m_targetLoc ) {
375  // First check to see if we are allowed to send output based upon the
376  // verbose_mask and verbose_level checks
377  if (((output_bits & ~m_verboseMask) == 0) &&
378  (output_level <= m_verboseLevel)){
379  // Get the argument list and then print it out
380  va_start(arg, format);
381  outputprintf(line, file, func, format, arg);
382  va_end(arg);
383  }
384  }
385 #else
386  /* When debug is disabled, silence warnings of unused parameters */
387  (void)line;
388  (void)file;
389  (void)func;
390  (void)output_level;
391  (void)output_bits;
392  (void)format;
393 #endif
394  }
395 
396 
397  /** Output the fatal message with formatting as specified by the format
398  parameter. Message will be sent to the output location and to stderr.
399  The output will be prepended with the expanded prefix set
400  in the object.
401  NOTE: fatal() will call MPI_Abort(exit_code) to terminate simulation.
402  @param line Line number of calling function (use CALL_INFO macro)
403  @param file File name calling function (use CALL_INFO macro)
404  @param func Function name calling function (use CALL_INFO macro)
405  @param exit_code The exit code used for termination of simulation.
406  will be passed to MPI_Abort()
407  @param format Format string. All valid formats for printf are available.
408  @param ... Arguments for format.
409  */
410  void fatal(uint32_t line, const char* file, const char* func,
411  int exit_code,
412  const char* format, ...) const
413  __attribute__ ((format (printf, 6, 7))) ;
414 
415 
416  // GET / SET METHODS
417 
418  /** Sets object prefix
419  @param prefix Prefix to be prepended to all strings emitted by calls to
420  debug(), verbose(), fatal() and possibly output().
421  NOTE: No space will be inserted between the prepended prefix
422  string and the normal output string.
423  Prefix can contain the following escape codes:
424  - \@f Name of the file in which output call was made.
425  - \@l Line number in the file in which output call was made.
426  - \@p Name of the function from which output call was made.
427  - \@r MPI rank of the calling process. Will be empty if
428  MPI_COMM_WORLD size is 1.
429  - \@R MPI rank of the calling process. Will be 0 if
430  MPI_COMM_WORLD size is 1.
431  - \@i Thread Id of the calling process. Will be empty if
432  number of threads is 1.
433  - \@I Thread Id of the calling process. Will be 0 if
434  number of threads is 1.
435  - \@x Rank information of the calling process. Will be empty if
436  number of MPI ranks and number of threads are both 1
437  Same as [\@r:\@i]
438  - \@X Rank information of the calling process. Will be [0.0] if
439  number of MPI ranks and number of threads are both 1
440  Same as [\@R:\@I]
441  - \@t Simulation time. Will be the raw simulation cycle time
442  retrieved from the SST Core.
443  */
444  void setPrefix(const std::string& prefix);
445 
446  /** Returns object prefix */
447  std::string getPrefix() const;
448 
449  /** Sets object verbose mask
450  @param verbose_mask Bitmask of allowed message types for debug(),
451  verbose() and fatal(). The Output object will only output the
452  message if the set bits of the output_bits parameter
453  are set in the verbose_mask of the object. It uses this logic:
454  if (~verbose_mask & output_bits == 0) then output is enabled.
455  */
456  void setVerboseMask(uint32_t verbose_mask);
457 
458  /** Returns object verbose mask */
459  uint32_t getVerboseMask() const;
460 
461  /** Sets object verbose level
462  @param verbose_level Debugging output level. Calls to debug(),
463  verbose() and fatal() are only output if their output_level
464  parameter is less than or equal to the verbose_level currently
465  set for the object
466  */
467  void setVerboseLevel(uint32_t verbose_level);
468 
469  /** Returns object verbose level */
470  uint32_t getVerboseLevel() const;
471 
472  /** Sets object output location
473  @param location Output location. Output will be directed to STDOUT,
474  STDERR, FILE, or NONE. If FILE output is selected, the
475  output will be directed to the file defined by the
476  --debug runtime parameter, or to the file 'sst_output' if the
477  --debug parameter is not defined. If the size of MPI_COMM_WORLD
478  is > 1, then the rank process will be appended to the file name.
479  */
480  void setOutputLocation(output_location_t location);
481 
482  /** Returns object output location */
484 
485  /** This method allows for the manual flushing of the output. */
486  inline void flush() const {std::fflush(*m_targetOutputRef);}
487 
488 
489  /** This method sets the static filename used by SST. It can only be called
490  once, and is automatically called by the SST Core. No components should
491  call this method.
492  */
493  static void setFileName(const std::string& filename);
494 
495  static Output& getDefaultObject() { return m_defaultObject; }
496 
497 private:
498 
499  friend class TraceFunction;
500  // Support Methods
501  void setTargetOutput(output_location_t location);
502  void openSSTTargetFile() const;
503  void closeSSTTargetFile();
504  // std::string getMPIProcName() const;
505  int getMPIWorldRank() const;
506  int getMPIWorldSize() const;
507  uint32_t getNumThreads() const;
508  uint32_t getThreadRank() const;
509  std::string buildPrefixString(uint32_t line,
510  const std::string& file,
511  const std::string& func) const;
512  void outputprintf(uint32_t line,
513  const std::string& file,
514  const std::string& func,
515  const char *format,
516  va_list arg) const;
517  void outputprintf(const char *format, va_list arg) const;
518 
519  friend int ::main(int argc, char **argv);
520  static Output& setDefaultObject(const std::string& prefix, uint32_t verbose_level,
521  uint32_t verbose_mask, output_location_t location,
522  const std::string& localoutputfilename = "")
523  {
524  m_defaultObject.init(prefix, verbose_level, verbose_mask, location, localoutputfilename);
525  return getDefaultObject();
526  }
527 
528  static void setWorldSize(const RankInfo &ri, int mpiRank)
529  {
530  m_worldSize = ri;
531  m_mpiRank = mpiRank;
532  }
533 
534  static void setThreadID(std::thread::id mach, uint32_t user)
535  {
536  m_threadMap.insert(std::make_pair(mach, user));
537  }
538 
539 
540  // Internal Member Variables
541  bool m_objInitialized;
542  std::string m_outputPrefix;
543  uint32_t m_verboseLevel;
544  uint32_t m_verboseMask;
545  output_location_t m_targetLoc;
546 
547  static Output m_defaultObject;
548 
549  // m_targetOutputRef is a pointer to a FILE* object. This is because
550  // the actual FILE* object (m_sstFileHandle) is not created on construction,
551  // but during the first call any of output(), verbose() or debug() methods.
552  // m_targetOutputRef points to either &m_sstFileHandle, &stdout, or &stderr
553  // depending upon constructor for the object. However m_sstFileHandle is a
554  // static variable that is set by the startup of SST, and the location
555  // cannot be changed in the constructor or a call to setFileName().
556  std::FILE** m_targetOutputRef;
557 
558  // m_targetFileHandleRef, m_targetFileNameRef, and m_targetFileAccessCount
559  // are pointers to their associated types. These point to either the local
560  // output file information or to the global simulation output file information.
561  std::FILE** m_targetFileHandleRef;
562  std::string* m_targetFileNameRef;
563  uint32_t* m_targetFileAccessCountRef;
564 
565  // Static Member Variables regarding the Global simulation file info
566  static std::string m_sstGlobalSimFileName;
567  static std::FILE* m_sstGlobalSimFileHandle;
568  static uint32_t m_sstGlobalSimFileAccessCount;
569 
570  // File Member Variables regarding the local simulation file info
571  std::string m_sstLocalFileName;
572  std::FILE* m_sstLocalFileHandle;
573  uint32_t m_sstLocalFileAccessCount;
574 
575  static std::unordered_map<std::thread::id, uint32_t> m_threadMap;
576  static RankInfo m_worldSize;
577  static int m_mpiRank;
578 
579 };
580 
581 // Class to easily trace function enter and exit
583 
584  static int trace_level;
585  static std::vector<char> indent_array;
586 
587 public:
588  TraceFunction(uint32_t line, const char* file, const char* func, bool print_sim_info = true);
589  ~TraceFunction();
590 
591  Output& getOutput() {return output_obj;}
592 
593  /** Output the message with formatting as specified by the format parameter.
594  @param format Format string. All valid formats for printf are available.
595  @param ... Arguments for format.
596  */
597  void output(const char* format, ...) const
598  __attribute__ ((format (printf, 2, 3)));
599 
600 
601 private:
602  Output output_obj;
603  uint32_t line;
604  std::string file;
605  std::string function;
606  // uint32_t rank;
607  // uint32_t thread;
608  int indent_length;
609 };
610 
611 
612 } // namespace SST
613 
614 #endif // SST_CORE_OUTPUT_H
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:54
void setVerboseLevel(uint32_t verbose_level)
Sets object verbose level.
Definition: output.cc:103
void setOutputLocation(output_location_t location)
Sets object output location.
Definition: output.cc:139
void debug(uint32_t line, const char *file, const char *func, uint32_t output_level, uint32_t output_bits, const char *format,...) const
Output the debug message with formatting as specified by the format parameter.
Definition: output.h:367
output_location_t
Choice of output location.
Definition: output.h:59
uint32_t getVerboseLevel() const
Returns object verbose level.
Definition: output.cc:109
void setVerboseMask(uint32_t verbose_mask)
Sets object verbose mask.
Definition: output.cc:115
void output(const char *format,...) const
Output the message with formatting as specified by the format parameter.
Definition: output.h:203
Output()
Default Constructor.
Definition: output.cc:59
std::string getPrefix() const
Returns object prefix.
Definition: output.cc:133
Definition: output.h:60
void verbose(uint32_t line, const char *file, const char *func, uint32_t output_level, uint32_t output_bits, const char *format,...) const
Output the verbose message with formatting as specified by the format parameter.
Definition: output.h:231
void verbosePrefix(const char *tempPrefix, uint32_t line, const char *file, const char *func, uint32_t output_level, uint32_t output_bits, const char *format,...)
Output the verbose message with formatting as specified by the format parameter.
Definition: output.h:268
Definition: output.h:63
Definition: output.h:582
void debugPrefix(const char *tempPrefix, uint32_t line, const char *file, const char *func, uint32_t output_level, uint32_t output_bits, const char *format,...)
Output the debug message with formatting as specified by the format parameter.
Definition: output.h:311
static void setFileName(const std::string &filename)
This method sets the static filename used by SST.
Definition: output.cc:220
void fatal(uint32_t line, const char *file, const char *func, int exit_code, const char *format,...) const
Output the fatal message with formatting as specified by the format parameter.
Definition: output.cc:155
Definition: output.h:61
void output(uint32_t line, const char *file, const char *func, const char *format,...) const
Output the message with formatting as specified by the format parameter.
Definition: output.h:186
Definition: output.h:62
uint32_t getVerboseMask() const
Returns object verbose mask.
Definition: output.cc:121
void flush() const
This method allows for the manual flushing of the output.
Definition: output.h:486
output_location_t getOutputLocation() const
Returns object output location.
Definition: output.cc:149
void init(const std::string &prefix, uint32_t verbose_level, uint32_t verbose_mask, output_location_t location, const std::string &localoutputfilename="")
Initialize the object after construction.
Definition: output.cc:71
void output(const char *format,...) const
Output the message with formatting as specified by the format parameter.
Definition: output.cc:526
void setPrefix(const std::string &prefix)
Sets object prefix.
Definition: output.cc:127