summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Wells <dwells@cs.uiuc.edu>2001-08-20 17:50:56 (GMT)
committerDan Wells <dwells@cs.uiuc.edu>2001-08-20 17:50:56 (GMT)
commit701966ef0f8d57fd44428a0f318590ce87a6d94c (patch)
tree56780a4d17fb056b7800f2783abc8c7f1b6fd0c5
parentc1131a02e53fd33e0bdf77ffa90c02f6ad93ff8e (diff)
downloadhdf5-701966ef0f8d57fd44428a0f318590ce87a6d94c.zip
hdf5-701966ef0f8d57fd44428a0f318590ce87a6d94c.tar.gz
hdf5-701966ef0f8d57fd44428a0f318590ce87a6d94c.tar.bz2
[svn-r4395] Purpose:
Bug fix Description: When the Fortran interface was used on the Linux systems, there were segmentation errors. This was caused because two arrays were being accessed outside of their bounds and because the trace type parameters were specified inccorectly in the ProcTrace.inc file. There were also problems on some systems caused because the long names of HDF entries resulted in trace IDs which were too long. Solution: The lines where arrays were being accessed outside of their bounds were changed. The code in the Makefile.in and the PabloSedscr sed script file were changed so that the tracetype parameters were generated correctly. The PabloSedscr file was also modified to eliminate trace IDs for individual entries. Platforms tested: LINUX, IRIX64, IBM SP2
-rw-r--r--pablo/Makefile.in11
-rw-r--r--pablo/PabloHDF.c15
-rw-r--r--pablo/PabloSedscr24
3 files changed, 29 insertions, 21 deletions
diff --git a/pablo/Makefile.in b/pablo/Makefile.in
index 0617169..2722b9f 100644
--- a/pablo/Makefile.in
+++ b/pablo/Makefile.in
@@ -174,17 +174,6 @@ ProcIDs.h: HDFidList.h ProcMasks.h
ProcTrace.inc: HDFidList.h
sed "=" $? | sed -f PabloSedscr > $@
- echo " integer RuntimeTrace" >> $@
- echo " integer SummaryTrace" >> $@
- echo " integer MPIRuntimeTrace" >> $@
- echo " integer MPISummaryTrace" >> $@
- echo " integer NoTrace" >> $@
- echo " parameter (RuntimeTrace = 0)" >> $@
- echo " parameter (SummaryTrace = 1)" >> $@
- echo " parameter (MPIRuntimeTrace = 2)" >> $@
- echo " parameter (MPISummaryTrace = 3)" >> $@
- echo " parameter (NoTrace = 4)" >> $@
-
PabloHDF.o: PabloHDF.c $(PABLO_INCLUDES)
$(CC) -g $(CFLAGS) $(CPPFLAGS) $(PABLO_FLAGS) -c $<
diff --git a/pablo/PabloHDF.c b/pablo/PabloHDF.c
index aa11d85..fd4f2b8 100644
--- a/pablo/PabloHDF.c
+++ b/pablo/PabloHDF.c
@@ -180,7 +180,6 @@ char *hdfRecordPointer;
// RETURNS *
// None. *
//======================================================================*/
-#ifndef PCF_BUILD
/*======================================================================*
// fortran to C interface. *
// This is called from hdfinittracef_ *
@@ -199,7 +198,7 @@ hinittracex_( char *file,
{
traceFileName[i] = file[i];
}
- traceFileName[*len+1] = 0;
+ traceFileName[*len] = 0;
/*===================================================================*
// Allocate space for trace indicators. *
//===================================================================*/
@@ -214,7 +213,7 @@ hinittracex_( char *file,
/*===================================================================*
// Initialize to 0. *
//===================================================================*/
- for ( i = 0; i <= NUM_HDF_IDS; ++i )
+ for ( i = 0; i < NUM_HDF_IDS; ++i )
{
procTrace[i] = 0;
}
@@ -240,6 +239,10 @@ hinittracex_( char *file,
procTrace[i] = 1;
}
}
+#ifdef PCF_BUILD
+ hdfCaptureInit( traceFileName, OUTPUT_SWITCH );
+#else
+ suppressMPIOtrace = TRUE;
if ( OUTPUT_SWITCH == RUNTIME_TRACE
|| OUTPUT_SWITCH == MPI_RUNTIME_TRACE )
{
@@ -265,8 +268,8 @@ hinittracex_( char *file,
fprintf(stderr," Exiting Program. <<\n");
exit (-1);
}
-}
#endif /* PCF_BUILD */
+}
void
HDFinitTrace( const char *traceFileName, int id_flag, ... )
{
@@ -445,14 +448,14 @@ hdfCaptureEnd( void )
for ( i = 0; i < NUM_HDF_IDS; ++i )
{
procTrace[i] = 0;
- }
+ }
hdfBaseEnd();
#ifdef HAVE_MPIO
mpiIObaseEnd();
#endif
unixIObaseEnd();
genericBaseEnd();
- basePerformanceEnd();
+ basePerformanceEnd();
}
#endif /* PCF_BUILD */
/*****************************************************************************/
diff --git a/pablo/PabloSedscr b/pablo/PabloSedscr
index 73edda0..6df38c2 100644
--- a/pablo/PabloSedscr
+++ b/pablo/PabloSedscr
@@ -1,15 +1,31 @@
-s/_//g
s/,//g
-/^[0-9]/,/ID/{
+/^[0-9]/,/[A-z]/{
/^[0-9]/h
/^[0-9]/d
-s/$/ = /
+s/$/ = ID_Begin + /
G
s/\n//
-s/ID/ parameter ( &/
+s/[A-z]/ parameter ( &/
s/$/ )/
h
s/parameter (/integer/
s/=.*//
G
}
+/ALLHDF/,$!d
+s/_//g
+/integer.*ALLHDF/{
+i\
+ integer RuntimeTrace\
+ integer SummaryTrace\
+ integer MPIRuntimeTrace\
+ integer MPISummaryTrace\
+ integer NoTrace\
+ integer IDBegin \
+ parameter (NoTrace = 0)\
+ parameter (RuntimeTrace = 1)\
+ parameter (SummaryTrace = 2)\
+ parameter (MPIRuntimeTrace = 3)\
+ parameter (MPISummaryTrace = 4)\
+ parameter ( IDBegin = 4 )
+}