[C-MPI-commits] SF.net SVN: c-mpi:[58] test/cmpi
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-29 20:02:35
|
Revision: 58
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=58&view=rev
Author: jmwozniak
Date: 2010-04-29 20:02:28 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
cmpi/test04 -> manyputs
Added Paths:
-----------
test/cmpi/test-manyputs.c
test/cmpi/test-manyputs.zsh
Removed Paths:
-------------
test/cmpi/test04.c
test/cmpi/test04.zsh
Copied: test/cmpi/test-manyputs.c (from rev 57, test/cmpi/test04.c)
===================================================================
--- test/cmpi/test-manyputs.c (rev 0)
+++ test/cmpi/test-manyputs.c 2010-04-29 20:02:28 UTC (rev 58)
@@ -0,0 +1,51 @@
+
+/**
+ Store many small records.
+ The number of records is controlled by the
+ "reps" key in the CMPI cache.
+*/
+
+#include "test_helpers.h"
+
+/**
+ Requires that "reps" be in the CMPI params.
+ Generates keys for multiple clients.
+*/
+void
+cmpi_client_code()
+{
+ int i;
+
+ // Obtain the number of reps to perform:
+ char* s = cmpi_params_search("reps");
+ if (s == NULL || strlen(s) == 0)
+ {
+ NOTE("No reps given!");
+ exit(1);
+ }
+ int reps;
+ int n = sscanf(s, "%i", &reps);
+ assert(n > 0);
+
+ wait_for_notification();
+ notify_next();
+
+ for (i = 0; i < reps; i++)
+ {
+ char key[20];
+ sprintf(key, "key_%i_%i", mpi_rank, i);
+ char* value = useless_data(10);
+
+ cmpi_put(key, value, strlen(value)+1);
+ }
+
+ sleep((mpi_size-mpi_rank)*3+10);
+
+ int client_rank;
+ MPI_Comm_rank(cmpi_comm_clients, &client_rank);
+ if (client_rank == 0)
+ {
+ note("Shutting down...");
+ cmpi_shutdown();
+ }
+}
Property changes on: test/cmpi/test-manyputs.c
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: test/cmpi/test-manyputs.zsh (from rev 57, test/cmpi/test04.zsh)
===================================================================
--- test/cmpi/test-manyputs.zsh (rev 0)
+++ test/cmpi/test-manyputs.zsh 2010-04-29 20:02:28 UTC (rev 58)
@@ -0,0 +1,37 @@
+#!/bin/zsh
+
+# Be sure to make tests with D=1
+
+# set -x
+
+source tools/test-helpers.zsh
+
+PROGRAM=$1
+OUT=${PROGRAM%.x}.out
+shift
+LAUNCH=${*}
+
+if (( USE_COMM_WORLD == 1 ))
+then
+
+ # Monolithic execution (5 nodes, 1 client):
+
+ mpiexec -n 6 ${PROGRAM} -n 5 -p reps=10 >& ${OUT}
+ CODE=$?
+ [[ ${CODE} == 0 ]] || crash "exit code was: ${CODE}"
+
+else
+
+ # KDA-2B execution:
+
+ tools/startup_nodes.zsh $(( N-1 )) 100 &
+ mpiexec -n 1 test/cmpi/test01.x > CLIENT.out
+ sleep $(( N+15 ))
+
+fi
+
+# Should be 6 "Normal exit."s
+N=$( grep -c "Normal exit." ${OUT} )
+(( N == 6 )) || crash "N != 6"
+
+exit 0
Property changes on: test/cmpi/test-manyputs.zsh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+
Deleted: test/cmpi/test04.c
===================================================================
--- test/cmpi/test04.c 2010-04-29 20:01:28 UTC (rev 57)
+++ test/cmpi/test04.c 2010-04-29 20:02:28 UTC (rev 58)
@@ -1,51 +0,0 @@
-
-/**
- Store many small records.
- The number of records is controlled by the
- "reps" key in the CMPI cache.
-*/
-
-#include "test_helpers.h"
-
-/**
- Requires that "reps" be in the CMPI params.
- Generates keys for multiple clients.
-*/
-void
-cmpi_client_code()
-{
- int i;
-
- // Obtain the number of reps to perform:
- char* s = cmpi_params_search("reps");
- if (s == NULL || strlen(s) == 0)
- {
- NOTE("No reps given!");
- exit(1);
- }
- int reps;
- int n = sscanf(s, "%i", &reps);
- assert(n > 0);
-
- wait_for_notification();
- notify_next();
-
- for (i = 0; i < reps; i++)
- {
- char key[20];
- sprintf(key, "key_%i_%i", mpi_rank, i);
- char* value = useless_data(10);
-
- cmpi_put(key, value, strlen(value)+1);
- }
-
- sleep((mpi_size-mpi_rank)*3+10);
-
- int client_rank;
- MPI_Comm_rank(cmpi_comm_clients, &client_rank);
- if (client_rank == 0)
- {
- note("Shutting down...");
- cmpi_shutdown();
- }
-}
Deleted: test/cmpi/test04.zsh
===================================================================
--- test/cmpi/test04.zsh 2010-04-29 20:01:28 UTC (rev 57)
+++ test/cmpi/test04.zsh 2010-04-29 20:02:28 UTC (rev 58)
@@ -1,37 +0,0 @@
-#!/bin/zsh
-
-# Be sure to make tests with D=1
-
-# set -x
-
-source tools/test-helpers.zsh
-
-PROGRAM=$1
-OUT=${PROGRAM%.x}.out
-shift
-LAUNCH=${*}
-
-if (( USE_COMM_WORLD == 1 ))
-then
-
- # Monolithic execution (5 nodes, 1 client):
-
- mpiexec -n 6 ${PROGRAM} -n 5 -p reps=10 >& ${OUT}
- CODE=$?
- [[ ${CODE} == 0 ]] || crash "exit code was: ${CODE}"
-
-else
-
- # KDA-2B execution:
-
- tools/startup_nodes.zsh $(( N-1 )) 100 &
- mpiexec -n 1 test/cmpi/test01.x > CLIENT.out
- sleep $(( N+15 ))
-
-fi
-
-# Should be 6 "Normal exit."s
-N=$( grep -c "Normal exit." ${OUT} )
-(( N == 6 )) || crash "N != 6"
-
-exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|