summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Wells <dwells@cs.uiuc.edu>2001-03-13 18:28:03 (GMT)
committerDan Wells <dwells@cs.uiuc.edu>2001-03-13 18:28:03 (GMT)
commita5d53d6dacb5809ebb320ceae9b0e516aa8952a3 (patch)
tree9651c64155409d012f0851689e89e3fd21c534ad
parent6c915a1fa6297bc7cbc08af7baa17274f1a9e492 (diff)
downloadhdf5-a5d53d6dacb5809ebb320ceae9b0e516aa8952a3.zip
hdf5-a5d53d6dacb5809ebb320ceae9b0e516aa8952a3.tar.gz
hdf5-a5d53d6dacb5809ebb320ceae9b0e516aa8952a3.tar.bz2
[svn-r3619]
Purpose: These changes allow the user to determine bytes requested and bytes received by MPI I/O calls. Description: User wished to know if the number of bytes requested in MPI I/O calls was save as the number actually received. Solution: Added additional fields to the HDFrecord structure for bytes requested and bytes received. Other files reflect these changes. Platforms tested: Solaris IRIX64 parallel
-rw-r--r--pablo/HDFTrace.h1
-rw-r--r--pablo/HDFmpioProtos.h11
-rw-r--r--pablo/HDFrecord_RT.h67
-rw-r--r--pablo/Makefile.in51
-rw-r--r--pablo/PabloHDF.c618
-rw-r--r--pablo/PabloHDF_RT.c932
-rw-r--r--pablo/PabloHDF_SDDF.c16
7 files changed, 840 insertions, 856 deletions
diff --git a/pablo/HDFTrace.h b/pablo/HDFTrace.h
index 1bcf8d6..264291c 100644
--- a/pablo/HDFTrace.h
+++ b/pablo/HDFTrace.h
@@ -132,6 +132,7 @@ extern char *hdfRecordPointer;
#define FAMILY_HDFPROCNAME 0300
typedef struct {
+ long numBytes;
long setID;
char *setName;
} HDFsetInfo ;
diff --git a/pablo/HDFmpioProtos.h b/pablo/HDFmpioProtos.h
index e5d33ef..01da37b 100644
--- a/pablo/HDFmpioProtos.h
+++ b/pablo/HDFmpioProtos.h
@@ -55,13 +55,6 @@ int HDF_MPI_File_write_at( MPI_File fh, MPI_Offset offset, void *buf,
int HDF_MPI_File_write_at_all( MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype,
MPI_Status *status );
-
-int HDF_MPI_File_iread_at( MPI_File fh, MPI_Offset offset, void *buf,
- int count, MPI_Datatype datatype,
- MPIO_Request *request );
-int HDF_MPI_File_iwrite_at( MPI_File fh, MPI_Offset offset, void *buf,
- int count, MPI_Datatype datatype,
- MPIO_Request *request );
int HDF_MPI_File_read( MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status );
int HDF_MPI_File_read_all( MPI_File fh, void *buf, int count,
@@ -70,10 +63,6 @@ int HDF_MPI_File_write( MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status );
int HDF_MPI_File_write_all( MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status );
-int HDF_MPI_File_iread( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPIO_Request *request );
-int HDF_MPI_File_iwrite( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPIO_Request *request );
int HDF_MPI_File_seek( MPI_File fh,
MPI_Offset offset, int whence ) ;
int HDF_MPI_File_get_position( MPI_File fh, MPI_Offset *offset );
diff --git a/pablo/HDFrecord_RT.h b/pablo/HDFrecord_RT.h
index 808eaef..3fb3f31 100644
--- a/pablo/HDFrecord_RT.h
+++ b/pablo/HDFrecord_RT.h
@@ -102,13 +102,52 @@
/*======================================================================*
// Enumeration of time fields in an HDFrec_t below *
//======================================================================*/
-enum TimeFields { HDF_, MPI, Malloc, AllIO, Open, Close, Read, Write, ARead,
- AWrite, Seek, Wait, Misc, nTallyFields };
+enum TimeFields { HDF_,
+ MPI,
+ Malloc,
+ AllIO,
+ Open,
+ Close,
+ Read,
+ Write,
+ Aread,
+ Awrite,
+ Seek,
+ Wait,
+ Misc,
+ MPIOread,
+ MPIOreadAll,
+ MPIOwrite,
+ MPIOwriteAll,
+ MPIOiRead,
+ MPIOiWrite,
+ MPIOother,
+ nTallyFields,
+ MPIOreadTrans,
+ MPIOreadAllTrans,
+ MPIOwriteTrans,
+ MPIOwriteAllTrans
+ };
/*======================================================================*
// Enumeration of byte fields in an HDFrec_t below *
//======================================================================*/
-enum ByteFields{ MallocBytes, ReadBytes, WriteBytes, AReadBytes, AWriteBytes,
- nByteFields };
+enum ByteFields{ MallocBytes,
+ ReadBytes,
+ WriteBytes,
+ AreadBytes,
+ AwriteBytes,
+ MPIOreadBytesReq,
+ MPIOreadBytesTrans,
+ MPIOwriteBytesReq,
+ MPIOwriteBytesTrans,
+ MPIOreadAllBytesReq,
+ MPIOreadAllBytesTrans,
+ MPIOwriteAllBytesReq,
+ MPIOwriteAllBytesTrans,
+ MPIOiReadBytesReq,
+ MPIOiWriteBytesReq,
+ nByteFields,
+ nHistFields = AwriteBytes+1 };
/*======================================================================*
// Definition of first and last IO event. *
//======================================================================*/
@@ -121,16 +160,16 @@ int BktLim[] = { 1, 4*ONEK, 64*ONEK, 256*ONEK, INT_MAX } ;
// Definition of structure used to account activity in an HDF call *
//======================================================================*/
typedef struct {
- int nCalls; /* number of proc calls */
- CLOCK lastCall; /* time of last call */
- CLOCK incDur; /* inclusive duration */
- CLOCK excDur; /* exclusive duration */
- CLOCK times[nTallyFields]; /* Tally op/calls times */
- int counts[nTallyFields]; /* Tally op/calls counts */
- int bytes[nByteFields]; /* Tally bytes transferred */
- int Hists[nByteFields][nBkts]; /* Historgrams */
- long hdfID; /* data set ID */
- long xRef; /* data set cross reference */
+ int nCalls; /* number of proc calls */
+ CLOCK lastCall; /* time of last call */
+ CLOCK incDur; /* inclusive duration */
+ CLOCK excDur; /* exclusive duration */
+ CLOCK times[nTallyFields]; /* Tally op/calls times */
+ int counts[nTallyFields]; /* Tally op/calls counts */
+ int bytes[nByteFields]; /* Tally bytes transferred */
+ int Hists[nHistFields][nBkts]; /* Historgrams */
+ long hdfID; /* data set ID */
+ long xRef; /* data set cross reference */
} HDFrec_t;
/*======================================================================*
// Node used to maintain linked lists of HDF procedure activity. *
diff --git a/pablo/Makefile.in b/pablo/Makefile.in
index d5941ad..c70c933 100644
--- a/pablo/Makefile.in
+++ b/pablo/Makefile.in
@@ -14,11 +14,12 @@ TRACE=perl ../bin/trace
## For Pablo instrumenation of parallel code, remove the # from in front of
## PABLO_MPIO_FLAGS.
## Set PABLO_INC equal to the path of the include directory for the Pablo
-## TraceLibrary
+## TraceLibrary. This can be done by setting the environment variable
+## PABLO_TRACELIB to the path where the Pablo Trace Library ins installed.
###############################################################################
-#PABLO_MPIO_FLAGS = -DHAVE_PARALLEL -DHAVE_MPIOTRACE
-PABLO_INC =
-PABLO_FLAGS = -I. -I../src -I$(PABLO_INC) -DHAVE_PABLO $(PABLO_MPIO_FLAGS)
+#PABLO_MPIO_FLAGS = -DH5_HAVE_PARALLEL -DH5_HAVE_MPIOTRACE
+PABLO_INC = $(PABLO_TRACELIB)/include
+PABLO_FLAGS = -I. -I../src -I$(PABLO_INC) -DH5_HAVE_PABLO $(PABLO_MPIO_FLAGS)
## This is our main target:
LIB=libhdf5-inst.a
@@ -29,17 +30,22 @@ SRCDIRS = ./. ../src/.
# should be make to the SRCFILES macro also and the LIB_SRC variable now has
# directory paths included in it (which may cause problems somewhere). - QAK
LIB_SRC= \
- H5.c H5A.c H5AC.c H5B.c H5D.c H5E.c H5F.c H5Farray.c H5Fcontig.c \
- H5Fistore.c H5Fseq.c H5FD.c H5FDsec2.c H5FDfamily.c H5FDmpio.c H5FDcore.c \
- H5FDdpss.c H5FDmulti.c H5FDgass.c H5FDlog.c H5FDsrb.c H5FDstdio.c \
- H5FDstream.c H5FL.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c H5I.c \
- H5MF.c H5MM.c H5O.c H5Oattr.c H5Ocomp.c H5Ocont.c H5Odtype.c H5Oefl.c \
- H5Ofill.c H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c H5Osdspace.c \
- H5Oshared.c H5Ostab.c H5P.c H5R.c H5S.c H5Sall.c H5Shyper.c \
- H5Smpio.c H5Snone.c H5Spoint.c H5Sselect.c H5T.c H5Tbit.c H5Tconv.c \
- H5Tinit.c H5Tvlen.c H5TB.c H5TS.c H5V.c H5Z.c H5Zdeflate.c
-
-PABLO_OBJ = PabloHDF.o PabloHDF_RT.o PabloHDF_SDDF.o PabloHDFff.o
+ 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 \
+ H5FDdpss.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
+
+PABLO_OBJ = PabloHDF.o PabloHDF_RT.o PabloHDF_SDDF.o
LIB_COBJ = $(LIB_SRC:.c=.o)
LIB_OBJ = $(PABLO_OBJ) $(LIB_COBJ)
@@ -47,6 +53,8 @@ lib_obj: $(LIB_OBJ)
copy_src:
cp ../src/*.c .
+ touch ../src/*.c
+ touch *.c
touch copy_src
# 'vpath' directive is only supported in gmake, take out - QAK
@@ -67,7 +75,7 @@ PABLO_HDR = HDFentryNames.h HDFidList.h ProcIDs.h HDFTrace.h ProcTrace.h \
##
lib: $(LIB)
$(LIB): $(LIB_OBJ)
- $(AR) -rc $@ $(LIB_OBJ)
+ $(AR) -rc $@ *.o
$(RANLIB) $@
##
## Dummy this out so that there is no redundant make of the library
@@ -144,11 +152,12 @@ maintainer-clean: distclean
PABLO_INCLUDES = HDFentryNames.h HDFidList.h ProcIDs.h HDFTrace.h ProcTrace.h \
ProcTrace.inc
-PABLO_CLEAN = HDFentryNames.h HDFidList.h ProcMasks.h HDFentries.txt
+PABLO_CLEAN = HDFentryNames.h HDFidList.h ProcMasks.h HDFentries.txt \
+ ProcTrace.inc
HDFentries.txt: ../src/*.c
- grep "FUNC_ENTER.*(H5" ../src/*.c | \
- sed "s/.*(H5/H5/;s/[,)].*//" | sort -u > $@
+ grep "FUNC_ENTER[_INIT ]*(" ../src/*.c | \
+ sed "s/.*FUNC_ENTER[_INIT ]*(//;s/[,)].*//" | sort -u > $@
HDFentryNames.h: HDFentries.txt
sed "s/.*/\"&\",/" $? > $@
@@ -180,7 +189,7 @@ ProcTrace.inc: HDFidList.h
PabloHDF.o: PabloHDF.c $(PABLO_INCLUDES) copy_src
- $(CC) $(CFLAGS) $(CPPFLAGS) $(PABLO_FLAGS) -c $<
+ $(CC) -g $(CFLAGS) $(CPPFLAGS) $(PABLO_FLAGS) -c $<
PabloHDF_RT.o: PabloHDF_RT.c $(PABLO_INCLUDES) copy_src
$(CC) $(CFLAGS) $(CPPFLAGS) $(PABLO_FLAGS) -c $<
@@ -189,4 +198,4 @@ PabloHDF_SDDF.o: PabloHDF_SDDF.c $(PABLO_INCLUDES) copy_src
$(CC) $(CFLAGS) $(CPPFLAGS) $(PABLO_FLAGS) -c $<
PabloHDFff.o: PabloHDFff.f $(PABLO_INCLUDES) copy_src
- $(F77) -O -c PabloHDFff.f
+ $(F77) $(FFLAGS) -O -c PabloHDFff.f
diff --git a/pablo/PabloHDF.c b/pablo/PabloHDF.c
index 8a61687..9c43897 100644
--- a/pablo/PabloHDF.c
+++ b/pablo/PabloHDF.c
@@ -126,9 +126,10 @@ extern void preInitIOTrace( void );
#define ID_timeStamp 9999
#define DUMMY_HDF 10000
-#ifdef HAVE_PARALLEL
-#include "mpio.h"
-#endif /* HAVE_PARALLEL*/
+#ifdef H5_HAVE_PARALLEL
+#include "mpi.h"
+int HDF_get_Bytes( MPI_Datatype datatype, int count );
+#endif /* H5_HAVE_PARALLEL*/
void HDFinitTrace_RT ( const char *, int );
void HDFinitTrace_SDDF ( const char *, int );
@@ -207,7 +208,7 @@ void hinittracex_( char *file, int *len, int flags[], int *nflags,
// procedures. *
//==============================================================*/
if ( *nflags == 0 || procTrace[ID_ALLHDF] ) {
- for ( i = ID_HDF_Last_Entry + 1; i < NUM_HDF_IDS; ++i ) {
+ for ( i = 0; i < NUM_HDF_IDS; ++i ) {
procTrace[i] = 1;
}
}
@@ -270,7 +271,7 @@ void HDFinitTrace( const char *traceFileName, int id_flag, ... )
// procedures. *
//==============================================================*/
if ( nIDs == 0 || procTrace[ID_ALLHDF] ) {
- for ( i = ID_HDF_Last_Entry + 1; i < NUM_HDF_IDS; ++i ) {
+ for ( i = 0; i < NUM_HDF_IDS; ++i ) {
procTrace[i] = 1;
}
}
@@ -1059,7 +1060,7 @@ void PabloHDFTrace( int ID )
exit (-1);
}
}
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
/*======================================================================*
// Pass call through to regular MPIO entry except in case of Real Time *
// tracing. *
@@ -1068,22 +1069,26 @@ void PabloHDFTrace( int ID )
int HDF_MPI_File_open( MPI_Comm comm, char *filename, int amode,
MPI_Info info, MPI_File *fh )
{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
+ int returnVal;
+ HDFsetInfo dataPtr;
+ int dataLen;
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_open( comm, filename, amode, info, fh );
- } else {
- dataLen = sizeof( HDFsetInfo );
- dataPtr.setID = (long)fh;
- dataPtr.setName = (char *)malloc( strlen(filename) + 1);
- strcpy( dataPtr.setName , filename );
- HDFtraceEvent_RT( HDFmpiOpenID, &dataPtr, dataLen );
- returnVal = PMPI_File_open( comm, filename, amode, info, fh );
- HDFtraceEvent_RT( -HDFmpiOpenID, &dataPtr, dataLen );
- }
- return returnVal;
+ if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE )
+ {
+ returnVal = PabloMPI_File_open( comm, filename, amode, info, fh );
+ }
+ else
+ {
+ dataLen = sizeof( HDFsetInfo );
+ dataPtr.setID = 0;
+ dataPtr.setName = (char *)malloc( strlen(filename) + 1);
+ strcpy( dataPtr.setName , filename );
+ HDFtraceEvent_RT( HDFmpiOpenID, &dataPtr, dataLen );
+ returnVal = PMPI_File_open( comm, filename, amode, info, fh );
+ dataPtr.setID = (long)fh;
+ HDFtraceEvent_RT( -HDFmpiOpenID, &dataPtr, dataLen );
+ }
+ return returnVal;
}
@@ -1099,18 +1104,21 @@ int HDF_MPI_File_close( MPI_File *fh )
HDFsetInfo dataPtr;
int dataLen;
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_close( fh );
- } else {
- dataLen = sizeof( HDFsetInfo );
- dataPtr.setID = (long)fh;
- dataPtr.setName = NULL;
- HDFtraceEvent_RT( HDFmpiCloseID, &dataPtr, dataLen );
- returnVal = PMPI_File_close( fh );
- HDFtraceEvent_RT( -HDFmpiCloseID, &dataPtr, dataLen );
- free( dataPtr.setName );
- }
- return returnVal;
+ if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE )
+ {
+ returnVal = PabloMPI_File_close( fh );
+ }
+ else
+ {
+ dataLen = sizeof( HDFsetInfo );
+ dataPtr.setID = (long)fh;
+ dataPtr.setName = NULL;
+ HDFtraceEvent_RT( HDFmpiCloseID, &dataPtr, dataLen );
+ returnVal = PMPI_File_close( fh );
+ HDFtraceEvent_RT( -HDFmpiCloseID, &dataPtr, dataLen );
+ free( dataPtr.setName );
+ }
+ return returnVal;
}
/*======================================================================*
@@ -1120,23 +1128,26 @@ int HDF_MPI_File_close( MPI_File *fh )
//======================================================================*/
int HDF_MPI_File_delete( char *filename, MPI_Info info )
{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
+ int returnVal;
+ HDFsetInfo dataPtr;
+ int dataLen;
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_delete( filename, info );
- } else {
- dataLen = sizeof( HDFsetInfo );
- dataPtr.setID = 0;
- dataPtr.setName = (char *)malloc( sizeof(filename) );
- strcpy( dataPtr.setName , filename );
- HDFtraceEvent_RT( HDFmpiDeleteID, &dataPtr, dataLen );
- returnVal = PMPI_File_delete( filename, info );
- HDFtraceEvent_RT( -HDFmpiDeleteID, &dataPtr, dataLen );
- free( dataPtr.setName );
- }
- return returnVal;
+ if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE )
+ {
+ returnVal = PabloMPI_File_delete( filename, info );
+ }
+ else
+ {
+ dataLen = sizeof( HDFsetInfo );
+ dataPtr.setID = 0;
+ dataPtr.setName = (char *)malloc( sizeof(filename) );
+ strcpy( dataPtr.setName , filename );
+ HDFtraceEvent_RT( HDFmpiDeleteID, &dataPtr, dataLen );
+ returnVal = PMPI_File_delete( filename, info );
+ HDFtraceEvent_RT( -HDFmpiDeleteID, &dataPtr, dataLen );
+ free( dataPtr.setName );
+ }
+ return returnVal;
}
/*======================================================================*
@@ -1146,43 +1157,23 @@ int HDF_MPI_File_delete( char *filename, MPI_Info info )
//======================================================================*/
int HDF_MPI_File_set_size( MPI_File fh, MPI_Offset size )
{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_set_size( fh, size );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiSetSizeID,&dataPtr,dataLen );
- returnVal = PMPI_File_set_size( fh, size );
- HDFtraceEvent_RT( -HDFmpiSetSizeID, &dataPtr, dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_preallocate( MPI_File fh, MPI_Offset size)
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
+ int returnVal;
+ HDFsetInfo dataPtr;
+ int dataLen;
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_preallocate( fh, size);
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiPreallocateID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_preallocate( fh, size);
- HDFtraceEvent_RT( -HDFmpiPreallocateID,
- &dataPtr, dataLen );
- }
- return returnVal;
+ if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE )
+ {
+ returnVal = PabloMPI_File_set_size( fh, size );
+ }
+ else
+ {
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
+ HDFtraceEvent_RT( HDFmpiSetSizeID,&dataPtr,dataLen );
+ returnVal = PMPI_File_set_size( fh, size );
+ HDFtraceEvent_RT( -HDFmpiSetSizeID, &dataPtr, dataLen );
+ }
+ return returnVal;
}
/*======================================================================*
@@ -1197,9 +1188,10 @@ int HDF_MPI_File_get_size( MPI_File fh, MPI_Offset *size )
int dataLen;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_size( fh, size);
+ returnVal = PabloMPI_File_get_size( fh, size);
} else {
- dataLen = 0;
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
HDFtraceEvent_RT( HDFmpiGetSizeID,
&dataPtr,dataLen );
returnVal = PMPI_File_get_size( fh, size);
@@ -1221,9 +1213,10 @@ int HDF_MPI_File_get_group( MPI_File fh, MPI_Group *group )
int dataLen;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_group( fh, group);
+ returnVal = PabloMPI_File_get_group( fh, group);
} else {
- dataLen = 0;
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
HDFtraceEvent_RT( HDFmpiGetGroupID,
&dataPtr,dataLen );
returnVal = PMPI_File_get_group( fh, group);
@@ -1245,9 +1238,10 @@ int HDF_MPI_File_get_amode( MPI_File fh, int *amode )
int dataLen;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_amode( fh, amode);
+ returnVal = PabloMPI_File_get_amode( fh, amode);
} else {
- dataLen = 0;
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
HDFtraceEvent_RT( HDFmpiGetAmodeID,
&dataPtr,dataLen );
returnVal = PMPI_File_get_amode( fh, amode);
@@ -1270,10 +1264,11 @@ int HDF_MPI_File_set_view( MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
int dataLen;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_set_view( fh, disp, etype, filetype,
+ returnVal = PabloMPI_File_set_view( fh, disp, etype, filetype,
datarep, info );
} else {
- dataLen = 0;
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
HDFtraceEvent_RT( HDFmpiSetViewID,
&dataPtr,dataLen );
returnVal = PMPI_File_set_view( fh, disp, etype, filetype,
@@ -1292,23 +1287,26 @@ int HDF_MPI_File_set_view( MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
int HDF_MPI_File_get_view( MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
MPI_Datatype *filetype, char *datarep )
{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_view(fh, disp, etype, filetype, datarep);
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiSetViewID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_get_view(fh, disp, etype, filetype, datarep);
- HDFtraceEvent_RT( -HDFmpiSetViewID,
+ int returnVal;
+ HDFsetInfo dataPtr;
+ int dataLen;
+
+ if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE )
+ {
+ returnVal = PabloMPI_File_get_view(fh, disp, etype, filetype, datarep);
+ }
+ else
+ {
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
+ HDFtraceEvent_RT( HDFmpiSetViewID,
&dataPtr,dataLen );
- returnVal = PMPI_File_get_view(fh, disp, etype, filetype, datarep);
+ returnVal = PMPI_File_get_view(fh, disp, etype, filetype, datarep);
+ HDFtraceEvent_RT( -HDFmpiSetViewID, &dataPtr,dataLen );
+ returnVal = PMPI_File_get_view(fh, disp, etype, filetype, datarep);
- }
- return returnVal;
+ }
+ return returnVal;
}
/*======================================================================*
@@ -1322,16 +1320,28 @@ int HDF_MPI_File_read_at( MPI_File fh, MPI_Offset offset, void *buf,
int returnVal;
HDFsetInfo dataPtr;
int dataLen;
+ int rCount;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_read_at( fh, offset, buf, count, datatype,
+ returnVal = PabloMPI_File_read_at( fh, offset, buf, count, datatype,
status );
} else {
- dataLen = 0;
+ dataLen = sizeof(dataPtr);
+ dataPtr.setID = (long)fh;
+ dataPtr.numBytes = HDF_get_Bytes( datatype, count );
HDFtraceEvent_RT( HDFmpiReadAtID,
&dataPtr,dataLen );
returnVal = PMPI_File_read_at( fh, offset, buf, count, datatype,
status );
+ MPI_Get_count(status,datatype,&rCount);
+ if ( rCount < 0 || rCount > count )
+ {
+ dataPtr.numBytes = -1;
+ }
+ else
+ {
+ dataPtr.numBytes = HDF_get_Bytes( datatype, rCount );
+ }
HDFtraceEvent_RT( -HDFmpiReadAtID,
&dataPtr,dataLen );
}
@@ -1350,16 +1360,28 @@ int HDF_MPI_File_read_at_all( MPI_File fh, MPI_Offset offset, void *buf,
int returnVal;
HDFsetInfo dataPtr;
int dataLen;
+ int rCount;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_read_at_all( fh, offset, buf,
+ returnVal = PabloMPI_File_read_at_all( fh, offset, buf,
count, datatype, status );
} else {
- dataLen = 0;
+ dataLen = sizeof(dataPtr);
+ dataPtr.setID = (long)fh;
+ dataPtr.numBytes = HDF_get_Bytes( datatype, count );
HDFtraceEvent_RT( HDFmpiReadAtAllID,
&dataPtr,dataLen );
returnVal = PMPI_File_read_at_all( fh, offset, buf,
count, datatype, status );
+ MPI_Get_count(status,datatype,&rCount);
+ if ( rCount < 0 || rCount > count )
+ {
+ dataPtr.numBytes = -1;
+ }
+ else
+ {
+ dataPtr.numBytes = HDF_get_Bytes( datatype, rCount );
+ }
HDFtraceEvent_RT( -HDFmpiReadAtAllID,
&dataPtr,dataLen );
}
@@ -1375,23 +1397,36 @@ int HDF_MPI_File_write_at( MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status )
{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_write_at( fh, offset, buf, count, datatype,
- status );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiWriteAtID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_write_at( fh, offset, buf, count, datatype,
- status );
- HDFtraceEvent_RT( -HDFmpiWriteAtID,
- &dataPtr,dataLen );
- }
- return returnVal;
+ int returnVal;
+ HDFsetInfo dataPtr;
+ int dataLen;
+ int rCount;
+
+ if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE )
+ {
+ returnVal = PabloMPI_File_write_at( fh, offset, buf, count, datatype,
+ status );
+ }
+ else
+ {
+ dataLen = sizeof(dataPtr);
+ dataPtr.setID = (long)fh;
+ dataPtr.numBytes = HDF_get_Bytes( datatype, count );
+ HDFtraceEvent_RT( HDFmpiWriteAtID, &dataPtr,dataLen );
+ returnVal = PMPI_File_write_at( fh, offset, buf, count, datatype,
+ status );
+ MPI_Get_count(status,datatype,&rCount);
+ if ( rCount < 0 || rCount > count )
+ {
+ dataPtr.numBytes = -1;
+ }
+ else
+ {
+ dataPtr.numBytes = HDF_get_Bytes( datatype, rCount );
+ }
+ HDFtraceEvent_RT( -HDFmpiWriteAtID, &dataPtr,dataLen );
+ }
+ return returnVal;
}
/*======================================================================*
@@ -1405,16 +1440,28 @@ int HDF_MPI_File_write_at_all( MPI_File fh, MPI_Offset offset, void *buf,
int returnVal;
HDFsetInfo dataPtr;
int dataLen;
+ int rCount;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_write_at_all( fh, offset, buf,
+ returnVal = PabloMPI_File_write_at_all( fh, offset, buf,
count, datatype, status );
} else {
- dataLen = 0;
+ dataLen = sizeof(dataPtr);
+ dataPtr.setID = (long)fh;
+ dataPtr.numBytes = HDF_get_Bytes( datatype, count );
HDFtraceEvent_RT( HDFmpiWriteAtAllID,
&dataPtr,dataLen );
returnVal = PMPI_File_write_at_all( fh, offset, buf,
count, datatype, status );
+ MPI_Get_count(status,datatype,&rCount);
+ if ( rCount < 0 || rCount > count )
+ {
+ dataPtr.numBytes = -1;
+ }
+ else
+ {
+ dataPtr.numBytes = HDF_get_Bytes( datatype, rCount );
+ }
HDFtraceEvent_RT( -HDFmpiWriteAtAllID,
&dataPtr,dataLen );
}
@@ -1426,300 +1473,6 @@ int HDF_MPI_File_write_at_all( MPI_File fh, MPI_Offset offset, void *buf,
// tracing. *
// Note: The regular MPIO entry may or may not be instrumented. *
//======================================================================*/
-int HDF_MPI_File_iread_at( MPI_File fh, MPI_Offset offset, void *buf,
- int count, MPI_Datatype datatype, MPIO_Request *request )
-{
- return MPI_File_iread_at( fh, offset, buf, count, datatype, request );
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_iwrite_at( MPI_File fh, MPI_Offset offset, void *buf,
- int count, MPI_Datatype datatype, MPIO_Request *request)
-{
- return MPI_File_iwrite_at( fh, offset, buf, count, datatype, request );
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_read( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPI_Status *status)
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_read( fh, buf, count, datatype, status );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiReadID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_read( fh, buf, count, datatype, status );
- HDFtraceEvent_RT( -HDFmpiReadID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_read_all( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPI_Status *status)
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_read_all( fh, buf, count, datatype, status );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiReadAllID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_read_all( fh, buf, count, datatype, status );
- HDFtraceEvent_RT( -HDFmpiReadAllID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_write( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPI_Status *status )
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_write( fh, buf, count, datatype, status );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiWriteID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_write( fh, buf, count, datatype, status );
- HDFtraceEvent_RT( -HDFmpiWriteID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_write_all( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPI_Status *status )
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal =MPI_File_write_all( fh, buf, count, datatype, status );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiWriteAllID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_write_all( fh, buf, count, datatype, status );
- HDFtraceEvent_RT( -HDFmpiWriteAllID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_iread( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPIO_Request *request )
-{
- return MPI_File_iread( fh, buf, count, datatype, request );
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_iwrite( MPI_File fh, void *buf, int count,
- MPI_Datatype datatype, MPIO_Request *request )
-{
- return MPI_File_iwrite( fh, buf, count, datatype, request );
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_seek( MPI_File fh, MPI_Offset offset, int whence )
-{
-
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_seek( fh, offset, whence );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiSeekID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_seek( fh, offset, whence );
- HDFtraceEvent_RT( -HDFmpiSeekID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_get_position( MPI_File fh, MPI_Offset *offset )
-{
-
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_position( fh, offset );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiGetPositionID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_get_position( fh, offset );
- HDFtraceEvent_RT( -HDFmpiGetPositionID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_get_byte_offset( MPI_File fh, MPI_Offset offset,
- MPI_Offset *disp )
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_byte_offset( fh, offset, disp );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiGetByteOffsetID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_get_byte_offset( fh, offset, disp );
- HDFtraceEvent_RT( -HDFmpiGetByteOffsetID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_get_type_extent( MPI_File fh, MPI_Datatype datatype,
- MPI_Aint *extent )
-{
-
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_type_extent( fh, datatype, extent );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiGetTypeExtentID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_get_type_extent( fh, datatype, extent );
- HDFtraceEvent_RT( -HDFmpiGetTypeExtentID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_set_atomicity( MPI_File fh, int flag )
-{
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_set_atomicity( fh, flag );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiSetAtomicityID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_set_atomicity( fh, flag );
- HDFtraceEvent_RT( -HDFmpiSetAtomicityID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
-int HDF_MPI_File_get_atomicity( MPI_File fh, int *flag )
-{
-
- int returnVal;
- HDFsetInfo dataPtr;
- int dataLen;
-
- if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_get_atomicity( fh, flag );
- } else {
- dataLen = 0;
- HDFtraceEvent_RT( HDFmpiGetAtomicityID,
- &dataPtr,dataLen );
- returnVal = PMPI_File_get_atomicity( fh, flag );
- HDFtraceEvent_RT( -HDFmpiGetAtomicityID,
- &dataPtr,dataLen );
- }
- return returnVal;
-}
-
-/*======================================================================*
-// Pass call through to regular MPIO entry except in case of Real Time *
-// tracing. *
-// Note: The regular MPIO entry may or may not be instrumented. *
-//======================================================================*/
int HDF_MPI_File_sync( MPI_File fh )
{
int returnVal;
@@ -1727,9 +1480,10 @@ int HDF_MPI_File_sync( MPI_File fh )
int dataLen;
if ( OUTPUT_SWITCH != MPI_SUMMARY_TRACE ) {
- returnVal = MPI_File_sync ( fh );
+ returnVal = PabloMPI_File_sync ( fh );
} else {
- dataLen = 0;
+ dataLen = 1;
+ dataPtr.setID = (long)fh;
HDFtraceEvent_RT( HDFmpiSyncID,
&dataPtr,dataLen );
returnVal = PMPI_File_sync ( fh );
@@ -1739,4 +1493,12 @@ int HDF_MPI_File_sync( MPI_File fh )
return returnVal;
}
-#endif /* HAVE_PARALLEL */
+int HDF_get_Bytes( MPI_Datatype datatype, int count )
+{
+ int nm_bytes;
+
+ MPI_Type_size( datatype, &nm_bytes );
+ return( nm_bytes * count );
+}
+
+#endif /* H5_HAVE_PARALLEL */
diff --git a/pablo/PabloHDF_RT.c b/pablo/PabloHDF_RT.c
index 1ccdad5..6de90d2 100644
--- a/pablo/PabloHDF_RT.c
+++ b/pablo/PabloHDF_RT.c
@@ -142,8 +142,8 @@
#include "HDFrecord_RT.h"
-#ifdef HAVE_PARALLEL
-#include "mpio.h"
+#ifdef H5_HAVE_PARALLEL
+#include "mpi.h"
#include "MPIO_EventArgs.h"
#endif
@@ -230,7 +230,7 @@ extern char *hdfRecordPointer;
//======================================================================*/
void HDFinitTrace_RT( char *fileName, int OUTSW )
{
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
int myNode;
#endif
int error;
@@ -241,7 +241,7 @@ void HDFinitTrace_RT( char *fileName, int OUTSW )
exit(-1);
}
FileName = ( char * ) malloc ( strlen( fileName ) + 10 );
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
/*==============================================================*
// Here the library was built to linked with the MPI and MPIO *
// libraries. However, the use may chose not to run with MPI. *
@@ -259,11 +259,11 @@ void HDFinitTrace_RT( char *fileName, int OUTSW )
}
#else
/*==============================================================*
- // In the non-parallel case, set the trace file name and *
+ case, set the trace file name and *
// initialize the trace library. *
//==============================================================*/
strcpy( FileName, fileName ) ;
-#endif /* HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
setTraceFileName(FileName);
basicLibraryInit( );
}
@@ -280,7 +280,6 @@ void HDFendTrace_RT( int OUTSW )
int j, numSetIDs;
HDFnode_t *P;
char **Names;
-/* char* mapFile;*/
HDFfinalTimeStamp();
/*==============================================================*
@@ -391,27 +390,40 @@ int initHDFProcTrace_RT( void )
//======================================================================*/
void HDFtraceEvent_RT( int eventType, char *dataPtr, unsigned dataLen )
{
- CLOCK seconds;
+ CLOCK seconds;
- seconds = getClock();
+ seconds = getClock();
- if ( isBeginIOEvent ( eventType ) || eventType == ID_malloc ) {
- BeginIOEventRecord ( eventType, seconds, dataPtr ) ;
- } else if ( isEndIOEvent( eventType ) || eventType == -ID_malloc) {
- EndIOEventRecord ( eventType, seconds, dataPtr );
- } else if ( isBeginHDFEvent( eventType ) ) {
- BeginHDFEventRecord ( eventType , seconds ) ;
- } else if ( isEndHDFEvent( eventType ) ) {
- EndHDFEventRecord ( seconds, dataPtr );
-#ifdef HAVE_PARALLEL
- } else if ( isBeginMPIOEvent( eventType ) ) {
- BeginMPIOEventRecord ( eventType, seconds, dataPtr, dataLen ) ;
- } else if ( isEndMPIOEvent( eventType ) ) {
- EndMPIOEventRecord ( eventType, seconds, dataPtr, dataLen );
-#endif /* HAVE_PARALLEL */
- } else {
- fprintf(stderr,"eventType %d, dataLen = %u\n",eventType,dataLen);
- }
+ if ( isBeginIOEvent ( eventType ) || eventType == ID_malloc )
+ {
+ BeginIOEventRecord ( eventType, seconds, dataPtr ) ;
+ }
+ else if ( isEndIOEvent( eventType ) || eventType == -ID_malloc)
+ {
+ EndIOEventRecord ( eventType, seconds, dataPtr );
+ }
+ else if ( isBeginHDFEvent( eventType ) )
+ {
+ BeginHDFEventRecord ( eventType , seconds ) ;
+ }
+ else if ( isEndHDFEvent( eventType ) )
+ {
+ EndHDFEventRecord ( seconds, dataPtr );
+#ifdef H5_HAVE_PARALLEL
+ }
+ else if ( isBeginMPIOEvent( eventType ) )
+ {
+ BeginMPIOEventRecord ( eventType, seconds, dataPtr, dataLen ) ;
+ }
+ else if ( isEndMPIOEvent( eventType ) )
+ {
+ EndMPIOEventRecord ( eventType, seconds, dataPtr, dataLen );
+#endif /* H5_HAVE_PARALLEL */
+ }
+ else
+ {
+ fprintf(stderr,"eventType %d, dataLen = %u\n",eventType,dataLen);
+ }
}
/*======================================================================*
// BeginIOEventRecord: *
@@ -420,41 +432,48 @@ void HDFtraceEvent_RT( int eventType, char *dataPtr, unsigned dataLen )
//======================================================================*/
void BeginIOEventRecord ( int eventType, CLOCK seconds, void *dataPtr )
{
- char *name;
- /*==============================================================*
- // save the time value temporarily in top of stack *
- // When the end record is received, the duration can be *
- // computed. *
- //==============================================================*/
- CallStack->lastIOtime = seconds;
- /*==============================================================*
- // get the ID or name of the file accessed from the structure *
- // passed as dataPtr. *
- //==============================================================*/
- switch ( eventType )
- {
- case fopenBeginID:
- case openBeginID:
- name = (char *)(dataPtr) + 2*sizeof(int);
- strcpy( openName, name );
- break;
- case fcloseBeginID:
- case closeBeginID:
- CallStack->record.hdfID = *( long *)dataPtr;
- break;
- case readBeginID:
- case freadBeginID:
- case writeBeginID:
- case fwriteBeginID:
- case lseekBeginID:
- case fseekBeginID:
- case fsetposBeginID:
- case rewindBeginID:
- CallStack->record.hdfID = *(int *)dataPtr;
- break;
- default:
- break;
- }
+ char *name;
+ /*===================================================================*
+ // save the time value temporarily in top of stack *
+ // When the end record is received, the duration can be computed. *
+ //===================================================================*/
+ CallStack->lastIOtime = seconds;
+ /*===================================================================*
+ // get the ID or name of the file accessed from the structure *
+ // passed as dataPtr. *
+ //===================================================================*/
+ switch ( eventType )
+ {
+ case fopenBeginID:
+ case openBeginID:
+ {
+ name = (char *)(dataPtr) + 2*sizeof(int);
+ strcpy( openName, name );
+ break;
+ }
+ case fcloseBeginID:
+ case closeBeginID:
+ {
+ CallStack->record.hdfID = *( long *)dataPtr;
+ break;
+ }
+ case readBeginID:
+ case freadBeginID:
+ case writeBeginID:
+ case fwriteBeginID:
+ case lseekBeginID:
+ case fseekBeginID:
+ case fsetposBeginID:
+ case rewindBeginID:
+ {
+ CallStack->record.hdfID = *(int *)dataPtr;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
}
/*======================================================================*
// EndIOEventRecord: *
@@ -465,44 +484,50 @@ void BeginIOEventRecord ( int eventType, CLOCK seconds, void *dataPtr )
//======================================================================*/
void EndIOEventRecord ( int eventType, CLOCK secs, void *dataPtr )
{
- CLOCK incDur;
- int i, Field, ByteField, bytes;
-
- incDur = clockSubtract(secs,CallStack->lastIOtime) ;
- Field = getHDFFieldIndex( eventType ) ;
- CallStack->record.times[Field]
- = clockAdd ( CallStack->record.times[Field] , incDur ) ;
- ++CallStack->record.counts[Field];
- ByteField = getHDFByteFieldIndex( Field ) ;
- switch ( eventType )
- {
- case readEndID:
- case freadEndID:
- case writeEndID:
- case fwriteEndID:
- case -ID_malloc:
- bytes = *((int *)dataPtr);
- CallStack->record.bytes[ByteField] += bytes;
- /*====================================================
- // update histogram *
- //===================================================*/
- i = -1;
- while ( bytes >= BktLim[i+1] ) ++i ;
- if ( i >= 0 ) ++CallStack->record.Hists[ByteField][i];
- break;
- case fopenEndID:
- case openEndID:
- openInfo.setName = openName;
- openInfo.setID = (int)(*((long *)dataPtr));
- CallStack->record.hdfID = openInfo.setID;
- HDFrecordFileName ( &openInfo );
- break;
- default:
- break;
- }
+ CLOCK incDur;
+ int i, Field, ByteField, bytes;
+
+ incDur = clockSubtract(secs,CallStack->lastIOtime) ;
+ Field = getHDFFieldIndex( eventType ) ;
+ CallStack->record.times[Field]
+ = clockAdd ( CallStack->record.times[Field] , incDur ) ;
+ ++CallStack->record.counts[Field];
+ ByteField = getHDFByteFieldIndex( Field ) ;
+ switch ( eventType )
+ {
+ case readEndID:
+ case freadEndID:
+ case writeEndID:
+ case fwriteEndID:
+ case -ID_malloc:
+ {
+ bytes = *((int *)dataPtr);
+ CallStack->record.bytes[ByteField] += bytes;
+ /*======================================================
+ // update histogram *
+ //=====================================================*/
+ i = -1;
+ while ( bytes >= BktLim[i+1] ) ++i ;
+ if ( i >= 0 ) ++CallStack->record.Hists[ByteField][i];
+ break;
+ }
+ case fopenEndID:
+ case openEndID:
+ {
+ openInfo.setName = openName;
+ openInfo.setID = (int)(*((long *)dataPtr));
+ CallStack->record.hdfID = openInfo.setID;
+ HDFrecordFileName ( &openInfo );
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
}
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
/*======================================================================*
// BeginMPIOEventRecord: *
// This routine simply records the time in the record on the top of *
@@ -510,141 +535,97 @@ void EndIOEventRecord ( int eventType, CLOCK secs, void *dataPtr )
//======================================================================*/
void BeginMPIOEventRecord( int eventType,
CLOCK seconds,
- void *dataPtr,
+ void *data,
int dataLen )
{
- /*==============================================================*
- // save the time value temporarily in top of stack *
- // When the end record is received, the duration can be *
- // computed. *
- //==============================================================*/
- CallStack->lastIOtime = seconds;
- /*==============================================================*
- // get useful info from the structure pointed to by dataPtr. *
- // in most cases, this is the file ID. For mpiOpen, it is the *
- // name of the file. For mpiDelete, no information is of any *
- // use. *
- //==============================================================*/
- if ( dataLen == 0 ) return;
- switch ( eventType )
- {
- case HDFmpiGetSizeID:
- CallStack->record.hdfID
- = ((struct mpiGetSizeBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetGroupID:
- CallStack->record.hdfID
- = ((struct mpiGetGroupBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetAmodeID:
- CallStack->record.hdfID
- = ((struct mpiGetAmodeBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetViewID:
- CallStack->record.hdfID
- = ((struct mpiGetViewBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetPositionID:
- CallStack->record.hdfID
- = ((struct mpiGetPositionBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetByteOffsetID:
- CallStack->record.hdfID
- = ((struct mpiGetByteOffsetBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetTypeExtentID:
- CallStack->record.hdfID
- = ((struct mpiGetTypeExtentBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiGetAtomicityID:
- CallStack->record.hdfID
- = ((struct mpiGetAtomicityBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiOpenID:
- strcpy( openName,
- ((struct mpiOpenBeginArgs *)dataPtr)->fileName);
- break;
- case HDFmpiCloseID:
- CallStack->record.hdfID
- = ((struct mpiCloseBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiDeleteID:
- break;
- case HDFmpiSetSizeID:
- CallStack->record.hdfID
- = ((struct mpiSetSizeBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiPreallocateID:
- CallStack->record.hdfID
- = ((struct mpiPreallocateBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiSetViewID:
- CallStack->record.hdfID
- = ((struct mpiSetViewBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiReadAtID:
- CallStack->record.hdfID
- = ((struct mpiReadAtBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiReadAtAllID:
- CallStack->record.hdfID
- = ((struct mpiReadAtAllBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiWriteAtID:
- CallStack->record.hdfID
- = ((struct mpiWriteAtBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiWriteAtAllID:
- CallStack->record.hdfID
- = ((struct mpiWriteAtAllBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiIreadAtID:
- CallStack->record.hdfID
- = ((struct mpiIreadAtBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiIwriteAtID:
- CallStack->record.hdfID
- = ((struct mpiIwriteAtBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiReadID:
- CallStack->record.hdfID
- = ((struct mpiReadBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiReadAllID:
- CallStack->record.hdfID
- = ((struct mpiReadAllBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiWriteID:
- CallStack->record.hdfID
- = ((struct mpiWriteBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiWriteAllID:
- CallStack->record.hdfID
- = ((struct mpiWriteAllBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiIreadID:
- CallStack->record.hdfID
- = ((struct mpiIreadBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiIwriteID:
- CallStack->record.hdfID
- = ((struct mpiIwriteBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiSeekID:
- CallStack->record.hdfID
- = ((struct mpiSeekBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiSetAtomicityID:
- CallStack->record.hdfID
- = ((struct mpiSetAtomicityBeginArgs *)dataPtr)->fileID;
- break;
- case HDFmpiSyncID:
- CallStack->record.hdfID
- = ((struct mpiSyncBeginArgs *)dataPtr)->fileID;
- break;
- default:
- break;
- }
+ HDFsetInfo *dataPtr;
+ dataPtr = (HDFsetInfo *)data;
+ /*==============================================================*
+ // save the time value temporarily in top of stack *
+ // When the end record is received, the duration can be *
+ // computed. *
+ //==============================================================*/
+ CallStack->lastIOtime = seconds;
+ /*==============================================================*
+ // get useful info from the structure pointed to by dataPtr. *
+ cases, this is the file ID. For mpiOpen, it is the *
+ // name of the file. For mpiDelete, no information is of any *
+ // use. *
+ //==============================================================*/
+ if ( dataLen == 0 ) return;
+ CallStack->record.hdfID = dataPtr->setID;
+ switch ( eventType )
+ {
+ case HDFmpiOpenID:
+ {
+ strcpy( openName, dataPtr->setName );
+ break;
+ }
+ case HDFmpiReadAtID:
+ {
+ CallStack->record.bytes[MPIOreadBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiReadAtAllID:
+ {
+ CallStack->record.bytes[MPIOreadAllBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiWriteAtID:
+ {
+ CallStack->record.bytes[MPIOwriteBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiWriteAtAllID:
+ {
+ CallStack->record.bytes[MPIOwriteAllBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiIreadAtID:
+ {
+ CallStack->record.bytes[MPIOiReadBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiIwriteAtID:
+ {
+ CallStack->record.bytes[MPIOiWriteBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiReadID:
+ {
+ CallStack->record.bytes[MPIOreadBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiReadAllID:
+ {
+ CallStack->record.bytes[MPIOreadAllBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiWriteID:
+ {
+ CallStack->record.bytes[MPIOwriteBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiWriteAllID:
+ {
+ CallStack->record.bytes[MPIOwriteAllBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiIreadID:
+ {
+ CallStack->record.bytes[MPIOiReadBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ case HDFmpiIwriteID:
+ {
+ CallStack->record.bytes[MPIOiWriteBytesReq] += dataPtr->numBytes;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
}
/*======================================================================*
// EndMPIOEventRecord: *
@@ -654,27 +635,136 @@ void BeginMPIOEventRecord( int eventType,
//======================================================================*/
void EndMPIOEventRecord ( int eventType,
CLOCK secs,
- void *dataPtr,
+ void *data,
int dataLen )
{
- CLOCK incDur;
+ CLOCK incDur;
- incDur = clockSubtract(secs,CallStack->lastIOtime) ;
- CallStack->record.times[MPI]
- = clockAdd ( CallStack->record.times[MPI], incDur );
- ++CallStack->record.counts[MPI];
- if ( eventType == -HDFmpiOpenID && dataLen != 0 ) {
- /*===========================================================*
- // complete the file information for the case of a file *
- // open and record the information. *
- //===========================================================*/
- openInfo.setName = openName;
- openInfo.setID = ((struct mpiOpenEndArgs *)dataPtr)->fileID;
- CallStack->record.hdfID = openInfo.setID;
- HDFrecordFileName ( &openInfo );
- }
+ HDFsetInfo* dataPtr;
+ incDur = clockSubtract(secs,CallStack->lastIOtime) ;
+ CallStack->record.times[MPI]
+ = clockAdd ( CallStack->record.times[MPI], incDur );
+ ++CallStack->record.counts[MPI];
+ if ( dataLen == 0 )
+ {
+ return;
+ }
+ dataPtr = (HDFsetInfo *)data;
+ switch ( eventType )
+ {
+ case -HDFmpiOpenID:
+ {
+ /*===========================================================*
+ // open and record the information. *
+ //===========================================================*/
+ openInfo.setName = openName;
+ openInfo.setID = dataPtr->setID;
+ CallStack->record.hdfID = openInfo.setID;
+ HDFrecordFileName ( &openInfo );
+ break;
+ }
+ case -HDFmpiReadAtID:
+ {
+ ++CallStack->record.counts[MPIOread] ;
+ CallStack->record.times[MPIOread]
+ = clockAdd ( CallStack->record.times[MPIOread], incDur );
+ CallStack->record.bytes[MPIOreadBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiReadAtAllID:
+ {
+ ++CallStack->record.counts[MPIOreadAll] ;
+ CallStack->record.times[MPIOreadAll]
+ = clockAdd ( CallStack->record.times[MPIOreadAll], incDur );
+ CallStack->record.bytes[MPIOreadAllBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiWriteAtID:
+ {
+ ++CallStack->record.counts[MPIOwrite] ;
+ CallStack->record.times[MPIOwrite]
+ = clockAdd ( CallStack->record.times[MPIOwrite], incDur );
+ CallStack->record.bytes[MPIOwriteBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiWriteAtAllID:
+ {
+ ++CallStack->record.counts[MPIOwriteAll] ;
+ CallStack->record.times[MPIOwriteAll]
+ = clockAdd ( CallStack->record.times[MPIOwriteAll], incDur );
+ CallStack->record.bytes[MPIOwriteAllBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiIreadAtID:
+ {
+ ++CallStack->record.counts[MPIOiRead] ;
+ CallStack->record.times[MPIOiRead]
+ = clockAdd ( CallStack->record.times[MPIOiRead], incDur );
+ break;
+ }
+ case -HDFmpiIwriteAtID:
+ {
+ ++CallStack->record.counts[MPIOiWrite] ;
+ CallStack->record.times[MPIOiWrite]
+ = clockAdd ( CallStack->record.times[MPIOiWrite], incDur );
+ break;
+ }
+ case -HDFmpiReadID:
+ {
+ ++CallStack->record.counts[MPIOread] ;
+ CallStack->record.times[MPIOread]
+ = clockAdd ( CallStack->record.times[MPIOread], incDur );
+ CallStack->record.bytes[MPIOreadBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiReadAllID:
+ {
+ ++CallStack->record.counts[MPIOreadAll] ;
+ CallStack->record.times[MPIOreadAll]
+ = clockAdd ( CallStack->record.times[MPIOreadAll], incDur );
+ CallStack->record.bytes[MPIOreadAllBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiWriteID:
+ {
+ ++CallStack->record.counts[MPIOwrite] ;
+ CallStack->record.times[MPIOwrite]
+ = clockAdd ( CallStack->record.times[MPIOwrite], incDur );
+ CallStack->record.bytes[MPIOwriteBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiWriteAllID:
+ {
+ ++CallStack->record.counts[MPIOwriteAll] ;
+ CallStack->record.times[MPIOwriteAll]
+ = clockAdd ( CallStack->record.times[MPIOwriteAll], incDur );
+ CallStack->record.bytes[MPIOwriteAllBytesTrans] += dataPtr->numBytes;
+ break;
+ }
+ case -HDFmpiIreadID:
+ {
+ ++CallStack->record.counts[MPIOiRead] ;
+ CallStack->record.times[MPIOiRead]
+ = clockAdd ( CallStack->record.times[MPIOiRead], incDur );
+ break;
+ }
+ case -HDFmpiIwriteID:
+ {
+ ++CallStack->record.counts[MPIOiWrite] ;
+ CallStack->record.times[MPIOiWrite]
+ = clockAdd ( CallStack->record.times[MPIOiWrite], incDur );
+ break;
+ }
+ default:
+ {
+ ++CallStack->record.counts[MPIOother] ;
+ CallStack->record.times[MPIOother]
+ = clockAdd ( CallStack->record.times[MPIOiWrite], incDur );
+ break;
+ }
+ }
}
-#endif /* HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
/*======================================================================*
// BeginHDFEventRecord: *
// This function puts a trace record on the stack corresponding to *
@@ -1015,8 +1105,8 @@ void HDFSummarySDDF( HDFnode_t *P, int procIndex )
+ nTallyFields*sizeof(int) /* count array */
+ sizeof(int) /* array len */
+ nByteFields*sizeof(int) /* bytes array */
- + nByteFields*sizeof(int) /* array lens */
- + nByteFields*nBkts*sizeof(int) /* byte hist */
+ + nHistFields*sizeof(int) /* array lens */
+ + nHistFields*nBkts*sizeof(int) /* byte hist */
+ sizeof(int) /* nodeID */
+ sizeof(int) ; /* Name len */
Header.packetTag = HDF_SUMMARY_FAMILY +
@@ -1137,7 +1227,7 @@ void HDFrecordSum ( HDFrec_t *S, HDFrec_t *T )
for ( j = 0; j < nByteFields; ++j ) {
S->bytes[j] += T->bytes[j] ;
}
- for ( j = 0; j < nByteFields; ++j ) {
+ for ( j = 0; j < nHistFields; ++j ) {
for ( i = 0; i < nBkts; ++i ) {
S->Hists[j][i] += T->Hists[j][i] ;
}
@@ -1149,105 +1239,137 @@ void HDFrecordSum ( HDFrec_t *S, HDFrec_t *T )
//======================================================================*/
int getHDFFieldIndex( int eventID )
{
- int result = -1;
- switch ( eventID )
- {
- case ID_malloc:
- case -ID_malloc:
- result = Malloc;
- break;
- case openBeginID:
- case openEndID:
- case fopenBeginID:
- case fopenEndID:
- result = Open;
- break;
- case closeBeginID:
- case closeEndID:
- case fcloseBeginID:
- case fcloseEndID:
- result = Close;
- break;
- case readBeginID:
- case readEndID:
- case freadBeginID:
- case freadEndID:
- result = Read;
- break;
- case lseekBeginID:
- case lseekEndID:
- case fseekBeginID:
- case fseekEndID:
- result = Seek;
- break;
- case writeBeginID:
- case writeEndID:
- case fwriteBeginID:
- case fwriteEndID:
- result = Write;
- break;
- case fflushBeginID:
- case fflushEndID:
- case flushBeginID:
- case flushEndID:
- result = Misc;
- break;
- case rewindBeginID:
- case rewindEndID:
- case fsetposBeginID:
- case fsetposEndID:
- result = Misc;
- break;
+ int result = -1;
+ switch ( eventID )
+ {
+ case ID_malloc:
+ case -ID_malloc:
+ {
+ result = Malloc;
+ break;
+ }
+ case openBeginID:
+ case openEndID:
+ case fopenBeginID:
+ case fopenEndID:
+ {
+ result = Open;
+ break;
+ }
+ case closeBeginID:
+ case closeEndID:
+ case fcloseBeginID:
+ case fcloseEndID:
+ {
+ result = Close;
+ break;
+ }
+ case readBeginID:
+ case readEndID:
+ case freadBeginID:
+ case freadEndID:
+ {
+ result = Read;
+ break;
+ }
+ case lseekBeginID:
+ case lseekEndID:
+ case fseekBeginID:
+ case fseekEndID:
+ {
+ result = Seek;
+ break;
+ }
+ case writeBeginID:
+ case writeEndID:
+ case fwriteBeginID:
+ case fwriteEndID:
+ {
+ result = Write;
+ break;
+ }
+ case fflushBeginID:
+ case fflushEndID:
+ case flushBeginID:
+ case flushEndID:
+ {
+ result = Misc;
+ break;
+ }
+ case rewindBeginID:
+ case rewindEndID:
+ case fsetposBeginID:
+ case fsetposEndID:
+ {
+ result = Misc;
+ break;
+ }
#ifdef creadBeginID
- case creadBeginID:
- case creadEndID:
- case creadvBeginID:
- case creadvEndID:
- result = Read;
- break;
- case cwriteBeginID:
- case cwriteEndID:
- case cwritevBeginID:
- case cwritevEndID:
- result = Write;
- break;
- case ireadBeginID:
- case ireadEndID:
- case ireadvBeginID:
- case ireadvEndID:
- result = ARead;
- break;
- case iwriteBeginID:
- case iwriteEndID:
- case iwritevBeginID:
- case iwritevEndID:
- result = AWrite;
- break;
- case iowaitBeginID:
- case iowaitEndID:
- result = Wait;
- break;
- case iodoneBeginID:
- case iodoneEndID:
- result = Misc;
- break;
- case gopenBeginID:
- case gopenEndID:
- result = Open;
- break;
- case iomodeBeginID:
- case iomodeEndID:
- case setiomodeBeginID:
- case setiomodeEndID:
- case lsizeBeginID:
- case lsizeEndID:
- case forflushBeginID:
- case forflushEndID:
- result = Misc;
- break;
+ case creadBeginID:
+ case creadEndID:
+ case creadvBeginID:
+ case creadvEndID:
+ {
+ result = Read;
+ break;
+ }
+ case cwriteBeginID:
+ case cwriteEndID:
+ case cwritevBeginID:
+ case cwritevEndID:
+ {
+ result = Write;
+ break;
+ }
+ case ireadBeginID:
+ case ireadEndID:
+ case ireadvBeginID:
+ case ireadvEndID:
+ {
+ result = Aread;
+ break;
+ }
+ case iwriteBeginID:
+ case iwriteEndID:
+ case iwritevBeginID:
+ case iwritevEndID:
+ {
+ result = Awrite;
+ break;
+ }
+ case iowaitBeginID:
+ case iowaitEndID:
+ {
+ result = Wait;
+ break;
+ }
+ case iodoneBeginID:
+ case iodoneEndID:
+ {
+ result = Misc;
+ break;
+ }
+ case gopenBeginID:
+ case gopenEndID:
+ {
+ result = Open;
+ break;
+ }
+ case iomodeBeginID:
+ case iomodeEndID:
+ case setiomodeBeginID:
+ case setiomodeEndID:
+ case lsizeBeginID:
+ case lsizeEndID:
+ case forflushBeginID:
+ case forflushEndID:
+ {
+ result = Misc;
+ break;
+ }
#endif
- }
- return result;
+ }
+ return result;
}
/*======================================================================*
// This routine determines the field index in the bytes array of the *
@@ -1257,29 +1379,91 @@ int getHDFFieldIndex( int eventID )
//======================================================================*/
int getHDFByteFieldIndex( int Operation )
{
- int result;
- switch ( Operation )
- {
- case Malloc:
- result = MallocBytes;
- break;
- case Read:
- result = ReadBytes;
- break;
- case Write:
- result = WriteBytes;
- break;
- case ARead:
- result = AReadBytes;
- break;
- case AWrite:
- result = AWriteBytes;
- break;
- default:
- result = -1;
- break;
- }
- return result;
+ int result;
+ switch ( Operation )
+ {
+ case Malloc:
+ {
+ result = MallocBytes;
+ break;
+ }
+ case Read:
+ {
+ result = ReadBytes;
+ break;
+ }
+ case Write:
+ {
+ result = WriteBytes;
+ break;
+ }
+ case Aread:
+ {
+ result = AreadBytes;
+ break;
+ }
+ case Awrite:
+ {
+ result = AwriteBytes;
+ break;
+ }
+ case MPIOread:
+ {
+ result = MPIOreadBytesReq;
+ break;
+ }
+ case MPIOwrite:
+ {
+ result = MPIOwriteBytesReq;
+ break;
+ }
+ case MPIOreadAll:
+ {
+ result = MPIOreadAllBytesReq;
+ break;
+ }
+ case MPIOwriteAll:
+ {
+ result = MPIOwriteAllBytesReq;
+ break;
+ }
+ case MPIOiRead:
+ {
+ result = MPIOiReadBytesReq;
+ break;
+ }
+ case MPIOiWrite:
+ {
+ result = MPIOiWriteBytesReq;
+ break;
+ }
+ case MPIOreadTrans:
+ {
+ result = MPIOreadBytesTrans;
+ break;
+ }
+ case MPIOwriteTrans:
+ {
+ result = MPIOwriteBytesTrans;
+ break;
+ }
+ case MPIOreadAllTrans:
+ {
+ result = MPIOreadAllBytesTrans;
+ break;
+ }
+ case MPIOwriteAllTrans:
+ {
+ result = MPIOwriteAllBytesTrans;
+ break;
+ }
+ default:
+ {
+ result = -1;
+ break;
+ }
+ }
+ return result;
}
/*======================================================================*
// This routine writes the SDDF packet descriptors for the HDF summary *
@@ -1365,12 +1549,12 @@ void _hdfDescriptorRT( char *recordName, char *recordDescription,
"Write Histogram",
"Historgram of size Write Requests",
INTEGER, 1 );
- WRITE_HDF_FIELD( "ARead Histogram",
- "ARead Histogram",
+ WRITE_HDF_FIELD( "Aread Histogram",
+ "Aread Histogram",
"Historgram of size Asynch Read Requests",
INTEGER, 1 );
- WRITE_HDF_FIELD( "AWrite Histogram",
- "AWrite Histogram",
+ WRITE_HDF_FIELD( "Awrite Histogram",
+ "Awrite Histogram",
"Historgram of size Asynch Write Requests",
INTEGER, 1 );
WRITE_HDF_FIELD( "Processor Number",
diff --git a/pablo/PabloHDF_SDDF.c b/pablo/PabloHDF_SDDF.c
index 859047d..d5468c6 100644
--- a/pablo/PabloHDF_SDDF.c
+++ b/pablo/PabloHDF_SDDF.c
@@ -57,14 +57,14 @@
//======================================================================*/
#include <stdio.h>
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
#include "mpi.h"
#endif
#include "H5config.h"
-#undef HAVE_PABLO
+#undef H5_HAVE_PABLO
#include "H5private.h"
-#define HAVE_PABLO
+#define H5_HAVE_PABLO
#include "ProcIDs.h"
#include "SystemDepend.h"
@@ -105,7 +105,7 @@ void endIOTrace( void );
#define returnRecord(x) return x;
-#ifdef HAVE_MPIOTRACE
+#ifdef H5_HAVE_MPIOTRACE
int initMPIOTrace( char *, int );
void endMPIOTrace( void ) ;
#else
@@ -233,7 +233,7 @@ void HDFinitTrace_SDDF( char *traceFileName, int OUTSW )
// set traceFileName and set IO tracing switches. If MPIO *
// tracing is available, MPIO tracing will also be initialized. *
//==============================================================*/
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
/*===============================================================
// The code is built to handle parallel processing using MPI. *
// However, the code may or may not be run using MPI and there *
@@ -254,7 +254,7 @@ void HDFinitTrace_SDDF( char *traceFileName, int OUTSW )
//===========================================================*/
MPI_Comm_rank( MPI_COMM_WORLD, &myNode );
setTraceProcessorNumber( myNode );
-#ifdef HAVE_MPIOTRACE
+#ifdef H5_HAVE_MPIOTRACE
/*============================================================
// MPIO Tracing is supported in the Pablo Library. Let the *
// MPIO initialization be performed and handle the naming of *
@@ -296,7 +296,7 @@ void HDFinitTrace_SDDF( char *traceFileName, int OUTSW )
disableLifetimeSummaries();
disableTimeWindowSummaries();
disableFileRegionSummaries();
-#endif /* HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
/*===============================================================
// complete HDF initiailization. *
//==============================================================*/
@@ -826,4 +826,4 @@ void _hdfMiscDescriptor( void )
putBytes( recordBuffer, (unsigned) recordLength );
}
-/*#endif */ /* HAVE_PABLO */
+/*#endif */ /* H5_HAVE_PABLO */