Fix prototype locations
parent
0072f26946
commit
e7fea4f102
|
@ -70,9 +70,7 @@
|
||||||
/**************************** P R O T O T Y P E S *****************************/
|
/**************************** P R O T O T Y P E S *****************************/
|
||||||
|
|
||||||
static IOR_offset_t SeekOffset_HDF5(void *, IOR_offset_t, IOR_param_t *);
|
static IOR_offset_t SeekOffset_HDF5(void *, IOR_offset_t, IOR_param_t *);
|
||||||
void SetHints(MPI_Info *, char *);
|
|
||||||
void SetupDataSet_HDF5(void *, IOR_param_t *);
|
void SetupDataSet_HDF5(void *, IOR_param_t *);
|
||||||
void ShowHints(MPI_Info *);
|
|
||||||
|
|
||||||
void *IOR_Create_HDF5(char *, IOR_param_t *);
|
void *IOR_Create_HDF5(char *, IOR_param_t *);
|
||||||
void *IOR_Open_HDF5(char *, IOR_param_t *);
|
void *IOR_Open_HDF5(char *, IOR_param_t *);
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
/**************************** P R O T O T Y P E S *****************************/
|
/**************************** P R O T O T Y P E S *****************************/
|
||||||
|
|
||||||
static IOR_offset_t SeekOffset_MPIIO(MPI_File, IOR_offset_t, IOR_param_t *);
|
static IOR_offset_t SeekOffset_MPIIO(MPI_File, IOR_offset_t, IOR_param_t *);
|
||||||
void SetHints(MPI_Info *, char *);
|
|
||||||
void ShowHints(MPI_Info *);
|
|
||||||
|
|
||||||
void *IOR_Create_MPIIO(char *, IOR_param_t *);
|
void *IOR_Create_MPIIO(char *, IOR_param_t *);
|
||||||
void *IOR_Open_MPIIO(char *, IOR_param_t *);
|
void *IOR_Open_MPIIO(char *, IOR_param_t *);
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
/**************************** P R O T O T Y P E S *****************************/
|
/**************************** P R O T O T Y P E S *****************************/
|
||||||
|
|
||||||
static int GetFileMode(IOR_param_t *);
|
static int GetFileMode(IOR_param_t *);
|
||||||
void SetHints(MPI_Info *, char *);
|
|
||||||
void ShowHints(MPI_Info *);
|
|
||||||
|
|
||||||
void *IOR_Create_NCMPI(char *, IOR_param_t *);
|
void *IOR_Create_NCMPI(char *, IOR_param_t *);
|
||||||
void *IOR_Open_NCMPI(char *, IOR_param_t *);
|
void *IOR_Open_NCMPI(char *, IOR_param_t *);
|
||||||
|
|
|
@ -183,5 +183,7 @@ typedef struct ior_aiori {
|
||||||
} ior_aiori_t;
|
} ior_aiori_t;
|
||||||
|
|
||||||
void init_IOR_Param_t(IOR_param_t *p);
|
void init_IOR_Param_t(IOR_param_t *p);
|
||||||
|
void SetHints (MPI_Info *, char *);
|
||||||
|
void ShowHints (MPI_Info *);
|
||||||
|
|
||||||
#endif /* not _AIORI_H */
|
#endif /* not _AIORI_H */
|
||||||
|
|
|
@ -81,13 +81,10 @@ void WriteTimes (IOR_param_t *, double **, int, int);
|
||||||
char * CurrentTimeString(void);
|
char * CurrentTimeString(void);
|
||||||
void DumpBuffer (void *, size_t);
|
void DumpBuffer (void *, size_t);
|
||||||
void ExtractHint (char *, char *, char *);
|
void ExtractHint (char *, char *, char *);
|
||||||
void SetHints (MPI_Info *, char *);
|
|
||||||
void ShowHints (MPI_Info *);
|
|
||||||
IOR_offset_t StringToBytes (char *);
|
IOR_offset_t StringToBytes (char *);
|
||||||
|
|
||||||
#if USE_UNDOC_OPT
|
#if USE_UNDOC_OPT
|
||||||
void CorruptFile (char *, IOR_param_t *, int, int);
|
void CorruptFile (char *, IOR_param_t *, int, int);
|
||||||
void ModifyByteInFile (char *, IOR_offset_t, int);
|
|
||||||
#endif /* USE_UNDOC_OPTS */
|
#endif /* USE_UNDOC_OPTS */
|
||||||
void SeedRandGen (MPI_Comm);
|
void SeedRandGen (MPI_Comm);
|
||||||
|
|
||||||
|
|
|
@ -381,6 +381,40 @@ int Regex(char *string, char *pattern)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_UNDOC_OPT /* corruptFile */
|
#if USE_UNDOC_OPT /* corruptFile */
|
||||||
|
/*
|
||||||
|
* Modify byte in file - used to testing write/read data checking.
|
||||||
|
*/
|
||||||
|
static void ModifyByteInFile(char *fileName, IOR_offset_t offset, int byteValue)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
int rc;
|
||||||
|
char old;
|
||||||
|
char new;
|
||||||
|
|
||||||
|
new = (char)byteValue;
|
||||||
|
|
||||||
|
/* open file, show old value, update to new value */
|
||||||
|
fd = open(fileName, O_RDWR);
|
||||||
|
rc = lseek(fd, offset, SEEK_SET);
|
||||||
|
if (rc == -1)
|
||||||
|
goto out;
|
||||||
|
rc = read(fd, &old, 1);
|
||||||
|
if (rc == -1)
|
||||||
|
goto out;
|
||||||
|
rc = lseek(fd, offset, SEEK_SET);
|
||||||
|
if (rc == -1)
|
||||||
|
goto out;
|
||||||
|
rc = write(fd, &new, 1);
|
||||||
|
if (rc == -1)
|
||||||
|
goto out;
|
||||||
|
fprintf(stdout,
|
||||||
|
"** DEBUG: offset %lld in %s changed from %d to %d **\n",
|
||||||
|
offset, fileName, (unsigned char)old, (unsigned char)new);
|
||||||
|
|
||||||
|
out:
|
||||||
|
close(fd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Corrupt file to testing data checking options.
|
* Corrupt file to testing data checking options.
|
||||||
*/
|
*/
|
||||||
|
@ -417,41 +451,6 @@ void CorruptFile(char *testFileName, IOR_param_t * test, int rep, int access)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Modify byte in file - used to testing write/read data checking.
|
|
||||||
*/
|
|
||||||
void ModifyByteInFile(char *fileName, IOR_offset_t offset, int byteValue)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
int rc;
|
|
||||||
char old;
|
|
||||||
char new;
|
|
||||||
|
|
||||||
new = (char)byteValue;
|
|
||||||
|
|
||||||
/* open file, show old value, update to new value */
|
|
||||||
fd = open(fileName, O_RDWR);
|
|
||||||
rc = lseek(fd, offset, SEEK_SET);
|
|
||||||
if (rc == -1)
|
|
||||||
goto out;
|
|
||||||
rc = read(fd, &old, 1);
|
|
||||||
if (rc == -1)
|
|
||||||
goto out;
|
|
||||||
rc = lseek(fd, offset, SEEK_SET);
|
|
||||||
if (rc == -1)
|
|
||||||
goto out;
|
|
||||||
rc = write(fd, &new, 1);
|
|
||||||
if (rc == -1)
|
|
||||||
goto out;
|
|
||||||
fprintf(stdout,
|
|
||||||
"** DEBUG: offset %lld in %s changed from %d to %d **\n",
|
|
||||||
offset, fileName, (unsigned char)old, (unsigned char)new);
|
|
||||||
|
|
||||||
out:
|
|
||||||
close(fd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif /* USE_UNDOC_OPT - corruptFile */
|
#endif /* USE_UNDOC_OPT - corruptFile */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue