[C-MPI-commits] SF.net SVN: c-mpi:[43] test/cmpi
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-28 20:48:43
|
Revision: 43
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=43&view=rev
Author: jmwozniak
Date: 2010-04-28 20:48:35 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
Fix test/cmpi/test02
Modified Paths:
--------------
Makefile.in
test/cmpi/module.mk.in
test/cmpi/test02.c
test/cmpi/test02.zsh
Modified: Makefile.in
===================================================================
--- Makefile.in 2010-04-28 20:28:31 UTC (rev 42)
+++ Makefile.in 2010-04-28 20:48:35 UTC (rev 43)
@@ -62,6 +62,7 @@
MPI = @USE_MPI@
MPICC = @USE_MPI@/bin/mpicc
MPIEXEC = @USE_MPI@/bin/mpiexec -recvtimeout 10
+CHECK_MPD = @USE_MPI@/bin/mpdlistjobs > /dev/null
# Job launch selection
ifeq (@HAVE_SRUN@,no)
Modified: test/cmpi/module.mk.in
===================================================================
--- test/cmpi/module.mk.in 2010-04-28 20:28:31 UTC (rev 42)
+++ test/cmpi/module.mk.in 2010-04-28 20:48:35 UTC (rev 43)
@@ -15,8 +15,9 @@
ifeq (@USE_COMM_WORLD@,1)
test/cmpi/test%.out: test/cmpi/test%.x
- mpdlistjobs
- $(patsubst %.x, %.zsh, $(<)) $(<) $(LAUNCH)
+ $(E)$(CHECK_MPD)
+ $(Q) " TEST $(@) "
+ $(E)$(patsubst %.x, %.zsh, $(<)) $(<) $(LAUNCH)
test/cmpi/test%.x: test/cmpi/test%.o test/cmpi/test_helpers.o src/cmpi/node.o $(CMPI)
$(Q) " LINK $(@) "
Modified: test/cmpi/test02.c
===================================================================
--- test/cmpi/test02.c 2010-04-28 20:28:31 UTC (rev 42)
+++ test/cmpi/test02.c 2010-04-28 20:48:35 UTC (rev 43)
@@ -10,6 +10,8 @@
{
NOTE_F;
+ gossip_set_debug_mask(1, MASK_MPIRPC|MASK_DHT);
+
wait_for_notification();
notify_next();
@@ -17,5 +19,6 @@
sleep(mpi_rank);
- cmpi_shutdown();
+ if (mpi_rank == mpi_size-1)
+ cmpi_shutdown();
}
Modified: test/cmpi/test02.zsh
===================================================================
--- test/cmpi/test02.zsh 2010-04-28 20:28:31 UTC (rev 42)
+++ test/cmpi/test02.zsh 2010-04-28 20:48:35 UTC (rev 43)
@@ -1,11 +1,36 @@
-#!/bin/zsh
+#!/bin/zsh
-N=4
+# Be sure to make tests with D=1
-# tools/startup_nodes.zsh ${N} 100 &
+# set -x
-# sleep $(( N+15 ))
+source tools/test-helpers.zsh
-# KDA-1 execution:
-mpiexec -n ${N} test/cmpi/test02.zsh -n 3
+PROGRAM=$1
+OUT=${PROGRAM%.x}.out
+shift
+LAUNCH=${*}
+if (( USE_COMM_WORLD == 1 ))
+then
+
+ # KDA-2A execution (3 nodes, 2 clients):
+ mpiexec -n 5 ${PROGRAM} -n 3 >& ${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 == 5 )) || crash "N != 5"
+
+exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|