Extracted (nearly identical) function DelaySeconds.
parent
6f8d2e8845
commit
48c17b4d81
12
src/ior.c
12
src/ior.c
|
@ -670,18 +670,6 @@ static void DestroyTests(IOR_test_t *tests_head)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Sleep for 'delay' seconds.
|
|
||||||
*/
|
|
||||||
static void DelaySecs(int delay)
|
|
||||||
{
|
|
||||||
if (rank == 0 && delay > 0) {
|
|
||||||
if (verbose >= VERBOSE_1)
|
|
||||||
fprintf(out_logfile, "delaying %d seconds . . .\n", delay);
|
|
||||||
sleep(delay);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Display freespace (df).
|
* Display freespace (df).
|
||||||
*/
|
*/
|
||||||
|
|
23
src/mdtest.c
23
src/mdtest.c
|
@ -174,25 +174,6 @@ typedef struct{
|
||||||
enum {MK_UNI_DIR, STAT_SUB_DIR, READ_SUB_DIR, RM_SUB_DIR, RM_UNI_DIR};
|
enum {MK_UNI_DIR, STAT_SUB_DIR, READ_SUB_DIR, RM_SUB_DIR, RM_UNI_DIR};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void delay_secs(int delay) {
|
|
||||||
|
|
||||||
|
|
||||||
if (( rank == 0 ) && ( verbose >= 1 )) {
|
|
||||||
fprintf( out_logfile, "V-1: Entering delay_secs...\n" );
|
|
||||||
fflush( out_logfile );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rank == 0 && delay > 0) {
|
|
||||||
if (verbose >= 1) {
|
|
||||||
fprintf(out_logfile, "delaying %d seconds . . .\n", delay);
|
|
||||||
fflush(out_logfile);
|
|
||||||
}
|
|
||||||
sleep(delay);
|
|
||||||
}
|
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void offset_timers(double * t, int tcount) {
|
void offset_timers(double * t, int tcount) {
|
||||||
double toffset;
|
double toffset;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1938,13 +1919,13 @@ static void mdtest_iteration(int i, int j, MPI_Group testgroup, mdtest_results_t
|
||||||
|
|
||||||
if (dirs_only && !shared_file) {
|
if (dirs_only && !shared_file) {
|
||||||
if (pre_delay) {
|
if (pre_delay) {
|
||||||
delay_secs(pre_delay);
|
DelaySecs(pre_delay);
|
||||||
}
|
}
|
||||||
directory_test(j, i, unique_mk_dir, progress);
|
directory_test(j, i, unique_mk_dir, progress);
|
||||||
}
|
}
|
||||||
if (files_only) {
|
if (files_only) {
|
||||||
if (pre_delay) {
|
if (pre_delay) {
|
||||||
delay_secs(pre_delay);
|
DelaySecs(pre_delay);
|
||||||
}
|
}
|
||||||
file_test(j, i, unique_mk_dir, progress);
|
file_test(j, i, unique_mk_dir, progress);
|
||||||
}
|
}
|
||||||
|
|
|
@ -586,3 +586,14 @@ void StoreStoneWallingIterations(char * const filename, int64_t count){
|
||||||
fprintf(out, "%lld", (long long) count);
|
fprintf(out, "%lld", (long long) count);
|
||||||
fclose(out);
|
fclose(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sleep for 'delay' seconds.
|
||||||
|
*/
|
||||||
|
void DelaySecs(int delay){
|
||||||
|
if (rank == 0 && delay > 0) {
|
||||||
|
if (verbose >= VERBOSE_1)
|
||||||
|
fprintf(out_logfile, "delaying %d seconds . . .\n", delay);
|
||||||
|
sleep(delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ void SeedRandGen(MPI_Comm);
|
||||||
void SetHints (MPI_Info *, char *);
|
void SetHints (MPI_Info *, char *);
|
||||||
void ShowHints (MPI_Info *);
|
void ShowHints (MPI_Info *);
|
||||||
int CountTasksPerNode(MPI_Comm comm);
|
int CountTasksPerNode(MPI_Comm comm);
|
||||||
|
void DelaySecs(int delay);
|
||||||
|
|
||||||
/* Returns -1, if cannot be read */
|
/* Returns -1, if cannot be read */
|
||||||
int64_t ReadStoneWallingIterations(char * const filename);
|
int64_t ReadStoneWallingIterations(char * const filename);
|
||||||
|
|
Loading…
Reference in New Issue