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

CVS commit program cvs at parl.clemson.edu
Wed Apr 9 16:38:55 EDT 2008


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

Modified Files:
      Tag: small-file-branch
	multi-md-test.c 
Log Message:
added argument to allow acache and ncache timeout to be set


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.12 -r1.1.2.13
--- multi-md-test.c	7 Apr 2008 18:08:12 -0000	1.1.2.12
+++ multi-md-test.c	9 Apr 2008 20:38:55 -0000	1.1.2.13
@@ -158,6 +158,7 @@ int opt_pause = -1; 
 int opt_start_clients = -1;
 int opt_end_clients = -1;
 int opt_interval_clients = -1;
+unsigned int opt_timeout = 100;
 
 void usage(char *name); 
 int parse_args(int argc, char **argv);
@@ -171,7 +172,7 @@ void usage(char *name)
     int i = 0;
 
     fprintf(stderr,
-        "usage: %s -d base_dir -n num_files_per_proc -s size -a api -p seconds_to_pause -c client_spec\n", name);
+        "usage: %s -d base_dir -n num_files_per_proc -s size -a api -p seconds_to_pause -c client_spec <-t tcache_timeout_ms>\n", name);
     fprintf(stderr, "    where api is one of:\n");
     while(api_table[i].name != NULL)
     {
@@ -191,7 +192,7 @@ int parse_args(
 {
     int c;
     int ret;
-    while ((c = getopt(argc, argv, "d:n:a:s:p:c:")) != -1)
+    while ((c = getopt(argc, argv, "d:n:a:s:p:c:t:")) != -1)
     {
         switch (c)
         {
@@ -210,6 +211,14 @@ int parse_args(
         case 'p':
             opt_pause = atoi(optarg);
             break;
+        case 't':
+            ret = sscanf(optarg, "%u", &opt_timeout);
+            if(ret != 1)
+            {
+                usage(argv[0]);
+                exit(-1);
+            }
+            break;
         case 'c':
             ret = sscanf(optarg, "%d,%d,%d", 
                 &opt_start_clients, &opt_interval_clients, &opt_end_clients);
@@ -313,6 +322,8 @@ int main(
     /* key for data tables */
     if(rank == 0)
     {
+        printf("# sysint tests using acache and ncache timeout of: %u ms.\n", 
+            opt_timeout);
         printf("# <api>\t<op>\t<file_size>\t<procs>\t<n_ops_per_proc>\t<n_ops_total>\t<time>\t<rate_per_proc>\t<rate_total>\n");
     }
 
@@ -888,6 +899,18 @@ void pvfs_prep(int rank, int* n_ops)
     if(ret < 0)
     {
         handle_error(ret, "init");
+    }
+
+    /* set ncache and acache timeout values */
+    ret = PVFS_sys_set_info(PVFS_SYS_NCACHE_TIMEOUT_MSECS, opt_timeout);
+    if(ret < 0)
+    {
+        handle_error(ret, "PVFS_sys_set_info");
+    }
+    ret = PVFS_sys_set_info(PVFS_SYS_ACACHE_TIMEOUT_MSECS, opt_timeout);
+    if(ret < 0)
+    {
+        handle_error(ret, "PVFS_sys_set_info");
     }
 
     /* set up an array of handles to keep track of files */



More information about the Pvfs2-cvs mailing list