[Pvfs2-cvs] commit by pcarns in pvfs2-1/test/client/mpi-io: multi-md-test.c

CVS commit program cvs at parl.clemson.edu
Mon Apr 7 11:42:39 EDT 2008


Update of /projects/cvsroot/pvfs2-1/test/client/mpi-io
In directory parlweb1:/tmp/cvs-serv30165

Modified Files:
      Tag: small-file-branch
	multi-md-test.c 
Log Message:
command line argument to control how long to sleep between test phases


Index: multi-md-test.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/test/client/mpi-io/Attic/multi-md-test.c,v
diff -p -u -r1.1.2.8 -r1.1.2.9
--- multi-md-test.c	7 Apr 2008 15:39:16 -0000	1.1.2.8
+++ multi-md-test.c	7 Apr 2008 15:42:39 -0000	1.1.2.9
@@ -142,6 +142,7 @@ int opt_nfiles = -1;
 char opt_basedir[PATH_MAX] = {0};
 int opt_size = -1;
 int opt_api = -1; 
+int opt_pause = -1; 
 
 void usage(char *name); 
 int parse_args(int argc, char **argv);
@@ -154,7 +155,7 @@ void usage(char *name)
     int i = 0;
 
     fprintf(stderr,
-        "usage: %s -d base_dir -n num_files_per_proc -s size -a api \n", name);
+        "usage: %s -d base_dir -n num_files_per_proc -s size -a api -p seconds_to_pause\n", name);
     fprintf(stderr, "    where api is one of:\n");
     while(api_table[i].name != NULL)
     {
@@ -170,7 +171,7 @@ int parse_args(
     char **argv)
 {
     int c;
-    while ((c = getopt(argc, argv, "d:n:a:s:")) != -1)
+    while ((c = getopt(argc, argv, "d:n:a:s:p:")) != -1)
     {
         switch (c)
         {
@@ -186,6 +187,9 @@ int parse_args(
         case 'a':
             opt_api = atoi(optarg);
             break;
+        case 'p':
+            opt_pause = atoi(optarg);
+            break;
         case '?':
         case ':':
         default:
@@ -193,7 +197,7 @@ int parse_args(
             exit(-1);
         }
     }
-    if(opt_basedir[0] == 0 || opt_nfiles < 1 || opt_size < 1 || opt_api < 0)
+    if(opt_basedir[0] == 0 || opt_nfiles < 1 || opt_size < 1 || opt_api < 0 || opt_pause < 0)
     {
         usage(argv[0]);
         exit(-1);
@@ -440,7 +444,7 @@ int run_test_phase(double* elapsed_time,
         {
             printf("# Pause...\n");
         }
-        sleep(5);
+        sleep(opt_pause);
     }
 
     if (rank == 0)



More information about the Pvfs2-cvs mailing list