From 237fc48acbc3eefc6aac46d1eef148ce0cc69421 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 27 Jun 2003 10:58:36 -0500 Subject: [svn-r7115] Purpose: Update code Description: Incorporate Pablo support patches from Dan Wells Platforms tested: FreeBSD 4.8 (sleipnir) h5committest --- pablo/Makefile.in | 72 ++++++++++++++++----- pablo/PabloHDF.c | 176 ++++++++++++++++++++++++++++++++++++-------------- pablo/PabloHDF_MPIO.c | 2 + pablo/PabloHDF_RT.c | 13 ++-- pablo/PabloHDF_SDDF.c | 34 ++++++---- pablo/ProcTrace.h | 7 +- 6 files changed, 220 insertions(+), 84 deletions(-) diff --git a/pablo/Makefile.in b/pablo/Makefile.in index 532d045..43a0b62 100644 --- a/pablo/Makefile.in +++ b/pablo/Makefile.in @@ -49,16 +49,22 @@ SRCDIRS=./. ../src/. # variable now has directory paths included in it (which may cause # problems somewhere). - QAK # -LIB_SRC=H5.c H5FDmulti.c H5HG.c H5Oname.c H5T.c H5A.c H5FDsec2.c H5HL.c \ - H5Onull.c H5TB.c H5AC.c H5FDsrb.c H5I.c H5Osdspace.c H5TS.c \ - H5B.c H5FDstdio.c H5MF.c H5Oshared.c H5Tbit.c H5D.c H5FDstream.c \ - H5MM.c H5Ostab.c H5Tconv.c H5E.c H5FL.c H5O.c H5P.c H5Tinit.c \ - H5F.c H5Farray.c H5Oattr.c H5R.c H5Tvlen.c H5FD.c H5Fcontig.c \ - H5Ocomp.c H5S.c H5V.c H5FDcore.c H5Fistore.c H5Ocont.c H5Sall.c \ - H5Z.c H5Fseq.c H5Odtype.c H5Shyper.c H5Zdeflate.c H5FDfamily.c \ - H5G.c H5Oefl.c H5Smpio.c H5detect.c H5FDgass.c H5Gent.c \ - H5Ofill.c H5Snone.c H5FDlog.c H5Gnode.c H5Olayout.c H5Spoint.c \ - H5FDmpio.c H5Gstab.c H5Omtime.c H5Sselect.c +LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5Dio.c H5E.c H5F.c H5FD.c \ + H5FDcore.c H5FDfamily.c H5FDfphdf5.c H5FDgass.c H5FDlog.c \ + H5FDmpio.c H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDsrb.c \ + H5FDstdio.c H5FDstream.c H5FL.c H5FO.c H5FP.c H5FPclient.c \ + H5FPserver.c H5FS.c H5Fcompact.c H5Fcontig.c H5Fistore.c H5Fseq.c \ + H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c H5HP.c H5I.c \ + H5MF.c H5MM.c H5O.c H5Oattr.c H5Obogus.c H5Ocont.c H5Odtype.c \ + H5Oefl.c H5Ofill.c H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c \ + H5Opline.c H5Osdspace.c H5Oshared.c H5Ostab.c H5P.c H5Pdcpl.c \ + H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Ptest.c H5R.c H5RS.c H5S.c H5ST.c \ + H5Sall.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c H5Sselect.c \ + H5Stest.c H5T.c H5TB.c H5TS.c H5Tarray.c H5Tbit.c H5Tcommit.c \ + H5Tcompound.c H5Tconv.c H5Tcset.c H5Tenum.c H5Tfields.c H5Tfixed.c \ + H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Topaque.c H5Torder.c \ + H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5V.c H5Z.c H5Zdeflate.c \ + H5Zfletcher32.c H5Zshuffle.c H5Zszip.c H5detect.c PABLO_OBJ=PabloHDF.o PabloHDF_RT.o PabloHDF_SDDF.o PabloHDF_MPIO.o @@ -172,8 +178,8 @@ PABLO_CLEAN=HDFentryNames.h HDFidList.h ProcMasks.h HDFentries.txt \ ProcTrace.inc HDFentries.txt: $(top_srcdir)/src/*.c - grep "FUNC_ENTER[_INIT ]*(" $(top_srcdir)/src/*.c | \ - sed "s/.*FUNC_ENTER[_INIT ]*( *//;s/[,)].*//" | sort -u > $@ + grep "FUNC_ENTER[_INITNOAPICLEARFS ]*(" $(top_srcdir)/src/*.[ch] | \ + sed "s/.*FUNC_ENTER[_INITNOAPICLEARFS ]*( *//;s/[,)].*//" | sort -u > $@ HDFentryNames.h: HDFentries.txt sed "s/.*/\"&\",/" $? > $@ @@ -213,21 +219,29 @@ H5A.c: $(top_srcdir)/src/H5A.c H5AC.c: $(top_srcdir)/src/H5AC.c H5B.c: $(top_srcdir)/src/H5B.c H5D.c: $(top_srcdir)/src/H5D.c +H5Dio.c: $(top_srcdir)/src/H5Dio.c H5E.c: $(top_srcdir)/src/H5E.c H5F.c: $(top_srcdir)/src/H5F.c H5FD.c: $(top_srcdir)/src/H5FD.c H5FDcore.c: $(top_srcdir)/src/H5FDcore.c H5FDfamily.c: $(top_srcdir)/src/H5FDfamily.c +H5FDfphdf5.c: $(top_srcdir)/src/H5FDfphdf5.c H5FDgass.c: $(top_srcdir)/src/H5FDgass.c H5FDlog.c: $(top_srcdir)/src/H5FDlog.c H5FDmpio.c: $(top_srcdir)/src/H5FDmpio.c +H5FDmpiposix.c: $(top_srcdir)/src/H5FDmpiposix.c H5FDmulti.c: $(top_srcdir)/src/H5FDmulti.c H5FDsec2.c: $(top_srcdir)/src/H5FDsec2.c H5FDsrb.c: $(top_srcdir)/src/H5FDsrb.c H5FDstdio.c: $(top_srcdir)/src/H5FDstdio.c H5FDstream.c: $(top_srcdir)/src/H5FDstream.c H5FL.c: $(top_srcdir)/src/H5FL.c -H5Farray.c: $(top_srcdir)/src/H5Farray.c +H5FO.c: $(top_srcdir)/src/H5FO.c +H5FP.c: $(top_srcdir)/src/H5FP.c +H5FPclient.c: $(top_srcdir)/src/H5FPclient.c +H5FPserver.c: $(top_srcdir)/src/H5FPserver.c +H5FS.c: $(top_srcdir)/src/H5FS.c +H5Fcompact.c: $(top_srcdir)/src/H5Fcompact.c H5Fcontig.c: $(top_srcdir)/src/H5Fcontig.c H5Fistore.c: $(top_srcdir)/src/H5Fistore.c H5Fseq.c: $(top_srcdir)/src/H5Fseq.c @@ -237,12 +251,13 @@ H5Gnode.c: $(top_srcdir)/src/H5Gnode.c H5Gstab.c: $(top_srcdir)/src/H5Gstab.c H5HG.c: $(top_srcdir)/src/H5HG.c H5HL.c: $(top_srcdir)/src/H5HL.c +H5HP.c: $(top_srcdir)/src/H5HP.c H5I.c: $(top_srcdir)/src/H5I.c H5MF.c: $(top_srcdir)/src/H5MF.c H5MM.c: $(top_srcdir)/src/H5MM.c H5O.c: $(top_srcdir)/src/H5O.c H5Oattr.c: $(top_srcdir)/src/H5Oattr.c -H5Ocomp.c: $(top_srcdir)/src/H5Ocomp.c +H5Obogus.c: $(top_srcdir)/src/H5Obogus.c H5Ocont.c: $(top_srcdir)/src/H5Ocont.c H5Odtype.c: $(top_srcdir)/src/H5Odtype.c H5Oefl.c: $(top_srcdir)/src/H5Oefl.c @@ -251,26 +266,53 @@ H5Olayout.c: $(top_srcdir)/src/H5Olayout.c H5Omtime.c: $(top_srcdir)/src/H5Omtime.c H5Oname.c: $(top_srcdir)/src/H5Oname.c H5Onull.c: $(top_srcdir)/src/H5Onull.c +H5Opline.c: $(top_srcdir)/src/H5Opline.c H5Osdspace.c: $(top_srcdir)/src/H5Osdspace.c H5Oshared.c: $(top_srcdir)/src/H5Oshared.c H5Ostab.c: $(top_srcdir)/src/H5Ostab.c H5P.c: $(top_srcdir)/src/H5P.c +H5Pdcpl.c: $(top_srcdir)/src/H5Pdcpl.c +H5Pdxpl.c: $(top_srcdir)/src/H5Pdxpl.c +H5Pfapl.c: $(top_srcdir)/src/H5Pfapl.c +H5Pfcpl.c: $(top_srcdir)/src/H5Pfcpl.c +H5Ptest.c: $(top_srcdir)/src/H5Ptest.c H5R.c: $(top_srcdir)/src/H5R.c +H5RS.c: $(top_srcdir)/src/H5RS.c H5S.c: $(top_srcdir)/src/H5S.c +H5ST.c: $(top_srcdir)/src/H5ST.c H5Sall.c: $(top_srcdir)/src/H5Sall.c H5Shyper.c: $(top_srcdir)/src/H5Shyper.c H5Smpio.c: $(top_srcdir)/src/H5Smpio.c H5Snone.c: $(top_srcdir)/src/H5Snone.c H5Spoint.c: $(top_srcdir)/src/H5Spoint.c H5Sselect.c: $(top_srcdir)/src/H5Sselect.c +H5Stest.c: $(top_srcdir)/src/H5Stest.c H5T.c: $(top_srcdir)/src/H5T.c H5TB.c: $(top_srcdir)/src/H5TB.c H5TS.c: $(top_srcdir)/src/H5TS.c +H5Tarray.c: $(top_srcdir)/src/H5Tarray.c H5Tbit.c: $(top_srcdir)/src/H5Tbit.c +H5Tcommit.c: $(top_srcdir)/src/H5Tcommit.c +H5Tcompound.c: $(top_srcdir)/src/H5Tcompound.c H5Tconv.c: $(top_srcdir)/src/H5Tconv.c -H5Tinit.c: $(top_builddir)/src/H5Tinit.c +H5Tcset.c: $(top_srcdir)/src/H5Tcset.c +H5Tenum.c: $(top_srcdir)/src/H5Tenum.c +H5Tfields.c: $(top_srcdir)/src/H5Tfields.c +H5Tfixed.c: $(top_srcdir)/src/H5Tfixed.c +H5Tfloat.c: $(top_srcdir)/src/H5Tfloat.c +H5Tinit.c: $(top_srcdir)/src/H5Tinit.c +H5Tnative.c: $(top_srcdir)/src/H5Tnative.c +H5Toffset.c: $(top_srcdir)/src/H5Toffset.c +H5Topaque.c: $(top_srcdir)/src/H5Topaque.c +H5Torder.c: $(top_srcdir)/src/H5Torder.c +H5Tpad.c: $(top_srcdir)/src/H5Tpad.c +H5Tprecis.c: $(top_srcdir)/src/H5Tprecis.c +H5Tstrpad.c: $(top_srcdir)/src/H5Tstrpad.c H5Tvlen.c: $(top_srcdir)/src/H5Tvlen.c H5V.c: $(top_srcdir)/src/H5V.c H5Z.c: $(top_srcdir)/src/H5Z.c H5Zdeflate.c: $(top_srcdir)/src/H5Zdeflate.c +H5Zfletcher32.c: $(top_srcdir)/src/H5Zfletcher32.c +H5Zshuffle.c: $(top_srcdir)/src/H5Zshuffle.c +H5Zszip.c: $(top_srcdir)/src/H5Zszip.c H5detect.c: $(top_srcdir)/src/H5detect.c diff --git a/pablo/PabloHDF.c b/pablo/PabloHDF.c index 4c8357a..537ed5a 100644 --- a/pablo/PabloHDF.c +++ b/pablo/PabloHDF.c @@ -78,6 +78,7 @@ #include #include #include +#include #ifndef fileno int fileno ( FILE * ); #endif @@ -90,6 +91,11 @@ int fileno ( FILE * ); #define HDFtrace3OPEN__ int HDFtrace3OPEN( const char *, int, mode_t ); +#ifdef TRACELIB_BUILD +#undef PCF_BUILD +#endif + +#ifndef PCF_BUILD #include "SDDFparam.h" #include "TraceParam.h" @@ -97,6 +103,9 @@ int HDFtrace3OPEN( const char *, int, mode_t ); #include "Trace.h" #include "IO_TraceParams.h" +#include "IOTrace.h" +#endif + #include "HDFIOTrace.h" #ifndef TRUE @@ -122,7 +131,6 @@ extern void preInitIOTrace( void ); #include "ProcIDs.h" #include "HDFTrace.h" -#include "IOTrace.h" #define ID_HDFprocName 9996 #define ID_malloc 9997 @@ -130,7 +138,7 @@ extern void preInitIOTrace( void ); #define ID_timeStamp 9999 #define DUMMY_HDF 10000 -extern char HDFprocNames[][40] = { +char HDFprocNames[][40] = { "noName", "noName", "noName", @@ -142,18 +150,58 @@ extern char HDFprocNames[][40] = { void startHDFtraceEvent (int ); void endHDFtraceEvent (int , int , char *, int ); +void getHDFprocName( int, char[41] ); -#ifdef TRACELIB_BUILD -#undef PCF_BUILD -#endif +void setHDFcallLevel( int ); +void resetHDFcallLevel( void ); +int HDFcallLevel; +int MaxHDFcallLevel = INT_MAX; #ifdef PCF_BUILD -void hdfCaptureInit( const char* name, int captureType ); +#include "PcUIOinterface.h" +void hdfCaptureInit( const char* name, int procNum, int captureType ); void hdfCaptureEnd( void ); +void traceHDFentryEvent( int eventID ) ; +void traceHDFexitEvent( int eventID ); +void basePerformanceInit( const char* name, int procNum ); +void genericBaseInit( int captureType, int procNum ); +void unixIObaseInit( int captureType, int procNum ); +int hdfBaseInit( int captureType, + int procNum, + int numHDFentries, + char HDFprocNames[][40] ); +void timeStamp( void ); +void hdfBaseEnd( void ); +void unixIObaseEnd( void ); +void genericBaseEnd( void ); +void basePerformanceEnd( void ); +/*void* traceMALLOC( size_t bytes ); +FILE* traceFOPEN( const char* fileName, const char* type ); +int traceOPEN( const char *path, int flags, ... ) ; +int trace3OPEN( const char *path, int flags, mode_t mode ) ; +int traceCREAT( const char *path, mode_t mode ) ; +int traceFFLUSH( FILE *stream ) ; +int traceFCLOSE( FILE *stream ) ; +int traceCLOSE( int fd ) ; +ssize_t traceREAD( int fd, void *buf, int nbyte ) ; +size_t traceFREAD( void *ptr, int size, int nItems, FILE *stream ) ; +int traceFGETC( FILE *stream ) ; +char* traceFGETS( char *s, int n, FILE *stream ) ; +int traceGETW( FILE *stream ) ; +off_t traceLSEEK( int fd, off_t offset, int whence ) ; +int traceFSEEK( FILE *stream, off_t offset, int whence ) ; +int traceFSETPOS( FILE *stream, const fpos_t *position ) ; +void traceREWIND( FILE *stream ) ; +ssize_t traceWRITE( int fd, const void *buf, int nbyte ) ; +size_t traceFWRITE(const void *ptr, int size, int nItems, FILE *stream ) ; +int traceFPUTC( int c, FILE *stream ) ; +int traceFPUTS( const char *s, FILE *stream ) ; +int tracePUTS( const char *s ) ; +int tracePUTW( int w, FILE *stream ) ;*/ #else -void HDFinitTrace_RT ( const char * ); -void HDFinitTrace_SDDF ( const char * ); -void hinittracex_ ( char [], int *, int[], int *,unsigned * ); +void HDFinitTrace_RT ( const char *, int procNum ); +void HDFinitTrace_SDDF ( const char *, int procNum ); +void hinittracex_ ( char [], int *, int*, int[], int *,unsigned * ); void hdfendtrace_ ( void ) ; void HDFendTrace_RT (void ); void HDFendTrace_SDDF( void ); @@ -187,6 +235,7 @@ char *hdfRecordPointer; void hinittracex_( char *file, int *len, + int *procNum, int flags[], int *nflags, unsigned *out_sw ) @@ -194,6 +243,7 @@ hinittracex_( char *file, char *traceFileName; int i; traceFileName = (char *)malloc(*len+1); + HDFcallLevel = 0; for ( i = 0; i < *len; ++i ) { traceFileName[i] = file[i]; @@ -240,19 +290,19 @@ hinittracex_( char *file, } } #ifdef PCF_BUILD - hdfCaptureInit( traceFileName, OUTPUT_SWITCH ); + hdfCaptureInit( traceFileName, *procNum, OUTPUT_SWITCH ); #else suppressMPIOtrace = TRUE; if ( OUTPUT_SWITCH == RUNTIME_TRACE || OUTPUT_SWITCH == MPI_RUNTIME_TRACE ) { - HDFinitTrace_SDDF( traceFileName ); + HDFinitTrace_SDDF( traceFileName, *procNum ); IOtracingEnabled = 1; } else if ( OUTPUT_SWITCH == SUMMARY_TRACE || OUTPUT_SWITCH == MPI_SUMMARY_TRACE ) { - HDFinitTrace_RT( traceFileName ); + HDFinitTrace_RT( traceFileName, *procNum ); IOtracingEnabled = 1; } else if ( OUTPUT_SWITCH == NO_TRACE ) @@ -271,12 +321,12 @@ hinittracex_( char *file, #endif /* PCF_BUILD */ } void -HDFinitTrace( const char *traceFileName, int id_flag, ... ) +HDFinitTrace( const char *traceFileName, int procNum, int id_flag, ... ) { int i; int nIDs; va_list ap; - + HDFcallLevel = 0; /*===================================================================* // Allocate space for trace indicators. * //===================================================================*/ @@ -322,19 +372,19 @@ HDFinitTrace( const char *traceFileName, int id_flag, ... ) } } #ifdef PCF_BUILD - hdfCaptureInit( traceFileName, OUTPUT_SWITCH ); + hdfCaptureInit( traceFileName, procNum, OUTPUT_SWITCH ); #else suppressMPIOtrace = TRUE; if ( OUTPUT_SWITCH == RUNTIME_TRACE || OUTPUT_SWITCH == MPI_RUNTIME_TRACE ) { - HDFinitTrace_SDDF( traceFileName ); + HDFinitTrace_SDDF( traceFileName, procNum ); IOtracingEnabled = 1; } else if ( OUTPUT_SWITCH == SUMMARY_TRACE || OUTPUT_SWITCH == MPI_SUMMARY_TRACE ) { - HDFinitTrace_RT( traceFileName ); + HDFinitTrace_RT( traceFileName, procNum ); IOtracingEnabled = 1; } else if ( OUTPUT_SWITCH == NO_TRACE ) @@ -364,6 +414,14 @@ void hdfendtrace_( void ) { HDFendTrace (); } +void setHDFcallLevel( int maxLevel ) +{ + MaxHDFcallLevel = maxLevel; +} +void resetHDFcallLevel() +{ + MaxHDFcallLevel = INT_MAX; +} void HDFendTrace(void) { #ifdef PCF_BUILD @@ -380,55 +438,68 @@ void HDFendTrace(void) HDFendTrace_RT(); } #endif /* PCF_BUILD */ + OUTPUT_SWITCH = NO_TRACE; + MaxHDFcallLevel = INT_MAX; } void startHDFtraceEvent(int eventID) { + ++HDFcallLevel; + if ( HDFcallLevel <= MaxHDFcallLevel ) + { #ifdef PCF_BUILD - traceHDFentryEvent( eventID ) ; + if (OUTPUT_SWITCH != NO_TRACE ) + { + traceHDFentryEvent( eventID ) ; + } #else - if ( OUTPUT_SWITCH == RUNTIME_TRACE + if ( OUTPUT_SWITCH == RUNTIME_TRACE || OUTPUT_SWITCH == MPI_RUNTIME_TRACE ) - { - traceEvent( eventID, NULL, 0 ) ; - } - else - { - HDFtraceEvent_RT( eventID, NULL, 0 ) ; - } + { + traceEvent( eventID, NULL, 0 ) ; + } + else if (OUTPUT_SWITCH != NO_TRACE ) + { + HDFtraceEvent_RT( eventID, NULL, 0 ) ; + } #endif /* PCF_BUILD */ + } } void endHDFtraceEvent(int eventID, int setID, char *setName, int IDtype ) { + if ( HDFcallLevel <= MaxHDFcallLevel ) + { #ifdef PCF_BUILD - traceHDFexitEvent( eventID ); + { + traceHDFexitEvent( eventID ); + } #else - HDFsetInfo info; - info.setID = setID; - info.setName = setName; - if ( OUTPUT_SWITCH == RUNTIME_TRACE + HDFsetInfo info; + info.setID = setID; + info.setName = setName; + if ( OUTPUT_SWITCH == RUNTIME_TRACE || OUTPUT_SWITCH == MPI_RUNTIME_TRACE ) - { - traceEvent( eventID, (char *)&info, 0 ) ; - } - else if ( OUTPUT_SWITCH == SUMMARY_TRACE + { + traceEvent( eventID, (char *)&info, 0 ) ; + } + else if ( OUTPUT_SWITCH == SUMMARY_TRACE || OUTPUT_SWITCH == MPI_SUMMARY_TRACE ) - { - HDFtraceEvent_RT( eventID, &info, 0 ) ; - } - else if ( OUTPUT_SWITCH != NO_TRACE ) - { - fprintf(stderr,"endHDFtraceEvent: "); - fprintf(stderr,"invalid OUTPUT_SWITCH %d, IDtype = %d\n", + { + HDFtraceEvent_RT( eventID, &info, 0 ) ; + } + else if ( OUTPUT_SWITCH != NO_TRACE ) + { + fprintf(stderr,"endHDFtraceEvent: "); + fprintf(stderr,"invalid OUTPUT_SWITCH %d, IDtype = %d\n", OUTPUT_SWITCH, IDtype ) ; - } + } #endif /* PCF_BUILD */ + } + --HDFcallLevel; } #ifdef PCF_BUILD void -hdfCaptureInit( const char* name, int captureType ) +hdfCaptureInit( const char* name, int procNum, int captureType ) { - int procNum; - HDF_get_NodeNum( &procNum ); basePerformanceInit( name, procNum ); genericBaseInit( captureType, procNum ); unixIObaseInit( captureType, procNum ); @@ -439,6 +510,7 @@ hdfCaptureInit( const char* name, int captureType ) procNum, ID_HDF_Last_Entry, HDFprocNames ); + HDFcallLevel = 0; } void hdfCaptureEnd( void ) @@ -456,6 +528,7 @@ hdfCaptureEnd( void ) unixIObaseEnd(); genericBaseEnd(); basePerformanceEnd(); + MaxHDFcallLevel = INT_MAX; } #endif /* PCF_BUILD */ /*****************************************************************************/ @@ -1121,10 +1194,10 @@ int HDFtracePUTS( const char *s ) { int ret; - int fd = fileno( stdout ); #ifdef PCF_BUILD - tracePUTS( s ); + ret = tracePUTS( s ); #else + int fd = fileno( stdout ); struct read_write_args writeArgs; if ( IOtracingEnabled ) { @@ -1146,6 +1219,11 @@ HDFtracePUTS( const char *s ) return( ret ); } +void getHDFprocName ( int i, char buff[41] ) +{ + strcpy( buff, HDFprocNames[i] ); +} + /*****************************************************************************/ /*+ Routine: int HDFtraceFPUTC( int c, FILE *stream ) +*/ /*+ substitute for fputc() +*/ @@ -1200,11 +1278,11 @@ HDFtraceFPUTC( int c, FILE *stream ) int HDFtraceFPUTS( const char *s, FILE *stream ) { int ret; - int fd = fileno( stream ); #ifdef PCF_BUILD ret = traceFPUTS( s, stream ); #else + int fd = fileno( stream ); struct read_write_args writeArgs; if ( IOtracingEnabled ) { diff --git a/pablo/PabloHDF_MPIO.c b/pablo/PabloHDF_MPIO.c index 13ed41a..025e823 100644 --- a/pablo/PabloHDF_MPIO.c +++ b/pablo/PabloHDF_MPIO.c @@ -97,6 +97,7 @@ // //======================================================================*/ #ifdef H5_HAVE_PARALLEL +void HDFtraceEvent_RT( int , char *, unsigned ) ; #include "mpi.h" /************************************************************************/ /* Return the node number. */ @@ -125,6 +126,7 @@ int HDF_get_comm( MPI_Comm ); int HDF_get_Datatype( MPI_Datatype ); int HDF_get_DataRep( char* ); int HDF_get_Bytes( MPI_Datatype, int ); +void HDFtraceIOEvent( int , void *, unsigned ); /* Get the mode at the file openning */ int diff --git a/pablo/PabloHDF_RT.c b/pablo/PabloHDF_RT.c index 0b53a45..c71f6e8 100644 --- a/pablo/PabloHDF_RT.c +++ b/pablo/PabloHDF_RT.c @@ -123,6 +123,7 @@ #include "SDDFparam.h" #include #include +#include #include /*======================================================================* // on ipsc/860 don't include this or you'll get multiply defined SEEK_ * @@ -184,7 +185,7 @@ fileRec_t *HDFfileList; /*======================================================================* // Internal Function prototypes * //======================================================================*/ -void HDFinitTrace_RT( char *, int ); +void HDFinitTrace_RT( char *, int, int ); void HDFendTrace_RT(); int initproctracert_( void ); int initHDFProcTrace_RT( void ); @@ -210,6 +211,8 @@ void printFileMappingsRT( char *, char **, int ); void _hdfNameDescriptor( void ); void _hdfDescriptorRT( char *, char *, int ); void HDFfinalTimeStamp( void ); +void getHDFprocName( int index, char buff[41] ); +void IOtraceInit( char*, int, int ); /*======================================================================* // Global variables * //======================================================================*/ @@ -230,7 +233,7 @@ extern char HDFprocNames[][40]; // RETURNS * // None. * //======================================================================*/ -void HDFinitTrace_RT( char *fileName, int OUTSW ) +void HDFinitTrace_RT( char *fileName, int procNum, int OUTSW ) { int error; TRgetClock( &epoch ); @@ -249,7 +252,7 @@ void HDFinitTrace_RT( char *fileName, int OUTSW ) // of the node as a suffix; if not, only one file is opened * // and it is not given a suffix. * //===================================================================*/ - initIOTraceMP( fileName, OUTSW ); + IOtraceInit( fileName, procNum, OUTSW ); } /*======================================================================* // NAME * @@ -1583,11 +1586,13 @@ void writeHDFRecDescrptrsRT( void ) { int j, FAMILY; char BUF1[256], BUF2[256] ; + char buff[41]; _hdfNameDescriptor(); /* Descriptor for named identifiers */ for ( j = 0; j < NumHDFProcs; ++j ) { if ( HDFQueues[j] != NULL ) { + getHDFprocName( j, buff ); strcpy( BUF2, "HDF "); - strcat( BUF2, HDFprocNames[j] ); + strcat( BUF2, buff ); strcat( BUF2, " Procedure Summary"); strcpy( BUF1, BUF2 ); strcat( BUF1, " Trace"); diff --git a/pablo/PabloHDF_SDDF.c b/pablo/PabloHDF_SDDF.c index 502e416..6326702 100644 --- a/pablo/PabloHDF_SDDF.c +++ b/pablo/PabloHDF_SDDF.c @@ -70,6 +70,7 @@ #include "Trace.h" #include "IOTrace.h" #include "HDFTrace.h" +void IOtraceInit( char*, int, int ); void HDFendTrace_SDDF(void); void startHDFtraceEvent(int eventID); void endHDFtraceEvent(int , int , char *, int ); @@ -92,6 +93,8 @@ void disableFileRegionSummaries( void ); void _hdfTraceDescriptor( char *, char *, int ); void createHDFTraceDescriptor( int ); void HDFfinalTimeStamp( void ); +void getHDFprocName( int index, char buff[41] ); +void endIOTrace(); #define PABLO 1 /* on the ipsc/860 we don't include unistd.h */ @@ -102,17 +105,16 @@ void HDFfinalTimeStamp( void ); #define returnRecord(x) return x; #ifdef H5_HAVE_MPIOTRACE - int initMPIOTrace( char *, int ); + int initMPIOTrace( char *, int, int ); void endMPIOTrace( void ) ; #else void endMPIOTrace( void ) {return;} #endif extern char *hdfRecordPointer; -extern char HDFprocNames[][40]; /*======================================================================* // Prototypes of functions in this file. * //======================================================================*/ -void HDFinitTrace_SDDF( char * ); +void HDFinitTrace_SDDF( char *, int ); /*======================================================================* // Each procedure being traced has associated with it a distinct pair * // of entry and exit event IDs. This code maintains a vector of such * @@ -206,21 +208,21 @@ int *procEntryCalled; // NAME * // HDFinitTrace_SDDF -- initalize HDF tracing with SDDF records * // USAGE * -// HDFinitTrace_SDDF( traceFileName ) * +// HDFinitTrace_SDDF( traceFileName, porcNum ) * // PARAMETERS * // char *traceFileName -- name of trace file to hold output * +// int procNum -- processor Number * // RETURNS * // None * //======================================================================*/ -void HDFinitTrace_SDDF( char *traceFileName ) +void HDFinitTrace_SDDF( char *traceFileName, int procNum ) { /*==================================================================== // set traceFileName and set IO tracing switches. If MPIO * // tracing is available, MPIO tracing will also be initialized. * //===================================================================*/ #ifdef H5_HAVE_MPIOTRACE - int myNode; - char *buff; +// int myNode; /*==================================================================== // in the parallel case, initialize MPI-IO tracing. This * // will initialize the traceFileName and set the I/O tracing * @@ -231,15 +233,19 @@ void HDFinitTrace_SDDF( char *traceFileName ) // MPIO initialization be performed and handle the naming of * // trace files. * //===================================================================*/ - initMPIOTrace( traceFileName, SUPPRESS_MPIO_TRACE ); - MPI_Comm_rank( MPI_COMM_WORLD, &myNode ); - setTraceProcessorNumber( myNode ); + initMPIOTrace( traceFileName, procNum, RUNTIME_TRACE ); +// MPI_Comm_rank( MPI_COMM_WORLD, &myNode ); + setTraceProcessorNumber( procNum ); #else - initIOTraceMP( traceFileName, RUNTIME_TRACE ); -#endif + IOtraceInit( traceFileName, procNum, RUNTIME_TRACE ); /*==================================================================== // complete HDF initiailization. * //===================================================================*/ + enableIOdetail(); + disableLifetimeSummaries(); + disableTimeWindowSummaries(); + disableFileRegionSummaries(); +#endif preInitHDFProcTrace(); initHDFProcTrace( sizeof(procEntries)/sizeof(int), procEntries ); } @@ -644,9 +650,11 @@ void createHDFTraceDescriptor( int Inx ) { char BUF1[256]; char BUF2[256] ; + char buff[41]; int FAMILY; + getHDFprocName( Inx, buff ); strcpy( BUF2, "HDF "); - strcat( BUF2, HDFprocNames[Inx] ); + strcat( BUF2, buff ); strcat( BUF2, " Procedure"); strcpy( BUF1, BUF2 ); strcat( BUF1, " Trace"); diff --git a/pablo/ProcTrace.h b/pablo/ProcTrace.h index 6ff2911..e9e3d31 100644 --- a/pablo/ProcTrace.h +++ b/pablo/ProcTrace.h @@ -88,8 +88,8 @@ #undef RUNTIME_TRACE #endif enum HDF_IDS { -NO_TRACE, -RUNTIME_TRACE, +NO_TRACE = 0, +RUNTIME_TRACE = 1, SUMMARY_TRACE, MPI_RUNTIME_TRACE, MPI_SUMMARY_TRACE, @@ -102,6 +102,7 @@ NUM_HDF_IDS #define SUPPRESS_MPIO_TRACE 6 #define ID_HDF_Last_Entry ID_ALLHDF -void HDFinitTrace( const char *, int trace_id, ... ); +void HDFinitTrace( const char *, int procNum, int trace_id, ... ); void HDFendTrace( void ); +void setHDFcallLevel( int ); #endif /* PROCTRACE_H */ -- cgit v0.12