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