[C-MPI-commits] SF.net SVN: c-mpi:[47] test/cmpi
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-28 21:11:07
|
Revision: 47
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=47&view=rev
Author: jmwozniak
Date: 2010-04-28 21:11:01 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
Rename to test-putget
Modified Paths:
--------------
test/cmpi/About.txt
Added Paths:
-----------
test/cmpi/test-putget.c
test/cmpi/test-putget.zsh
Removed Paths:
-------------
test/cmpi/test03.c
Modified: test/cmpi/About.txt
===================================================================
--- test/cmpi/About.txt 2010-04-28 21:09:17 UTC (rev 46)
+++ test/cmpi/About.txt 2010-04-28 21:11:01 UTC (rev 47)
@@ -10,6 +10,6 @@
test-startup: Basic startup and shutdown.
test-tables: Debug tables.
-test03: put() + get().
+test-putget: Small put() + get().
test04: multiple put() + get().
test05: put() + update() + get().
Copied: test/cmpi/test-putget.c (from rev 46, test/cmpi/test03.c)
===================================================================
--- test/cmpi/test-putget.c (rev 0)
+++ test/cmpi/test-putget.c 2010-04-28 21:11:01 UTC (rev 47)
@@ -0,0 +1,39 @@
+
+/**
+ Put two keys and get one of them.
+*/
+
+#include "test_helpers.h"
+
+void
+cmpi_client_code()
+{
+ char key1[10];
+ char key2[10];
+ sprintf(key1, "key1_%i", mpi_rank);
+ sprintf(key2, "key2_%i", mpi_rank);
+
+ wait_for_notification();
+ notify_next();
+
+ char value[30];
+ strcpy(value, "value1");
+ cmpi_put(key1, value, strlen(value)+1);
+ strcpy(value, "value2");
+ cmpi_put(key2, value, strlen(value)+1);
+
+ sleep(2);
+
+ cmpi_debug_caches();
+
+ sleep(2);
+
+ int length;
+ char* result;
+ cmpi_get(key1, &result, &length);
+ printf("result(%i): %s\n", length, result);
+
+ sleep(3);
+
+ cmpi_shutdown();
+}
Property changes on: test/cmpi/test-putget.c
___________________________________________________________________
Added: svn:mergeinfo
+
Added: test/cmpi/test-putget.zsh
===================================================================
--- test/cmpi/test-putget.zsh (rev 0)
+++ test/cmpi/test-putget.zsh 2010-04-28 21:11:01 UTC (rev 47)
@@ -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 (3 nodes, 2 clients):
+
+ mpiexec -n 6 ${PROGRAM} -n 5 >& ${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 5 "Normal exit."s
+N=$( grep -c "Normal exit." ${OUT} )
+(( N == 6 )) || crash "N != 6"
+
+exit 0
Property changes on: test/cmpi/test-putget.zsh
___________________________________________________________________
Added: svn:executable
+ *
Deleted: test/cmpi/test03.c
===================================================================
--- test/cmpi/test03.c 2010-04-28 21:09:17 UTC (rev 46)
+++ test/cmpi/test03.c 2010-04-28 21:11:01 UTC (rev 47)
@@ -1,39 +0,0 @@
-
-/**
- Put two keys and get one of them.
-*/
-
-#include "test_helpers.h"
-
-void
-cmpi_client_code()
-{
- char key1[10];
- char key2[10];
- sprintf(key1, "key1_%i", mpi_rank);
- sprintf(key2, "key2_%i", mpi_rank);
-
- wait_for_notification();
- notify_next();
-
- char value[30];
- strcpy(value, "value1");
- cmpi_put(key1, value, strlen(value)+1);
- strcpy(value, "value2");
- cmpi_put(key2, value, strlen(value)+1);
-
- sleep(2);
-
- cmpi_debug_caches();
-
- sleep(2);
-
- int length;
- char* result;
- cmpi_get(key1, &result, &length);
- printf("result(%i): %s\n", length, result);
-
- sleep(3);
-
- cmpi_shutdown();
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|