summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Wells <dwells@cs.uiuc.edu>1998-11-03 19:48:54 (GMT)
committerDan Wells <dwells@cs.uiuc.edu>1998-11-03 19:48:54 (GMT)
commit09a871339d86af0c75d9cff8c28fcd3fa76e5e95 (patch)
tree63907a5f1c07cd21471c1a432291edcbdd534c10
parent3039dac9dc5335b2c50608ad6a4503644d47f5d7 (diff)
downloadhdf5-09a871339d86af0c75d9cff8c28fcd3fa76e5e95.zip
hdf5-09a871339d86af0c75d9cff8c28fcd3fa76e5e95.tar.gz
hdf5-09a871339d86af0c75d9cff8c28fcd3fa76e5e95.tar.bz2
[svn-r865] Modifications required for 64 bit longs.
-rw-r--r--pablo/PabloHDF.c6
-rw-r--r--pablo/PabloHDF_RT.c37
-rw-r--r--pablo/PabloHDF_SDDF.c20
3 files changed, 30 insertions, 33 deletions
diff --git a/pablo/PabloHDF.c b/pablo/PabloHDF.c
index 36bf0df..5c4cc73 100644
--- a/pablo/PabloHDF.c
+++ b/pablo/PabloHDF.c
@@ -836,8 +836,8 @@ int HDFtraceFPUTS( const char *s, FILE *stream )
void *HDFtraceMALLOC(size_t bytes )
{
void *ptr;
- size_t byte_req;
- byte_req = bytes;
+ int byte_req;
+ byte_req = (int)bytes;
if ( IOtracingEnabled ) {
HDFtraceIOEvent ( ID_malloc, NULL, 0 );
}
@@ -845,7 +845,7 @@ void *HDFtraceMALLOC(size_t bytes )
ptr = malloc( bytes );
if ( IOtracingEnabled ) {
- HDFtraceIOEvent ( -ID_malloc, &byte_req, sizeof(size_t) );
+ HDFtraceIOEvent ( -ID_malloc, &byte_req, sizeof(int) );
}
return ptr ;
diff --git a/pablo/PabloHDF_RT.c b/pablo/PabloHDF_RT.c
index ff04783..9c3feb6 100644
--- a/pablo/PabloHDF_RT.c
+++ b/pablo/PabloHDF_RT.c
@@ -188,7 +188,7 @@ int initproctracert_( void );
int initHDFProcTrace_RT( void );
void HDFtraceEvent_RT( int , char *, unsigned ) ;
void BeginIOEventRecord ( int, double , void * );
-void EndIOEventRecord ( int , double , void *);
+void EndIOEventRecord ( int , double , void * );
void BeginMPIOEventRecord ( int, double, void * );
void EndMPIOEventRecord ( int , double , void *);
void BeginHDFEventRecord( int , double );
@@ -266,7 +266,7 @@ void HDFinitTrace_RT( char *fileName, unsigned procTraceMask )
// RETURNS *
// None. *
//======================================================================*/
-void HDFendTrace_RT( )
+void HDFendTrace_RT( void )
{
int j, numSetIDs;
HDFnode_t *P;
@@ -367,7 +367,7 @@ int initHDFProcTrace_RT( void )
// each HDF procedure. Each queue will be a list of summary *
// records distinquished by file type and *
//==============================================================*/
- size = numProcs*sizeof( HDFnode_t * );
+ size = (int)(numProcs*sizeof( HDFnode_t * ));
HDFQueues = (HDFnode_t **)malloc( size );
if ( HDFQueues == NULL ) {
fprintf(stderr,"Failed to allocate HDFQueues in initHDFProcTrace\n");
@@ -415,7 +415,7 @@ void HDFtraceEvent_RT( int eventType, char *dataPtr, unsigned dataLen )
EndMPIOEventRecord ( eventType, seconds, dataPtr );
#endif /* HAVE_PARALLEL */
} else {
- fprintf(stderr,"eventType %d, dataLen = %d\n",eventType,dataLen);
+ fprintf(stderr,"eventType %d, dataLen = %u\n",eventType,dataLen);
}
TRunlock( criticalSection );
}
@@ -498,7 +498,7 @@ void EndIOEventRecord ( int eventType, double secs, void *dataPtr )
case fopenEndID:
case openEndID:
openInfo.setName = openName;
- openInfo.setID = *((long *)dataPtr);
+ openInfo.setID = (int)(*((long *)dataPtr));
CallStack->record.hdfID = openInfo.setID;
HDFrecordFileName ( &openInfo );
break;
@@ -707,11 +707,6 @@ void EndHDFEventRecord ( int eventID, double seconds, void *dataPtr )
HDFnode_t *HDFrec;
double incSecs;
static int dummyIDs = -4;
- int procIndex;
- /*==============================================================*
- // Find the procIndex in the table. *
- //==============================================================*/
- procIndex = ProcIndexForHDFExit( eventID );
/*==============================================================*
// pop record from top of the stack, compute inclusive duration *
// and set the corresponding record field and increment nCalls. *
@@ -798,7 +793,8 @@ void HDFassignPabloIDs( int *nSetIDs, char ***Names )
{
fileRec_t *F, *G;
HDFnode_t *P;
- int j, hdfID, xRef, PabloID = 1;
+ int j, PabloID = 1;
+ long hdfID, xRef;
char *fName, **T;
F = HDFfileList;
@@ -902,10 +898,10 @@ void writeHDFNamePacketsRT( char **Names, int numSetIDs )
//==============================================================*/
for ( j = 1; j <= numSetIDs; ++j ) {
fName = Names[j];
- NamePkt.packetLength = sizeof(NamePkt) + strlen(fName) ;
+ NamePkt.packetLength = (int)(sizeof(NamePkt) + strlen(fName));
NamePkt.fileType = 0; /* not currently used */
NamePkt.fileID = j;
- NamePkt.nameLen = strlen(fName) ;
+ NamePkt.nameLen = (int)strlen(fName) ;
if ( buffSize < NamePkt.packetLength ) {
free((void *)BUFF) ;
buffSize = NamePkt.packetLength + 80;
@@ -926,10 +922,10 @@ void writeHDFNamePacketsRT( char **Names, int numSetIDs )
// This routine takes the records after they have been tagged and adds *
// their fields to the apporopriate position in the HDFQueues structure *
//======================================================================*/
-void HDFupdateProcLists( )
+void HDFupdateProcLists( void )
{
HDFnode_t *P, *Q;
- int hdfID;
+ long hdfID;
hdfID = TagQueue->record.hdfID;
P = TagQueue;
@@ -949,7 +945,8 @@ void HDFupdateProcLists( )
//======================================================================*/
void HDFupdateProcs( HDFnode_t *P )
{
- int procIndex, hdfID, xRef, eventID;
+ int procIndex, eventID;
+ long hdfID, xRef;
HDFnode_t *Q;
eventID = P->eventID;
procIndex = ProcIndexForHDFEntry( eventID );
@@ -1361,7 +1358,7 @@ void _hdfDescriptorRT( char *recordName, char *recordDescription,
// Compute and update the record length. *
// Write the completed record. *
//==================================================================*/
- recordLength = hdfRecordPointer - recordBuffer;
+ recordLength = (int)(hdfRecordPointer - recordBuffer);
hdfRecordPointer = recordBuffer;
sddfWriteInteger( &hdfRecordPointer, recordLength );
@@ -1373,7 +1370,7 @@ void _hdfDescriptorRT( char *recordName, char *recordDescription,
// Internal Routine: writeHDFRecDescrptrsRT *
// Writes record descriptors for the HDF events. *
//======================================================================*/
-void writeHDFRecDescrptrsRT()
+void writeHDFRecDescrptrsRT( void )
{
char HDFProcNames[][40] = {
# include "HDFentryNames.h"
@@ -1423,7 +1420,7 @@ void printFileMappingsRT( char *mapFile, char **Names, int nPabloIDs )
/* Generate a SDDF binary format record descriptor for the */
/* named identifiers used during execution. */
/************************************************************************/
-void _hdfNameDescriptor()
+void _hdfNameDescriptor( void )
{
static char recordBuffer[ 4096 ];
int recordLength;
@@ -1469,7 +1466,7 @@ void _hdfNameDescriptor()
"HDF Name", "Name of File, Data Set or Dim",
CHARACTER, 1 );
- recordLength = hdfRecordPointer - recordBuffer;
+ recordLength = (int)(hdfRecordPointer - recordBuffer);
hdfRecordPointer = recordBuffer;
sddfWriteInteger( &hdfRecordPointer, recordLength );
diff --git a/pablo/PabloHDF_SDDF.c b/pablo/PabloHDF_SDDF.c
index 6faf551..40710ef 100644
--- a/pablo/PabloHDF_SDDF.c
+++ b/pablo/PabloHDF_SDDF.c
@@ -83,7 +83,7 @@ TR_RECORD *HDFprocEventRecord( int, TR_EVENT *, CLOCK, HDFsetInfo *, unsigned );
TR_RECORD *miscEventRecord( int , TR_EVENT *, CLOCK, void *, unsigned );
void _hdfMiscDescriptor( void );
void _hdfProcNameDescriptor( void );
-int setEventRecordFunction( int, void * );
+int setEventRecordFunction( int, void *(*)() );
void HDFtraceIOEvent( int, void *, unsigned );
void initIOTrace( void );
void enableIOdetail( void );
@@ -225,6 +225,7 @@ void HDFinitTrace_SDDF( char *traceFileName, uint32 procTraceMask )
// tracing is available, this will be initialized also. *
//==============================================================*/
#ifdef HAVE_PARALLEL
+ int myNode;
/*===============================================================
// in the parallel case, initialize MPI-IO tracing. This will *
// initialize the traceFileName and set the I/O tracing *
@@ -269,6 +270,7 @@ void HDFinitTrace_SDDF( char *traceFileName, uint32 procTraceMask )
//======================================================================*/
void HDFendTrace_SDDF(void)
{
+ HDFfinalTimeStamp();
#ifdef HAVE_MPIOTRACE
/*===============================================================
// termintate MPI-IO tracing in the parallel case. This will *
@@ -279,7 +281,6 @@ void HDFendTrace_SDDF(void)
/*===============================================================
// terminate tracing *
//==============================================================*/
- HDFfinalTimeStamp();
endIOTrace();
endTracing();
#endif
@@ -333,9 +334,9 @@ int initHDFProcTrace( int numProcs, int *procEntryID )
procEvents[ procIndex ].exitID = -procEntryID[ procIndex ];
setEventRecordFunction( procEntryID[ procIndex ],
- HDFprocEventRecord );
+ (void *(*)())HDFprocEventRecord );
setEventRecordFunction( -procEntryID[ procIndex ],
- HDFprocEventRecord );
+ (void *(*)())HDFprocEventRecord );
procEntryCalled[ procIndex ] = 0;
}
@@ -347,12 +348,12 @@ int initHDFProcTrace( int numProcs, int *procEntryID )
//==============================================================*/
procEvents[ numProcs ].entryID = ID_malloc;
procEvents[ numProcs ].exitID = -ID_malloc;
- setEventRecordFunction( ID_malloc, miscEventRecord );
- setEventRecordFunction( -ID_malloc, miscEventRecord );
+ setEventRecordFunction( ID_malloc, (void *(*)())miscEventRecord );
+ setEventRecordFunction( -ID_malloc, (void *(*)())miscEventRecord );
procEvents[ numProcs+1 ].entryID = ID_free;
procEvents[ numProcs+1 ].exitID = -ID_free;
- setEventRecordFunction( ID_free, miscEventRecord );
- setEventRecordFunction( -ID_free, miscEventRecord );
+ setEventRecordFunction( ID_free, (void *(*)())miscEventRecord );
+ setEventRecordFunction( -ID_free, (void *(*)())miscEventRecord );
return SUCCESS;
}
@@ -580,11 +581,10 @@ TR_RECORD *miscEventRecord( int recordType,
break;
case -ID_malloc:
case -ID_free:
- miscRecord.bytes = *(size_t *)dataPointer;
+ miscRecord.bytes = *(int *)dataPointer;
miscRecord.duration = clockToSeconds( timeStamp)
- miscRecord.seconds;
return &traceRecord; /* generate trace record */
- break;
default:
fprintf( stderr, "miscEventRecord: unknown eventID %d\n", eventID );
break;