• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/elements/genericProc/FE/fe_debug.h

00001 // Copyright 2010 Sandia Corporation. Under the terms
00002 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
00003 // Government retains certain rights in this software.
00004 // 
00005 // Copyright (c) 2007, 2010, Sandia Corporation
00006 // All rights reserved.
00007 // 
00008 // This file is part of the SST software package. For license
00009 // information, see the LICENSE file in the top level directory of the
00010 // distribution.
00011 
00012 
00013 #ifndef _FE_DEBUG_H_
00014 #define _FE_DEBUG_H_
00015 
00016 extern int __print_end_timestamp;
00017 extern int __dprint_level;
00018 extern int __print_warn;
00019 extern int __print_info;
00020 
00021 
00022 #define USE_DPRINT
00023 
00024 
00025 #include <stdlib.h>
00026 
00027 #ifdef USE_DPRINT
00028 #define DPRINT(x,fmt,args...) if ( __dprint_level >= x ) \
00029                 printf( "%s:%s(), "fmt, __FILE__,__FUNCTION__, ## args )
00030 #else
00031 #define DPRINT(x,fmt,args...)
00032 #endif
00033 
00034 #define ERROR(fmt,args...) {\
00035         printf( "ERROR:%s:%s(), "fmt, __FILE__,__FUNCTION__, ## args );\
00036         exit(1);}
00037 
00038 #define WARN(fmt,args...) if ( __print_warn) \
00039         printf( "WARNING:%s:%s(), "fmt, __FILE__,__FUNCTION__, ## args )
00040 
00041 #define MSG(fmt,args...) \
00042         printf( "MSG:%s:%s(), "fmt, __FILE__,__FUNCTION__, ## args )
00043 
00044 #define INFO(fmt,args...) \
00045         if ( __print_info ) printf( "INFO: "fmt, ## args )
00046 #define INFO2(fmt,args...) \
00047         if ( __print_info) printf( fmt, ## args )
00048 
00049 #define PRINTF(fmt,args...) \
00050         printf( "%s() "fmt, __FUNCTION__, ## args )
00051 
00052 #endif  // _FE_DEBUG_H_

Generated on Fri Oct 22 2010 11:02:21 for SST by  doxygen 1.7.1