From 57839037cbd67d4e865f0e42490db45635973ed3 Mon Sep 17 00:00:00 2001 From: rosinski Date: Mon, 1 Jan 2007 04:38:15 +0000 Subject: [PATCH] *** empty log message *** --- gptl.c | 6 +++--- gptl.h | 15 ++++++++------- gptl.inc | 12 +++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gptl.c b/gptl.c index 534e3fc8..e3370e06 100644 --- a/gptl.c +++ b/gptl.c @@ -512,6 +512,9 @@ int GPTLstop (const char *name) /* timer name */ if ( ! initialized) return GPTLerror ("GPTLstop: GPTLinitialize has not been called\n"); + if ((t = get_thread_num (&nthreads, &maxthreads)) < 0) + return GPTLerror ("GPTLstop\n"); + /* ** If current depth exceeds a user-specified limit for print, just ** decrement and return @@ -522,9 +525,6 @@ int GPTLstop (const char *name) /* timer name */ return 0; } - if ((t = get_thread_num (&nthreads, &maxthreads)) < 0) - return GPTLerror ("GPTLstop\n"); - nchars = MIN (strlen (name), MAX_CHARS); strncpy (locname, name, nchars); locname[nchars] = '\0'; diff --git a/gptl.h b/gptl.h index c2d68f34..7312cee6 100644 --- a/gptl.h +++ b/gptl.h @@ -1,5 +1,5 @@ /* -$Id: gptl.h,v 1.13 2007-01-01 03:44:02 rosinski Exp $ +$Id: gptl.h,v 1.14 2007-01-01 04:36:20 rosinski Exp $ */ #ifndef GPTL_H #define GPTL_H @@ -7,15 +7,16 @@ typedef enum { GPTLwall = 1, GPTLcpu = 2, GPTLabort_on_error = 3, - GPTLoverhead = 4 + GPTLoverhead = 4, + GPTLdepthlimit = 5 } Option; typedef enum { - GPTLnanotime = 5, - GPTLrtc = 6, - GPTLmpiwtime = 7, - GPTLclockgettime = 8, - GPTLgettimeofday = 9 + GPTLnanotime = 6, + GPTLrtc = 7, + GPTLmpiwtime = 8, + GPTLclockgettime = 9, + GPTLgettimeofday = 10 } Funcoption; /* diff --git a/gptl.inc b/gptl.inc index a228c7e4..6d45d185 100644 --- a/gptl.inc +++ b/gptl.inc @@ -2,6 +2,7 @@ integer GPTLcpu integer GPTLabort_on_error integer GPTLoverhead + integer GPTLdepthlimit integer GPTLnanotime integer GPTLrtc @@ -13,12 +14,13 @@ parameter (GPTLcpu = 2) parameter (GPTLabort_on_error = 3) parameter (GPTLoverhead = 4) + parameter (GPTLdepthlimit = 5) - parameter (GPTLnanotime = 5) - parameter (GPTLrtc = 6) - parameter (GPTLmpiwtime = 7) - parameter (GPTLclockgettime = 8) - parameter (GPTLgettimeofday = 9) + parameter (GPTLnanotime = 6) + parameter (GPTLrtc = 7) + parameter (GPTLmpiwtime = 8) + parameter (GPTLclockgettime = 9) + parameter (GPTLgettimeofday = 10) ! Externals