Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] ISP tests integration
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 25 Jul 2014 14:12:49 +0000 (16:12 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 25 Aug 2014 12:56:02 +0000 (14:56 +0200)
180 files changed:
.gitignore
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/MakeExe.cmake
buildtools/Cmake/Option.cmake
teshsuite/smpi/isp/umpire/CMakeLists.txt [new file with mode: 0644]
teshsuite/smpi/isp/umpire/README [new file with mode: 0644]
teshsuite/smpi/isp/umpire/abort.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/abort1.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/abort2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/abort3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock10.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock10.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock10_mod.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock11.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock4.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock4.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock4_mod.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock5.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock5.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock5_mod.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock6.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock6.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock6_mod.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock7.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock8.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-can-deadlock9.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-wait-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-wait-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-wait-deadlock2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-cart_create.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-cart_sub.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-graph_create.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_merge.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/basic-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/bcast-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/bcast-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/change-send-buffer-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/change-send-buffer-type-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/change-send-buffer.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-exhaustive-byte-int-mismatch.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-exhaustive-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-misorder-allreduce.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-misorder-allreduce.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-misorder.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-misorder.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/collective-misorder2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-bcast-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-dup-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-dup-no-free.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-dup-no-free2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-simple.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-split-no-free.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/comm-translate-ranks.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/complex-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/complex-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/deadlock-config.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/deadlock-config.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/deadlock-config_blocking.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/dropped-req.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/errhandler-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/errhandler-no-free.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/finalize-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/finalize-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-error-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-error2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-error3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-free-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-free.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-free2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/group-no-free3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/hello.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/intercomm_create-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/intercomm_create-deadlock2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/intercomm_create-deadlock3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/intercomm_create-deadlock4.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/intercomm_create-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/intercomm_merge-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/irecv-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/irecv-deadlock.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/irecv-isend-ok.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/irecv-isend-ok2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/lost-request-waitall.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/lost-request.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/lost-request2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/lost-request3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-derived-comms.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-interleaved-isend.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-persistent-all-completions.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-persistent-test.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-persistent-testpartial.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-persistent-waitpartial.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-persistent.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-probe-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-probe-any_tag.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-probe.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-test.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-testall.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-testany.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-vector-isend.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-wait-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-wait-any_src2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-wait-any_src3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-wait-any_src4.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-wait.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-wait2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitall-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitall-any_src2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitall-any_src3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitall.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitany-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitany-any_src2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitany-any_src3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitany.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error-waitany2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error2.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error3-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error3-any_src.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error3.tesh [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error4-any_src.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/no-error4.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/op-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/op-no-free.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/partial-recv-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/partial-recv-persistent.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/partial-recv-persistent2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/partial-recv-persistent3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/partial-recv-persistent4.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/partial-recv.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/persistent.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/persistent2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/persistent3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/persistent4.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/probe-any_src-types-can-mismatch.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/probe-any_tag-types-can-mismatch.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/probe-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/pt2pt-byte-int-mismatch.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/remote_group-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/send-recv-ok.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/sendrecv-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-commit-twice.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-error-exhaustive-with-isends.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-error-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-error.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-free-exhaustive.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-free.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-free2.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/type-no-free3.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/wait-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/waitall-deadlock.c [new file with mode: 0644]
teshsuite/smpi/isp/umpire/waitany-deadlock.c [new file with mode: 0644]
tools/tesh/CMakeLists.txt

index e668f32..88e47be 100644 (file)
@@ -252,6 +252,155 @@ examples/smpi/mc/bugged2
 src/replay/replay
 src/testall
 teshsuite/bug-17132/bug-17132
+teshsuite/smpi/isp/umpire/abort
+teshsuite/smpi/isp/umpire/abort1
+teshsuite/smpi/isp/umpire/abort2
+teshsuite/smpi/isp/umpire/abort3
+teshsuite/smpi/isp/umpire/any_src-can-deadlock
+teshsuite/smpi/isp/umpire/any_src-can-deadlock10
+teshsuite/smpi/isp/umpire/any_src-can-deadlock10_mod
+teshsuite/smpi/isp/umpire/any_src-can-deadlock11
+teshsuite/smpi/isp/umpire/any_src-can-deadlock2
+teshsuite/smpi/isp/umpire/any_src-can-deadlock3
+teshsuite/smpi/isp/umpire/any_src-can-deadlock4
+teshsuite/smpi/isp/umpire/any_src-can-deadlock4_mod
+teshsuite/smpi/isp/umpire/any_src-can-deadlock5
+teshsuite/smpi/isp/umpire/any_src-can-deadlock5_mod
+teshsuite/smpi/isp/umpire/any_src-can-deadlock6
+teshsuite/smpi/isp/umpire/any_src-can-deadlock6_mod
+teshsuite/smpi/isp/umpire/any_src-can-deadlock7
+teshsuite/smpi/isp/umpire/any_src-can-deadlock8
+teshsuite/smpi/isp/umpire/any_src-can-deadlock9
+teshsuite/smpi/isp/umpire/any_src-deadlock
+teshsuite/smpi/isp/umpire/any_src-wait-deadlock
+teshsuite/smpi/isp/umpire/any_src-wait-deadlock2
+teshsuite/smpi/isp/umpire/any_src-waitall-deadlock
+teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2
+teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3
+teshsuite/smpi/isp/umpire/any_src-waitany-deadlock
+teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2
+teshsuite/smpi/isp/umpire/basic-deadlock
+teshsuite/smpi/isp/umpire/basic-deadlock-cart_create
+teshsuite/smpi/isp/umpire/basic-deadlock-cart_sub
+teshsuite/smpi/isp/umpire/basic-deadlock-comm_create
+teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup
+teshsuite/smpi/isp/umpire/basic-deadlock-comm_split
+teshsuite/smpi/isp/umpire/basic-deadlock-graph_create
+teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create
+teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_merge
+teshsuite/smpi/isp/umpire/bcast-deadlock
+teshsuite/smpi/isp/umpire/change-send-buffer
+teshsuite/smpi/isp/umpire/change-send-buffer-exhaustive
+teshsuite/smpi/isp/umpire/change-send-buffer-type-exhaustive
+teshsuite/smpi/isp/umpire/collective-exhaustive-byte-int-mismatch
+teshsuite/smpi/isp/umpire/collective-exhaustive-no-error
+teshsuite/smpi/isp/umpire/collective-misorder
+teshsuite/smpi/isp/umpire/collective-misorder-allreduce
+teshsuite/smpi/isp/umpire/collective-misorder2
+teshsuite/smpi/isp/umpire/comm-bcast-deadlock
+teshsuite/smpi/isp/umpire/comm-deadlock
+teshsuite/smpi/isp/umpire/comm-dup-no-error
+teshsuite/smpi/isp/umpire/comm-dup-no-free
+teshsuite/smpi/isp/umpire/comm-dup-no-free2
+teshsuite/smpi/isp/umpire/comm-simple
+teshsuite/smpi/isp/umpire/comm-split-no-free
+teshsuite/smpi/isp/umpire/comm-translate-ranks
+teshsuite/smpi/isp/umpire/complex-deadlock
+teshsuite/smpi/isp/umpire/deadlock-config
+teshsuite/smpi/isp/umpire/deadlock-config_blocking
+teshsuite/smpi/isp/umpire/dropped-req
+teshsuite/smpi/isp/umpire/errhandler-no-error
+teshsuite/smpi/isp/umpire/errhandler-no-free
+teshsuite/smpi/isp/umpire/finalize-deadlock
+teshsuite/smpi/isp/umpire/group-no-error
+teshsuite/smpi/isp/umpire/group-no-error-exhaustive
+teshsuite/smpi/isp/umpire/group-no-error2
+teshsuite/smpi/isp/umpire/group-no-error3
+teshsuite/smpi/isp/umpire/group-no-free
+teshsuite/smpi/isp/umpire/group-no-free-exhaustive
+teshsuite/smpi/isp/umpire/group-no-free2
+teshsuite/smpi/isp/umpire/group-no-free3
+teshsuite/smpi/isp/umpire/hello
+teshsuite/smpi/isp/umpire/intercomm_create-deadlock
+teshsuite/smpi/isp/umpire/intercomm_create-deadlock2
+teshsuite/smpi/isp/umpire/intercomm_create-deadlock3
+teshsuite/smpi/isp/umpire/intercomm_create-deadlock4
+teshsuite/smpi/isp/umpire/intercomm_create-no-error
+teshsuite/smpi/isp/umpire/intercomm_merge-deadlock
+teshsuite/smpi/isp/umpire/irecv-deadlock
+teshsuite/smpi/isp/umpire/irecv-isend-ok
+teshsuite/smpi/isp/umpire/irecv-isend-ok2
+teshsuite/smpi/isp/umpire/lost-request
+teshsuite/smpi/isp/umpire/lost-request-waitall
+teshsuite/smpi/isp/umpire/lost-request2
+teshsuite/smpi/isp/umpire/lost-request3
+teshsuite/smpi/isp/umpire/no-error
+teshsuite/smpi/isp/umpire/no-error-any_src
+teshsuite/smpi/isp/umpire/no-error-derived-comms
+teshsuite/smpi/isp/umpire/no-error-interleaved-isend
+teshsuite/smpi/isp/umpire/no-error-persistent
+teshsuite/smpi/isp/umpire/no-error-persistent-all-completions
+teshsuite/smpi/isp/umpire/no-error-persistent-test
+teshsuite/smpi/isp/umpire/no-error-persistent-testpartial
+teshsuite/smpi/isp/umpire/no-error-persistent-waitpartial
+teshsuite/smpi/isp/umpire/no-error-probe
+teshsuite/smpi/isp/umpire/no-error-probe-any_src
+teshsuite/smpi/isp/umpire/no-error-probe-any_tag
+teshsuite/smpi/isp/umpire/no-error-test
+teshsuite/smpi/isp/umpire/no-error-testall
+teshsuite/smpi/isp/umpire/no-error-testany
+teshsuite/smpi/isp/umpire/no-error-vector-isend
+teshsuite/smpi/isp/umpire/no-error-wait
+teshsuite/smpi/isp/umpire/no-error-wait-any_src
+teshsuite/smpi/isp/umpire/no-error-wait-any_src2
+teshsuite/smpi/isp/umpire/no-error-wait-any_src3
+teshsuite/smpi/isp/umpire/no-error-wait-any_src4
+teshsuite/smpi/isp/umpire/no-error-waitall
+teshsuite/smpi/isp/umpire/no-error-waitall-any_src
+teshsuite/smpi/isp/umpire/no-error-waitall-any_src2
+teshsuite/smpi/isp/umpire/no-error-waitall-any_src3
+teshsuite/smpi/isp/umpire/no-error-waitany
+teshsuite/smpi/isp/umpire/no-error-waitany-any_src
+teshsuite/smpi/isp/umpire/no-error-waitany-any_src2
+teshsuite/smpi/isp/umpire/no-error-waitany-any_src3
+teshsuite/smpi/isp/umpire/no-error-waitany2
+teshsuite/smpi/isp/umpire/no-error2
+teshsuite/smpi/isp/umpire/no-error3
+teshsuite/smpi/isp/umpire/no-error3-any_src
+teshsuite/smpi/isp/umpire/no-error4
+teshsuite/smpi/isp/umpire/no-error4-any_src
+teshsuite/smpi/isp/umpire/op-no-error
+teshsuite/smpi/isp/umpire/op-no-free
+teshsuite/smpi/isp/umpire/partial-recv
+teshsuite/smpi/isp/umpire/partial-recv-exhaustive
+teshsuite/smpi/isp/umpire/partial-recv-persistent
+teshsuite/smpi/isp/umpire/partial-recv-persistent2
+teshsuite/smpi/isp/umpire/partial-recv-persistent3
+teshsuite/smpi/isp/umpire/partial-recv-persistent4
+teshsuite/smpi/isp/umpire/persistent
+teshsuite/smpi/isp/umpire/persistent2
+teshsuite/smpi/isp/umpire/persistent3
+teshsuite/smpi/isp/umpire/persistent4
+teshsuite/smpi/isp/umpire/probe-any_src-types-can-mismatch
+teshsuite/smpi/isp/umpire/probe-any_tag-types-can-mismatch
+teshsuite/smpi/isp/umpire/probe-deadlock
+teshsuite/smpi/isp/umpire/pt2pt-byte-int-mismatch
+teshsuite/smpi/isp/umpire/remote_group-no-error
+teshsuite/smpi/isp/umpire/send-recv-ok
+teshsuite/smpi/isp/umpire/sendrecv-deadlock
+teshsuite/smpi/isp/umpire/temp.txt
+teshsuite/smpi/isp/umpire/tmpzLRJML
+teshsuite/smpi/isp/umpire/type-commit-twice
+teshsuite/smpi/isp/umpire/type-no-error
+teshsuite/smpi/isp/umpire/type-no-error-exhaustive
+teshsuite/smpi/isp/umpire/type-no-error-exhaustive-with-isends
+teshsuite/smpi/isp/umpire/type-no-free
+teshsuite/smpi/isp/umpire/type-no-free-exhaustive
+teshsuite/smpi/isp/umpire/type-no-free2
+teshsuite/smpi/isp/umpire/type-no-free3
+teshsuite/smpi/isp/umpire/wait-deadlock
+teshsuite/smpi/isp/umpire/waitall-deadlock
+teshsuite/smpi/isp/umpire/waitany-deadlock
 teshsuite/smpi/bcast/bcast_coll
 teshsuite/smpi/compute/compute2
 teshsuite/smpi/compute/compute3
index 5700844..449213e 100644 (file)
@@ -552,6 +552,37 @@ ENDIF()
 
 ENDIF()
 
+if(enable_smpi AND enable_smpi_ISP_testsuite)
+FOREACH (tesh
+    any_src-can-deadlock10
+    any_src-can-deadlock4
+    any_src-can-deadlock5
+    any_src-can-deadlock6
+    any_src-waitall-deadlock2
+    any_src-waitall-deadlock3
+    any_src-waitany-deadlock2
+    any_src-waitany-deadlock
+    any_src-wait-deadlock
+    basic-deadlock-comm_create
+    basic-deadlock-comm_dup
+    basic-deadlock-comm_split
+    basic-deadlock
+    bcast-deadlock
+    collective-misorder-allreduce
+    collective-misorder
+    complex-deadlock
+    deadlock-config
+    finalize-deadlock
+    irecv-deadlock
+    no-error2
+    no-error3-any_src
+    no-error3
+    no-error
+    )
+  ADD_TESH(umpire_${tesh} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire/${tesh}.tesh)
+ENDFOREACH()
+endif()
+
   ## OTHER ##
 ADD_TEST(testall                                 ${CMAKE_BINARY_DIR}/src/testall)
 
index 9a51f2c..cafac51 100644 (file)
@@ -1082,6 +1082,7 @@ set(TESHSUITE_CMAKEFILES_TXT
   teshsuite/smpi/shared/CMakeLists.txt
   teshsuite/smpi/struct/CMakeLists.txt
   teshsuite/smpi/vector/CMakeLists.txt
+  teshsuite/smpi/isp/umpire/CMakeLists.txt
   teshsuite/smpi/mpich3-test/CMakeLists.txt
   teshsuite/smpi/mpich3-test/attr/CMakeLists.txt
   teshsuite/smpi/mpich3-test/coll/CMakeLists.txt
index 7c2097f..f5e8cd5 100644 (file)
@@ -131,6 +131,9 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/scatter)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector)
+
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire)
+
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/attr)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll)
index a3f0dae..0bde6df 100644 (file)
@@ -49,6 +49,7 @@ else()
   option(enable_smpi "Whether SMPI in included in library." on)
   option(enable_smpi_MPICH3_testsuite "Whether the test suite form MPICH 3 should be built" off)
 endif()
+option(enable_smpi_ISP_testsuite "Whether the test suite form ISP should be built" off)
 
 if(enable_scala AND NOT enable_java)
   message(WARNING "For using scala you must turn java on with command:\ncmake -Denable_java=on .")
diff --git a/teshsuite/smpi/isp/umpire/CMakeLists.txt b/teshsuite/smpi/isp/umpire/CMakeLists.txt
new file mode 100644 (file)
index 0000000..254020f
--- /dev/null
@@ -0,0 +1,212 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(umpire_src
+  abort1.c
+  abort2.c
+  abort3.c
+  abort.c
+  any_src-can-deadlock10.c
+  any_src-can-deadlock10_mod.c
+  any_src-can-deadlock11.c
+  any_src-can-deadlock2.c
+  any_src-can-deadlock3.c
+  any_src-can-deadlock4.c
+  any_src-can-deadlock4_mod.c
+  any_src-can-deadlock5.c
+  any_src-can-deadlock5_mod.c
+  any_src-can-deadlock6.c
+  any_src-can-deadlock6_mod.c
+  any_src-can-deadlock7.c
+  any_src-can-deadlock8.c
+  any_src-can-deadlock9.c
+  any_src-can-deadlock.c
+  any_src-deadlock.c
+  any_src-waitall-deadlock2.c
+  any_src-waitall-deadlock3.c
+  any_src-waitall-deadlock.c
+  any_src-waitany-deadlock2.c
+  any_src-waitany-deadlock.c
+  any_src-wait-deadlock2.c
+  any_src-wait-deadlock.c
+  basic-deadlock.c
+  basic-deadlock-cart_create.c
+  basic-deadlock-cart_sub.c
+  basic-deadlock-comm_create.c
+  basic-deadlock-comm_dup.c
+  basic-deadlock-comm_split.c
+  basic-deadlock-graph_create.c
+  basic-deadlock-intercomm_create.c
+  basic-deadlock-intercomm_merge.c
+  bcast-deadlock.c
+  change-send-buffer.c
+  change-send-buffer-exhaustive.c
+  change-send-buffer-type-exhaustive.c
+  collective-exhaustive-byte-int-mismatch.c
+  collective-exhaustive-no-error.c
+  collective-misorder2.c
+  collective-misorder-allreduce.c
+  collective-misorder.c
+  comm-bcast-deadlock.c
+  comm-deadlock.c
+  comm-dup-no-error.c
+  comm-dup-no-free2.c
+  comm-dup-no-free.c
+  comm-simple.c
+  comm-split-no-free.c
+  comm-translate-ranks.c
+  complex-deadlock.c
+  deadlock-config_blocking.c
+  deadlock-config.c
+  dropped-req.c
+  errhandler-no-error.c
+  errhandler-no-free.c
+  finalize-deadlock.c
+  group-no-error2.c
+  group-no-error3.c
+  group-no-error.c
+  group-no-error-exhaustive.c
+  group-no-free2.c
+  group-no-free3.c
+  group-no-free.c
+  group-no-free-exhaustive.c
+  hello.c
+  intercomm_create-deadlock2.c
+  intercomm_create-deadlock3.c
+  intercomm_create-deadlock4.c
+  intercomm_create-deadlock.c
+  intercomm_create-no-error.c
+  intercomm_merge-deadlock.c
+  irecv-deadlock.c
+  irecv-isend-ok2.c
+  irecv-isend-ok.c
+  lost-request2.c
+  lost-request3.c
+  lost-request.c
+  lost-request-waitall.c
+  no-error2.c
+  no-error3-any_src.c
+  no-error3.c
+  no-error4-any_src.c
+  no-error4.c
+  no-error-any_src.c
+  no-error.c
+  no-error-derived-comms.c
+  no-error-interleaved-isend.c
+  no-error-persistent-all-completions.c
+  no-error-persistent.c
+  no-error-persistent-test.c
+  no-error-persistent-testpartial.c
+  no-error-persistent-waitpartial.c
+  no-error-probe-any_src.c
+  no-error-probe-any_tag.c
+  no-error-probe.c
+  no-error-testall.c
+  no-error-testany.c
+  no-error-test.c
+  no-error-vector-isend.c
+  # no-error-wait2.c # Does not compile.
+  no-error-waitall-any_src2.c
+  no-error-waitall-any_src3.c
+  no-error-waitall-any_src.c
+  no-error-waitall.c
+  no-error-waitany2.c
+  no-error-waitany-any_src2.c
+  no-error-waitany-any_src3.c
+  no-error-waitany-any_src.c
+  no-error-waitany.c
+  no-error-wait-any_src2.c
+  no-error-wait-any_src3.c
+  no-error-wait-any_src4.c
+  no-error-wait-any_src.c
+  no-error-wait.c
+  op-no-error.c
+  op-no-free.c
+  partial-recv.c
+  partial-recv-exhaustive.c
+  partial-recv-persistent2.c
+  partial-recv-persistent3.c
+  partial-recv-persistent4.c
+  partial-recv-persistent.c
+  persistent2.c
+  persistent3.c
+  persistent4.c
+  persistent.c
+  probe-any_src-types-can-mismatch.c
+  probe-any_tag-types-can-mismatch.c
+  probe-deadlock.c
+  pt2pt-byte-int-mismatch.c
+  remote_group-no-error.c
+  sendrecv-deadlock.c
+  send-recv-ok.c
+  type-commit-twice.c
+  type-no-error.c
+  type-no-error-exhaustive.c
+  type-no-error-exhaustive-with-isends.c
+  type-no-free2.c
+  type-no-free3.c
+  type-no-free.c
+  type-no-free-exhaustive.c
+  waitall-deadlock.c
+  waitany-deadlock.c
+  wait-deadlock.c
+  )
+
+set(sources "")
+FOREACH(s ${umpire_src})
+  set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${s})
+ENDFOREACH()
+
+set(umpire_tesh "")
+foreach(tesh
+    any_src-can-deadlock10
+    any_src-can-deadlock4
+    any_src-can-deadlock5
+    any_src-can-deadlock6
+    any_src-waitall-deadlock2
+    any_src-waitall-deadlock3
+    any_src-waitany-deadlock2
+    any_src-waitany-deadlock
+    any_src-wait-deadlock
+    basic-deadlock-comm_create
+    basic-deadlock-comm_dup
+    basic-deadlock-comm_split
+    basic-deadlock
+    bcast-deadlock
+    collective-misorder-allreduce
+    collective-misorder
+    complex-deadlock
+    deadlock-config
+    finalize-deadlock
+    irecv-deadlock
+    no-error2
+    no-error3-any_src
+    no-error3
+    no-error
+    )
+  set(umpire_tesh ${umpire_tesh} teshsuite/smpi/isp/umpire/${tesh}.tesh)
+ENDFOREACH()
+
+set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
+set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README PARENT_SCOPE)
+set(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/no-error-wait2.c PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${umpire_tesh} PARENT_SCOPE)
+
+if(enable_smpi AND enable_smpi_ISP_testsuite)
+  if(WIN32)
+    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
+  else()
+    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
+  endif()
+
+  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
+
+  FOREACH (s ${umpire_src})
+    STRING(REGEX REPLACE "\\.c$" "" exe ${s})
+    add_executable(${exe} ${s})
+    target_link_libraries(${exe} simgrid)
+    set_source_files_properties(${s} PROPERTIES COMPILE_FLAGS "-Wno-error")
+  ENDFOREACH(s)
+endif()
diff --git a/teshsuite/smpi/isp/umpire/README b/teshsuite/smpi/isp/umpire/README
new file mode 100644 (file)
index 0000000..19a86c6
--- /dev/null
@@ -0,0 +1 @@
+ISP Test taken from <http://www.cs.utah.edu/formal_verification/ISP_Tests/>.
diff --git a/teshsuite/smpi/isp/umpire/abort.c b/teshsuite/smpi/isp/umpire/abort.c
new file mode 100644 (file)
index 0000000..1ac5684
--- /dev/null
@@ -0,0 +1,42 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Oct 29 2002 */
+/* abort.c -- call MPI abort in all tasks... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    printf ("(%d) Aborting\n", rank);
+    MPI_Abort (MPI_COMM_WORLD, -1);
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/abort1.c b/teshsuite/smpi/isp/umpire/abort1.c
new file mode 100644 (file)
index 0000000..9765767
--- /dev/null
@@ -0,0 +1,43 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Oct 29 2002 */
+/* abort1.c -- call MPI abort in all tasks other than zero... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    if (rank) {
+      printf ("(%d) Aborting\n", rank);
+      MPI_Abort (MPI_COMM_WORLD, -1);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/abort2.c b/teshsuite/smpi/isp/umpire/abort2.c
new file mode 100644 (file)
index 0000000..563a6b9
--- /dev/null
@@ -0,0 +1,43 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Oct 29 2002 */
+/* abort2.c -- call MPI abort in task zero... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      printf ("(%d) Aborting\n", rank);
+      MPI_Abort (MPI_COMM_WORLD, -1);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/abort3.c b/teshsuite/smpi/isp/umpire/abort3.c
new file mode 100644 (file)
index 0000000..21e198b
--- /dev/null
@@ -0,0 +1,44 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Oct 29 2002 */
+/* abort3.c -- call MPI abort in task one... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    /* ensure that we have a non-manager that doesn't abort... */
+    printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 1) {
+      printf ("(%d) Aborting\n", rank);
+      MPI_Abort (MPI_COMM_WORLD, -1);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock.c
new file mode 100644 (file)
index 0000000..9fe72c8
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Jan 3 2002 */
+/* any_src-can-deadlock.c -- deadlock occurs if task 0 receives */
+/*                           from task 2 first; pretty random */
+/*                           as to which is received first... */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock10.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock10.c
new file mode 100644 (file)
index 0000000..65e3a6e
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Sep 30 2003 */
+/* any_src-can-deadlock10.c -- deadlock occurs if task 0 receives */
+/*                             from task 1 first; sleeps generally */
+/*                             make order 1 before 2 with all task */
+/*                             0 ops being posted before both 1 and 2 */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+    //  sleep (30);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+     // sleep (60);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock10.tesh b/teshsuite/smpi/isp/umpire/any_src-can-deadlock10.tesh
new file mode 100644 (file)
index 0000000..f004859
--- /dev/null
@@ -0,0 +1,52 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock10
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 26
+> [0.000000] [mc_global/INFO] Visited states = 26
+> [0.000000] [mc_global/INFO] Executed transitions = 25
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock10_mod.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock10_mod.c
new file mode 100644 (file)
index 0000000..25d2b5a
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Sep 30 2003 */
+/* any_src-can-deadlock10.c -- deadlock occurs if task 0 receives */
+/*                             from task 1 first; sleeps generally */
+/*                             make order 1 before 2 with all task */
+/*                             0 ops being posted before both 1 and 2 */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+    //  sleep (30);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+     // sleep (60);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock11.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock11.c
new file mode 100644 (file)
index 0000000..48717b8
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock11.c -- deadlock occurs if task 0 receives */
+/*                             from task 2 first; sleeps generally */
+/*                             make order 2 before 1 with all task */
+/*                             0 ops being posted before both 1 and 2 */
+/*                             same as any_src-can-deadlock10.c */
+/*                             except tasks 1 and 2 are interchanged */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+      //sleep (30);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      //sleep (60);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock2.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock2.c
new file mode 100644 (file)
index 0000000..6559eb2
--- /dev/null
@@ -0,0 +1,70 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Jan 3 2002 */
+/* any_src-can-deadlock.c -- deadlock occurs if task 0 receives */
+/*                           from task 2 first; the likely outcome */
+/*                           because we sleep task 1 */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+     // sleep (60);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock3.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock3.c
new file mode 100644 (file)
index 0000000..53015d0
--- /dev/null
@@ -0,0 +1,70 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Jan 3 2002 */
+/* any_src-can-deadlock.c -- deadlock occurs if task 0 receives */
+/*                           from task 2 first; the unlikely outcome */
+/*                           because we sleep task 2 */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+      //sleep (60);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock4.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock4.c
new file mode 100644 (file)
index 0000000..94dd335
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock4.c -- deadlock occurs if task 0 receives */
+/*                            from task 1 first; pretty random */
+/*                            as to which is received first... */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock4.tesh b/teshsuite/smpi/isp/umpire/any_src-can-deadlock4.tesh
new file mode 100644 (file)
index 0000000..cf03096
--- /dev/null
@@ -0,0 +1,51 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock4
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 26
+> [0.000000] [mc_global/INFO] Visited states = 26
+> [0.000000] [mc_global/INFO] Executed transitions = 25
+> Aborted
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock4_mod.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock4_mod.c
new file mode 100644 (file)
index 0000000..51cf1ce
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock4.c -- deadlock occurs if task 0 receives */
+/*                            from task 1 first; pretty random */
+/*                            as to which is received first... */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock5.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock5.c
new file mode 100644 (file)
index 0000000..050d557
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock5.c -- deadlock occurs if task 0 receives */
+/*                            from task 1 first; sleeps generally */
+/*                            make order 1 before 2 with all task */
+/*                            0 ops being posted after both 1 and 2 */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      //sleep (60);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+     // sleep (30);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock5.tesh b/teshsuite/smpi/isp/umpire/any_src-can-deadlock5.tesh
new file mode 100644 (file)
index 0000000..bae9bc7
--- /dev/null
@@ -0,0 +1,52 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock5
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 26
+> [0.000000] [mc_global/INFO] Visited states = 26
+> [0.000000] [mc_global/INFO] Executed transitions = 25
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock5_mod.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock5_mod.c
new file mode 100644 (file)
index 0000000..d06d031
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock5.c -- deadlock occurs if task 0 receives */
+/*                            from task 1 first; sleeps generally */
+/*                            make order 1 before 2 with all task */
+/*                            0 ops being posted after both 1 and 2 */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      //sleep (60);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+     // sleep (30);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock6.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock6.c
new file mode 100644 (file)
index 0000000..4ca42bc
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock5.c -- deadlock occurs if task 0 receives */
+/*                            from task 1 first; sleeps generally */
+/*                            make order 2 before 1 with all task */
+/*                            0 ops being posted after both 1 and 2 */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+//      sleep (60);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+ //     sleep (30);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock6.tesh b/teshsuite/smpi/isp/umpire/any_src-can-deadlock6.tesh
new file mode 100644 (file)
index 0000000..3f32b3c
--- /dev/null
@@ -0,0 +1,52 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock6
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 26
+> [0.000000] [mc_global/INFO] Visited states = 26
+> [0.000000] [mc_global/INFO] Executed transitions = 25
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock6_mod.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock6_mod.c
new file mode 100644 (file)
index 0000000..6e80869
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock5.c -- deadlock occurs if task 0 receives */
+/*                            from task 1 first; sleeps generally */
+/*                            make order 2 before 1 with all task */
+/*                            0 ops being posted after both 1 and 2 */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+//      sleep (60);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+ //     sleep (30);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock7.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock7.c
new file mode 100644 (file)
index 0000000..b265d21
--- /dev/null
@@ -0,0 +1,77 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock7.c -- deadlock occurs if task 0 receives */
+/*                            from task 2 first; pretty random */
+/*                            as to which is received first... */
+/*                            same as any_src-can-deadlock4.c */
+/*                            except tasks 1 and 2 are interchanged */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock8.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock8.c
new file mode 100644 (file)
index 0000000..d789beb
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock8.c -- deadlock occurs if task 0 receives */
+/*                            from task 2 first; sleeps generally */
+/*                            make order 1 before 2 with all task */
+/*                            0 ops being posted after both 1 and 2 */
+/*                            same as any_src-can-deadlock6.c */
+/*                            except tasks 1 and 2 are interchanged */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+//      sleep (60);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+  //    sleep (30);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-can-deadlock9.c b/teshsuite/smpi/isp/umpire/any_src-can-deadlock9.c
new file mode 100644 (file)
index 0000000..3778ffe
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 26 2003 */
+/* any_src-can-deadlock9.c -- deadlock occurs if task 0 receives */
+/*                            from task 2 first; sleeps generally */
+/*                            make order 2 before 1 with all task */
+/*                            0 ops being posted after both 1 and 2 */
+/*                            same as any_src-can-deadlock5.c */
+/*                            except tasks 1 and 2 are interchanged */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      //sleep (60);
+
+     MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 2)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+     // sleep (30);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-deadlock.c b/teshsuite/smpi/isp/umpire/any_src-deadlock.c
new file mode 100644 (file)
index 0000000..e8beec3
--- /dev/null
@@ -0,0 +1,58 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-wait-deadlock.c b/teshsuite/smpi/isp/umpire/any_src-wait-deadlock.c
new file mode 100644 (file)
index 0000000..130c972
--- /dev/null
@@ -0,0 +1,65 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Wait (&req, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Wait (&req, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-wait-deadlock.tesh b/teshsuite/smpi/isp/umpire/any_src-wait-deadlock.tesh
new file mode 100644 (file)
index 0000000..1567e6b
--- /dev/null
@@ -0,0 +1,49 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-wait-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 23
+> [0.000000] [mc_global/INFO] Visited states = 23
+> [0.000000] [mc_global/INFO] Executed transitions = 22
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-wait-deadlock2.c b/teshsuite/smpi/isp/umpire/any_src-wait-deadlock2.c
new file mode 100644 (file)
index 0000000..40d3ccd
--- /dev/null
@@ -0,0 +1,78 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int i;
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+      printf("Proc 0:  Request number - %d\n",req);
+      
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+       
+      MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&req, &status);
+      printf("Proc 0:  Request number after wait test- %d\n",req);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+      printf("Proc 1:  Request number - %d\n",req);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&req, &status);
+      printf("Proc 1:  Request number after wait test- %d\n",req);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock.c b/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock.c
new file mode 100644 (file)
index 0000000..2468637
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 2, 2, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 2, MPI_COMM_WORLD, statuses);
+
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.c b/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.c
new file mode 100644 (file)
index 0000000..fb2fdef
--- /dev/null
@@ -0,0 +1,67 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.tesh b/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.tesh
new file mode 100644 (file)
index 0000000..9ae4cbe
--- /dev/null
@@ -0,0 +1,52 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitall-deadlock2
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 26
+> [0.000000] [mc_global/INFO] Visited states = 26
+> [0.000000] [mc_global/INFO] Executed transitions = 25
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.c b/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.c
new file mode 100644 (file)
index 0000000..64591d6
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 1's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.tesh b/teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.tesh
new file mode 100644 (file)
index 0000000..173b558
--- /dev/null
@@ -0,0 +1,55 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitall-deadlock3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 29
+> [0.000000] [mc_global/INFO] Visited states = 29
+> [0.000000] [mc_global/INFO] Executed transitions = 28
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.c b/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.c
new file mode 100644 (file)
index 0000000..9bf356e
--- /dev/null
@@ -0,0 +1,66 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int done;
+  MPI_Status status;
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitany (2, reqs, &done, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.tesh b/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.tesh
new file mode 100644 (file)
index 0000000..5a912d8
--- /dev/null
@@ -0,0 +1,50 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitany-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 24
+> [0.000000] [mc_global/INFO] Visited states = 24
+> [0.000000] [mc_global/INFO] Executed transitions = 23
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.c b/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.c
new file mode 100644 (file)
index 0000000..5db5992
--- /dev/null
@@ -0,0 +1,80 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int done;
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitany (2, reqs, &done, statuses);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&reqs[(done + 1) % 2], statuses);
+    }
+  else if (rank == 2)
+    {
+    //  sleep (60);      
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.tesh b/teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.tesh
new file mode 100644 (file)
index 0000000..fa30aa0
--- /dev/null
@@ -0,0 +1,55 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitany-deadlock2
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 29
+> [0.000000] [mc_global/INFO] Visited states = 29
+> [0.000000] [mc_global/INFO] Executed transitions = 28
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-cart_create.c b/teshsuite/smpi/isp/umpire/basic-deadlock-cart_create.c
new file mode 100644 (file)
index 0000000..145f900
--- /dev/null
@@ -0,0 +1,86 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define TWOD     2
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm comm;
+  MPI_Group world_group, dgroup;
+  int *granks;
+  int dims[TWOD], periods[TWOD];
+  int drank, dnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 4) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* create a 2 X nprocs/2 torus topology, allow reordering */
+    dims[0] = 2;
+    dims[1] = nprocs/2;
+    periods[0] = periods[1] = 1;
+    MPI_Cart_create (MPI_COMM_WORLD, TWOD, dims, periods, 1, &comm);
+
+    if (comm != MPI_COMM_NULL) {
+      MPI_Comm_size (comm, &dnprocs);
+      MPI_Comm_rank (comm, &drank);
+
+      if (dnprocs > 1) {
+       if (drank == 0) {
+         memset (buf0, 0, buf_size);
+
+         MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+       
+         MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+       }
+       else if (drank == 1) {
+         memset (buf1, 1, buf_size);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+       }
+      }
+      else {
+       printf ("(%d) Derived communicator too small (size = %d)\n",
+               rank, dnprocs);
+      }
+
+      MPI_Comm_free (&comm);
+    }
+    else {
+      printf ("(%d) Got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-cart_sub.c b/teshsuite/smpi/isp/umpire/basic-deadlock-cart_sub.c
new file mode 100644 (file)
index 0000000..0e15d1f
--- /dev/null
@@ -0,0 +1,99 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define TWOD     2
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, comm;
+  MPI_Group world_group, dgroup;
+  int *granks;
+  int dims[TWOD], periods[TWOD], remain_dims[TWOD];
+  int drank, dnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 4) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make cartesian communicator temporarily... */
+    /* create a 2 X nprocs/2 torus topology, allow reordering */
+    dims[0] = 2;
+    dims[1] = nprocs/2;
+    periods[0] = periods[1] = 1;
+    MPI_Cart_create (MPI_COMM_WORLD, TWOD, dims, periods, 1, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      /* create 2 1 X nprocs/2 topologies... */
+      remain_dims[0] = 0;
+      remain_dims[1] = 1;
+      MPI_Cart_sub (temp, remain_dims, &comm);
+      /* free up temporarily created cartesian communicator... */
+      MPI_Comm_free (&temp);
+    }
+    else {
+      comm = MPI_COMM_NULL;
+    }
+
+    if (comm != MPI_COMM_NULL) {
+      MPI_Comm_size (comm, &dnprocs);
+      MPI_Comm_rank (comm, &drank);
+
+      if (dnprocs > 1) {
+       if (drank == 0) {
+         memset (buf0, 0, buf_size);
+
+         MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+       
+         MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+       }
+       else if (drank == 1) {
+         memset (buf1, 1, buf_size);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+       }
+      }
+      else {
+       printf ("(%d) Derived communicator too small (size = %d)\n",
+               rank, dnprocs);
+      }
+
+      MPI_Comm_free (&comm);
+    }
+    else {
+      printf ("(%d) Got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.c b/teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.c
new file mode 100644 (file)
index 0000000..0c75f1f
--- /dev/null
@@ -0,0 +1,91 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm comm;
+  MPI_Group world_group, dgroup;
+  int *granks;
+  int i, drank, dnprocs, newsize;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    MPI_Comm_group (MPI_COMM_WORLD, &world_group);
+    if (nprocs % 2)
+      newsize = (nprocs/2) + 1;
+    else
+      newsize = nprocs/2;
+    granks = (int *) malloc (sizeof(int) * (newsize));
+    for (i = 0; i < newsize; i++)
+      granks [i] = 2 * i;
+    MPI_Group_incl (world_group, newsize, granks, &dgroup);
+    MPI_Comm_create (MPI_COMM_WORLD, dgroup, &comm);
+    MPI_Group_free (&world_group);
+    MPI_Group_free (&dgroup);
+    free (granks);
+
+    if (comm != MPI_COMM_NULL) {
+      MPI_Comm_size (comm, &dnprocs);
+      MPI_Comm_rank (comm, &drank);
+
+      if (dnprocs > 1) {
+       if (drank == 0) {
+         memset (buf0, 0, buf_size);
+
+         MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+       
+         MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+       }
+       else if (drank == 1) {
+         memset (buf1, 1, buf_size);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+       }
+      }
+      else {
+       printf ("(%d) Derived communicator too small (size = %d)\n",
+               rank, dnprocs);
+      }
+
+      MPI_Comm_free (&comm);
+    }
+    else {
+      printf ("(%d) Got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.tesh b/teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.tesh
new file mode 100644 (file)
index 0000000..6e0bd50
--- /dev/null
@@ -0,0 +1,50 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock-comm_create
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 23
+> [0.000000] [mc_global/INFO] Visited states = 23
+> [0.000000] [mc_global/INFO] Executed transitions = 22
+> (1) Got MPI_COMM_NULL
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.c b/teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.c
new file mode 100644 (file)
index 0000000..d71c510
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm comm;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    MPI_Comm_dup (MPI_COMM_WORLD, &comm);
+    
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+      
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+    }
+
+    MPI_Comm_free (&comm);
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.tesh b/teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.tesh
new file mode 100644 (file)
index 0000000..585b2cf
--- /dev/null
@@ -0,0 +1,49 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock-comm_dup
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 23
+> [0.000000] [mc_global/INFO] Visited states = 23
+> [0.000000] [mc_global/INFO] Executed transitions = 22
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.c b/teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.c
new file mode 100644 (file)
index 0000000..89828d4
--- /dev/null
@@ -0,0 +1,77 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm comm;
+  int drank, dnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &comm);
+    
+    if (comm != MPI_COMM_NULL) {
+      MPI_Comm_size (comm, &dnprocs);
+      MPI_Comm_rank (comm, &drank);
+
+      if (dnprocs > 1) {
+       if (drank == 0) {
+         memset (buf0, 0, buf_size);
+
+         MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+       
+         MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+       }
+       else if (drank == 1) {
+         memset (buf1, 1, buf_size);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+       }
+      }
+      else {
+       printf ("(%d) Derived communicator too small (size = %d)\n",
+               rank, dnprocs);
+      }
+
+      MPI_Comm_free (&comm);
+    }
+    else {
+      printf ("(%d) Got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.tesh b/teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.tesh
new file mode 100644 (file)
index 0000000..13b94e3
--- /dev/null
@@ -0,0 +1,62 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock-comm_split
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 35
+> [0.000000] [mc_global/INFO] Visited states = 35
+> [0.000000] [mc_global/INFO] Executed transitions = 34
+> (1) Derived communicator too small (size = 1)
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-graph_create.c b/teshsuite/smpi/isp/umpire/basic-deadlock-graph_create.c
new file mode 100644 (file)
index 0000000..2017b4c
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define GRAPH_SZ 4
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm comm;
+  int drank, dnprocs;
+  int graph_index[] = { 2, 3, 4, 6 };
+  int graph_edges[] = { 1, 3, 0, 3, 0, 2 };
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 4) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* create the graph on p.268 MPI: The Complete Reference... */
+    MPI_Graph_create (MPI_COMM_WORLD, GRAPH_SZ, 
+                     graph_index, graph_edges, 1, &comm);
+
+    if (comm != MPI_COMM_NULL) {
+      MPI_Comm_size (comm, &dnprocs);
+      MPI_Comm_rank (comm, &drank);
+
+      if (dnprocs > 1) {
+       if (drank == 0) {
+         memset (buf0, 0, buf_size);
+
+         MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+       
+         MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+       }
+       else if (drank == 1) {
+         memset (buf1, 1, buf_size);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+       }
+      }
+      else {
+       printf ("(%d) Derived communicator too small (size = %d)\n",
+               rank, dnprocs);
+      }
+
+      MPI_Comm_free (&comm);
+    }
+    else {
+      printf ("(%d) Got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c b/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c
new file mode 100644 (file)
index 0000000..78beb4f
--- /dev/null
@@ -0,0 +1,93 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, intercomm;
+  int drank, dnprocs, rleader, rnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      MPI_Comm_free (&temp);
+      
+      if (intercomm != MPI_COMM_NULL) {
+       MPI_Comm_size (intercomm, &dnprocs);
+       MPI_Comm_rank (intercomm, &drank);
+       MPI_Comm_remote_size (intercomm, &rnprocs);
+     
+       if (rnprocs > drank) {
+         if (rank % 2) {
+           memset (buf1, 1, buf_size);
+
+           MPI_Recv (buf0, buf_size, MPI_INT, drank, 0, intercomm, &status);
+
+           MPI_Send (buf1, buf_size, MPI_INT, drank, 0, intercomm);
+         }
+         else {
+           memset (buf0, 0, buf_size);
+           
+           MPI_Recv (buf1, buf_size, MPI_INT, drank, 0, intercomm, &status);
+       
+           MPI_Send (buf0, buf_size, MPI_INT, drank, 0, intercomm);
+         }
+       }
+       else {
+         printf ("(%d) Intercomm too small (lrank = %d; remote size = %d)\n",
+                 rank, drank, rnprocs);
+       }
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_merge.c b/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_merge.c
new file mode 100644 (file)
index 0000000..e936120
--- /dev/null
@@ -0,0 +1,103 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm comm, temp, intercomm;
+  int drank, dnprocs, rleader;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      MPI_Comm_free (&temp);
+      
+      if (intercomm == MPI_COMM_NULL) {
+       printf ("(%d) MPI_Intercomm_Create returned MPI_COMM_NULL\n", rank);
+       printf ("(%d) Aborting...\n", rank);
+       MPI_Abort (MPI_COMM_WORLD, 666);
+       exit (666);
+      }
+
+      MPI_Intercomm_merge (intercomm, rank % 2, &comm);
+
+      MPI_Comm_free (&intercomm);
+
+      if (comm != MPI_COMM_NULL) {
+       MPI_Comm_size (comm, &dnprocs);
+       MPI_Comm_rank (comm, &drank);
+      
+       if (dnprocs > 1) {
+         if (drank == 0) {
+           memset (buf0, 0, buf_size);
+           
+           MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+       
+           MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+         }
+         else if (drank == 1) {
+           memset (buf1, 1, buf_size);
+
+           MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+           MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+         }
+       }
+       else {
+         printf ("(%d) Derived communicator too small (size = %d)\n",
+                 rank, dnprocs);
+       }
+
+       MPI_Comm_free (&comm);
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock.c b/teshsuite/smpi/isp/umpire/basic-deadlock.c
new file mode 100644 (file)
index 0000000..60a3f6b
--- /dev/null
@@ -0,0 +1,58 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock.tesh b/teshsuite/smpi/isp/umpire/basic-deadlock.tesh
new file mode 100644 (file)
index 0000000..9f1e0ce
--- /dev/null
@@ -0,0 +1,49 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 23
+> [0.000000] [mc_global/INFO] Visited states = 23
+> [0.000000] [mc_global/INFO] Executed transitions = 22
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/bcast-deadlock.c b/teshsuite/smpi/isp/umpire/bcast-deadlock.c
new file mode 100644 (file)
index 0000000..eb1d7ba
--- /dev/null
@@ -0,0 +1,43 @@
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int rank;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    memset (buf0, 0, buf_size);
+    MPI_Bcast (buf0, buf_size, MPI_INT, 1, MPI_COMM_WORLD);    
+    MPI_Bcast (buf0, buf_size, MPI_INT, 0, MPI_COMM_WORLD);    
+  }
+  else {
+    if (rank == 1)
+      memset (buf1, 1, buf_size);
+
+    MPI_Bcast (buf0, buf_size, MPI_INT, 0, MPI_COMM_WORLD);    
+    MPI_Bcast (buf0, buf_size, MPI_INT, 1, MPI_COMM_WORLD);    
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/bcast-deadlock.tesh b/teshsuite/smpi/isp/umpire/bcast-deadlock.tesh
new file mode 100644 (file)
index 0000000..b3908f9
--- /dev/null
@@ -0,0 +1,30 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/bcast-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 4
+> [0.000000] [mc_global/INFO] Visited states = 4
+> [0.000000] [mc_global/INFO] Executed transitions = 3
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/change-send-buffer-exhaustive.c b/teshsuite/smpi/isp/umpire/change-send-buffer-exhaustive.c
new file mode 100644 (file)
index 0000000..3b1945d
--- /dev/null
@@ -0,0 +1,284 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+/* change-send-buffer-exhaustive.c -- do lots pt-2-pt ops with */
+/*                                    send buffer overwrite errors*/
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/change-send-buffer-exhaustive.c,v 1.5 2002/10/24 17:04:54 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define BUF_SIZE 128
+#define NUM_SEND_TYPES 8
+#define NUM_PERSISTENT_SEND_TYPES 4
+#define NUM_BSEND_TYPES 2
+#define NUM_COMPLETION_MECHANISMS 8
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int bbuf[(BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES];
+  int buf[BUF_SIZE * 2 * NUM_SEND_TYPES];
+  int i, j, k, at_size, send_t_number, index, outcount, total, flag;
+  int num_errors, error_count, indices[2 * NUM_SEND_TYPES];
+  MPI_Request aReq[2 * NUM_SEND_TYPES];
+  MPI_Status aStatus[2 * NUM_SEND_TYPES];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Buffer_attach (bbuf, sizeof(int) * 
+                    (BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    send_t_number = NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES;
+
+    MPI_Send_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Send_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+    send_t_number++;
+
+    MPI_Bsend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Bsend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+
+    send_t_number++;
+
+    MPI_Rsend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Rsend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+    send_t_number++;
+
+    MPI_Ssend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Ssend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+  }
+
+  for (k = 0; k < (NUM_COMPLETION_MECHANISMS * 2); k++) {
+    if (rank == 0) {
+      /* initialize all of the send buffers */
+      for (j = 0; j < NUM_SEND_TYPES; j++) {
+       for (i = 0; i < BUF_SIZE; i++) {
+         buf[2 * j * BUF_SIZE + i] = i;
+         buf[((2 * j + 1) * BUF_SIZE) + i] = BUF_SIZE - 1 - i;
+       }
+      }
+    }
+    else if (rank == 1) {
+      /* zero out all of the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2 * NUM_SEND_TYPES);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    if (rank == 0) {
+      /* set up transient sends... */
+      send_t_number = 0;
+    
+      MPI_Isend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+      MPI_Isend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                comm, &aReq[send_t_number * 2 + 1]);
+
+      send_t_number++;
+      
+      MPI_Ibsend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                 1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+      MPI_Ibsend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                 BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                 comm, &aReq[send_t_number * 2 + 1]);
+
+      send_t_number++;
+
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+
+      MPI_Irsend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                 1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+      MPI_Irsend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                 BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                 comm, &aReq[send_t_number * 2 + 1]);
+
+      send_t_number++;
+
+      MPI_Issend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                 1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+      MPI_Issend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                 BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                 comm, &aReq[send_t_number * 2 + 1]);
+
+      /* just to be paranoid */
+      send_t_number++;
+      assert (send_t_number == NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES);
+
+      /* start the persistent sends... */
+      if (k % 2) {
+       MPI_Startall (NUM_PERSISTENT_SEND_TYPES * 2, &aReq[2 * send_t_number]);
+      }
+      else {
+       for (j = 0; j < NUM_PERSISTENT_SEND_TYPES * 2; j++) {
+         MPI_Start (&aReq[2 * send_t_number + j]);
+       }
+      }
+    
+      /* NOTE: Changing the send buffer of a Bsend is NOT an error... */
+      for (j = 0; j < NUM_SEND_TYPES; j++) {
+       /* muck the buffers */
+       buf[j * 2 * BUF_SIZE + (BUF_SIZE >> 1)] = BUF_SIZE;
+      }
+
+      printf ("USER MSG: 6 change send buffer errors in iteration #%d:\n", k);
+
+      /* complete the sends */
+      switch (k/2) {
+      case 0:
+       /* use MPI_Wait */
+       for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+         MPI_Wait (&aReq[j], &aStatus[j]);
+       }
+       break;
+       
+      case 1:
+       /* use MPI_Waitall */
+       MPI_Waitall (NUM_SEND_TYPES * 2, aReq, aStatus);
+       break;
+
+      case 2:
+       /* use MPI_Waitany */
+       for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+         MPI_Waitany (NUM_SEND_TYPES * 2, aReq, &index, aStatus);
+       }
+
+       break;
+       
+      case 3:
+       /* use MPI_Waitsome */
+       total = 0;
+       while (total < NUM_SEND_TYPES * 2) {
+         MPI_Waitsome (NUM_SEND_TYPES * 2, aReq, &outcount, indices, aStatus);
+
+         total += outcount;
+       }
+
+       break;
+
+      case 4:
+       /* use MPI_Test */
+       for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+         flag = 0;
+
+         while (!flag) {
+           MPI_Test (&aReq[j], &flag, &aStatus[j]);
+         }
+       }
+
+       break;
+       
+      case 5:
+       /* use MPI_Testall */
+       flag = 0;
+       while (!flag) {
+         MPI_Testall (NUM_SEND_TYPES * 2, aReq, &flag, aStatus);
+       }
+
+       break;
+
+      case 6:
+       /* use MPI_Testany */
+       for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+         flag = 0;
+         while (!flag) {
+           MPI_Testany (NUM_SEND_TYPES * 2, aReq, &index, &flag, aStatus);
+         }
+       }
+
+       break;
+       
+      case 7:
+       /* use MPI_Testsome */
+       total = 0;
+       while (total < NUM_SEND_TYPES * 2) {
+         outcount = 0;
+
+         while (!outcount) {
+           MPI_Testsome (NUM_SEND_TYPES * 2, aReq, 
+                         &outcount, indices, aStatus);
+         }
+
+         total += outcount;
+       }
+
+       break;
+
+      default:
+       assert (0);
+       break;
+      }
+    }
+    else if (rank == 1) {
+      /* set up receives for all of the sends */
+      for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+       MPI_Irecv (&buf[j * BUF_SIZE], BUF_SIZE, 
+                  MPI_INT, 0, j, comm, &aReq[j]);
+      }
+
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+
+      /* complete all of the receives... */
+      MPI_Waitall (NUM_SEND_TYPES * 2, aReq, aStatus);
+    }
+    else {
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent requests */
+    for (i = 2* (NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES);
+        i < 2 * NUM_SEND_TYPES; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+  MPI_Buffer_detach (bbuf, &at_size);
+
+  assert (at_size == 
+         sizeof(int) * (BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/change-send-buffer-type-exhaustive.c b/teshsuite/smpi/isp/umpire/change-send-buffer-type-exhaustive.c
new file mode 100644 (file)
index 0000000..06735db
--- /dev/null
@@ -0,0 +1,747 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive-with-isends.c -- send with weird types */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/change-send-buffer-type-exhaustive.c,v 1.1 2002/06/08 09:11:34 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+typedef struct _test_basic_struct_t
+{
+  double the_double;
+  char the_char;
+}
+test_basic_struct_t;
+
+
+typedef struct _test_lb_ub_struct_t
+{
+  double dontsend_double1;
+  double the_double_to_send;
+  char   the_chars[8]; /* only send the first one... */
+  double dontsend_double2;
+}
+test_lb_ub_struct_t;
+
+
+#define TYPE_CONSTRUCTOR_COUNT 7
+#define MSG_COUNT              3
+
+/*
+*/
+#define RUN_TYPE_STRUCT
+#define RUN_TYPE_VECTOR
+#define RUN_TYPE_HVECTOR
+#define RUN_TYPE_INDEXED
+#define RUN_TYPE_HINDEXED
+#define RUN_TYPE_CONTIGUOUS
+#define RUN_TYPE_STRUCT_LB_UB
+/*
+*/
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j, k, basic_extent;
+  int blocklens[4], displs[4];
+  MPI_Datatype structtypes[4]; 
+  MPI_Datatype newtype[TYPE_CONSTRUCTOR_COUNT]; 
+  MPI_Request aReq[TYPE_CONSTRUCTOR_COUNT];
+  MPI_Status aStatus[TYPE_CONSTRUCTOR_COUNT];
+#ifdef RUN_TYPE_STRUCT
+  test_basic_struct_t struct_buf[MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_VECTOR
+  test_basic_struct_t vector_buf[7*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_HVECTOR
+  test_basic_struct_t hvector_buf[44*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_INDEXED
+  test_basic_struct_t indexed_buf[132*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_HINDEXED
+  test_basic_struct_t hindexed_buf[272*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_CONTIGUOUS
+  test_basic_struct_t contig_buf[2720*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_STRUCT
+  test_lb_ub_struct_t struct_lb_ub_send_buf[MSG_COUNT];
+  test_basic_struct_t struct_lb_ub_recv_buf[MSG_COUNT];
+#endif
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  structtypes[0] = MPI_DOUBLE;
+  structtypes[1] = MPI_CHAR;
+  blocklens[0] = blocklens[1] = 1;
+  displs[0] = 0;
+  displs[1] = sizeof(double);
+
+  MPI_Barrier (comm);
+
+  /* create the types */
+  MPI_Type_struct (2, blocklens, displs, structtypes, &newtype[0]);
+  
+  MPI_Type_extent (newtype[0], &basic_extent);
+  if (basic_extent != sizeof (test_basic_struct_t)) {
+    fprintf (stderr, "(%d): Unexpect extent for struct\n");
+    MPI_Abort (MPI_COMM_WORLD, 666);
+  }
+
+  MPI_Type_vector (2, 3, 4, newtype[0], &newtype[1]);
+  MPI_Type_hvector (3, 2, 15 * sizeof (test_basic_struct_t), 
+                   newtype[1], &newtype[2]);
+  displs[1] = 2;
+  MPI_Type_indexed (2, blocklens, displs, newtype[2], &newtype[3]);
+  displs[1] = 140 * sizeof (test_basic_struct_t);
+  MPI_Type_hindexed (2, blocklens, displs, newtype[3], &newtype[4]);
+  MPI_Type_contiguous (10, newtype[4], &newtype[5]);
+
+  structtypes[0] = MPI_LB;
+  structtypes[1] = MPI_DOUBLE;
+  structtypes[2] = MPI_CHAR;
+  structtypes[3] = MPI_UB;
+  blocklens[0] = blocklens[1] = blocklens[2] = blocklens[3] = 1;
+  displs[0] = -sizeof(double);
+  displs[1] = 0;
+  displs[2] = sizeof(double);
+  displs[3] = 2*sizeof(double)+8*sizeof(char);
+
+  MPI_Type_struct (4, blocklens, displs, structtypes, &newtype[6]);
+
+#ifdef RUN_TYPE_STRUCT 
+  MPI_Type_commit (&newtype[0]);
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+  MPI_Type_commit (&newtype[1]);
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+  MPI_Type_commit (&newtype[2]);
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+  MPI_Type_commit (&newtype[3]);
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+  MPI_Type_commit (&newtype[4]);
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+  MPI_Type_commit (&newtype[5]);
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB 
+  MPI_Type_commit (&newtype[6]);
+#endif
+
+  if (rank == 0) {
+    /* initialize buffers */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      struct_buf[i].the_double = 1.0;
+      struct_buf[i].the_char = 'a';
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      for (j = 0; j < 7; j++) {
+       vector_buf[i*7 + j].the_double = 1.0;
+       vector_buf[i*7 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      for (j = 0; j < 44; j++) {
+       hvector_buf[i*44 + j].the_double = 1.0;
+       hvector_buf[i*44 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      for (j = 0; j < 132; j++) {
+       indexed_buf[i*132 + j].the_double = 1.0;
+       indexed_buf[i*132 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      for (j = 0; j < 272; j++) {
+       hindexed_buf[i*272 + j].the_double = 1.0;
+       hindexed_buf[i*272 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 2720; j++) {
+       contig_buf[i*2720 + j].the_double = 1.0;
+       contig_buf[i*2720 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      struct_lb_ub_send_buf[i].dontsend_double1 = 1.0;
+      struct_lb_ub_send_buf[i].the_double_to_send = 1.0;
+      for (j = 0; j < 8; j++)
+       struct_lb_ub_send_buf[i].the_chars[j] = 'a';
+      struct_lb_ub_send_buf[i].dontsend_double2 = 1.0;
+#endif
+    }
+       
+    /* set up the sends */
+#ifdef RUN_TYPE_STRUCT
+    MPI_Isend (struct_buf, MSG_COUNT, newtype[0], 1, 0, comm, &aReq[0]);
+#else
+    aReq[0] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+    MPI_Isend (vector_buf, MSG_COUNT, newtype[1], 1, 1, comm, &aReq[1]);
+#else
+    aReq[1] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+    MPI_Isend (hvector_buf, MSG_COUNT, newtype[2], 1, 2, comm, &aReq[2]);
+#else
+    aReq[2] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+    MPI_Isend (indexed_buf, MSG_COUNT, newtype[3], 1, 3, comm, &aReq[3]);
+#else
+    aReq[3] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+    MPI_Isend (hindexed_buf, MSG_COUNT, newtype[4], 1, 4, comm, &aReq[4]);
+#else
+    aReq[4] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+    MPI_Isend (contig_buf, MSG_COUNT, newtype[5], 1, 5, comm, &aReq[5]);
+#else
+    aReq[5] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_STRUCT
+    MPI_Isend (&(struct_lb_ub_send_buf[0].the_double_to_send), 
+              MSG_COUNT, newtype[6], 1, 6, comm, &aReq[6]);
+#else
+    aReq[6] = MPI_REQUEST_NULL;
+#endif
+  }
+  else if (rank == 1) {
+    /* initialize buffers */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      struct_buf[i].the_double = 2.0;
+      struct_buf[i].the_char = 'b';
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      for (j = 0; j < 7; j++) {
+       vector_buf[i*7 + j].the_double = 2.0;
+       vector_buf[i*7 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      for (j = 0; j < 44; j++) {
+       hvector_buf[i*44 + j].the_double = 2.0;
+       hvector_buf[i*44 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      for (j = 0; j < 132; j++) {
+       indexed_buf[i*132 + j].the_double = 2.0;
+       indexed_buf[i*132 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      for (j = 0; j < 272; j++) {
+       hindexed_buf[i*272 + j].the_double = 2.0;
+       hindexed_buf[i*272 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 2720; j++) {
+       contig_buf[i*2720 + j].the_double = 2.0;
+       contig_buf[i*2720 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      struct_lb_ub_recv_buf[i].the_double = 2.0;
+      struct_lb_ub_recv_buf[i].the_char = 'b';
+#endif
+    }
+
+    /* set up the receives... */
+#ifdef RUN_TYPE_STRUCT
+    MPI_Irecv (struct_buf, MSG_COUNT, newtype[0], 0, 0, comm, &aReq[0]);
+#else
+    aReq[0] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+    MPI_Irecv (vector_buf, MSG_COUNT, newtype[1], 0, 1, comm, &aReq[1]);
+#else
+    aReq[1] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+    MPI_Irecv (hvector_buf, MSG_COUNT, newtype[2], 0, 2, comm, &aReq[2]);
+#else
+    aReq[2] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+    MPI_Irecv (indexed_buf, MSG_COUNT, newtype[3], 0, 3, comm, &aReq[3]);
+#else
+    aReq[3] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+    MPI_Irecv (hindexed_buf, MSG_COUNT, newtype[4], 0, 4, comm, &aReq[4]);
+#else
+    aReq[4] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+    MPI_Irecv (contig_buf, MSG_COUNT, newtype[5], 0, 5, comm, &aReq[5]);
+#else
+    aReq[5] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+    MPI_Irecv (struct_lb_ub_recv_buf, 
+              MSG_COUNT, newtype[0], 0, 6, comm, &aReq[6]);
+#else
+    aReq[6] = MPI_REQUEST_NULL;
+#endif
+  }
+
+  if (rank == 0) {
+    /* muck something in each that is not in the holes... */
+    /* see below to see where the holes are... */
+    /* don't use the first one to test handling of count arg */
+    i = (MSG_COUNT > 1) ? 1 : 0;
+
+#ifdef RUN_TYPE_STRUCT
+    /* muck the char member... */
+    struct_buf[i].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+    /* muck the element after the hole due to stride in vector... */
+    vector_buf[i*7 + 4].the_double = 3.0;
+    vector_buf[i*7 + 4].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+    /* muck the element after the hole due to stride in hvector... */
+    hvector_buf[i*44 + 15].the_double = 3.0;
+    hvector_buf[i*44 + 15].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+    /* muck the element after the hole due to indexed displacements... */
+    indexed_buf[i*132 + 44 + 44].the_double = 3.0;
+    indexed_buf[i*132 + 44 + 44].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+    /* muck the element after the hole due to hindexed displacements... */
+    hindexed_buf[i*272 + 132 + 8].the_double = 3.0;
+    hindexed_buf[i*272 + 132 + 8].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+    /* muck element after the hole due to hindex displacements, hindex 2... */
+    contig_buf[i*2720 + 272 + 140].the_double = 3.0;
+    contig_buf[i*2720 + 272 + 140].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+    /* muck the double member and char member being sent... */
+    struct_lb_ub_send_buf[i].the_double_to_send = 3.0;
+    struct_lb_ub_send_buf[i].the_chars[0] = 'c';
+#endif
+  }
+       
+  if ((rank == 0) || (rank == 1))
+    /* wait on everything... */
+    MPI_Waitall (TYPE_CONSTRUCTOR_COUNT, aReq, aStatus);
+
+  if (rank == 1) {
+    /* check the holes... */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      /* no holes in struct_buf... */
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      /* one hole in vector_buf... */
+      assert ((vector_buf[i*7 + 3].the_double == 2.0) &&
+             (vector_buf[i*7 + 3].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      /* eight holes in hvector_buf... */
+      /* hole in first vector, first block... */
+      assert ((hvector_buf[i*44 + 3].the_double == 2.0) && 
+             (hvector_buf[i*44 + 3].the_char == 'b'));
+      /* hole in second vector, first block... */
+      assert ((hvector_buf[i*44 + 10].the_double == 2.0) &&
+             (hvector_buf[i*44 + 10].the_char == 'b'));
+      /* hole in between first and second vector blocks... */
+      assert ((hvector_buf[i*44 + 14].the_double == 2.0) &&
+             (hvector_buf[i*44 + 14].the_char == 'b'));
+      /* hole in first vector, second block... */
+      assert ((hvector_buf[i*44 + 18].the_double == 2.0) &&
+             (hvector_buf[i*44 + 18].the_char == 'b'));
+      /* hole in second vector, second block... */
+      assert ((hvector_buf[i*44 + 25].the_double == 2.0) &&
+             (hvector_buf[i*44 + 25].the_char == 'b'));
+      /* hole in between second and third vector blocks... */
+      assert ((hvector_buf[i*44 + 29].the_double == 2.0) &&
+             (hvector_buf[i*44 + 29].the_char == 'b'));
+      /* hole in first vector, third block... */
+      assert ((hvector_buf[i*44 + 33].the_double == 2.0) &&
+             (hvector_buf[i*44 + 33].the_char == 'b'));
+      /* hole in second vector, third block... */
+      assert ((hvector_buf[i*44 + 40].the_double == 2.0) &&
+             (hvector_buf[i*44 + 40].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      /* sixty holes in indexed_buf... */
+      /* hole in first vector, first block, first hvector... */
+      assert ((indexed_buf[i*132 + 3].the_double == 2.0) &&
+             (indexed_buf[i*132 + 3].the_char == 'b'));
+      /* hole in second vector, first block, first hvector... */
+      assert ((indexed_buf[i*132 + 10].the_double == 2.0) &&
+             (indexed_buf[i*132 + 10].the_char == 'b'));
+      /* hole in between first and second vector blocks, first hvector... */
+      assert ((indexed_buf[i*132 + 14].the_double == 2.0) &&
+             (indexed_buf[i*132 + 14].the_char == 'b'));
+      /* hole in first vector, second block, first hvector... */
+      assert ((indexed_buf[i*132 + 18].the_double == 2.0) &&
+             (indexed_buf[i*132 + 18].the_char == 'b'));
+      /* hole in second vector, second block, first hvector... */
+      assert ((indexed_buf[i*132 + 25].the_double == 2.0) &&
+             (indexed_buf[i*132 + 25].the_char == 'b'));
+      /* hole in between second and third vector blocks, first hvector... */
+      assert ((indexed_buf[i*132 + 29].the_double == 2.0) &&
+             (indexed_buf[i*132 + 29].the_char == 'b'));
+      /* hole in first vector, third block, first hvector... */
+      assert ((indexed_buf[i*132 + 33].the_double == 2.0) &&
+             (indexed_buf[i*132 + 33].the_char == 'b'));
+      /* hole in second vector, third block, first hvector... */
+      assert ((indexed_buf[i*132 + 40].the_double == 2.0) &&
+             (indexed_buf[i*132 + 40].the_char == 'b'));
+      /* hole in between hvectors... */
+      for (j = 0; j < 44; j++) {
+       assert ((indexed_buf[i*132 + 44 + j].the_double == 2.0) &&
+               (indexed_buf[i*132 + 44 + j].the_char == 'b'));
+      }
+      /* hole in first vector, first block, second hvector... */
+      assert ((indexed_buf[i*132 + 3 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 3 + 88].the_char == 'b'));
+      /* hole in second vector, first block, second hvector... */
+      assert ((indexed_buf[i*132 + 10 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 10 + 88].the_char == 'b'));
+      /* hole in between first and second vector blocks, second hvector... */
+      assert ((indexed_buf[i*132 + 14 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 14 + 88].the_char == 'b'));
+      /* hole in first vector, second block, second hvector... */
+      assert ((indexed_buf[i*132 + 18 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 18 + 88].the_char == 'b'));
+      /* hole in second vector, second block, second hvector... */
+      assert ((indexed_buf[i*132 + 25 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 25 + 88].the_char == 'b'));
+      /* hole in between second and third vector blocks, second hvector... */
+      assert ((indexed_buf[i*132 + 29 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 29 + 88].the_char == 'b'));
+      /* hole in first vector, third block, second hvector... */
+      assert ((indexed_buf[i*132 + 33 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 33 + 88].the_char == 'b'));
+      /* hole in second vector, third block, second hvector... */
+      assert ((indexed_buf[i*132 + 40 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 40 + 88].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      /* one hundred twenty eight holes in hindexed_buf... */
+      /* hole in first vector, first block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 3].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3].the_char == 'b'));
+      /* hole in second vector, first block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 10].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 1, index 1... */
+      assert ((hindexed_buf[i*272 + 14].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14].the_char == 'b'));
+      /* hole in first vector, second block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 18].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18].the_char == 'b'));
+      /* hole in second vector, second block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 25].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 1, index 1... */
+      assert ((hindexed_buf[i*272 + 29].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29].the_char == 'b'));
+      /* hole in first vector, third block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 33].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33].the_char == 'b'));
+      /* hole in second vector, third block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 40].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40].the_char == 'b'));
+      /* hole in between hvectors, index 1... */
+      for (j = 0; j < 44; j++) {
+       assert ((hindexed_buf[i*272 + 44 + j].the_double == 2.0) &&
+               (hindexed_buf[i*272 + 44 + j].the_char == 'b'));
+      }
+      /* hole in first vector, first block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 3 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3 + 88].the_char == 'b'));
+      /* hole in second vector, first block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 10 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10 + 88].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 2, index 1... */
+      assert ((hindexed_buf[i*272 + 14 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14 + 88].the_char == 'b'));
+      /* hole in first vector, second block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 18 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18 + 88].the_char == 'b'));
+      /* hole in second vector, second block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 25 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25 + 88].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 2, index 1... */
+      assert ((hindexed_buf[i*272 + 29 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29 + 88].the_char == 'b'));
+      /* hole in first vector, third block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 33 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33 + 88].the_char == 'b'));
+      /* hole in second vector, third block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 40 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40 + 88].the_char == 'b'));
+      /* indexed hole... */
+      for (j = 0; j < 8; j++) {
+       assert ((hindexed_buf[i*272 + 132 + j].the_double == 2.0) &&
+               (hindexed_buf[i*272 + 132 + j].the_char == 'b'));
+      }
+      /* hole in first vector, first block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 3 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3 + 140].the_char == 'b'));
+      /* hole in second vector, first block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 10 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10 + 140].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 1, index 2... */
+      assert ((hindexed_buf[i*272 + 14 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14 + 140].the_char == 'b'));
+      /* hole in first vector, second block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 18 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18 + 140].the_char == 'b'));
+      /* hole in second vector, second block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 25 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25 + 140].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 1, index 2... */
+      assert ((hindexed_buf[i*272 + 29 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29 + 140].the_char == 'b'));
+      /* hole in first vector, third block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 33 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33 + 140].the_char == 'b'));
+      /* hole in second vector, third block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 40 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40 + 140].the_char == 'b'));
+      /* hole in between hvectors, index 2... */
+      for (j = 0; j < 44; j++) {
+       assert ((hindexed_buf[i*272 + 44 + j + 140].the_double == 2.0) &&
+               (hindexed_buf[i*272 + 44 + j + 140].the_char == 'b'));
+      }
+      /* hole in first vector, first block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 3 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3 + 88 + 140].the_char == 'b'));
+      /* hole in second vector, first block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 10 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10 + 88 + 140].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 2, index 2... */
+      assert ((hindexed_buf[i*272 + 14 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14 + 88 + 140].the_char == 'b'));
+      /* hole in first vector, second block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 18 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18 + 88 + 140].the_char == 'b'));
+      /* hole in second vector, second block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 25 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25 + 88 + 140].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 2, index 2... */
+      assert ((hindexed_buf[i*272 + 29 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29 + 88 + 140].the_char == 'b'));
+      /* hole in first vector, third block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 33 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33 + 88 + 140].the_char == 'b'));
+      /* hole in second vector, third block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 40 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40 + 88 + 140].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 10; j++) {
+       /* hole in first vector, first block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 3].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3].the_char == 'b'));
+       /* hole in second vector, first block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 10].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 1, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 14].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14].the_char == 'b'));
+       /* hole in first vector, second block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 18].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18].the_char == 'b'));
+       /* hole in second vector, second block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 25].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 1, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 29].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29].the_char == 'b'));
+       /* hole in first vector, third block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 33].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33].the_char == 'b'));
+       /* hole in second vector, third block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 40].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40].the_char == 'b'));
+       /* hole in between hvectors, index 1... */
+       for (k = 0; k < 44; k++) {
+         assert ((contig_buf[i*2720 + j*272 + 44 + k].the_double == 2.0) &&
+                 (contig_buf[i*2720 + j*272 + 44 + k].the_char == 'b'));
+       }
+       /* hole in first vector, first block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 3 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3 + 88].the_char == 'b'));
+       /* hole in second vector, first block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 10 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10 + 88].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 2, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 14 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14 + 88].the_char == 'b'));
+       /* hole in first vector, second block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 18 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18 + 88].the_char == 'b'));
+       /* hole in second vector, second block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 25 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25 + 88].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 2, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 29 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29 + 88].the_char == 'b'));
+       /* hole in first vector, third block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 33 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33 + 88].the_char == 'b'));
+       /* hole in second vector, third block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 40 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40 + 88].the_char == 'b'));
+       /* indexed hole... */
+       for (k = 0; k < 8; k++) {
+         assert ((contig_buf[i*2720 + j*272 + 132 + k].the_double == 2.0) &&
+                 (contig_buf[i*2720 + j*272 + 132 + k].the_char == 'b'));
+       }
+       /* hole in first vector, first block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 3 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3 + 140].the_char == 'b'));
+       /* hole in second vector, first block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 10 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10 + 140].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 1, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 14 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14 + 140].the_char == 'b'));
+       /* hole in first vector, second block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 18 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18 + 140].the_char == 'b'));
+       /* hole in second vector, second block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 25 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25 + 140].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 1, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 29 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29 + 140].the_char == 'b'));
+       /* hole in first vector, third block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 33 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33 + 140].the_char == 'b'));
+       /* hole in second vector, third block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 40 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40 + 140].the_char == 'b'));
+       /* hole in between hvectors, index 2... */
+       for (k = 0; k < 44; k++) {
+         assert ((contig_buf[i*2720+j*272+44+k+140].the_double == 2.0) &&
+                 (contig_buf[i*2720 +j*272+44+k+140].the_char == 'b'));
+       }
+       /* hole in first vector, first block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+3+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_char == 'b'));
+       /* hole in second vector, first block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+10+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 2, index 2... */
+       assert ((contig_buf[i*2720+j*272+14+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_char == 'b'));
+       /* hole in first vector, second block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+18+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_char == 'b'));
+       /* hole in second vector, second block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+25+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 2, index 2... */
+       assert ((contig_buf[i*2720+j*272+29+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_char == 'b'));
+       /* hole in first vector, third block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+33+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_char == 'b'));
+       /* hole in second vector, third block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+40+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_char == 'b'));
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      /* no holes in struct_lb_ub_recv_buf... */
+#endif
+    }
+  }
+       
+  for (i = 0; i < TYPE_CONSTRUCTOR_COUNT; i++)
+    MPI_Type_free (&newtype[i]);
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/change-send-buffer.c b/teshsuite/smpi/isp/umpire/change-send-buffer.c
new file mode 100644 (file)
index 0000000..5a85ace
--- /dev/null
@@ -0,0 +1,110 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/change-send-buffer.c,v 1.3 2002/07/30 21:34:42 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int tag1 = 0;
+  int tag2 = 0;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[128];
+  int buf1[128];
+  int i;
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+int j, k;
+  for (i = 0; i < 128; i++)
+    {
+      buf0[i] = i;
+      buf1[i] = 127 - i;
+    }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  switch (rank)
+    {
+    case 0:
+       MPI_Isend (buf0, 128, MPI_INT, 1, tag1, comm, &aReq[0]);
+      MPI_Isend (buf1, 128, MPI_INT, 1, tag2, comm, &aReq[1]);
+      /* do some work here */
+
+      buf0[64] = 1000000;
+
+      MPI_Wait (&aReq[0], &aStatus[0]);
+      MPI_Wait (&aReq[1], &aStatus[1]);
+
+      break;
+
+    case 1:
+      MPI_Irecv (buf0, 128, MPI_INT, 0, tag1, comm, &aReq[0]);
+      MPI_Irecv (buf1, 128, MPI_INT, 0, tag2, comm, &aReq[1]);
+      /* do some work here ... */
+      MPI_Wait (&aReq[0], &aStatus[0]);
+      MPI_Wait (&aReq[1], &aStatus[1]);
+      break;
+
+    default:
+      /* do nothing */
+      break;
+    }
+
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  for (i = 0; i < 128; i++)
+    {
+      buf0[i] = i;
+      buf1[i] = 127 - i;
+    }
+  switch (rank)
+    {
+    case 0:
+      MPI_Isend (buf0, 128, MPI_INT, 1, tag1, comm, &aReq[0]);
+      MPI_Isend (buf1, 128, MPI_INT, 1, tag2, comm, &aReq[1]);
+      /* do some work here */
+
+      buf0[64] = 1000000;
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      break;
+
+    case 1:
+      MPI_Irecv (buf0, 128, MPI_INT, 0, tag1, comm, &aReq[0]);
+      MPI_Irecv (buf1, 128, MPI_INT, 0, tag2, comm, &aReq[1]);
+      /* do some work here ... */
+      MPI_Waitall (2, aReq, aStatus);
+      break;
+
+    default:
+      /* do nothing */
+      break;
+    }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/collective-exhaustive-byte-int-mismatch.c b/teshsuite/smpi/isp/umpire/collective-exhaustive-byte-int-mismatch.c
new file mode 100644 (file)
index 0000000..4255382
--- /dev/null
@@ -0,0 +1,801 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Oct 17 2002 */
+/* collective-exhaustive-byte-int-mismatch.c -- do many collective */
+/* operations with simple type mismatches whenever possible (i.e., */
+/* MPI_INT does not match MPI_BYTE, despite many thinking it does) */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/collective-exhaustive-byte-int-mismatch.c,v 1.1 2002/10/24 17:04:54 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+#define RUN_BARRIER
+#define RUN_BCAST
+#define RUN_GATHER
+#define RUN_GATHERV
+#define RUN_SCATTER
+#define RUN_SCATTERV
+#define RUN_ALLGATHER
+#define RUN_ALLGATHERV
+#define RUN_ALLTOALL
+#define RUN_ALLTOALLV
+#define RUN_REDUCE
+#define RUN_ALLREDUCE
+#define RUN_REDUCE_SCATTER
+#define RUN_SCAN
+
+
+#define RUN_MAX
+#define RUN_MIN
+#define RUN_SUM
+#define RUN_PROD
+#define RUN_LAND
+#define RUN_BAND
+#define RUN_LOR
+#define RUN_BOR
+#define RUN_LXOR
+#define RUN_BXOR
+#define RUN_USEROP
+
+
+#define buf_size 128
+#define OP_COUNT 1
+
+
+#ifdef RUN_USEROP
+typedef struct {
+  double real, imag;
+} complex_t;
+
+void
+complex_prod (void *inp, void *inoutp, int *len, MPI_Datatype *dptr)
+{
+  int i, stop;
+  complex_t c;
+  complex_t *in = (complex_t *) inp;
+  complex_t *inout = (complex_t *) inoutp;
+
+  if (*dptr == MPI_BYTE)
+    stop = (*len)/(2 * sizeof(double));
+  else 
+    stop = *len;
+
+  for (i = 0; i < stop; i++) {
+    c.real = inout->real * in->real - inout->imag * in->imag;
+    c.imag = inout->real * in->imag + inout->imag * in->real;
+    *inout = c;
+    in++; 
+    inout++;
+  }
+
+  return;
+}
+#endif
+
+
+int
+main (int argc, char **argv)
+{
+  int i, nprocs = -1;
+  int rank = -1;
+  MPI_Comm comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int *buf0, *buf1, *displs, *counts, *rcounts, *alltoallvcounts;
+#ifdef RUN_USEROP
+  MPI_Op user_op;
+  complex_t *a, *answer;
+  MPI_Datatype ctype;
+#endif
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  buf0 = (int *) malloc (buf_size * nprocs * sizeof(int));
+  assert (buf0);
+  for (i = 0; i < buf_size * nprocs; i++) 
+    buf0[i] = rank;
+
+#ifdef RUN_ALLTOALLV
+  alltoallvcounts = (int *) malloc (nprocs * sizeof(int));
+  assert (alltoallvcounts);
+#endif
+
+#ifdef RUN_USEROP
+  a = (complex_t *) malloc (buf_size * nprocs * sizeof(complex_t));
+  for (i = 0; i < buf_size * nprocs; i++) {
+    a[i].real = ((double) rank)/((double) nprocs);
+    a[i].imag = ((double) (-rank))/((double) nprocs);
+  }
+
+  MPI_Type_contiguous (2, MPI_DOUBLE, &ctype);
+  MPI_Type_commit (&ctype);
+
+  MPI_Op_create (complex_prod, 1 /* TRUE */, &user_op);
+#endif
+
+  if (rank == 0) {
+    buf1 = (int *) malloc (buf_size * nprocs * sizeof(int));
+    assert (buf1);
+    for (i = 0; i < buf_size * nprocs; i++) 
+      buf1[i] = i;
+
+    displs = (int *) malloc (nprocs * sizeof(int));
+    counts = (int *) malloc (nprocs * sizeof(int));
+    rcounts = (int *) malloc (nprocs * sizeof(int));
+    assert (displs && counts && rcounts);
+    for (i = 0; i < nprocs; i++) {
+      displs[i] = i * buf_size;
+      if (i < buf_size)
+       rcounts[i] = counts[i] = i;
+      else
+       rcounts[i] = counts[i] = buf_size;
+      if ((i + rank) < buf_size)
+       alltoallvcounts[i] = i + rank;
+      else
+       alltoallvcounts[i] = buf_size;
+    }
+
+#ifdef RUN_USEROP
+    answer = (complex_t *) malloc (buf_size * nprocs * sizeof(complex_t));
+#endif
+
+#ifdef RUN_BARRIER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Barrier (comm);
+#endif
+
+#ifdef RUN_BCAST
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Bcast (buf0, buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_GATHER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Gather (&buf0[rank*buf_size], buf_size, 
+                 MPI_INT, buf1, buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_SCATTER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scatter (buf1, buf_size, MPI_INT, buf0, buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_GATHERV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Gatherv (&buf0[rank*buf_size], 
+                  (rank < buf_size) ? rank : buf_size, 
+                  MPI_INT, buf1, rcounts, displs, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_SCATTERV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scatterv (buf1, counts, displs, MPI_INT, buf0, 
+                   (rank < buf_size) ? rank : buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_REDUCE
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_MAX, 0, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_MIN, 0, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_SUM, 0, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_PROD, 0, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_LAND, 0, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_BAND, 0, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_LOR, 0, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_BOR, 0, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_LXOR, 0, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_BXOR, 0, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (a, answer, buf_size, ctype, user_op, 0, comm);
+#endif
+#endif
+
+#ifdef RUN_ALLGATHER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allgather (buf0, buf_size, MPI_INT, buf1, buf_size, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLTOALL
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Alltoall (buf1, buf_size, MPI_INT, buf0, buf_size, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLGATHERV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allgatherv (buf0, 
+                     (rank < buf_size) ? rank : buf_size, 
+                     MPI_INT, buf1, rcounts, displs, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLTOALLV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Alltoallv (buf1, alltoallvcounts, displs, MPI_INT, 
+                    buf0, alltoallvcounts, displs, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLREDUCE
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (a, answer, buf_size, ctype, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_REDUCE_SCATTER
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (a, answer, rcounts, ctype, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_SCAN
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (a, answer, buf_size, ctype, user_op, comm);
+#endif
+#endif
+  }
+  else {
+    int *ricounts, *rdcounts;
+
+#ifdef RUN_BARRIER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Barrier (comm);
+#endif
+
+#ifdef RUN_BCAST
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Bcast (buf0, buf_size * sizeof(int), MPI_BYTE, 0, comm);
+#endif
+
+#ifdef RUN_GATHER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Gather (&buf0[rank*buf_size], buf_size * sizeof(int), 
+                 MPI_BYTE, buf1, buf_size * sizeof(int), MPI_BYTE, 0, comm);
+#endif
+
+#ifdef RUN_SCATTER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scatter (buf1, buf_size * sizeof(int), MPI_BYTE, 
+                  buf0, buf_size * sizeof(int), MPI_BYTE, 0, comm);
+#endif
+
+#ifdef RUN_GATHERV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Gatherv (&buf0[rank*buf_size], 
+                  ((rank < buf_size) ? rank : buf_size) * sizeof(int), 
+                  MPI_BYTE, buf1, rcounts, displs, MPI_BYTE, 0, comm);
+#endif
+
+#ifdef RUN_SCATTERV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scatterv (buf1, counts, displs, MPI_BYTE, buf0, 
+                   ((rank < buf_size) ? rank : buf_size) * sizeof(int), 
+                   MPI_BYTE, 0, comm);
+#endif
+
+#ifdef RUN_REDUCE
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_MAX, 0, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_MIN, 0, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_SUM, 0, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_PROD, 0, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LAND, 0, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, 
+                 buf_size * sizeof(int), MPI_BYTE, MPI_BAND, 0, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LOR, 0, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, 
+                 buf_size * sizeof(int), MPI_BYTE, MPI_BOR, 0, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LXOR, 0, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, 
+                 buf_size * sizeof(int), MPI_BYTE, MPI_BXOR, 0, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (a, answer, 
+                 buf_size * 2 * sizeof(double), MPI_BYTE, user_op, 0, comm);
+#endif
+#endif
+
+    buf1 = (int *) malloc (buf_size * nprocs * sizeof(int));
+    assert (buf1);
+    for (i = 0; i < buf_size * nprocs; i++) 
+      buf1[i] = i;
+
+    displs = (int *) malloc (nprocs * sizeof(int));
+    counts = (int *) malloc (nprocs * sizeof(int));
+    rcounts = (int *) malloc (nprocs * sizeof(int));
+    ricounts = (int *) malloc (nprocs * sizeof(int));
+    rdcounts = (int *) malloc (nprocs * sizeof(int));
+    assert (displs && counts && rcounts);
+    for (i = 0; i < nprocs; i++) {
+      displs[i] = i * buf_size * sizeof(int);
+      if (i < buf_size) {
+       rcounts[i] = counts[i] = i * sizeof(int);
+       ricounts[i] = i;
+       rdcounts[i] = i * 2 * sizeof(double);
+      }
+      else {
+       rcounts[i] = counts[i] = buf_size * sizeof(int);
+       ricounts[i] = buf_size;
+       rdcounts[i] = buf_size * 2 * sizeof(double);
+      }
+      if ((i + rank) < buf_size)
+       alltoallvcounts[i] = i + rank * sizeof(int);
+      else
+       alltoallvcounts[i] = buf_size * sizeof(int);
+    }
+
+#ifdef RUN_USEROP
+    answer = (complex_t *) malloc (buf_size * nprocs * sizeof(complex_t));
+#endif
+
+#ifdef RUN_ALLGATHER
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allgather (buf0, buf_size * sizeof(int), MPI_BYTE, 
+                    buf1, buf_size * sizeof(int), MPI_BYTE, comm);
+#endif
+
+#ifdef RUN_ALLTOALL
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Alltoall (buf1, buf_size * sizeof(int), MPI_BYTE, 
+                   buf0, buf_size * sizeof(int), MPI_BYTE, comm);
+#endif
+
+#ifdef RUN_ALLGATHERV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allgatherv (buf0, 
+                     ((rank < buf_size) ? rank : buf_size) * sizeof(int), 
+                     MPI_BYTE, buf1, rcounts, displs, MPI_BYTE, comm);
+#endif
+
+#ifdef RUN_ALLTOALLV
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Alltoallv (buf1, alltoallvcounts, displs, MPI_BYTE, 
+                    buf0, alltoallvcounts, displs, MPI_BYTE, comm);
+#endif
+
+#ifdef RUN_ALLREDUCE
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, 
+                    buf_size * sizeof (int), MPI_BYTE, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, 
+                    buf_size * sizeof (int), MPI_BYTE, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, 
+                    buf_size * sizeof (int), MPI_BYTE, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (a, answer, 
+                    buf_size * 2 * sizeof (double), MPI_BYTE, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_REDUCE_SCATTER
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_BYTE, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_BYTE, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, ricounts, MPI_UNSIGNED, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_BYTE, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (a, answer, rdcounts, MPI_BYTE, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_SCAN
+#ifdef RUN_MAX
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size * sizeof(int), MPI_BYTE, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size * sizeof(int), MPI_BYTE, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_UNSIGNED, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size * sizeof(int), MPI_BYTE, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_USEROP
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (a, answer, 
+               buf_size * 2 * sizeof(double), MPI_BYTE, user_op, comm);
+#endif
+#endif
+  }
+
+#ifdef RUN_BARRIER
+  MPI_Barrier (comm);
+#endif
+
+#ifdef RUN_USEROP
+  free (a);
+  free (answer);
+  MPI_Op_free (&user_op);
+  MPI_Type_free (&ctype);
+#endif
+
+#ifdef RUN_ALLTOALLV
+  free (alltoallvcounts);
+#endif
+
+  free (buf0);
+  free (buf1);
+  free (displs);
+  free (counts);
+  free (rcounts);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+
+  return 0;
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/collective-exhaustive-no-error.c b/teshsuite/smpi/isp/umpire/collective-exhaustive-no-error.c
new file mode 100644 (file)
index 0000000..1e53e14
--- /dev/null
@@ -0,0 +1,550 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Oct 17 2002 */
+/* collective-exhaustive-no-error.c -- do some many collective operations */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/collective-exhaustive-no-error.c,v 1.1 2002/10/24 17:04:54 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+#define RUN_BARRIER
+#define RUN_BCAST
+#define RUN_GATHER
+#define RUN_GATHERV
+#define RUN_SCATTER
+#define RUN_SCATTERV
+#define RUN_ALLGATHER
+#define RUN_ALLGATHERV
+#define RUN_ALLTOALL
+#define RUN_ALLTOALLV
+#define RUN_REDUCE
+#define RUN_ALLREDUCE
+#define RUN_REDUCE_SCATTER
+#define RUN_SCAN
+
+
+#define RUN_MAX
+#define RUN_MIN
+#define RUN_SUM
+#define RUN_PROD
+#define RUN_LAND
+#define RUN_BAND
+#define RUN_LOR
+#define RUN_BOR
+#define RUN_LXOR
+#define RUN_BXOR
+#define RUN_MAXLOC
+#define RUN_MINLOC
+#define RUN_USEROP
+
+
+#define buf_size 128
+#define OP_COUNT 10
+
+
+#ifdef RUN_USEROP
+typedef struct {
+  double real, imag;
+} complex_t;
+
+void
+complex_prod (void *inp, void *inoutp, int *len, MPI_Datatype *dptr)
+{
+  int i;
+  complex_t c;
+  complex_t *in = (complex_t *) inp;
+  complex_t *inout = (complex_t *) inoutp;
+
+  for (i = 0; i < *len; i++) {
+    c.real = inout->real * in->real - inout->imag * in->imag;
+    c.imag = inout->real * in->imag + inout->imag * in->real;
+    *inout = c;
+    in++; 
+    inout++;
+  }
+
+  return;
+}
+#endif
+
+
+int
+main (int argc, char **argv)
+{
+  int i, nprocs = -1;
+  int rank = -1;
+  MPI_Comm comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int *buf0, *buf1, *displs, *counts, *rcounts, *alltoallvcounts;
+#ifdef RUN_USEROP
+  MPI_Op user_op;
+  complex_t *a, *answer;
+  MPI_Datatype ctype;
+#endif
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  buf0 = (int *) malloc (buf_size * nprocs * sizeof(int));
+  assert (buf0);
+  for (i = 0; i < buf_size * nprocs; i++) 
+    buf0[i] = rank;
+
+#ifdef RUN_ALLTOALLV
+  alltoallvcounts = (int *) malloc (nprocs * sizeof(int));
+  assert (alltoallvcounts);
+  for (i = 0; i < nprocs; i++)
+    if ((i + rank) < buf_size)
+      alltoallvcounts[i] = i + rank;
+    else
+      alltoallvcounts[i] = buf_size;
+#endif
+
+#ifdef RUN_USEROP
+  a = (complex_t *) malloc (buf_size * nprocs * sizeof(complex_t));
+  for (i = 0; i < buf_size * nprocs; i++) {
+    a[i].real = ((double) rank)/((double) nprocs);
+    a[i].imag = ((double) (-rank))/((double) nprocs);
+  }
+
+  MPI_Type_contiguous (2, MPI_DOUBLE, &ctype);
+  MPI_Type_commit (&ctype);
+
+  MPI_Op_create (complex_prod, 1 /* TRUE */, &user_op);
+#endif
+
+  if (rank == 0) {
+    buf1 = (int *) malloc (buf_size * nprocs * sizeof(int));
+    assert (buf1);
+    for (i = 0; i < buf_size * nprocs; i++) 
+      buf1[i] = i;
+
+    displs = (int *) malloc (nprocs * sizeof(int));
+    counts = (int *) malloc (nprocs * sizeof(int));
+    rcounts = (int *) malloc (nprocs * sizeof(int));
+    assert (displs && counts && rcounts);
+    for (i = 0; i < nprocs; i++) {
+      displs[i] = i * buf_size;
+      if (i < buf_size)
+       rcounts[i] = counts[i] = i;
+      else
+       rcounts[i] = counts[i] = buf_size;
+    }
+
+#ifdef RUN_USEROP
+    answer = (complex_t *) malloc (buf_size * nprocs * sizeof(complex_t));
+#endif
+  }
+
+#ifdef RUN_BARRIER
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Barrier (comm);
+#endif
+
+#ifdef RUN_BCAST
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Bcast (buf0, buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_GATHER
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Gather (&buf0[rank*buf_size], buf_size, 
+               MPI_INT, buf1, buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_SCATTER
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scatter (buf1, buf_size, MPI_INT, buf0, buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_GATHERV
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Gatherv (&buf0[rank*buf_size], 
+                (rank < buf_size) ? rank : buf_size, 
+                MPI_INT, buf1, rcounts, displs, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_SCATTERV
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scatterv (buf1, counts, displs, MPI_INT, buf0, 
+                 (rank < buf_size) ? rank : buf_size, MPI_INT, 0, comm);
+#endif
+
+#ifdef RUN_REDUCE
+#ifdef RUN_MAX
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_MAX, 0, comm);
+#endif
+
+#ifdef RUN_MIN
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_MIN, 0, comm);
+#endif
+
+#ifdef RUN_SUM
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_SUM, 0, comm);
+#endif
+
+#ifdef RUN_PROD
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_PROD, 0, comm);
+#endif
+
+#ifdef RUN_LAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_LAND, 0, comm);
+#endif
+
+#ifdef RUN_BAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_BAND, 0, comm);
+#endif
+
+#ifdef RUN_LOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_LOR, 0, comm);
+#endif
+
+#ifdef RUN_BOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_BOR, 0, comm);
+#endif
+
+#ifdef RUN_LXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_LXOR, 0, comm);
+#endif
+
+#ifdef RUN_BXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (buf0, buf1, buf_size, MPI_INT, MPI_BXOR, 0, comm);
+#endif
+
+#ifdef RUN_MAXLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_2INT, MPI_MAXLOC, 0, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MAXLOC test\n");
+#endif
+
+#ifdef RUN_MINLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce (buf0, buf1, buf_size, MPI_2INT, MPI_MINLOC, 0, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MINLOC test\n");
+#endif
+
+#ifdef RUN_USEROP
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce (a, answer, buf_size, ctype, user_op, 0, comm);
+#endif
+#endif
+
+  if (rank != 0) {
+    buf1 = (int *) malloc (buf_size * nprocs * sizeof(int));
+    assert (buf1);
+    for (i = 0; i < buf_size * nprocs; i++) 
+      buf1[i] = i;
+
+    displs = (int *) malloc (nprocs * sizeof(int));
+    counts = (int *) malloc (nprocs * sizeof(int));
+    rcounts = (int *) malloc (nprocs * sizeof(int));
+    assert (displs && counts && rcounts);
+    for (i = 0; i < nprocs; i++) {
+      displs[i] = i * buf_size;
+      if (i < buf_size)
+       rcounts[i] = counts[i] = i;
+      else
+       rcounts[i] = counts[i] = buf_size;
+    }
+
+#ifdef RUN_USEROP
+    answer = (complex_t *) malloc (buf_size * nprocs * sizeof(complex_t));
+#endif
+  }
+
+#ifdef RUN_ALLGATHER
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allgather (buf0, buf_size, MPI_INT, buf1, buf_size, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLTOALL
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Alltoall (buf1, buf_size, MPI_INT, buf0, buf_size, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLGATHERV
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allgatherv (buf0, 
+                   (rank < buf_size) ? rank : buf_size, 
+                   MPI_INT, buf1, rcounts, displs, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLTOALLV
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Alltoallv (buf1, alltoallvcounts, displs, MPI_INT, 
+                  buf0, alltoallvcounts, displs, MPI_INT, comm);
+#endif
+
+#ifdef RUN_ALLREDUCE
+#ifdef RUN_MAX
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (buf0, buf1, buf_size, MPI_INT, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_MAXLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_2INT, MPI_MAXLOC, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MAXLOC test\n");
+#endif
+
+#ifdef RUN_MINLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Allreduce (buf0, buf1, buf_size, MPI_2INT, MPI_MINLOC, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MINLOC test\n");
+#endif
+
+#ifdef RUN_USEROP
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Allreduce (a, answer, buf_size, ctype, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_REDUCE_SCATTER
+#ifdef RUN_MAX
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_INT, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_MAXLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_2INT, MPI_MAXLOC, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MAXLOC test\n");
+#endif
+
+#ifdef RUN_MINLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Reduce_scatter (buf0, buf1, rcounts, MPI_2INT, MPI_MINLOC, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MINLOC test\n");
+#endif
+
+#ifdef RUN_USEROP
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Reduce_scatter (a, answer, rcounts, ctype, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_SCAN
+#ifdef RUN_MAX
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_MAX, comm);
+#endif
+
+#ifdef RUN_MIN
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_MIN, comm);
+#endif
+
+#ifdef RUN_SUM
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_SUM, comm);
+#endif
+
+#ifdef RUN_PROD
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_PROD, comm);
+#endif
+
+#ifdef RUN_LAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_LAND, comm);
+#endif
+
+#ifdef RUN_BAND
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_BAND, comm);
+#endif
+
+#ifdef RUN_LOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_LOR, comm);
+#endif
+
+#ifdef RUN_BOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_BOR, comm);
+#endif
+
+#ifdef RUN_LXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_LXOR, comm);
+#endif
+
+#ifdef RUN_BXOR
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (buf0, buf1, buf_size, MPI_INT, MPI_BXOR, comm);
+#endif
+
+#ifdef RUN_MAXLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_2INT, MPI_MAXLOC, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MAXLOC test\n");
+#endif
+
+#ifdef RUN_MINLOC
+  if (nprocs > 1)
+    for (i = 0; i < OP_COUNT; i++) 
+      MPI_Scan (buf0, buf1, buf_size, MPI_2INT, MPI_MINLOC, comm);
+  else
+    fprintf (stderr, "Not enough tasks for MINLOC test\n");
+#endif
+
+#ifdef RUN_USEROP
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Scan (a, answer, buf_size, ctype, user_op, comm);
+#endif
+#endif
+
+#ifdef RUN_BARRIER
+  MPI_Barrier (comm);
+#endif
+
+#ifdef RUN_USEROP
+  free (a);
+  free (answer);
+  MPI_Op_free (&user_op);
+  MPI_Type_free (&ctype);
+#endif
+
+#ifdef RUN_ALLTOALLV
+  free (alltoallvcounts);
+#endif
+
+  free (buf0);
+  free (buf1);
+  free (displs);
+  free (counts);
+  free (rcounts);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+
+  return 0;
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/collective-misorder-allreduce.c b/teshsuite/smpi/isp/umpire/collective-misorder-allreduce.c
new file mode 100644 (file)
index 0000000..5611247
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* collective-misorder.c -- do some collective operations (w/ one of them out of order) */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/collective-misorder-allreduce.c,v 1.2 2000/12/04 19:09:45 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int sbuf[buf_size];
+  int rbuf[buf_size];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  memset (sbuf, 0, buf_size);
+  memset (rbuf, 1, buf_size);
+
+  MPI_Barrier (comm);
+
+  switch (rank)
+    {
+    case 0:
+      MPI_Reduce(sbuf,rbuf,1,MPI_INT,MPI_MAX,0,comm);
+      break;
+
+    default:
+      MPI_Allreduce(sbuf,rbuf,1,MPI_INT, MPI_MAX, comm);
+      break;
+    }
+
+  MPI_Barrier(comm);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/collective-misorder-allreduce.tesh b/teshsuite/smpi/isp/umpire/collective-misorder-allreduce.tesh
new file mode 100644 (file)
index 0000000..779979a
--- /dev/null
@@ -0,0 +1,49 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/collective-misorder-allreduce
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 23
+> [0.000000] [mc_global/INFO] Visited states = 23
+> [0.000000] [mc_global/INFO] Executed transitions = 22
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/collective-misorder.c b/teshsuite/smpi/isp/umpire/collective-misorder.c
new file mode 100644 (file)
index 0000000..b5e0b5b
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* collective-misorder.c -- do some collective operations (w/ one of them out of order) */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/collective-misorder.c,v 1.2 2000/12/04 19:09:45 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  memset (buf0, 0, buf_size);
+  memset (buf1, 1, buf_size);
+
+  MPI_Barrier (comm);
+  MPI_Barrier (comm);
+
+  switch (rank)
+    {
+    case 0:
+      MPI_Bcast (buf0, buf_size, MPI_INT, 1, comm);    /* note that I didn't use root == 0 */
+      MPI_Barrier (comm);
+      break;
+
+    default:
+      MPI_Barrier (comm);
+      MPI_Bcast (buf0, buf_size, MPI_INT, 1, comm);
+      break;
+    }
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/collective-misorder.tesh b/teshsuite/smpi/isp/umpire/collective-misorder.tesh
new file mode 100644 (file)
index 0000000..9401a31
--- /dev/null
@@ -0,0 +1,71 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/collective-misorder
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 45
+> [0.000000] [mc_global/INFO] Visited states = 45
+> [0.000000] [mc_global/INFO] Executed transitions = 44
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/collective-misorder2.c b/teshsuite/smpi/isp/umpire/collective-misorder2.c
new file mode 100644 (file)
index 0000000..403c493
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* collective-misorder.c -- do some collective operations (w/ one of them out of order) */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/collective-misorder2.c,v 1.1 2002/01/05 00:19:39 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  memset (buf0, 0, buf_size);
+  memset (buf1, 1, buf_size);
+
+  MPI_Barrier (comm);
+  MPI_Barrier (comm);
+
+  switch (rank)
+    {
+    case 0:
+      MPI_Bcast (buf0, buf_size, MPI_INT, 0, comm);
+      MPI_Barrier (comm);
+      break;
+
+    default:
+      MPI_Barrier (comm);
+      MPI_Bcast (buf0, buf_size, MPI_INT, 0, comm);
+      break;
+    }
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-bcast-deadlock.c b/teshsuite/smpi/isp/umpire/comm-bcast-deadlock.c
new file mode 100644 (file)
index 0000000..8c1b86c
--- /dev/null
@@ -0,0 +1,65 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Aug 12 2003 */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-bcast-deadlock.c,v 1.1 2003/09/02 15:57:49 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm inverted_comm;
+  int bcast_rank;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs != 3)
+    {
+      printf ("Incorrect number of tasks; exactly 3 required\n");
+    }
+  else {
+    /* create inverted communicator... */
+    MPI_Comm_split (comm, 0, nprocs - rank, &inverted_comm);
+
+    if (rank == 1) {
+      MPI_Bcast (&rank, 1, MPI_INT, 1, inverted_comm);
+      MPI_Bcast (&bcast_rank, 1, MPI_INT, 2, comm);
+    }
+    else if (rank == 2) {
+      MPI_Bcast (&rank, 1, MPI_INT, 2, comm);
+      MPI_Bcast (&bcast_rank, 1, MPI_INT, 1, inverted_comm);
+    }
+    else {
+      MPI_Bcast (&bcast_rank, 1, MPI_INT, 2, comm);
+      MPI_Bcast (&bcast_rank, 1, MPI_INT, 1, inverted_comm);
+    }
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-deadlock.c b/teshsuite/smpi/isp/umpire/comm-deadlock.c
new file mode 100644 (file)
index 0000000..dcc2289
--- /dev/null
@@ -0,0 +1,71 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-deadlock.c,v 1.2 2000/12/04 19:09:45 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm nc1;
+  int dat = 1234;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  if (rank == 0)
+    {
+      printf ("Creating first new comm\n");
+    }
+  {
+    int color = rank % 2;
+    int key = 1;
+    int nrank;
+    int nsize;
+    MPI_Comm_split (comm, color, key, &nc1);
+    MPI_Comm_size (nc1, &nsize);
+    MPI_Comm_rank (nc1, &nrank);
+    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d\n",
+           comm, nprocs, rank, nc1, nsize, nrank);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("Entering deadlock state.....\n");
+
+  if (rank == 1)
+    {
+      MPI_Bcast (&dat, 1, MPI_INT, 0, nc1);
+    }
+  else
+    {
+      MPI_Bcast (&dat, 1, MPI_INT, 0, comm);
+    }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-dup-no-error.c b/teshsuite/smpi/isp/umpire/comm-dup-no-error.c
new file mode 100644 (file)
index 0000000..f7af01e
--- /dev/null
@@ -0,0 +1,67 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Dec 20 2002 */
+
+/* comm-dup-no-error.c - "correctly" use many communicators... */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-dup-no-error.c,v 1.1 2003/01/13 18:31:47 bronis Exp $";
+#endif
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* Approximately 4100 gets "ERROR: 0032-160 Too many communicators" */
+/* with IBM's MPI (AIX 5.1.0, PSSP 3.4) as of 1/13/03... */
+/* Umpire failure is graceful - comm creates are identified... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 1/13/03... */
+/* UMPIRE FAILURE IS NOT GRACEFUL AS OF THIS TIME IN THIS CASE... */
+#define ITERATIONS               10
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm newcomm[ITERATIONS];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    MPI_Comm_dup (MPI_COMM_WORLD, &newcomm[i]);
+  }
+
+  for (i = 0; i < ITERATIONS; i++) {
+    MPI_Barrier (newcomm[i]);
+  }
+
+
+  for (i = 0; i < ITERATIONS; i++) {
+    MPI_Comm_free (&newcomm[i]);
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-dup-no-free.c b/teshsuite/smpi/isp/umpire/comm-dup-no-free.c
new file mode 100644 (file)
index 0000000..b497948
--- /dev/null
@@ -0,0 +1,43 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+/* type-commit-twice.c -- do a type commit twice w/ the same type */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-dup-no-free.c,v 1.1.1.1 2000/08/23 17:28:26 vetter Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm newcomm;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+  MPI_Comm_dup (comm, &newcomm);       /* not freed */
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-dup-no-free2.c b/teshsuite/smpi/isp/umpire/comm-dup-no-free2.c
new file mode 100644 (file)
index 0000000..351cd47
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Dec 20 2002 */
+
+/* comm-dup-no-free2.c - leak many communicators created with comm dup */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-dup-no-free2.c,v 1.1 2003/01/13 18:31:47 bronis Exp $";
+#endif
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* Approximately 4100 gets "ERROR: 0032-160 Too many communicators" */
+/* with IBM's MPI (AIX 5.1.0, PSSP 3.4) as of 1/13/03... */
+/* Umpire failure is graceful - comm creates are identified... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 1/13/03... */
+/* UMPIRE FAILURE IS NOT GRACEFUL AS OF THIS TIME IN THIS CASE... */
+#define ITERATIONS               10
+#define COMMS_PER_ITERATION          3
+#define COMMS_LOST_PER_ITERATION     1
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm newcomm[COMMS_PER_ITERATION];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    for (j = 0; j < COMMS_PER_ITERATION; j++) {
+      MPI_Comm_dup (MPI_COMM_WORLD, &newcomm[j]);
+
+      MPI_Barrier (newcomm[j]);
+
+      if (j < COMMS_PER_ITERATION - COMMS_LOST_PER_ITERATION) {
+       MPI_Comm_free (&newcomm[j]);
+      }
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-simple.c b/teshsuite/smpi/isp/umpire/comm-simple.c
new file mode 100644 (file)
index 0000000..274769a
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-simple.c,v 1.2 2000/12/04 19:09:45 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm newcomm;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  printf ("WARNING: doesn't really deadlock yet! work-in-progress.\n");
+
+  MPI_Barrier (comm);
+
+  {
+    int color = rank % 2;
+    int key = 1;
+    int nrank;
+    int nsize;
+    int dat = 0;
+
+    MPI_Comm_split (comm, color, key, &newcomm);
+
+    MPI_Comm_size (newcomm, &nsize);
+    MPI_Comm_rank (newcomm, &nrank);
+    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d\n",
+           comm, nprocs, rank, newcomm, nsize, nrank);
+
+    if (nrank == 0)
+      {
+       dat = 1000 + color;
+      }
+
+    MPI_Bcast (&dat, 1, MPI_INT, 0, newcomm);
+
+    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d --> %d\n",
+           comm, nprocs, rank, newcomm, nsize, nrank, dat);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-split-no-free.c b/teshsuite/smpi/isp/umpire/comm-split-no-free.c
new file mode 100644 (file)
index 0000000..cd9fb8a
--- /dev/null
@@ -0,0 +1,45 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-split-no-free.c,v 1.1.1.1 2000/08/23 17:28:26 vetter Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm newcomm;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+  {
+    int color = rank % 2;
+    int key = 1;
+    MPI_Comm_split (comm, color, key, &newcomm);       /* not freed */
+  }
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/comm-translate-ranks.c b/teshsuite/smpi/isp/umpire/comm-translate-ranks.c
new file mode 100644 (file)
index 0000000..f3d09bd
--- /dev/null
@@ -0,0 +1,94 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/comm-translate-ranks.c,v 1.1.1.1 2000/08/23 17:28:26 vetter Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm newcomm;
+  int key = -1;
+  int nrank;
+  int nsize;
+  int dat = 0;
+  int color = -1;
+
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  {
+    color = rank % 2;
+    key = 1;
+    MPI_Comm_split (comm, color, key, &newcomm);
+
+    MPI_Comm_size (newcomm, &nsize);
+    MPI_Comm_rank (newcomm, &nrank);
+    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d\n",
+           comm, nprocs, rank, newcomm, nsize, nrank);
+  }
+
+  MPI_Barrier (comm);
+
+  /* after every comm constructor, fetch the rank translation from the
+     0 rank of that comm (assume that there is a 0). */
+
+  if (nrank == 0)
+    {
+      int i;
+      MPI_Group wcGroup;
+      int wcRanks[128];
+      MPI_Group ncGroup;
+      int ncRanks[128];
+
+      MPI_Comm_group (comm, &wcGroup);
+      MPI_Comm_group (newcomm, &ncGroup);
+
+      for (i = 0; i < nprocs; i++)
+       {
+         wcRanks[i] = i;
+       }
+
+      MPI_Group_translate_ranks (wcGroup, nprocs, wcRanks, ncGroup, ncRanks);
+
+      for (i = 0; i < nprocs; i++)
+       {
+         if (ncRanks[i] == MPI_UNDEFINED)
+           {
+             printf ("World rank %d ->\tUNDEFINED\n", wcRanks[i]);
+           }
+         else
+           {
+             printf ("World rank %d ->\t%d\n", wcRanks[i], ncRanks[i]);
+           }
+       }
+    }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/complex-deadlock.c b/teshsuite/smpi/isp/umpire/complex-deadlock.c
new file mode 100644 (file)
index 0000000..6981e60
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int zero_to_two;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      zero_to_two = 1;
+
+      MPI_Send (&zero_to_two, 1, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+
+      MPI_Recv (&zero_to_two, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/complex-deadlock.tesh b/teshsuite/smpi/isp/umpire/complex-deadlock.tesh
new file mode 100644 (file)
index 0000000..a094d85
--- /dev/null
@@ -0,0 +1,52 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/complex-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 26
+> [0.000000] [mc_global/INFO] Visited states = 26
+> [0.000000] [mc_global/INFO] Executed transitions = 25
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/deadlock-config.c b/teshsuite/smpi/isp/umpire/deadlock-config.c
new file mode 100644 (file)
index 0000000..0b9b410
--- /dev/null
@@ -0,0 +1,48 @@
+/* $Header: /usr/gapps/asde/cvs-vault/umpire/tests/deadlock-config.c,v 1.2 2001/09/20 22:27:28 bronis Exp $ */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 32000
+
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  float data[buf_size];
+  int tag = 30;
+  char processor_name[128];
+  int namelen = buf_size;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  if (rank == 0)
+    {
+      printf ("WARNING: This test depends on the MPI's eager limit. "
+             "Set it appropriately.\n");
+    }
+  printf ("Initializing (%d of %d)\n", rank, nprocs);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  {
+    int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
+    data[0] = rank;
+    MPI_Send (data, buf_size, MPI_FLOAT, dest, tag, MPI_COMM_WORLD);
+    printf ("(%d) sent data %f\n", rank, data[0]);
+    fflush (stdout);
+  }
+  {
+    int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
+    MPI_Status status;
+    MPI_Recv (data, buf_size, MPI_FLOAT, src, tag, MPI_COMM_WORLD, &status);
+    printf ("(%d) got data %f\n", rank, data[0]);
+    fflush (stdout);
+  }
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+                                /* EOF */
diff --git a/teshsuite/smpi/isp/umpire/deadlock-config.tesh b/teshsuite/smpi/isp/umpire/deadlock-config.tesh
new file mode 100644 (file)
index 0000000..5c9869e
--- /dev/null
@@ -0,0 +1,34 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/deadlock-config
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> WARNING: This test depends on the MPI's eager limit. Set it appropriately.
+> Initializing (0 of 3)
+> (0) is alive on Tremblay
+> Initializing (1 of 3)
+> (1) is alive on Jupiter
+> Initializing (2 of 3)
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 4
+> [0.000000] [mc_global/INFO] Visited states = 4
+> [0.000000] [mc_global/INFO] Executed transitions = 3
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/deadlock-config_blocking.c b/teshsuite/smpi/isp/umpire/deadlock-config_blocking.c
new file mode 100644 (file)
index 0000000..0b9b410
--- /dev/null
@@ -0,0 +1,48 @@
+/* $Header: /usr/gapps/asde/cvs-vault/umpire/tests/deadlock-config.c,v 1.2 2001/09/20 22:27:28 bronis Exp $ */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 32000
+
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  float data[buf_size];
+  int tag = 30;
+  char processor_name[128];
+  int namelen = buf_size;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  if (rank == 0)
+    {
+      printf ("WARNING: This test depends on the MPI's eager limit. "
+             "Set it appropriately.\n");
+    }
+  printf ("Initializing (%d of %d)\n", rank, nprocs);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  {
+    int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
+    data[0] = rank;
+    MPI_Send (data, buf_size, MPI_FLOAT, dest, tag, MPI_COMM_WORLD);
+    printf ("(%d) sent data %f\n", rank, data[0]);
+    fflush (stdout);
+  }
+  {
+    int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
+    MPI_Status status;
+    MPI_Recv (data, buf_size, MPI_FLOAT, src, tag, MPI_COMM_WORLD, &status);
+    printf ("(%d) got data %f\n", rank, data[0]);
+    fflush (stdout);
+  }
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+                                /* EOF */
diff --git a/teshsuite/smpi/isp/umpire/dropped-req.c b/teshsuite/smpi/isp/umpire/dropped-req.c
new file mode 100644 (file)
index 0000000..ff3560f
--- /dev/null
@@ -0,0 +1,59 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Nov 29 2000 */
+/* dropped-req.c -- create a request that's never matched */
+/* NOTE: THIS TEST ASSUMES THAT MPI LIBRARY USES EAGER SENDS IF */
+/* BUFFER IS ZERO BYTES; WILL DEADLOCK IN WHILE LOOP IF FALSE */
+
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* 10000 breaks umpire due to running out of memory as of 12/20/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS                10
+
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include "mpi.h"
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int tag = 31;
+  int i;
+  MPI_Comm comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Request req;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier(comm);
+
+  /* 0 sends task nprocs-1 a message that is never received */
+  if (rank == 0) {
+    for (i = 0; i < ITERATIONS; i++) {
+      int flag = 0;
+      MPI_Isend (&tag, 0, MPI_BYTE, nprocs - 1, tag, comm, &req);
+
+      while (!flag)
+       MPI_Test (&req, &flag, &status);
+    }
+  }
+
+ MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/errhandler-no-error.c b/teshsuite/smpi/isp/umpire/errhandler-no-error.c
new file mode 100644 (file)
index 0000000..fdb3053
--- /dev/null
@@ -0,0 +1,85 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* errhandler-no-error.c -- construct some MPI_Errhandlers and free them */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/errhandler-no-error.c,v 1.1 2002/05/29 16:09:47 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+/* multiple instances of same errhandler to exercise more Umpire code... */
+#define ERRHANDLER_COUNT  5
+
+
+
+void
+myErrhandler (MPI_Comm *comm, int *errorcode, ...)
+{
+  char      buf[MPI_MAX_ERROR_STRING];
+  int       error_strlen;
+
+  /* print alert */
+  fprintf (stderr, "Caught an MPI Error! Time to abort!\n");
+
+  /* get and print MPI error message... */
+  MPI_Error_string (*(errorcode), buf, &error_strlen);
+  fprintf (stderr, "%s\n", buf);
+
+  MPI_Abort (*comm, *errorcode);
+
+  return;
+}
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Errhandler newerrhandler[ERRHANDLER_COUNT];
+  MPI_Errhandler newerrhandler2[ERRHANDLER_COUNT];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  for (i = 0; i < ERRHANDLER_COUNT; i++) 
+    MPI_Errhandler_create (myErrhandler, &newerrhandler[i]);
+
+  for (i = 0; i < ERRHANDLER_COUNT; i++) 
+    MPI_Errhandler_free (&newerrhandler[i]);
+
+  MPI_Barrier (comm);
+
+  /* now with an alias... */
+
+  for (i = 0; i < ERRHANDLER_COUNT; i++) 
+    MPI_Errhandler_create (myErrhandler, &newerrhandler[i]);
+
+  for (i = 0; i < ERRHANDLER_COUNT; i++) {
+    newerrhandler2[i] = newerrhandler[i];
+    MPI_Errhandler_free (&newerrhandler2[i]);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/errhandler-no-free.c b/teshsuite/smpi/isp/umpire/errhandler-no-free.c
new file mode 100644 (file)
index 0000000..3870ad5
--- /dev/null
@@ -0,0 +1,69 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* errhandler-no-error.c -- construct some MPI_Errhandlers and free them */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/errhandler-no-free.c,v 1.1 2002/05/29 16:09:48 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+/* multiple instances of same errhandler to exercise more Umpire code... */
+#define ERRHANDLER_COUNT  5
+
+
+
+void
+myErrhandler (MPI_Comm *comm, int *errorcode, ...)
+{
+  char      buf[MPI_MAX_ERROR_STRING];
+  int       error_strlen;
+
+  /* print alert */
+  fprintf (stderr, "Caught an MPI Error! Time to abort!\n");
+
+  /* get and print MPI error message... */
+  MPI_Error_string (*(errorcode), buf, &error_strlen);
+  fprintf (stderr, "%s\n", buf);
+
+  MPI_Abort (*comm, *errorcode);
+
+  return;
+}
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Errhandler newerrhandler[ERRHANDLER_COUNT];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  for (i = 0; i < ERRHANDLER_COUNT; i++) 
+    MPI_Errhandler_create (myErrhandler, &newerrhandler[i]);
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/finalize-deadlock.c b/teshsuite/smpi/isp/umpire/finalize-deadlock.c
new file mode 100644 (file)
index 0000000..80bc5b3
--- /dev/null
@@ -0,0 +1,51 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* finalize-deadlock.c -- deadlock caused by calling MPI_Finalize */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int its_raining = 0;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+    }
+  else if ((rank == 1) && (its_raining))
+    {
+      /* This code is never executed... */
+      memset (buf0, 1, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/finalize-deadlock.tesh b/teshsuite/smpi/isp/umpire/finalize-deadlock.tesh
new file mode 100644 (file)
index 0000000..d4476a3
--- /dev/null
@@ -0,0 +1,48 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/finalize-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] Expanded states = 20
+> [0.000000] [mc_global/INFO] Visited states = 20
+> [0.000000] [mc_global/INFO] Executed transitions = 19
+> (1) Finished normally
+> (2) Finished normally
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/group-no-error-exhaustive.c b/teshsuite/smpi/isp/umpire/group-no-error-exhaustive.c
new file mode 100644 (file)
index 0000000..a2bdbd3
--- /dev/null
@@ -0,0 +1,165 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive.c -- use all group constructors correctly */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-error-exhaustive.c,v 1.2 2002/07/30 21:34:42 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define GROUP_CONSTRUCTOR_COUNT 8
+#define INTERCOMM_CREATE_TAG 666
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i;
+  int ranks[2], ranges[1][3];
+  MPI_Group newgroup[GROUP_CONSTRUCTOR_COUNT]; 
+  MPI_Group newgroup2[GROUP_CONSTRUCTOR_COUNT]; 
+  MPI_Comm temp;
+  MPI_Comm intercomm = MPI_COMM_NULL;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  ranks[0] = 0;
+  ranks[1] = 1;
+
+  ranges[0][0] = 0;
+  ranges[0][1] = 2;
+  ranges[0][2] = 2;
+
+  MPI_Barrier (comm);
+
+  if (nprocs < 3) {
+      printf ("requires at least 3 tasks\n");
+  }
+  else {
+    /* create the groups */
+    if (GROUP_CONSTRUCTOR_COUNT > 0)
+      MPI_Comm_group (MPI_COMM_WORLD, &newgroup[0]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 1)
+      MPI_Group_incl (newgroup[0], 2, ranks, &newgroup[1]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 2)
+      MPI_Group_excl (newgroup[0], 2, ranks, &newgroup[2]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 3)
+      MPI_Group_range_incl (newgroup[0], 1, ranges, &newgroup[3]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 4)
+      MPI_Group_range_excl (newgroup[0], 1, ranges, &newgroup[4]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 5)
+      MPI_Group_union (newgroup[1], newgroup[3], &newgroup[5]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 6)
+      MPI_Group_intersection (newgroup[5], newgroup[2], &newgroup[6]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 7)
+      MPI_Group_difference (newgroup[5], newgroup[2], &newgroup[7]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 8) {
+      /* need lots of stuff for this constructor... */
+      MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp);
+
+      if (rank % 3) {
+       MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                             (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                             nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                             INTERCOMM_CREATE_TAG, &intercomm);
+
+       MPI_Comm_remote_group (intercomm, &newgroup[8]);
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       MPI_Comm_group (temp, &newgroup[8]);
+      }
+
+      MPI_Comm_free (&temp);
+    }
+      
+    for (i = 0; i < GROUP_CONSTRUCTOR_COUNT; i++)
+      MPI_Group_free (&newgroup[i]);
+
+    MPI_Barrier (comm);
+
+    /* create the groups again and free with an alias... */
+    if (GROUP_CONSTRUCTOR_COUNT > 0)
+      MPI_Comm_group (MPI_COMM_WORLD, &newgroup[0]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 1)
+      MPI_Group_incl (newgroup[0], 2, ranks, &newgroup[1]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 2)
+      MPI_Group_excl (newgroup[0], 2, ranks, &newgroup[2]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 3)
+      MPI_Group_range_incl (newgroup[0], 1, ranges, &newgroup[3]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 4)
+      MPI_Group_range_excl (newgroup[0], 1, ranges, &newgroup[4]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 5)
+      MPI_Group_union (newgroup[1], newgroup[3], &newgroup[5]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 6)
+      MPI_Group_intersection (newgroup[5], newgroup[2], &newgroup[6]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 7)
+      MPI_Group_difference (newgroup[5], newgroup[2], &newgroup[7]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 8) {
+      /* need lots of stuff for this constructor... */
+      MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp);
+
+      if (rank % 3) {
+       MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                             (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                             nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                             INTERCOMM_CREATE_TAG, &intercomm);
+
+       MPI_Comm_remote_group (intercomm, &newgroup[8]);
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       MPI_Comm_group (temp, &newgroup[8]);
+      }
+
+      MPI_Comm_free (&temp);
+    }
+      
+    for (i = 0; i < GROUP_CONSTRUCTOR_COUNT; i++) {
+      newgroup2[i] = newgroup[i];
+      MPI_Group_free (&newgroup2[i]);
+    }
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-error.c b/teshsuite/smpi/isp/umpire/group-no-error.c
new file mode 100644 (file)
index 0000000..896aeb6
--- /dev/null
@@ -0,0 +1,47 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* group-no-error.c -- construct a group and free it */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-error.c,v 1.2 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Group newgroup, newgroup2;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Comm_group (MPI_COMM_WORLD, &newgroup);
+  MPI_Group_free (&newgroup);
+  MPI_Barrier (MPI_COMM_WORLD);
+  /* now with an alias... */
+  MPI_Comm_group (MPI_COMM_WORLD, &newgroup);
+  newgroup2 = newgroup;
+  MPI_Group_free (&newgroup2);
+  MPI_Barrier (MPI_COMM_WORLD);
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-error2.c b/teshsuite/smpi/isp/umpire/group-no-error2.c
new file mode 100644 (file)
index 0000000..a804c81
--- /dev/null
@@ -0,0 +1,59 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* group-no-error.c -- "correctly" construct many groups and free them */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-error2.c,v 1.1 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 12/20/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS               100
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Group newgroup[ITERATIONS];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    MPI_Comm_group (MPI_COMM_WORLD, &newgroup[i]);
+  }
+
+  for (i = 0; i < ITERATIONS; i++) {
+    MPI_Group_free (&newgroup[i]);
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-error3.c b/teshsuite/smpi/isp/umpire/group-no-error3.c
new file mode 100644 (file)
index 0000000..2587eb1
--- /dev/null
@@ -0,0 +1,63 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* group-no-error3.c -- "correctly" construct many groups and free them */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-error3.c,v 1.1 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 12/20/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS               100
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Group worldgroup, newgroup[ITERATIONS];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Comm_group (MPI_COMM_WORLD, &worldgroup);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    /* create groups that don't include the local rank... */
+    MPI_Group_excl (worldgroup, 1, &rank, &newgroup[i]);
+  }
+
+  for (i = 0; i < ITERATIONS; i++) {
+    MPI_Group_free (&newgroup[i]);
+  }
+
+  MPI_Group_free (&worldgroup);
+  MPI_Barrier (MPI_COMM_WORLD);
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-free-exhaustive.c b/teshsuite/smpi/isp/umpire/group-no-free-exhaustive.c
new file mode 100644 (file)
index 0000000..be2f596
--- /dev/null
@@ -0,0 +1,109 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* group-no-free-exhaustive.c -- use all group constructors without freeing */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-free-exhaustive.c,v 1.1 2002/05/29 16:09:49 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define GROUP_CONSTRUCTOR_COUNT 9
+#define INTERCOMM_CREATE_TAG 666
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i;
+  int ranks[2], ranges[1][3];
+  MPI_Group newgroup[GROUP_CONSTRUCTOR_COUNT]; 
+  MPI_Group newgroup2[GROUP_CONSTRUCTOR_COUNT]; 
+  MPI_Comm temp;
+  MPI_Comm intercomm = MPI_COMM_NULL;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  ranks[0] = 0;
+  ranks[1] = 1;
+
+  ranges[0][0] = 0;
+  ranges[0][1] = 2;
+  ranges[0][2] = 2;
+
+  MPI_Barrier (comm);
+
+  if (nprocs < 3) {
+      printf ("requires at least 3 tasks\n");
+  }
+  else {
+    /* create the groups */
+    if (GROUP_CONSTRUCTOR_COUNT > 0)
+      MPI_Comm_group (MPI_COMM_WORLD, &newgroup[0]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 1)
+      MPI_Group_incl (newgroup[0], 2, ranks, &newgroup[1]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 2)
+      MPI_Group_excl (newgroup[0], 2, ranks, &newgroup[2]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 3)
+      MPI_Group_range_incl (newgroup[0], 1, ranges, &newgroup[3]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 4)
+      MPI_Group_range_excl (newgroup[0], 1, ranges, &newgroup[4]);    
+
+    if (GROUP_CONSTRUCTOR_COUNT > 5)
+      MPI_Group_union (newgroup[1], newgroup[3], &newgroup[5]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 6)
+      MPI_Group_intersection (newgroup[5], newgroup[2], &newgroup[6]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 7)
+      MPI_Group_difference (newgroup[5], newgroup[2], &newgroup[7]);
+
+    if (GROUP_CONSTRUCTOR_COUNT > 8) {
+      /* need lots of stuff for this constructor... */
+      MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp);
+
+      if (rank % 3) {
+       MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                             (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                             nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                             INTERCOMM_CREATE_TAG, &intercomm);
+
+       MPI_Comm_remote_group (intercomm, &newgroup[8]);
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       MPI_Comm_group (temp, &newgroup[8]);
+      }
+
+      MPI_Comm_free (&temp);
+    }
+  }      
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-free.c b/teshsuite/smpi/isp/umpire/group-no-free.c
new file mode 100644 (file)
index 0000000..2555ed9
--- /dev/null
@@ -0,0 +1,42 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* group-no-free.c -- construct a group without freeing */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-free.c,v 1.2 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Group newgroup;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Comm_group (MPI_COMM_WORLD, &newgroup);
+  MPI_Barrier (MPI_COMM_WORLD);
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-free2.c b/teshsuite/smpi/isp/umpire/group-no-free2.c
new file mode 100644 (file)
index 0000000..1430443
--- /dev/null
@@ -0,0 +1,63 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* group-no-free2.c -- construct many groups without freeing some */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-free2.c,v 1.1 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 12/20/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS                  100
+#define GROUPS_PER_ITERATION          3
+#define GROUPS_LOST_PER_ITERATION     1
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Group newgroup[GROUPS_PER_ITERATION];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    for (j = 0; j < GROUPS_PER_ITERATION; j++) {
+      MPI_Comm_group (MPI_COMM_WORLD, &newgroup[j]);
+
+      if (j < GROUPS_PER_ITERATION - GROUPS_LOST_PER_ITERATION) {
+       MPI_Group_free (&newgroup[j]);
+      }
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/group-no-free3.c b/teshsuite/smpi/isp/umpire/group-no-free3.c
new file mode 100644 (file)
index 0000000..bdf4d22
--- /dev/null
@@ -0,0 +1,67 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* group-no-free3.c -- construct many groups without freeing some */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-free3.c,v 1.1 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 12/20/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS                   10
+#define GROUPS_PER_ITERATION          3
+#define GROUPS_LOST_PER_ITERATION     1
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Group worldgroup, newgroup[GROUPS_PER_ITERATION];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Comm_group (MPI_COMM_WORLD, &worldgroup);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    for (j = 0; j < GROUPS_PER_ITERATION; j++) {
+      /* create groups that don't include the local rank... */
+      MPI_Group_excl (worldgroup, 1, &rank, &newgroup[j]);
+
+      if (j < GROUPS_PER_ITERATION - GROUPS_LOST_PER_ITERATION) {
+       MPI_Group_free (&newgroup[j]);
+      }
+    }
+  }
+
+  MPI_Group_free (&worldgroup);
+  MPI_Barrier (MPI_COMM_WORLD);
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/hello.c b/teshsuite/smpi/isp/umpire/hello.c
new file mode 100644 (file)
index 0000000..fa0e706
--- /dev/null
@@ -0,0 +1,43 @@
+/* -*- C -*- 
+
+   @PROLOGUE@
+
+   ----- 
+
+   Jeffrey Vetter vetter@llnl.gov
+   Center for Applied Scientific Computing, LLNL
+   31 Oct 2000
+
+   hello.c -- simple hello world app
+
+ */
+
+#ifndef lint
+static char *rcsid = "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/hello.c,v 1.2 2000/12/04 19:09:46 bronis Exp $";
+#endif
+
+#include "mpi.h"
+
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int recvbuf = 0;
+
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  printf ("MPI comm size is %d with rank %d executing\n", nprocs, rank);
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Reduce (&rank, &recvbuf, 1, MPI_INT, MPI_MAX, 0, MPI_COMM_WORLD);
+  if (rank == 0)
+    {
+      printf ("Reduce max is %d\n", recvbuf);
+    }
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+
+/* eof */
diff --git a/teshsuite/smpi/isp/umpire/intercomm_create-deadlock.c b/teshsuite/smpi/isp/umpire/intercomm_create-deadlock.c
new file mode 100644 (file)
index 0000000..afe7232
--- /dev/null
@@ -0,0 +1,113 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, intercomm;
+  int trank, tnprocs;
+  int drank, dnprocs, rleader, rnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      MPI_Comm_size (temp, &tnprocs);
+      MPI_Comm_rank (temp, &trank);
+
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+
+      if (trank == 1) {
+       MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, temp, &status);
+      }
+
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      if (tnprocs > 1) {
+       if (trank == 0) {       
+         memset (buf0, 0, buf_size);
+       
+         MPI_Send (buf0, buf_size, MPI_INT, 1, 0, temp);
+       }
+      }
+      else {
+       printf ("(%d) Split communicator too small\n", rank);
+      }
+
+      MPI_Comm_free (&temp);
+      
+      if (intercomm != MPI_COMM_NULL) {
+       MPI_Comm_size (intercomm, &dnprocs);
+       MPI_Comm_rank (intercomm, &drank);
+       MPI_Comm_remote_size (intercomm, &rnprocs);
+     
+       if (rnprocs > drank) {
+         if (rank % 2) {
+           memset (buf1, 1, buf_size);
+
+           MPI_Recv (buf0, buf_size, MPI_INT, drank, 0, intercomm, &status);
+
+           MPI_Send (buf1, buf_size, MPI_INT, drank, 0, intercomm);
+         }
+         else {
+           memset (buf0, 0, buf_size);
+       
+           MPI_Send (buf0, buf_size, MPI_INT, drank, 0, intercomm);
+           
+           MPI_Recv (buf1, buf_size, MPI_INT, drank, 0, intercomm, &status);
+         }
+       }
+       else {
+         printf ("(%d) Intercomm too small (lrank = %d; remote size = %d)\n",
+                 rank, drank, rnprocs);
+       }
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/intercomm_create-deadlock2.c b/teshsuite/smpi/isp/umpire/intercomm_create-deadlock2.c
new file mode 100644 (file)
index 0000000..332dce0
--- /dev/null
@@ -0,0 +1,112 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, intercomm;
+  int trank, tnprocs;
+  int drank, dnprocs, rleader, rnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      MPI_Comm_size (temp, &tnprocs);
+      MPI_Comm_rank (temp, &trank);
+
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+
+      if ((trank == 0) && (rank % 2)) {
+       MPI_Recv (buf0, buf_size, MPI_INT, 
+                 rleader, 0, MPI_COMM_WORLD, &status);
+      }
+
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      if ((trank == 0) && !(rank % 2)) {
+       memset (buf0, 0, buf_size);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, temp);
+      }
+      else {
+       printf ("(%d) Split communicator too small\n", rank);
+      }
+
+      MPI_Comm_free (&temp);
+      
+      if (intercomm != MPI_COMM_NULL) {
+       MPI_Comm_size (intercomm, &dnprocs);
+       MPI_Comm_rank (intercomm, &drank);
+       MPI_Comm_remote_size (intercomm, &rnprocs);
+     
+       if (rnprocs > drank) {
+         if (rank % 2) {
+           memset (buf1, 1, buf_size);
+
+           MPI_Recv (buf0, buf_size, MPI_INT, drank, 0, intercomm, &status);
+
+           MPI_Send (buf1, buf_size, MPI_INT, drank, 0, intercomm);
+         }
+         else {
+           memset (buf0, 0, buf_size);
+       
+           MPI_Send (buf0, buf_size, MPI_INT, drank, 0, intercomm);
+           
+           MPI_Recv (buf1, buf_size, MPI_INT, drank, 0, intercomm, &status);
+         }
+       }
+       else {
+         printf ("(%d) Intercomm too small (lrank = %d; remote size = %d)\n",
+                 rank, drank, rnprocs);
+       }
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/intercomm_create-deadlock3.c b/teshsuite/smpi/isp/umpire/intercomm_create-deadlock3.c
new file mode 100644 (file)
index 0000000..d546995
--- /dev/null
@@ -0,0 +1,108 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, intercomm;
+  int trank, tnprocs;
+  int drank, dnprocs, rleader, rnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 4) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      MPI_Comm_size (temp, &tnprocs);
+      MPI_Comm_rank (temp, &trank);
+
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+
+      if (rank == 1) {
+       MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+      }
+
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      if (rank == 0) {
+       memset (buf0, 0, buf_size);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+      }
+
+      MPI_Comm_free (&temp);
+      
+      if (intercomm != MPI_COMM_NULL) {
+       MPI_Comm_size (intercomm, &dnprocs);
+       MPI_Comm_rank (intercomm, &drank);
+       MPI_Comm_remote_size (intercomm, &rnprocs);
+     
+       if (rnprocs > drank) {
+         if (rank % 2) {
+           memset (buf1, 1, buf_size);
+
+           MPI_Recv (buf0, buf_size, MPI_INT, drank, 0, intercomm, &status);
+
+           MPI_Send (buf1, buf_size, MPI_INT, drank, 0, intercomm);
+         }
+         else {
+           memset (buf0, 0, buf_size);
+       
+           MPI_Send (buf0, buf_size, MPI_INT, drank, 0, intercomm);
+           
+           MPI_Recv (buf1, buf_size, MPI_INT, drank, 0, intercomm, &status);
+         }
+       }
+       else {
+         printf ("(%d) Intercomm too small (lrank = %d; remote size = %d)\n",
+                 rank, drank, rnprocs);
+       }
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/intercomm_create-deadlock4.c b/teshsuite/smpi/isp/umpire/intercomm_create-deadlock4.c
new file mode 100644 (file)
index 0000000..8c45d54
--- /dev/null
@@ -0,0 +1,116 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, intercomm;
+  int trank, tnprocs;
+  int drank, dnprocs, rleader, rnprocs;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 5) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      MPI_Comm_size (temp, &tnprocs);
+      MPI_Comm_rank (temp, &trank);
+
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+
+      if ((rank % 2) && (trank == 0)) {
+       MPI_Recv (buf0, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+      }
+      else if (rank == 0) {
+       MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+      }
+
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      if (rank == 2) {
+       memset (buf0, 0, buf_size);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, rleader, 0, MPI_COMM_WORLD);
+      }
+      else if (rank == 1) {
+       memset (buf0, 0, buf_size);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+      }
+
+      MPI_Comm_free (&temp);
+      
+      if (intercomm != MPI_COMM_NULL) {
+       MPI_Comm_size (intercomm, &dnprocs);
+       MPI_Comm_rank (intercomm, &drank);
+       MPI_Comm_remote_size (intercomm, &rnprocs);
+     
+       if (rnprocs > drank) {
+         if (rank % 2) {
+           memset (buf1, 1, buf_size);
+
+           MPI_Recv (buf0, buf_size, MPI_INT, drank, 0, intercomm, &status);
+
+           MPI_Send (buf1, buf_size, MPI_INT, drank, 0, intercomm);
+         }
+         else {
+           memset (buf0, 0, buf_size);
+       
+           MPI_Send (buf0, buf_size, MPI_INT, drank, 0, intercomm);
+           
+           MPI_Recv (buf1, buf_size, MPI_INT, drank, 0, intercomm, &status);
+         }
+       }
+       else {
+         printf ("(%d) Intercomm too small (lrank = %d; remote size = %d)\n",
+                 rank, drank, rnprocs);
+       }
+
+       MPI_Comm_free (&intercomm);
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/intercomm_create-no-error.c b/teshsuite/smpi/isp/umpire/intercomm_create-no-error.c
new file mode 100644 (file)
index 0000000..700edce
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive.c -- use all group constructors correctly */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/intercomm_create-no-error.c,v 1.1 2002/07/30 21:34:43 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define INTERCOMM_CREATE_TAG 666
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i;
+  MPI_Comm temp, intercomm = MPI_COMM_NULL;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("requires at least 2 tasks\n");
+  }
+  else {
+    /* need lots of stuff for this constructor... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                         nprocs - 
+                         ((rank % 2) ? 2 - (nprocs % 2) : 1 + (nprocs % 2)),
+                         INTERCOMM_CREATE_TAG, &intercomm);
+      
+    MPI_Comm_free (&intercomm);
+
+    MPI_Comm_free (&temp);
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/intercomm_merge-deadlock.c b/teshsuite/smpi/isp/umpire/intercomm_merge-deadlock.c
new file mode 100644 (file)
index 0000000..6d35a0a
--- /dev/null
@@ -0,0 +1,150 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+#define INTERCOMM_CREATE_TAG 666
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Comm temp, intercomm, intercomm2, comm, comm2;
+  int trank, tnprocs;
+  int drank, dnprocs, rleader;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 4) {
+    printf ("not enough tasks\n");
+  }
+  else {
+    /* need to make split communicator temporarily... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 2, nprocs - rank, &temp);
+
+    if (temp != MPI_COMM_NULL) {
+      /* create an intercommunicator temporarily so can merge it... */
+      rleader = ((rank + nprocs) % 2) ?  nprocs - 2 : nprocs - 1;
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                           INTERCOMM_CREATE_TAG, &intercomm);
+      MPI_Comm_free (&temp);
+      
+      if (intercomm != MPI_COMM_NULL) {
+       /* need to make a different split communicator temporarily... */
+       MPI_Comm_split (MPI_COMM_WORLD, 
+                       rank < nprocs/2, nprocs - rank, &temp);
+
+       if (temp != MPI_COMM_NULL) {
+         /* create another intercommunicator temporarily to merge... */
+         rleader = (rank < nprocs/2) ?  nprocs - 1 : nprocs/2 - 1;
+         MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, rleader,
+                               INTERCOMM_CREATE_TAG, &intercomm2);
+         MPI_Comm_free (&temp);
+      
+         if (intercomm2 != MPI_COMM_NULL) {
+           if (rank < nprocs/2) {
+             MPI_Intercomm_merge (intercomm2, rank < nprocs/2, &comm2);
+             MPI_Comm_free (&intercomm2);
+             MPI_Intercomm_merge (intercomm, rank % 2, &comm);
+             MPI_Comm_free (&intercomm);
+           }
+           else {
+             MPI_Intercomm_merge (intercomm, rank % 2, &comm);
+             MPI_Comm_free (&intercomm);
+             MPI_Intercomm_merge (intercomm2, rank < nprocs/2, &comm2);
+             MPI_Comm_free (&intercomm2);
+           }
+
+           if ((comm != MPI_COMM_NULL) && (comm2 != MPI_COMM_NULL)) {
+             MPI_Comm_size (comm, &dnprocs);
+             MPI_Comm_rank (comm, &drank);
+
+             if (dnprocs > 1) {
+               if (drank == 1) {
+                 memset (buf1, 1, buf_size);
+
+                 MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);
+
+                 MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm);
+               }
+               else if (drank == 0) {
+                 memset (buf0, 0, buf_size);
+       
+                 MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
+           
+                 MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
+               }
+             }
+             else {
+               printf ("(%d) comm too small\n", rank);
+             }
+
+             MPI_Comm_size (comm2, &dnprocs);
+             MPI_Comm_rank (comm2, &drank);
+
+             if (dnprocs > 1) {
+               if (drank == 1) {
+                 memset (buf1, 1, buf_size);
+
+                 MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm2, &status);
+
+                 MPI_Send (buf1, buf_size, MPI_INT, 0, 0, comm2);
+               }
+               else if (drank == 0) {
+                 memset (buf0, 0, buf_size);
+       
+                 MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm2);
+           
+                 MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm2, &status);
+               }
+             }
+             else {
+               printf ("(%d) comm2 too small\n", rank);
+             }
+           }
+           else {
+             printf ("(%d) Got MPI_COMM_NULL\n", rank);
+           }
+         }
+         else {
+           printf ("(%d) Got MPI_COMM_NULL for intercomm2\n", rank);
+         }
+       }
+       else {
+         printf ("(%d) Second MPI_Comm_split got MPI_COMM_NULL\n", rank);
+       }
+      }
+      else {
+       printf ("(%d) Got MPI_COMM_NULL for intercomm1\n", rank);
+      }
+    }
+    else {
+      printf ("(%d) First MPI_Comm_split got MPI_COMM_NULL\n", rank);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/irecv-deadlock.c b/teshsuite/smpi/isp/umpire/irecv-deadlock.c
new file mode 100644 (file)
index 0000000..c1a16fe
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else
+    {
+      int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
+      int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
+      memset (buf0, rank, buf_size);
+      MPI_Irecv (buf0, buf_size, MPI_INT, src, 0, MPI_COMM_WORLD, &req);
+      MPI_Wait(&req,&status);
+      MPI_Send (buf0, buf_size, MPI_INT, dest, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/irecv-deadlock.tesh b/teshsuite/smpi/isp/umpire/irecv-deadlock.tesh
new file mode 100644 (file)
index 0000000..3bc6c86
--- /dev/null
@@ -0,0 +1,48 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/irecv-deadlock
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] *** DEAD-LOCK DETECTED ***
+> [0.000000] [mc_global/INFO] **************************
+> [0.000000] [mc_global/INFO] Locked request:
+> [0.000000] [mc_global/INFO] Counter-example execution trace:
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iSend(src=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(3)Fafard (2)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iSend(src=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (1)Tremblay (0)])
+> [0.000000] [mc_global/INFO] [(1)Tremblay (0)] iRecv(dst=(1)Tremblay (0), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(2)Jupiter (1)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iSend(src=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] Wait(comm=(verbose only) [(3)Fafard (2)-> (2)Jupiter (1)])
+> [0.000000] [mc_global/INFO] [(2)Jupiter (1)] iRecv(dst=(2)Jupiter (1), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] Wait(comm=(verbose only) [(1)Tremblay (0)-> (3)Fafard (2)])
+> [0.000000] [mc_global/INFO] [(3)Fafard (2)] iRecv(dst=(3)Fafard (2), buff=(verbose only), size=(verbose only))
+> [0.000000] [mc_global/INFO] Expanded states = 22
+> [0.000000] [mc_global/INFO] Visited states = 22
+> [0.000000] [mc_global/INFO] Executed transitions = 21
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/irecv-isend-ok.c b/teshsuite/smpi/isp/umpire/irecv-isend-ok.c
new file mode 100644 (file)
index 0000000..a0a2bd4
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req1;
+  MPI_Request req2;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else
+    {
+      int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
+      int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
+      memset (buf0, rank, buf_size);
+      memset (buf1, rank, buf_size);
+      MPI_Irecv (buf0, buf_size, MPI_INT, src, 0, MPI_COMM_WORLD, &req1);
+      MPI_Isend (buf1, buf_size, MPI_INT, dest, 0, MPI_COMM_WORLD, &req2);
+      MPI_Wait(&req2,&status);
+      MPI_Wait(&req1,&status);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/irecv-isend-ok2.c b/teshsuite/smpi/isp/umpire/irecv-isend-ok2.c
new file mode 100644 (file)
index 0000000..80a6388
--- /dev/null
@@ -0,0 +1,59 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size  128
+#define req_count 20
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int i;
+  MPI_Status status;
+  MPI_Request req1;
+  MPI_Request req2;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else
+    {
+      int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
+      int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
+      memset (buf0, rank, buf_size);
+      memset (buf1, rank, buf_size);
+      
+      for (i = 0; i < req_count; i++) {
+       MPI_Irecv (buf0, buf_size, MPI_INT, src, 0, MPI_COMM_WORLD, &req1);
+       MPI_Isend (buf1, buf_size, MPI_INT, dest, 0, MPI_COMM_WORLD, &req2);
+       MPI_Wait(&req2,&status);
+       MPI_Wait(&req1,&status);
+      }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/lost-request-waitall.c b/teshsuite/smpi/isp/umpire/lost-request-waitall.c
new file mode 100644 (file)
index 0000000..cf7da83
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/lost-request-waitall.c,v 1.1.1.1 2000/08/23 17:28:26 vetter Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+mydelay ()                     /* about 6 seconds */
+{
+  int i;
+  int val;
+  for (i = 0; i < 3000000; i++)
+    {
+      val = getpid ();         /* about 2.06 usecs on snow */
+    }
+  return val;
+}
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int tag1 = 31;
+  int tag2 = 32;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request req, req0, req1;
+  MPI_Status status, status0, status1;
+  MPI_Request areq[10];
+  MPI_Status astatus[10];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  memset (buf0, 0, buf_size);
+  memset (buf1, 1, buf_size);
+
+  /* 0 sends 1 two messages, but the request gets overwritten */
+  switch (rank)
+    {
+    case 0:
+      MPI_Isend (buf0, buf_size, MPI_INT, 1, tag1, comm, &(areq[0]));
+      MPI_Isend (buf1, buf_size, MPI_INT, 1, tag2, comm, &(areq[1]));
+      /* do some work here */
+      //mydelay ();
+      MPI_Waitall (2, areq, astatus);
+      break;
+
+    case 1:
+      MPI_Irecv (buf0, buf_size, MPI_INT, 0, tag1, comm, &req);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 0, tag2, comm, &req);        /* overwrite req */
+      /* do some work here and get confused */
+      MPI_Wait (&req, &status);
+      break;
+
+    default:
+      /* do nothing */
+      break;
+    }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/lost-request.c b/teshsuite/smpi/isp/umpire/lost-request.c
new file mode 100644 (file)
index 0000000..8baabb5
--- /dev/null
@@ -0,0 +1,87 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/lost-request.c,v 1.3 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+mydelay ()                     /* about 6 seconds */
+{
+  int i;
+  int val;
+  for (i = 0; i < 3000000; i++)
+    {
+      val = getpid ();         /* about 2.06 usecs on snow */
+    }
+  return val;
+}
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int tag1 = 31;
+  int tag2 = 32;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request req, req0, req1;
+  MPI_Status status, status0, status1;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  memset (buf0, 1, buf_size);
+  memset (buf1, 2, buf_size);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  /* 0 sends 1 two messages, but the request gets overwritten */
+  switch (rank)
+    {
+    case 0:
+      MPI_Isend (buf0, buf_size, MPI_INT, 1, tag1, MPI_COMM_WORLD, &req0);
+      MPI_Isend (buf1, buf_size, MPI_INT, 1, tag2, MPI_COMM_WORLD, &req1);
+
+      /* do some work here */
+
+      mydelay ();
+      MPI_Wait (&req0, &status0);
+      MPI_Wait (&req1, &status1);
+      break;
+
+    case 1:
+      MPI_Irecv (buf0, buf_size, MPI_INT, 0, tag1, MPI_COMM_WORLD, &req);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 0, tag2, MPI_COMM_WORLD, &req);      /* overwrite req */
+
+      /* do some work here and get confused */
+
+      MPI_Wait (&req, &status);
+      break;
+
+    default:
+      /* do nothing */
+      break;
+    }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/lost-request2.c b/teshsuite/smpi/isp/umpire/lost-request2.c
new file mode 100644 (file)
index 0000000..0953cb5
--- /dev/null
@@ -0,0 +1,131 @@
+/* -*- Mode: C; -*- */
+/* Modifier: Bronis R. de Supinski (bronis@llnl.gov) Wed Nov 29 2000 */
+/* lost-request2.c -- create requests that are never completed */
+/* Derived directly from comm-split.c by John Gyllenhaal (see below) */
+/* Written by John Gyllenhaal 10/25/02 to reproduce Gary Kerbel
+  * request leak that caused:
+  *   0:ERROR: 0032-160 Too many communicators  (2046) in
+  *            MPI_Comm_split, task 0
+  * when run for too many cycles.
+  *
+  * Compile with:
+  *   mpxlc comm_split.c -o comm_split
+  * Run with a multiple of two tasks, even tasks have the problem:
+  *  comm_split -nodes 1 -procs 4
+  */
+
+
+#include "mpi.h"
+#include <stdio.h>
+
+
+#define CYCLE_COUNT 5
+
+int main
+(int argc, char **argv)
+{
+  int  numtasks, rank, rc, split_rank, recv_int;
+  int cycle;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Comm split_comm;
+  MPI_Status status;
+  MPI_Request request;
+  int done;
+
+  rc = MPI_Init(&argc,&argv);
+  if (rc != MPI_SUCCESS) 
+    {
+      printf ("Error starting MPI program. Terminating.\n");
+      MPI_Abort(MPI_COMM_WORLD, rc);
+    }
+
+  MPI_Comm_size(MPI_COMM_WORLD,&numtasks);
+  MPI_Comm_rank(MPI_COMM_WORLD,&rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  
+  /* Must be multiple of two for this test */
+  if ((numtasks & 1) != 0)
+    {
+      printf ("Tasks must be multiple of two for this test. Terminating.\n");
+      MPI_Abort(MPI_COMM_WORLD, rc);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* CYCLE_COUNT = 2500 causes IBM implementation to die from request leak */
+  /* Can see problem with only a few (5) cycles */
+  for (cycle = 0; cycle < CYCLE_COUNT; cycle ++)
+    {
+      /* Split adjacent pairs into their own communicator group */
+      rc = MPI_Comm_split (MPI_COMM_WORLD, rank/2, rank, &split_comm);
+      if (rc != MPI_SUCCESS)
+       {
+         printf ("Error (rc %i) cycle %i doing MPI_Comm_split!\n",
+                 rc, cycle);
+         MPI_Abort(MPI_COMM_WORLD, rc);
+       }
+
+      if (rank < 2)
+       printf ("Split_comm handle %i in cycle %i\n", split_comm, cycle);
+
+      MPI_Comm_rank(split_comm, &split_rank);
+
+      if (split_rank == 0)
+       {
+         rc = MPI_Issend (&cycle, 1, MPI_INT, 1, 0, split_comm, &request);
+         if (rc != MPI_SUCCESS)
+            {
+             printf ("Error (rc %i) cycle %i doing MPI_Isend!\n",
+                     rc, cycle);
+             MPI_Abort(MPI_COMM_WORLD, rc);
+            }
+         /* HERE IS THE PROBLEM! Request not waited on, memory leak! */
+       }
+      else if (split_rank == 1)
+       {
+         rc = MPI_Irecv (&recv_int, 1, MPI_INT, 0, 0, split_comm, 
+                         &request);
+         if (rc != MPI_SUCCESS)
+           {
+             printf ("Error (rc %i) cycle %i doing MPI_Irecv!\n",
+                     rc, cycle);
+             MPI_Abort(MPI_COMM_WORLD, rc);
+           }
+         done = 0;
+         while (!done)
+           {
+             rc = MPI_Test (&request, &done, &status);
+             if (rc != MPI_SUCCESS)
+               {
+                 printf ("Error (rc %i) cycle %i doing MPI_Test!\n",
+                         rc, cycle);
+                 MPI_Abort(MPI_COMM_WORLD, rc);
+               }
+           }
+         if (rank == 1)
+           {
+             printf ("Received %i in recv_int\n", recv_int);
+           }
+       }
+
+      /* Free the communicator */
+      rc = MPI_Comm_free (&split_comm);
+      if (rc != MPI_SUCCESS)
+       {
+         printf ("Error (rc %i) cycle %i doing MPI_Comm_free!\n",
+                 rc, cycle);
+         MPI_Abort(MPI_COMM_WORLD, rc);
+       }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize();
+  printf ("(%d) Finished normally\n", rank);
+
+  return 0;
+}
+
diff --git a/teshsuite/smpi/isp/umpire/lost-request3.c b/teshsuite/smpi/isp/umpire/lost-request3.c
new file mode 100644 (file)
index 0000000..7d4875c
--- /dev/null
@@ -0,0 +1,90 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Dec 20 2002 */
+/* lost-request3.c -- lose lots of requests */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/lost-request3.c,v 1.1 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* UNKNOWN N breaks umpire due to running out of memory as of 12/20/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS                10000
+#define REQS_PER_ITERATION            3
+#define REQS_LOST_PER_ITERATION       1
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[buf_size * REQS_PER_ITERATION];
+  MPI_Request req[REQS_PER_ITERATION];
+  MPI_Status statuses[REQS_PER_ITERATION];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  /* 0 sends 1 two messages, but the request gets overwritten */
+  switch (rank)
+    {
+    case 0:
+      for (i = 0; i < ITERATIONS; i++) {
+       memset (buf, 1, buf_size * REQS_PER_ITERATION);
+
+       for (j = 0; j < REQS_PER_ITERATION; j++) {
+         MPI_Isend (&buf[j*buf_size], buf_size, MPI_INT, 
+                    1, j, MPI_COMM_WORLD, &req[j]);
+       }
+
+       MPI_Waitall (REQS_PER_ITERATION, req, statuses);
+      }
+
+      break;
+
+    case 1:
+      for (i = 0; i < ITERATIONS; i++) {
+       memset (buf, 2, buf_size * REQS_PER_ITERATION);
+
+       for (j = 0; j < REQS_PER_ITERATION; j++) {
+         MPI_Irecv (&buf[j*buf_size], buf_size, MPI_INT, 
+                    0, j, MPI_COMM_WORLD, &req[j]);
+       }
+
+       /* do some work here and get confused */
+       MPI_Waitall(REQS_PER_ITERATION-REQS_LOST_PER_ITERATION,req,statuses);
+      }
+
+      break;
+
+    default:
+      /* do nothing */
+      break;
+    }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-any_src.c b/teshsuite/smpi/isp/umpire/no-error-any_src.c
new file mode 100644 (file)
index 0000000..48aa54e
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* no-error3.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      for (i = 1; i < nprocs; i++) {
+       MPI_Recv (buf, buf_size, MPI_INT, 
+                 MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+      }
+    }
+    else {
+      memset (buf, 1, buf_size);
+
+      MPI_Send (buf, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-derived-comms.c b/teshsuite/smpi/isp/umpire/no-error-derived-comms.c
new file mode 100644 (file)
index 0000000..4f5a479
--- /dev/null
@@ -0,0 +1,327 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* no-error-derived-comms.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+#define RUN_COMM_DUP
+#define RUN_COMM_CREATE
+#define RUN_INTERCOMM_CREATE
+#define RUN_CART_CREATE
+#define RUN_GRAPH_CREATE
+#define RUN_CART_SUB
+#define RUN_INTERCOMM_MERGE
+
+
+#define buf_size 128
+#define DCOMM_CALL_COUNT  7 /* MPI_Cart_create; MPI_Cart_sub;
+                              MPI_Comm_create; MPI_Comm_dup;
+                              MPI_Comm_split; MPI_Graph_create;
+                              and MPI_Intercomm_merge; store 
+                              MPI_Intercomm_create separately... */
+#define TWOD     2
+#define GRAPH_SZ 4
+#define INTERCOMM_CREATE_TAG 666
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j;
+  int *granks;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[buf_size];
+  MPI_Status status;
+  MPI_Comm temp;
+  MPI_Comm intercomm = MPI_COMM_NULL;
+  MPI_Comm dcomms[DCOMM_CALL_COUNT];
+  MPI_Group world_group, dgroup;
+  int intersize, dnprocs[DCOMM_CALL_COUNT], drank[DCOMM_CALL_COUNT];
+  int dims[TWOD], periods[TWOD], remain_dims[TWOD];
+  int graph_index[] = { 2, 3, 4, 6 };
+  int graph_edges[] = { 1, 3, 0, 3, 0, 2 };
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* probably want number to be higher... */
+  if (nprocs < 4) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (DCOMM_CALL_COUNT > 0) {
+#ifdef RUN_COMM_DUP
+      /* create all of the derived communicators... */
+      /* simplest is created by MPI_Comm_dup... */
+      MPI_Comm_dup (MPI_COMM_WORLD, &dcomms[0]);
+#else
+      dcomms[0] = MPI_COMM_NULL;
+#endif
+    }
+
+    if (DCOMM_CALL_COUNT > 1) {
+#ifdef RUN_COMM_CREATE
+      /* use subset of MPI_COMM_WORLD group for MPI_Comm_create... */
+      MPI_Comm_group (MPI_COMM_WORLD, &world_group);
+      granks = (int *) malloc (sizeof(int) * (nprocs/2));
+      for (i = 0; i < nprocs/2; i++)
+       granks [i] = 2 * i;
+      MPI_Group_incl (world_group, nprocs/2, granks, &dgroup);
+      MPI_Comm_create (MPI_COMM_WORLD, dgroup, &dcomms[1]);
+      MPI_Group_free (&world_group);
+      MPI_Group_free (&dgroup);
+      free (granks);
+#else
+      dcomms[1] = MPI_COMM_NULL;
+#endif
+    }
+
+    if (DCOMM_CALL_COUNT > 2) {
+#ifdef RUN_COMM_SPLIT
+      /* split into thirds with inverted ranks... */
+      MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &dcomms[2]);
+#else
+      dcomms[2] = MPI_COMM_NULL;
+#endif
+    }
+
+#ifdef RUN_INTERCOMM_CREATE
+    if ((DCOMM_CALL_COUNT < 2) || (dcomms[2] == MPI_COMM_NULL)) {
+      MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp);
+    }
+    else {
+      temp = dcomms[2];
+    }
+    if (rank % 3) {
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                           (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                           nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                           INTERCOMM_CREATE_TAG, &intercomm);
+    }
+    if ((DCOMM_CALL_COUNT < 2) || (dcomms[2] == MPI_COMM_NULL)) {
+      MPI_Comm_free (&temp);
+    }
+#endif
+
+    if (DCOMM_CALL_COUNT > 3) {
+#ifdef RUN_CART_CREATE
+      /* create a 2 X nprocs/2 torus topology, allow reordering */
+      dims[0] = 2;
+      dims[1] = nprocs/2;
+      periods[0] = periods[1] = 1;
+      MPI_Cart_create (MPI_COMM_WORLD, TWOD, dims, periods, 1, &dcomms[3]);
+#else
+      dcomms[3] = MPI_COMM_NULL;
+#endif
+    }
+
+    if (DCOMM_CALL_COUNT > 4) {
+#ifdef RUN_GRAPH_CREATE
+      /* create the graph on p.268 MPI: The Complete Reference... */
+      MPI_Graph_create (MPI_COMM_WORLD, GRAPH_SZ, 
+                       graph_index, graph_edges, 1, &dcomms[4]);
+#else
+      dcomms[4] = MPI_COMM_NULL;
+#endif
+    }
+
+    if (DCOMM_CALL_COUNT > 5) {
+#ifdef RUN_CART_SUB
+#ifndef RUN_CART_CREATE
+      /* need to make cartesian communicator temporarily... */
+      /* create a 2 X nprocs/2 torus topology, allow reordering */
+      dims[0] = 2;
+      dims[1] = nprocs/2;
+      periods[0] = periods[1] = 1;
+      MPI_Cart_create (MPI_COMM_WORLD, TWOD, dims, periods, 1, &dcomms[3]);
+#endif
+      if (dcomms[3] != MPI_COMM_NULL) {
+       /* create 2 1 X nprocs/2 topologies... */
+       remain_dims[0] = 0;
+       remain_dims[1] = 1;
+       MPI_Cart_sub (dcomms[3], remain_dims, &dcomms[5]);
+#ifndef RUN_CART_CREATE
+       /* free up temporarily created cartesian communicator... */
+       MPI_Comm_free (&dcomms[3]);
+#endif
+      }
+      else {
+       dcomms[5] = MPI_COMM_NULL;
+      }
+#else
+      dcomms[5] = MPI_COMM_NULL;
+#endif
+    }
+
+    if (DCOMM_CALL_COUNT > 6) {
+#ifdef RUN_INTERCOMM_MERGE
+#ifndef RUN_INTERCOMM_CREATE
+#ifndef RUN_COMM_SPLIT
+      /* need to make split communicator temporarily... */
+      /* split into thirds with inverted ranks... */
+      MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &dcomms[2]);
+#endif
+#endif
+      /* create an intercommunicator and merge it... */
+      if (rank % 3) {
+#ifndef RUN_INTERCOMM_CREATE
+       MPI_Intercomm_create (dcomms[2], 0, MPI_COMM_WORLD, 
+                             (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                             nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                             INTERCOMM_CREATE_TAG, &intercomm);
+#endif
+
+       MPI_Intercomm_merge (intercomm, ((rank % 3) == 1), &dcomms[6]);
+
+#ifndef RUN_INTERCOMM_CREATE
+       /* we are done with intercomm... */
+       MPI_Comm_free (&intercomm);
+#endif
+      }
+      else {
+       dcomms[6] = MPI_COMM_NULL;
+      }    
+#ifndef RUN_INTERCOMM_CREATE
+#ifndef RUN_COMM_SPLIT
+      if (dcomms[2] != MPI_COMM_NULL)
+       /* free up temporarily created split communicator... */
+       MPI_Comm_free (&dcomms[2]);
+#endif
+#endif
+#else
+      dcomms[6] = MPI_COMM_NULL;
+#endif
+    }
+
+    /* get all of the sizes and ranks... */
+    for (i = 0; i < DCOMM_CALL_COUNT; i++) {
+      if (dcomms[i] != MPI_COMM_NULL) {
+       MPI_Comm_size (dcomms[i], &dnprocs[i]);
+       MPI_Comm_rank (dcomms[i], &drank[i]);
+      }
+      else {
+       dnprocs[i] = 0;
+       drank[i] = -1;
+      }
+    }
+
+#ifdef RUN_INTERCOMM_CREATE
+    /* get the intercomm remote size... */
+    if (rank % 3) {
+      MPI_Comm_remote_size (intercomm, &intersize);
+    }
+#endif
+
+    /* do some point to point on all of the dcomms... */
+    for (i = 0; i < DCOMM_CALL_COUNT; i++) {
+      if (dnprocs[i] > 1) {
+       if (drank[i] == 0) {
+         for (j = 1; j < dnprocs[i]; j++) {
+           MPI_Recv (buf, buf_size, MPI_INT, j, 0, dcomms[i], &status);
+         }
+       }
+       else {
+         memset (buf, 1, buf_size);
+
+         MPI_Send (buf, buf_size, MPI_INT, 0, 0, dcomms[i]);
+       }
+      }
+    }
+
+#ifdef RUN_INTERCOMM_CREATE
+    /* do some point to point on the intercomm... */
+    if ((rank % 3) == 1) {
+      for (j = 0; j < intersize; j++) {
+       MPI_Recv (buf, buf_size, MPI_INT, j, 0, intercomm, &status);
+      }
+    }
+    else if ((rank % 3) == 2) {
+      for (j = 0; j < intersize; j++) {
+       memset (buf, 1, buf_size);
+
+       MPI_Send (buf, buf_size, MPI_INT, j, 0, intercomm);
+      }
+    }
+#endif
+
+    /* do a bcast on all of the dcomms... */
+    for (i = 0; i < DCOMM_CALL_COUNT; i++) {
+      /* IBM's implementation gets error with comm over MPI_COMM_NULL... */
+      if (dnprocs[i] > 0)
+       MPI_Bcast (buf, buf_size, MPI_INT, 0, dcomms[i]);
+    }
+
+    /* use any source receives... */
+    for (i = 0; i < DCOMM_CALL_COUNT; i++) {
+      if (dnprocs[i] > 1) {
+       if (drank[i] == 0) {
+         for (j = 1; j < dnprocs[i]; j++) {
+           MPI_Recv (buf, buf_size, MPI_INT, 
+                     MPI_ANY_SOURCE, 0, dcomms[i], &status);
+         }
+       }
+       else {
+         memset (buf, 1, buf_size);
+
+         MPI_Send (buf, buf_size, MPI_INT, 0, 0, dcomms[i]);
+       }
+      }
+    }
+
+#ifdef RUN_INTERCOMM_CREATE
+    /* do any source receives on the intercomm... */
+    if ((rank % 3) == 1) {
+      for (j = 0; j < intersize; j++) {
+       MPI_Recv (buf, buf_size, MPI_INT, 
+                 MPI_ANY_SOURCE, 0, intercomm, &status);
+      }
+    }
+    else if ((rank % 3) == 2) {
+      for (j = 0; j < intersize; j++) {
+       memset (buf, 1, buf_size);
+
+       MPI_Send (buf, buf_size, MPI_INT, j, 0, intercomm);
+      }
+    }
+#endif
+
+    /* do a barrier on all of the dcomms... */
+    for (i = 0; i < DCOMM_CALL_COUNT; i++) {
+      /* IBM's implementation gets with communication over MPI_COMM_NULL... */
+      if (dnprocs[i] > 0)
+       MPI_Barrier (dcomms[i]);
+    }
+
+    /* free all of the derived communicators... */
+    for (i = 0; i < DCOMM_CALL_COUNT; i++) {
+      /* freeing MPI_COMM_NULL is explicitly defined as erroneous... */
+      if (dnprocs[i] > 0)
+       MPI_Comm_free (&dcomms[i]);
+    }
+
+#ifdef RUN_INTERCOMM_CREATE
+    if (rank % 3)
+      /* we are done with intercomm... */
+      MPI_Comm_free (&intercomm);
+#endif
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-interleaved-isend.c b/teshsuite/smpi/isp/umpire/no-error-interleaved-isend.c
new file mode 100644 (file)
index 0000000..762ce39
--- /dev/null
@@ -0,0 +1,69 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+/* no-error-interleaved-isend.c - use isends with vector type */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-interleaved-isend.c,v 1.2 2002/06/07 20:41:22 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[buf_size];
+  int i;
+  MPI_Request req;
+  MPI_Status status;
+  MPI_Datatype strided_type;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Type_vector (buf_size/2, 1, 2, MPI_INT, &strided_type);
+  MPI_Type_commit (&strided_type);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank < 2)
+    {
+      for (i = rank; i < buf_size; i = i + 2)
+       buf[i] = i;
+
+      MPI_Isend (&buf[rank], 1, 
+                strided_type, (rank + 1) % 2, 0, comm, &req);
+
+      MPI_Recv (&buf[(rank + 1) % 2], 1, 
+               strided_type, (rank + 1) % 2, 0, comm, &status);
+
+      MPI_Wait (&req, &status);
+
+      for (i = 0; i < buf_size; i++)
+       assert (buf[i] == i);
+    }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  MPI_Type_free (&strided_type);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-persistent-all-completions.c b/teshsuite/smpi/isp/umpire/no-error-persistent-all-completions.c
new file mode 100644 (file)
index 0000000..03267e3
--- /dev/null
@@ -0,0 +1,170 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-persistent-all-completions.c,v 1.1 2002/01/14 18:58:06 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define BUF_SIZE 128
+#define NUM_COMPLETION_MECHANISMS 8
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2];
+  int i, j, k, index, outcount, flag;
+  int indices[2];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (&buf[0], BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (i = 0; i < BUF_SIZE; i++) {
+      buf[i] = i;
+      buf[BUF_SIZE + i] = BUF_SIZE - 1 - i;
+    }
+  }
+
+  for (k = 0; k < (NUM_COMPLETION_MECHANISMS * 2); k++) {
+    if (rank == 1) {
+      /* zero out the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    if (rank == 0) {
+      /* start the persistent sends... */
+      if (k % 2) {
+       MPI_Startall (2, &aReq[0]);
+      }
+      else {
+       for (j = 0; j < 2; j++) {
+         MPI_Start (&aReq[j]);
+       }
+      }
+    
+      /* complete the sends */
+      switch (k/2) {
+      case 0:
+       /* use MPI_Wait */
+       for (j = 0; j < 2; j++) {
+         MPI_Wait (&aReq[j], &aStatus[j]);
+       }
+       break;
+       
+      case 1:
+       /* use MPI_Waitall */
+       MPI_Waitall (2, aReq, aStatus);
+       break;
+
+      case 2:
+       /* use MPI_Waitany */
+       for (j = 0; j < 2; j++) {
+         MPI_Waitany (2, aReq, &index, aStatus);
+       }
+       break;
+       
+      case 3:
+       /* use MPI_Waitsome */
+       j = 0;
+       while (j < 2) {
+         MPI_Waitsome (2, aReq, &outcount, indices, aStatus);
+         j += outcount;
+       }
+       break;
+
+      case 4:
+       /* use MPI_Test */
+       for (j = 0; j < 2; j++) {
+         flag = 0;
+         while (!flag) {
+           MPI_Test (&aReq[j], &flag, &aStatus[j]);
+         }
+       }
+       break;
+       
+      case 5:
+       /* use MPI_Testall */
+       flag = 0;
+       while (!flag) {
+         MPI_Testall (2, aReq, &flag, aStatus);
+       }
+       break;
+
+      case 6:
+       /* use MPI_Testany */
+       for (j = 0; j < 2; j++) {
+         flag = 0;
+         while (!flag) {
+           MPI_Testany (2, aReq, &index, &flag, aStatus);
+         }
+       }
+       break;
+       
+      case 7:
+       /* use MPI_Testsome */
+       j = 0;
+       while (j < 2) {
+         outcount = 0;
+         while (!outcount) {
+           MPI_Testsome (2, aReq, &outcount, indices, aStatus);
+         }
+         j += outcount;
+       }
+       break;
+
+      default:
+       assert (0);
+       break;
+      }
+    }
+    else if (rank == 1) {
+      /* set up receives for all of the sends */
+      for (j = 0; j < 2; j++) {
+       MPI_Irecv (&buf[j * BUF_SIZE], BUF_SIZE, 
+                  MPI_INT, 0, j, comm, &aReq[j]);
+      }
+      /* complete all of the receives... */
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent requests */
+    for (i = 0 ; i < 2; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-persistent-test.c b/teshsuite/smpi/isp/umpire/no-error-persistent-test.c
new file mode 100644 (file)
index 0000000..1fac72d
--- /dev/null
@@ -0,0 +1,112 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-persistent-test.c,v 1.1 2002/01/14 18:58:07 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define BUF_SIZE 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2];
+  int i, j, k, index, outcount, flag;
+  int indices[2];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (&buf[0], BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (i = 0; i < BUF_SIZE; i++) {
+      buf[i] = i;
+      buf[BUF_SIZE + i] = BUF_SIZE - 1 - i;
+    }
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    if (rank == 0) {
+      /* start the persistent sends... */
+      if (k % 2) {
+       MPI_Startall (2, &aReq[0]);
+      }
+      else {
+       for (j = 0; j < 2; j++) {
+         MPI_Start (&aReq[j]);
+       }
+      }
+    
+      /* complete the sends */
+      if (k < 2) {
+       /* use MPI_Test */
+       for (j = 0; j < 2; j++) {
+         flag = 0;
+         while (!flag) {
+           MPI_Test (&aReq[j], &flag, &aStatus[j]);
+         }
+       }
+      }
+      else {
+       /* use MPI_Testall */
+       flag = 0;
+       while (!flag) {
+         MPI_Testall (2, aReq, &flag, aStatus);
+       }
+      }
+    }
+    else if (rank == 1) {
+      /* set up receives for all of the sends */
+      for (j = 0; j < 2; j++) {
+       MPI_Irecv (&buf[j * BUF_SIZE], BUF_SIZE, 
+                  MPI_INT, 0, j, comm, &aReq[j]);
+      }
+      /* complete all of the receives... */
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent requests */
+    for (i = 0 ; i < 2; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-persistent-testpartial.c b/teshsuite/smpi/isp/umpire/no-error-persistent-testpartial.c
new file mode 100644 (file)
index 0000000..9f0323e
--- /dev/null
@@ -0,0 +1,116 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis de Supinski (bronis@llnl.gov) */
+/* no-error-testpartial.c -- persistent requests and testany/testsome */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-persistent-testpartial.c,v 1.2 2002/07/30 21:34:43 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define BUF_SIZE 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2];
+  int i, j, k, index, outcount, flag;
+  int indices[2];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (&buf[0], BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (i = 0; i < BUF_SIZE; i++) {
+      buf[i] = i;
+      buf[BUF_SIZE + i] = BUF_SIZE - 1 - i;
+    }
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    if (rank == 0) {
+      /* start the persistent sends... */
+      if (k % 2) {
+       MPI_Startall (2, &aReq[0]);
+      }
+      else {
+       for (j = 0; j < 2; j++) {
+         MPI_Start (&aReq[j]);
+       }
+      }
+    
+      /* complete the sends */
+      if (k < 2) {
+       /* use MPI_Testany */
+       for (j = 0; j < 2; j++) {
+         flag = 0;
+         while (!flag) {
+           MPI_Testany (2, aReq, &index, &flag, aStatus);
+         }
+       }
+      }
+      else {
+       /* use MPI_Testsome */
+       j = 0;
+       while (j < 2) {
+         outcount = 0;
+         while (!outcount) {
+           MPI_Testsome (2, aReq, &outcount, indices, aStatus);
+         }
+         j += outcount;
+       }
+      }
+    }
+    else if (rank == 1) {
+      /* set up receives for all of the sends */
+      for (j = 0; j < 2; j++) {
+       MPI_Irecv (&buf[j * BUF_SIZE], BUF_SIZE, 
+                  MPI_INT, 0, j, comm, &aReq[j]);
+      }
+      /* complete all of the receives... */
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent requests */
+    for (i = 0 ; i < 2; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-persistent-waitpartial.c b/teshsuite/smpi/isp/umpire/no-error-persistent-waitpartial.c
new file mode 100644 (file)
index 0000000..d64207b
--- /dev/null
@@ -0,0 +1,109 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-persistent-waitpartial.c,v 1.1 2002/01/15 23:55:08 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define BUF_SIZE 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2];
+  int i, j, k, index, outcount, flag;
+  int indices[2];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (&buf[0], BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (i = 0; i < BUF_SIZE; i++) {
+      buf[i] = i;
+      buf[BUF_SIZE + i] = BUF_SIZE - 1 - i;
+    }
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    if (rank == 0) {
+      /* start the persistent sends... */
+      if (k % 2) {
+       MPI_Startall (2, &aReq[0]);
+      }
+      else {
+       for (j = 0; j < 2; j++) {
+         MPI_Start (&aReq[j]);
+       }
+      }
+    
+      /* complete the sends */
+      if (k < 2) {
+       /* use MPI_Waitany */
+       for (j = 0; j < 2; j++)
+         MPI_Waitany (2, aReq, &index, aStatus);
+      }
+      else {
+       /* use MPI_Waitsome */
+       j = 0;
+       while (j < 2) {
+         MPI_Waitsome (2, aReq, &outcount, indices, aStatus);
+         j += outcount;
+       }
+      }
+    }
+    else if (rank == 1) {
+      /* set up receives for all of the sends */
+      for (j = 0; j < 2; j++) {
+       MPI_Irecv (&buf[j * BUF_SIZE], BUF_SIZE, 
+                  MPI_INT, 0, j, comm, &aReq[j]);
+      }
+      /* complete all of the receives... */
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent requests */
+    for (i = 0 ; i < 2; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-persistent.c b/teshsuite/smpi/isp/umpire/no-error-persistent.c
new file mode 100644 (file)
index 0000000..10f502d
--- /dev/null
@@ -0,0 +1,103 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov  1 1999 */
+/* lost-request.c -- overwrite a request and essentially lose a synch point */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-persistent.c,v 1.1 2002/01/14 18:58:07 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define BUF_SIZE 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2];
+  int i, j, k, index, outcount, flag;
+  int indices[2];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (&buf[0], BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (i = 0; i < BUF_SIZE; i++) {
+      buf[i] = i;
+      buf[BUF_SIZE + i] = BUF_SIZE - 1 - i;
+    }
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2);
+    }
+
+    MPI_Barrier(MPI_COMM_WORLD);
+
+    if (rank == 0) {
+      /* start the persistent sends... */
+      if (k % 2) {
+       MPI_Startall (2, &aReq[0]);
+      }
+      else {
+       for (j = 0; j < 2; j++) {
+         MPI_Start (&aReq[j]);
+       }
+      }
+    
+      /* complete the sends */
+      if (k < 2)
+       /* use MPI_Wait */
+       for (j = 0; j < 2; j++)
+         MPI_Wait (&aReq[j], &aStatus[j]);
+      else 
+       /* use MPI_Waitall */
+       MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      /* set up receives for all of the sends */
+      for (j = 0; j < 2; j++) {
+       MPI_Irecv (&buf[j * BUF_SIZE], BUF_SIZE, 
+                  MPI_INT, 0, j, comm, &aReq[j]);
+      }
+      /* complete all of the receives... */
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent requests */
+    for (i = 0 ; i < 2; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-probe-any_src.c b/teshsuite/smpi/isp/umpire/no-error-probe-any_src.c
new file mode 100644 (file)
index 0000000..4ea1ef1
--- /dev/null
@@ -0,0 +1,67 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Oct 30 2002 */
+/* no-error-probe-any_src.c -- do some MPI calls without any errors */
+/* adapted from MPI The Complete Reference, p. 77... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j;
+  double x;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* use probe to guarantee msg has arrived when blocking recv is called */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      i = 0;
+
+      MPI_Send (&i, 1, MPI_INT, 2, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      x = 1.0;
+
+      MPI_Send (&x, 1, MPI_DOUBLE, 2, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      for (j = 0; j < 2; j++) {
+       MPI_Probe (MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+      
+       if (status.MPI_SOURCE == 0)
+         MPI_Recv (&i, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+       else 
+         MPI_Recv (&x, 1, MPI_DOUBLE, 1, 0, MPI_COMM_WORLD, &status);
+      }
+    }
+      
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-probe-any_tag.c b/teshsuite/smpi/isp/umpire/no-error-probe-any_tag.c
new file mode 100644 (file)
index 0000000..9be706c
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Oct 30 2002 */
+/* no-error-probe-any_tag.c -- do some MPI calls without any errors */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j;
+  double x;
+  MPI_Status status;
+  MPI_Request req0, req1;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* use probe to guarantee msg has arrived when blocking recv is called */
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      i = 0;
+      x = 1.0;
+
+      MPI_Isend (&i, 1, MPI_INT, 1, 0, MPI_COMM_WORLD, &req0);
+
+      MPI_Isend (&x, 1, MPI_DOUBLE, 1, 1, MPI_COMM_WORLD, &req1);
+
+      MPI_Wait (&req1, &status);
+
+      MPI_Wait (&req0, &status);
+    }
+  else if (rank == 1) 
+    {
+      for (j = 0; j < 2; j++) {
+       MPI_Probe (0, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+      
+       if (status.MPI_TAG == 0)
+         MPI_Recv (&i, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+       else
+         MPI_Recv (&x, 1, MPI_DOUBLE, 0, 1, MPI_COMM_WORLD, &status);
+      }
+    }
+      
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-probe.c b/teshsuite/smpi/isp/umpire/no-error-probe.c
new file mode 100644 (file)
index 0000000..159bfc3
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Jan 3 2002 */
+/* no-error-probe.c -- do some MPI calls without any errors */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j;
+  double x;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      i = 0;
+
+      MPI_Send (&i, 1, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Probe (1, 0, MPI_COMM_WORLD, &status);
+      
+      MPI_Recv (&x, 1, MPI_DOUBLE, 1, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      x = 1.0;
+
+      MPI_Probe (0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Recv (&i, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (&x, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);
+    }
+      
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-test.c b/teshsuite/smpi/isp/umpire/no-error-test.c
new file mode 100644 (file)
index 0000000..7a87685
--- /dev/null
@@ -0,0 +1,66 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int flag = 0;
+  MPI_Status status;
+  MPI_Request req;
+       int i;
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      while (!flag)
+       MPI_Test (&req, &flag, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &req);
+
+      while (!flag)
+       MPI_Test (&req, &flag, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-testall.c b/teshsuite/smpi/isp/umpire/no-error-testall.c
new file mode 100644 (file)
index 0000000..da5ccca
--- /dev/null
@@ -0,0 +1,74 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error-testall.c -- use MPI_Testall without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int flag = 0;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      while (!flag) 
+       MPI_Testall (2, reqs, &flag, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      while (!flag) 
+       MPI_Testall (2, reqs, &flag, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-testany.c b/teshsuite/smpi/isp/umpire/no-error-testany.c
new file mode 100644 (file)
index 0000000..75bdb65
--- /dev/null
@@ -0,0 +1,74 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error-waitany.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int buf2[buf_size];
+  int i, flipbit, done, flag;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Request reqs[3];
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, &reqs[0]);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 2, MPI_COMM_WORLD, &reqs[1]);
+      MPI_Irecv (buf2, buf_size, MPI_INT, 1, 3, MPI_COMM_WORLD, &reqs[2]);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Send (&flipbit, 1, MPI_INT, 1, i, MPI_COMM_WORLD);
+
+       flag = 0;
+printf ("req = %0x", (unsigned int)reqs);
+       while (!flag)
+           MPI_Testany (i, reqs, &done, &flag, &status);
+
+       assert (done == (i - 1));
+      }
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 1, buf_size);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Recv (&flipbit, 1, MPI_INT, 0, i, MPI_COMM_WORLD, &status);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 0, i, MPI_COMM_WORLD);
+      }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-vector-isend.c b/teshsuite/smpi/isp/umpire/no-error-vector-isend.c
new file mode 100644 (file)
index 0000000..e217177
--- /dev/null
@@ -0,0 +1,77 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+/* no-error-vector-isend.c - use isend with vector type; touch holes */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/no-error-vector-isend.c,v 1.1 2002/06/07 20:41:22 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[buf_size];
+  int i;
+  MPI_Request req;
+  MPI_Status status;
+  MPI_Datatype strided_type;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Type_vector (buf_size/2, 1, 2, MPI_INT, &strided_type);
+  MPI_Type_commit (&strided_type);
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    for (i = 0; i < buf_size; i = i + 2)
+      buf[i] = i;
+
+    MPI_Isend (&buf[rank], 1, strided_type, (rank + 1) % 2, 0, comm, &req);
+
+    for (i = 1; i < buf_size; i = i + 2)
+      buf[i] = i;
+
+    MPI_Wait (&req, &status);
+
+    for (i = 0; i < buf_size; i++)
+      assert (buf[i] == i);
+  }
+  else if (rank == 1) {
+    for (i = 1; i < buf_size; i = i + 2)
+      buf[i] = i;
+
+    MPI_Recv (&buf[(rank + 1) % 2], 1, 
+             strided_type, (rank + 1) % 2, 0, comm, &status);
+
+    for (i = 0; i < buf_size; i++)
+      assert (buf[i] == i);
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  MPI_Type_free (&strided_type);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-wait-any_src.c b/teshsuite/smpi/isp/umpire/no-error-wait-any_src.c
new file mode 100644 (file)
index 0000000..e33c2c9
--- /dev/null
@@ -0,0 +1,64 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Wait (&req, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-wait-any_src2.c b/teshsuite/smpi/isp/umpire/no-error-wait-any_src2.c
new file mode 100644 (file)
index 0000000..3649939
--- /dev/null
@@ -0,0 +1,60 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 1, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-wait-any_src3.c b/teshsuite/smpi/isp/umpire/no-error-wait-any_src3.c
new file mode 100644 (file)
index 0000000..db9980b
--- /dev/null
@@ -0,0 +1,85 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+#define NUMREPS  3
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int i;
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (NUMREPS < 1)
+    {
+      printf ("not enough repetitions\n");
+    }
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+       MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      for (i = 0; i < NUMREPS; i++) {
+       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+       
+       MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+      }
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      for (i = 0; i < NUMREPS-1; i++) {
+       MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+       MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+      }
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&req, &status);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-wait-any_src4.c b/teshsuite/smpi/isp/umpire/no-error-wait-any_src4.c
new file mode 100644 (file)
index 0000000..fd6b2a1
--- /dev/null
@@ -0,0 +1,79 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Wait (reqs, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+
+      MPI_Wait (&reqs[1], statuses);
+    }
+  else if (rank == 2)
+    {
+      //sleep (60);      
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-wait.c b/teshsuite/smpi/isp/umpire/no-error-wait.c
new file mode 100644 (file)
index 0000000..0f9d331
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&req, &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Wait (&req, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-wait2.c b/teshsuite/smpi/isp/umpire/no-error-wait2.c
new file mode 100644 (file)
index 0000000..2318a95
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error-wait2.c -- do some MPI calls without any errors */
+/*    use assignment of handles to confuse address checking */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req, req2;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &req);
+
+      req2 = req;
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Wait (&req2, &status, i);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &req);
+
+      req2 = req;
+
+      MPI_Wait (&req2, &status, i);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitall-any_src.c b/teshsuite/smpi/isp/umpire/no-error-waitall-any_src.c
new file mode 100644 (file)
index 0000000..2fe9b32
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* the following code is "correct although its result */
+  /* is non-deterministic - in task 0, either buf0 will */
+  /* hold result of memset to 0 and buf1 will hold result */
+  /* of memset to 1 or buf0 will hold result of memset to */
+  /* 1 and buf1 will hold result of memset to 0; in task 1, */
+  /* buf1 will mirror task 0 buf1 result while, in task 2, */
+  /* buf0 will mirror task 0 buf0 result; thus buf0 may */
+  /* be equal to buf1 in tasks 1 and 2 or it may not... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 2, 2, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+    }
+  else if (rank == 2)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 2, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitall-any_src2.c b/teshsuite/smpi/isp/umpire/no-error-waitall-any_src2.c
new file mode 100644 (file)
index 0000000..f6d3e36
--- /dev/null
@@ -0,0 +1,67 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      //sleep (60);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitall-any_src3.c b/teshsuite/smpi/isp/umpire/no-error-waitall-any_src3.c
new file mode 100644 (file)
index 0000000..bed4b5e
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitall.c b/teshsuite/smpi/isp/umpire/no-error-waitall.c
new file mode 100644 (file)
index 0000000..b1def37
--- /dev/null
@@ -0,0 +1,73 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitany-any_src.c b/teshsuite/smpi/isp/umpire/no-error-waitany-any_src.c
new file mode 100644 (file)
index 0000000..3aaa049
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error-waitany.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int buf2[buf_size];
+  int i, flipbit, done;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Request reqs[3];
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 1, MPI_COMM_WORLD, &reqs[0]);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 2, MPI_COMM_WORLD, &reqs[1]);
+      MPI_Irecv (buf2, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 3, MPI_COMM_WORLD, &reqs[2]);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Send (&flipbit, 1, MPI_INT, 1, i, MPI_COMM_WORLD);
+
+       MPI_Waitany (i, reqs, &done, &status);
+
+       assert (done == (i - 1));
+      }
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 1, buf_size);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Recv (&flipbit, 1, MPI_INT, 
+                 MPI_ANY_SOURCE, i, MPI_COMM_WORLD, &status);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 0, i, MPI_COMM_WORLD);
+      }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitany-any_src2.c b/teshsuite/smpi/isp/umpire/no-error-waitany-any_src2.c
new file mode 100644 (file)
index 0000000..93d3582
--- /dev/null
@@ -0,0 +1,85 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int done;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to any_src-waitall-deadlock.c */
+  /* but eliminates the deadlock by using MPI_Waitany... */
+  /* also very similar to no-error-waitall-any_src.c but */
+  /* this code is deterministic; buf0 holds result of */
+  /* memset to 0 and buf1 holds the result of memset to */
+  /* in all three tasks since must match the first Irecv first... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitany (2, reqs, &done, &status);
+
+      assert (done == 0);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 2, 2, MPI_COMM_WORLD);
+
+      MPI_Wait (&reqs[1], &status);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 2, MPI_COMM_WORLD, &status);
+
+      memset (buf1, 1, buf_size);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitany-any_src3.c b/teshsuite/smpi/isp/umpire/no-error-waitany-any_src3.c
new file mode 100644 (file)
index 0000000..2a690bc
--- /dev/null
@@ -0,0 +1,80 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int done;
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 
+                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitany (2, reqs, &done, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+
+      MPI_Wait (&reqs[(done + 1) % 2], statuses);
+    }
+  else if (rank == 2)
+    {
+      sleep (60);      
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitany.c b/teshsuite/smpi/isp/umpire/no-error-waitany.c
new file mode 100644 (file)
index 0000000..20ff43c
--- /dev/null
@@ -0,0 +1,71 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error-waitany.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int buf2[buf_size];
+  int i, flipbit, done;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Request reqs[3];
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, &reqs[0]);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 2, MPI_COMM_WORLD, &reqs[1]);
+      MPI_Irecv (buf2, buf_size, MPI_INT, 1, 3, MPI_COMM_WORLD, &reqs[2]);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Send (&flipbit, 1, MPI_INT, 1, i, MPI_COMM_WORLD);
+
+       MPI_Waitany (i, reqs, &done, &status);
+
+       assert (done == (i - 1));
+      }
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 1, buf_size);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Recv (&flipbit, 1, MPI_INT, 0, i, MPI_COMM_WORLD, &status);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 0, i, MPI_COMM_WORLD);
+      }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error-waitany2.c b/teshsuite/smpi/isp/umpire/no-error-waitany2.c
new file mode 100644 (file)
index 0000000..7de46f9
--- /dev/null
@@ -0,0 +1,86 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Mon Jan 21 2003 */
+/* no-error-waitany2.c -- test behavior with MPI_Waitany & MPI_REQUEST_NULL */
+
+#include <stdio.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int buf2[buf_size];
+  int i, flipbit, done;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Request reqs[3];
+
+      /* first just try MPI_Waitany on explicit MPI_REQUEST_NULL set... */
+      reqs[0] = reqs[1] = reqs[2] = MPI_REQUEST_NULL;
+
+      MPI_Waitany (3, reqs, &done, &status);
+
+      assert (done < 0);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, &reqs[0]);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 2, MPI_COMM_WORLD, &reqs[1]);
+      MPI_Irecv (buf2, buf_size, MPI_INT, 1, 3, MPI_COMM_WORLD, &reqs[2]);
+
+      for (i = 3; i >= 0; i--) {
+       MPI_Send (&flipbit, 1, MPI_INT, 1, i, MPI_COMM_WORLD);
+
+       MPI_Waitany (3, reqs, &done, &status);
+printf ("Done = %d\n", done);
+
+       if (i > 0) {
+         assert (done == (i - 1));
+       }
+       else {
+         assert (done < 0);
+       }
+      }
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 1, buf_size);
+
+      for (i = 3; i >= 0; i--) {
+       MPI_Recv (&flipbit, 1, MPI_INT, 0, i, MPI_COMM_WORLD, &status);
+       
+       if (i > 0) {
+         MPI_Send (buf0, buf_size, MPI_INT, 0, i, MPI_COMM_WORLD);
+       }
+      }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error.c b/teshsuite/smpi/isp/umpire/no-error.c
new file mode 100644 (file)
index 0000000..a78e7fe
--- /dev/null
@@ -0,0 +1,76 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else
+    {
+      if (rank == 0)
+       {
+         memset (buf0, 0, buf_size);
+
+         MPI_Sendrecv (buf0, buf_size, MPI_INT, 1, 0,
+                       buf1, buf_size, MPI_INT, 1, 0,
+                       MPI_COMM_WORLD, &status);
+
+         MPI_Sendrecv (buf1, buf_size, MPI_INT, 1, 0,
+                       buf0, buf_size, MPI_INT, 1, 0,
+                       MPI_COMM_WORLD, &status);
+
+         MPI_Sendrecv (buf0, buf_size, MPI_INT, 1, 0,
+                       buf1, buf_size, MPI_INT, 1, 0,
+                       MPI_COMM_WORLD, &status);
+       }
+      else
+       {
+         if (rank == 1)
+           {
+             memset (buf1, 1, buf_size);
+
+             MPI_Sendrecv (buf1, buf_size, MPI_INT, 0, 0,
+                           buf0, buf_size, MPI_INT, 0, 0,
+                           MPI_COMM_WORLD, &status);
+
+             MPI_Sendrecv (buf0, buf_size, MPI_INT, 0, 0,
+                           buf1, buf_size, MPI_INT, 0, 0,
+                           MPI_COMM_WORLD, &status);
+
+             MPI_Sendrecv (buf1, buf_size, MPI_INT, 0, 0,
+                           buf0, buf_size, MPI_INT, 0, 0,
+                           MPI_COMM_WORLD, &status);
+           }
+       }
+    }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error.tesh b/teshsuite/smpi/isp/umpire/no-error.tesh
new file mode 100644 (file)
index 0000000..9cb94eb
--- /dev/null
@@ -0,0 +1,25 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] Expanded states = 19
+> [0.000000] [mc_global/INFO] Visited states = 46
+> [0.000000] [mc_global/INFO] Executed transitions = 42
+> (2) Finished normally
+> (0) Finished normally
+> (1) Finished normally
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/no-error2.c b/teshsuite/smpi/isp/umpire/no-error2.c
new file mode 100644 (file)
index 0000000..659c1c2
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error2.c -- do some MPI calls without any errors */
+/* unlike no-error.c, this uses a raing and calls MPI_Barrier... */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int src, dest;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  src = (rank + 1) % nprocs;
+  dest = (rank - 1 + nprocs) % nprocs;
+
+  memset (buf0, 0, buf_size);
+
+  MPI_Sendrecv (buf0, buf_size, MPI_INT, dest, 0,
+               buf1, buf_size, MPI_INT, src, 0, MPI_COMM_WORLD, &status);
+
+  memset (buf1, 1, buf_size);
+
+  MPI_Sendrecv (buf1, buf_size, MPI_INT, src, 0,
+               buf0, buf_size, MPI_INT, dest, 0, MPI_COMM_WORLD, &status);
+
+  memset (buf0, 0, buf_size);
+
+  MPI_Sendrecv (buf0, buf_size, MPI_INT, dest, 0,
+               buf1, buf_size, MPI_INT, src, 0, MPI_COMM_WORLD, &status);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error2.tesh b/teshsuite/smpi/isp/umpire/no-error2.tesh
new file mode 100644 (file)
index 0000000..9bb6deb
--- /dev/null
@@ -0,0 +1,30 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error2
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] Expanded states = 87
+> [0.000000] [mc_global/INFO] Visited states = 343
+> [0.000000] [mc_global/INFO] Executed transitions = 331
+> (0) Finished normally
+> (1) Finished normally
+> (2) Finished normally
+> (0) Finished normally
+> (0) Finished normally
+> (1) Finished normally
+> (2) Finished normally
+> (0) Finished normally
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/no-error3-any_src.c b/teshsuite/smpi/isp/umpire/no-error3-any_src.c
new file mode 100644 (file)
index 0000000..c80985f
--- /dev/null
@@ -0,0 +1,58 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* no-error3.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Sendrecv (buf0, buf_size, MPI_INT, 1, 0,
+                   buf1, buf_size, MPI_INT, MPI_ANY_SOURCE, 0,
+                   MPI_COMM_WORLD, &status);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 
+               MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+      
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error3-any_src.tesh b/teshsuite/smpi/isp/umpire/no-error3-any_src.tesh
new file mode 100644 (file)
index 0000000..5cecb65
--- /dev/null
@@ -0,0 +1,30 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error3-any_src
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] Expanded states = 80
+> [0.000000] [mc_global/INFO] Visited states = 328
+> [0.000000] [mc_global/INFO] Executed transitions = 315
+> (0) Finished normally
+> (1) Finished normally
+> (2) Finished normally
+> (0) Finished normally
+> (0) Finished normally
+> (1) Finished normally
+> (2) Finished normally
+> (0) Finished normally
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/no-error3.c b/teshsuite/smpi/isp/umpire/no-error3.c
new file mode 100644 (file)
index 0000000..ec91c5d
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* no-error3.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Sendrecv (buf0, buf_size, MPI_INT, 1, 0,
+                   buf1, buf_size, MPI_INT, 1, 0,
+                   MPI_COMM_WORLD, &status);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+      
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error3.tesh b/teshsuite/smpi/isp/umpire/no-error3.tesh
new file mode 100644 (file)
index 0000000..1512434
--- /dev/null
@@ -0,0 +1,30 @@
+#! ./tesh
+
+! expect return 134
+$ ${bindir:=.}/../../../../bin/smpirun -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/coll_selector' to 'mpich'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check a safety property
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> (0) is alive on Tremblay
+> (1) is alive on Jupiter
+> (2) is alive on Fafard
+> [0.000000] [mc_global/INFO] Expanded states = 80
+> [0.000000] [mc_global/INFO] Visited states = 328
+> [0.000000] [mc_global/INFO] Executed transitions = 315
+> (0) Finished normally
+> (1) Finished normally
+> (2) Finished normally
+> (0) Finished normally
+> (0) Finished normally
+> (1) Finished normally
+> (2) Finished normally
+> (0) Finished normally
+> Aborted
+
diff --git a/teshsuite/smpi/isp/umpire/no-error4-any_src.c b/teshsuite/smpi/isp/umpire/no-error4-any_src.c
new file mode 100644 (file)
index 0000000..426149a
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* no-error3.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Recv_init (buf1, buf_size, MPI_INT, 
+                    MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf0, 1, buf_size);
+
+      MPI_Startall (2, aReq);
+      MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv_init (buf0, buf_size, MPI_INT, 
+                    MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Send_init (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf1, 0, buf_size);
+
+      MPI_Startall (2, aReq);
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Request_free (&aReq[0]);
+  MPI_Request_free (&aReq[1]);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/no-error4.c b/teshsuite/smpi/isp/umpire/no-error4.c
new file mode 100644 (file)
index 0000000..c962cca
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* no-error3.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Recv_init (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf0, 1, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv_init (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Send_init (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf1, 0, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Request_free (&aReq[0]);
+  MPI_Request_free (&aReq[1]);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/op-no-error.c b/teshsuite/smpi/isp/umpire/op-no-error.c
new file mode 100644 (file)
index 0000000..1cf7bb7
--- /dev/null
@@ -0,0 +1,87 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* op-no-error.c -- construct some MPI_Ops and free them */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/op-no-error.c,v 1.1 2002/05/29 16:09:50 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+/* construct multiple instances of same op to exercise more Umpire code... */
+#define OP_COUNT  5
+
+
+typedef struct {
+  double real, imag;
+} Complex;
+
+void 
+myProd (void *inp, void *inoutp, int *len, MPI_Datatype *dptr) 
+{
+  int i;
+  Complex c;
+  Complex *in = (Complex *) inp;
+  Complex *inout = (Complex *) inoutp;
+
+  for (i =0; i < *len; ++i) {
+    c.real = inout->real*in->real - inout->imag*in->imag;
+    c.imag = inout->real*in->imag + inout->imag*in->real;
+    *inout = c;
+    in++; inout++;
+  }
+
+  return;
+}
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Op newop[OP_COUNT];
+  MPI_Op newop2[OP_COUNT];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Op_create (myProd, 1, &newop[i]);
+
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Op_free (&newop[i]);
+
+  MPI_Barrier (comm);
+
+  /* now with an alias... */
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Op_create (myProd, 1, &newop[i]);
+
+  for (i = 0; i < OP_COUNT; i++) {
+    newop2[i] = newop[i];
+    MPI_Op_free (&newop2[i]);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/op-no-free.c b/teshsuite/smpi/isp/umpire/op-no-free.c
new file mode 100644 (file)
index 0000000..21cd5ae
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* op-no-free.c -- construct some MPI_Ops without freeing them */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/op-no-free.c,v 1.1 2002/05/29 16:09:50 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+/* construct multiple instances of same op to exercise more Umpire code... */
+#define OP_COUNT  5
+
+
+typedef struct {
+  double real, imag;
+} Complex;
+
+void 
+myProd (void *inp, void *inoutp, int *len, MPI_Datatype *dptr) 
+{
+  int i;
+  Complex c;
+  Complex *in = (Complex *) inp;
+  Complex *inout = (Complex *) inoutp;
+
+  for (i =0; i < *len; ++i) {
+    c.real = inout->real*in->real - inout->imag*in->imag;
+    c.imag = inout->real*in->imag + inout->imag*in->real;
+    *inout = c;
+    in++; inout++;
+  }
+
+  return;
+}
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  int i;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Op newop[OP_COUNT];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  for (i = 0; i < OP_COUNT; i++) 
+    MPI_Op_create (myProd, 1, &newop[i]);
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/partial-recv-exhaustive.c b/teshsuite/smpi/isp/umpire/partial-recv-exhaustive.c
new file mode 100644 (file)
index 0000000..f942daa
--- /dev/null
@@ -0,0 +1,402 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Oct 17, 2002 */
+/* partial-recv-exhaustive.c -- do lots pt-2-pt ops w/oversized recv bufs */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/partial-recv-exhaustive.c,v 1.1 2002/10/24 17:04:56 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+#define BUF_SIZE 128
+#define NUM_SEND_TYPES 8
+#define NUM_PERSISTENT_SEND_TYPES 4
+#define NUM_BSEND_TYPES 2
+#define NUM_COMPLETION_MECHANISMS 8
+#define NUM_RECV_TYPES 2
+#define SLOP 128
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int bbuf[(BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES];
+  int buf[BUF_SIZE * 2 * NUM_SEND_TYPES + SLOP];
+  int i, j, k, l, m, at_size, send_t_number, index, outcount, total, flag;
+  int num_errors, error_count, indices[2 * NUM_SEND_TYPES];
+  MPI_Request aReq[2 * NUM_SEND_TYPES];
+  MPI_Status aStatus[2 * NUM_SEND_TYPES];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Buffer_attach (bbuf, sizeof(int) * 
+                    (BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    send_t_number = NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES;
+
+    MPI_Send_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Send_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+    send_t_number++;
+
+    MPI_Bsend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Bsend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+
+    send_t_number++;
+
+    MPI_Rsend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Rsend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+    send_t_number++;
+
+    MPI_Ssend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Ssend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+  }
+
+  for (m = 0; m < NUM_RECV_TYPES; m++) {
+    if ((m == 1) && (rank == 1)) {
+      /* set up the persistent receives... */
+      for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+       MPI_Recv_init (&buf[j * BUF_SIZE], 
+                      BUF_SIZE + (j % 2) * SLOP, 
+                      MPI_INT, 0, j, comm, &aReq[j]);
+      }
+    }
+
+    for (l = 0; l < (NUM_COMPLETION_MECHANISMS * 2); l++) {
+      for (k = 0; k < (NUM_COMPLETION_MECHANISMS * 2); k++) {
+       if (rank == 0) {
+         /* initialize all of the send buffers */
+         for (j = 0; j < NUM_SEND_TYPES; j++) {
+           for (i = 0; i < BUF_SIZE; i++) {
+             buf[2 * j * BUF_SIZE + i] = i;
+             buf[((2 * j + 1) * BUF_SIZE) + i] = BUF_SIZE - 1 - i;
+           }
+         }
+       }
+       else if (rank == 1) {
+         /* zero out all of the receive buffers */
+         bzero (buf, sizeof(int) * BUF_SIZE * 2 * NUM_SEND_TYPES);
+       }
+
+       MPI_Barrier(MPI_COMM_WORLD);
+
+       if (rank == 0) {
+         /* set up transient sends... */
+         send_t_number = 0;
+    
+         MPI_Isend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                    1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Isend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                    BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                    comm, &aReq[send_t_number * 2 + 1]);
+
+         send_t_number++;
+       
+         MPI_Ibsend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                     1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Ibsend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                     BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                     comm, &aReq[send_t_number * 2 + 1]);
+
+         send_t_number++;
+
+         /* Barrier to ensure receives are posted for rsends... */
+         MPI_Barrier(MPI_COMM_WORLD);
+         
+         MPI_Irsend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Irsend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                     BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                     comm, &aReq[send_t_number * 2 + 1]);
+
+         send_t_number++;
+
+         MPI_Issend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                     1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Issend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                     BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                     comm, &aReq[send_t_number * 2 + 1]);
+
+         /* just to be paranoid */
+         send_t_number++;
+         assert (send_t_number == 
+                 NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES);
+
+         /* start the persistent sends... */
+         if (k % 2) {
+           MPI_Startall (NUM_PERSISTENT_SEND_TYPES * 2, 
+                         &aReq[2 * send_t_number]);
+         }
+         else {
+           for (j = 0; j < NUM_PERSISTENT_SEND_TYPES * 2; j++) {
+             MPI_Start (&aReq[2 * send_t_number + j]);
+           }
+         }
+       
+         /* complete the sends */
+         switch (k/2) {
+         case 0:
+           /* use MPI_Wait */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Wait (&aReq[j], &aStatus[j]);
+           }
+           break;
+         
+         case 1:
+           /* use MPI_Waitall */
+           MPI_Waitall (NUM_SEND_TYPES * 2, aReq, aStatus);
+           break;
+
+         case 2:
+           /* use MPI_Waitany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Waitany (NUM_SEND_TYPES * 2, aReq, &index, aStatus);
+           }
+           
+           break;
+       
+         case 3:
+           /* use MPI_Waitsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             MPI_Waitsome (NUM_SEND_TYPES * 2, aReq, 
+                           &outcount, indices, aStatus);
+
+             total += outcount;
+           }
+
+           break;
+
+         case 4:
+           /* use MPI_Test */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+           
+             while (!flag) {
+               MPI_Test (&aReq[j], &flag, &aStatus[j]);
+             }
+           }
+         
+           break;
+       
+         case 5:
+           /* use MPI_Testall */
+           flag = 0;
+           while (!flag) {
+             MPI_Testall (NUM_SEND_TYPES * 2, aReq, &flag, aStatus);
+           }
+         
+           break;
+       
+         case 6:
+           /* use MPI_Testany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+             while (!flag) {
+               MPI_Testany (NUM_SEND_TYPES * 2, aReq, 
+                            &index, &flag, aStatus);
+             }
+           }
+
+           break;
+       
+         case 7:
+           /* use MPI_Testsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             outcount = 0;
+
+             while (!outcount) {
+               MPI_Testsome (NUM_SEND_TYPES * 2, aReq, 
+                             &outcount, indices, aStatus);
+             }
+
+             total += outcount;
+           }
+
+           break;
+
+         default:
+           assert (0);
+           break;
+         }
+       }
+       else if (rank == 1) {
+         /* start receives for all of the sends */
+         if (m == 0) {
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Irecv (&buf[j * BUF_SIZE], 
+                        BUF_SIZE + (j % 2) * SLOP, 
+                        MPI_INT, 0, j, comm, &aReq[j]);
+           }
+         }
+         else {
+           /* start the persistent receives... */
+           if (l % 2) {
+             MPI_Startall (NUM_SEND_TYPES * 2, aReq);
+           }
+           else {
+             for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+               MPI_Start (&aReq[j]);
+             }
+           }
+         }
+
+         /* Barrier to ensure receives are posted for rsends... */
+         MPI_Barrier(MPI_COMM_WORLD);
+       
+         /* complete all of the receives... */
+         switch (l/2) {
+         case 0: 
+           /* use MPI_Wait */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Wait (&aReq[j], &aStatus[j]);
+           }
+           break;
+           
+         case 1:
+           /* use MPI_Waitall */
+           MPI_Waitall (NUM_SEND_TYPES * 2, aReq, aStatus);
+           break;
+
+         case 2:
+           /* use MPI_Waitany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Waitany (NUM_SEND_TYPES * 2, aReq, &index, aStatus);
+           }
+           
+           break;
+       
+         case 3:
+           /* use MPI_Waitsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             MPI_Waitsome (NUM_SEND_TYPES * 2, aReq, 
+                           &outcount, indices, aStatus);
+
+             total += outcount;
+           }
+
+           break;
+           
+         case 4:
+           /* use MPI_Test */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+             
+             while (!flag) {
+               MPI_Test (&aReq[j], &flag, &aStatus[j]);
+             }
+           }
+           
+           break;
+           
+         case 5:
+           /* use MPI_Testall */
+           flag = 0;
+           while (!flag) {
+             MPI_Testall (NUM_SEND_TYPES * 2, aReq, &flag, aStatus);
+           }
+           
+           break;
+           
+         case 6:
+           /* use MPI_Testany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+             while (!flag) {
+               MPI_Testany (NUM_SEND_TYPES * 2, aReq, 
+                            &index, &flag, aStatus);
+             }
+           }
+           
+           break;
+           
+         case 7:
+           /* use MPI_Testsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             outcount = 0;
+
+             while (!outcount) {
+               MPI_Testsome (NUM_SEND_TYPES * 2, aReq, 
+                             &outcount, indices, aStatus);
+             }
+             
+             total += outcount;
+           }
+           
+           break;
+           
+         default:
+           assert (0);
+           break;
+         }
+       }
+       else {
+         /* Barrier to ensure receives are posted for rsends... */
+         MPI_Barrier(MPI_COMM_WORLD);
+       }
+      }
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent send requests */
+    for (i = 2* (NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES);
+        i < 2 * NUM_SEND_TYPES; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+  else if (rank == 1) {
+    /* free the persistent receive requests */
+    for (i = 0; i < 2 * NUM_SEND_TYPES; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+
+  MPI_Buffer_detach (bbuf, &at_size);
+
+  assert (at_size == 
+         sizeof(int) * (BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/partial-recv-persistent.c b/teshsuite/smpi/isp/umpire/partial-recv-persistent.c
new file mode 100644 (file)
index 0000000..c97dfb5
--- /dev/null
@@ -0,0 +1,106 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Jan 22, 2003 */
+/* partial-recv-persistent.c -- do persistent ops w/oversized recv bufs */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/partial-recv-persistent.c,v 1.1 2003/05/17 11:05:31 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define BUF_SIZE 128
+#define SLOP 128
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2 + SLOP];
+  int k, flag;
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (buf, BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (k = 0; k < BUF_SIZE; k++) {
+      buf[k] = k;
+      buf[BUF_SIZE + k] = BUF_SIZE - 1 - k;
+    }
+  }
+  else {
+    /* set up the persistent receives... */
+    MPI_Recv_init (buf, BUF_SIZE, MPI_INT, 0, 0, comm, &aReq[0]);
+    MPI_Recv_init (&buf[BUF_SIZE],BUF_SIZE+SLOP,MPI_INT,0,1,comm,&aReq[1]);
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out all of the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2 + SLOP);
+    }
+
+    /* start the persistent requests... */
+    if (rank < 2) {
+      if (k % 2) {
+       MPI_Startall (2, aReq);
+      }
+      else {
+       MPI_Start (&aReq[0]);
+       MPI_Start (&aReq[1]);
+      }
+
+      MPI_Barrier(MPI_COMM_WORLD);
+
+      /* complete the requests */
+      if (k/2) {
+       /* use MPI_Waitall */
+       MPI_Waitall (2, aReq, aStatus);
+      }
+      else {
+       /* use MPI_Testall */
+       flag = 0;
+       while (!flag) {
+         MPI_Testall (2, aReq, &flag, aStatus);
+       }
+      }
+    }  
+    else {
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank < 2) {
+    /* free the persistent requests */
+    MPI_Request_free (&aReq[0]);
+    MPI_Request_free (&aReq[1]);
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/partial-recv-persistent2.c b/teshsuite/smpi/isp/umpire/partial-recv-persistent2.c
new file mode 100644 (file)
index 0000000..25786ea
--- /dev/null
@@ -0,0 +1,110 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Jan 24, 2003 */
+/* partial-recv-persistent2.c -- do persistent ops w/oversized recv bufs */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/partial-recv-persistent2.c,v 1.1 2003/05/17 11:05:31 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define BUF_SIZE 128
+#define SLOP 128
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2 + SLOP];
+  int j, k, flag, index;
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (buf, BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (k = 0; k < BUF_SIZE; k++) {
+      buf[k] = k;
+      buf[BUF_SIZE + k] = BUF_SIZE - 1 - k;
+    }
+  }
+  else {
+    /* set up the persistent receives... */
+    MPI_Recv_init (buf, BUF_SIZE, MPI_INT, 0, 0, comm, &aReq[0]);
+    MPI_Recv_init (&buf[BUF_SIZE],BUF_SIZE+SLOP,MPI_INT,0,1,comm,&aReq[1]);
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out all of the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2 + SLOP);
+    }
+
+    /* start the persistent requests... */
+    if (rank < 2) {
+      if (k % 2) {
+       MPI_Startall (2, aReq);
+      }
+      else {
+       MPI_Start (&aReq[0]);
+       MPI_Start (&aReq[1]);
+      }
+
+      MPI_Barrier(MPI_COMM_WORLD);
+
+      /* complete the requests */
+      if (k/2) {
+       /* use MPI_Waitany */
+       for (j = 0; j < 2; j++) {
+         MPI_Waitany (2, aReq, &index, aStatus);
+       }
+      }
+      else {
+       /* use MPI_Testany */
+       for (j = 0; j < 2; j++) {
+         flag = 0;
+         while (!flag) {
+           MPI_Testany (2, aReq, &index, &flag, aStatus);
+         }
+       }
+      }
+    }  
+    else {
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank < 2) {
+    /* free the persistent requests */
+    MPI_Request_free (&aReq[0]);
+    MPI_Request_free (&aReq[1]);
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/partial-recv-persistent3.c b/teshsuite/smpi/isp/umpire/partial-recv-persistent3.c
new file mode 100644 (file)
index 0000000..547ace9
--- /dev/null
@@ -0,0 +1,116 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Jan 24, 2003 */
+/* partial-recv-persistent2.c -- do persistent ops w/oversized recv bufs */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/partial-recv-persistent3.c,v 1.1 2003/05/17 11:05:31 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define BUF_SIZE 128
+#define SLOP 128
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2 + SLOP];
+  int j, k, flag, total, outcount, indices[2];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (buf, BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (k = 0; k < BUF_SIZE; k++) {
+      buf[k] = k;
+      buf[BUF_SIZE + k] = BUF_SIZE - 1 - k;
+    }
+  }
+  else {
+    /* set up the persistent receives... */
+    MPI_Recv_init (buf, BUF_SIZE, MPI_INT, 0, 0, comm, &aReq[0]);
+    MPI_Recv_init (&buf[BUF_SIZE],BUF_SIZE+SLOP,MPI_INT,0,1,comm,&aReq[1]);
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out all of the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2 + SLOP);
+    }
+
+    /* start the persistent requests... */
+    if (rank < 2) {
+      if (k % 2) {
+       MPI_Startall (2, aReq);
+      }
+      else {
+       MPI_Start (&aReq[0]);
+       MPI_Start (&aReq[1]);
+      }
+
+      MPI_Barrier(MPI_COMM_WORLD);
+
+      /* complete the requests */
+      if (k/2) {
+       /* use MPI_Waitsome */
+       total = 0;
+       while (total < 2) {
+         MPI_Waitsome (2, aReq, &outcount, indices, aStatus);
+         total += outcount;
+       }
+      }
+      else {
+       /* use MPI_Testsome */
+       total = 0;
+       while (total < 2) {
+         outcount = 0;
+
+         while (!outcount) {
+           MPI_Testsome (2, aReq, &outcount, indices, aStatus);
+         }
+
+         total += outcount;
+       }
+      }
+    }  
+    else {
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank < 2) {
+    /* free the persistent requests */
+    MPI_Request_free (&aReq[0]);
+    MPI_Request_free (&aReq[1]);
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/partial-recv-persistent4.c b/teshsuite/smpi/isp/umpire/partial-recv-persistent4.c
new file mode 100644 (file)
index 0000000..d63c5b5
--- /dev/null
@@ -0,0 +1,111 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Jan 24, 2003 */
+/* partial-recv-persistent2.c -- do persistent ops w/oversized recv bufs */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/partial-recv-persistent4.c,v 1.1 2003/05/17 11:05:31 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define BUF_SIZE 128
+#define SLOP 128
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int buf[BUF_SIZE * 2 + SLOP];
+  int j, k, flag;
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    MPI_Send_init (buf, BUF_SIZE, MPI_INT, 1, 0, comm, &aReq[0]);
+    MPI_Send_init (&buf[BUF_SIZE], BUF_SIZE, MPI_INT, 1, 1, comm, &aReq[1]);
+
+    /* initialize the send buffers */
+    for (k = 0; k < BUF_SIZE; k++) {
+      buf[k] = k;
+      buf[BUF_SIZE + k] = BUF_SIZE - 1 - k;
+    }
+  }
+  else {
+    /* set up the persistent receives... */
+    MPI_Recv_init (buf, BUF_SIZE, MPI_INT, 0, 0, comm, &aReq[0]);
+    MPI_Recv_init (&buf[BUF_SIZE],BUF_SIZE+SLOP,MPI_INT,0,1,comm,&aReq[1]);
+  }
+
+  for (k = 0; k < 4; k++) {
+    if (rank == 1) {
+      /* zero out all of the receive buffers */
+      bzero (buf, sizeof(int) * BUF_SIZE * 2 + SLOP);
+    }
+
+    /* start the persistent requests... */
+    if (rank < 2) {
+      if (k % 2) {
+       MPI_Startall (2, aReq);
+      }
+      else {
+       MPI_Start (&aReq[0]);
+       MPI_Start (&aReq[1]);
+      }
+
+      MPI_Barrier(MPI_COMM_WORLD);
+
+      /* complete the requests */
+      if (k/2) {
+       /* use MPI_Wait */
+       for (j = 0; j < 2; j++) {
+         MPI_Wait (&aReq[j], &aStatus[j]);
+       }
+      }
+      else {
+       /* use MPI_Test */
+       for (j = 0; j < 2; j++) {
+         flag = 0;
+         
+         while (!flag) {
+           MPI_Test (&aReq[j], &flag, &aStatus[j]);
+         }
+       }
+      }
+    }  
+    else {
+      /* Barrier to ensure receives are posted for rsends... */
+      MPI_Barrier(MPI_COMM_WORLD);
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank < 2) {
+    /* free the persistent requests */
+    MPI_Request_free (&aReq[0]);
+    MPI_Request_free (&aReq[1]);
+  }
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/partial-recv.c b/teshsuite/smpi/isp/umpire/partial-recv.c
new file mode 100644 (file)
index 0000000..669021d
--- /dev/null
@@ -0,0 +1,145 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive-with-isends.c -- send with weird types */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/partial-recv.c,v 1.1 2002/10/24 17:04:56 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+typedef struct _test_small_struct_t
+{
+  double the_double;
+  char the_char;
+}
+test_small_struct_t;
+
+
+typedef struct _test_big_struct_t
+{
+  double the_double;
+  char the_char;
+  double the_other_double;
+}
+test_big_struct_t;
+
+
+#define SMALL_SIZE  10
+#define BIG_SIZE    10
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i, basic_extent;
+  int blocklens[3], displs[3];
+  MPI_Datatype structtypes[3]; 
+  MPI_Datatype newtype[2]; 
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+  test_small_struct_t small_struct_buf[SMALL_SIZE];
+  test_big_struct_t big_struct_buf[BIG_SIZE];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  structtypes[0] = MPI_DOUBLE;
+  structtypes[1] = MPI_CHAR;
+  structtypes[2] = MPI_DOUBLE;
+  blocklens[0] = blocklens[1] = blocklens[2] = 1;
+  displs[0] = 0;
+  displs[1] = sizeof(double);
+  displs[2] = 
+    ((void *) &(big_struct_buf[0].the_other_double)) - 
+    ((void *) big_struct_buf);
+
+  if (displs[2] < 0) displs[2] = -displs[2];
+
+  MPI_Barrier (comm);
+
+  /* create the types */
+  MPI_Type_struct (2, blocklens, displs, structtypes, &newtype[0]);
+  MPI_Type_struct (3, blocklens, displs, structtypes, &newtype[1]);
+  
+  MPI_Type_extent (newtype[0], &basic_extent);
+  if (basic_extent != sizeof (test_small_struct_t)) {
+    fprintf (stderr, "(%d): Unexpected extent for small struct\n");
+    MPI_Abort (MPI_COMM_WORLD, 666);
+  }
+  
+  MPI_Type_extent (newtype[1], &basic_extent);
+  if (basic_extent != sizeof (test_big_struct_t)) {
+    fprintf (stderr, "(%d): Unexpected extent for big struct\n");
+    MPI_Abort (MPI_COMM_WORLD, 666);
+  }
+
+  MPI_Type_commit (&newtype[0]);
+  MPI_Type_commit (&newtype[1]);
+
+  if (rank == 0) {
+    /* initialize buffers */
+    for (i = 0; i < SMALL_SIZE; i++) {
+      small_struct_buf[i].the_double = 1.0;
+      small_struct_buf[i].the_char = 'a';
+    }
+       
+    for (i = 0; i < BIG_SIZE; i++) {
+      big_struct_buf[i].the_double = 1.0;
+      big_struct_buf[i].the_char = 'a';
+      big_struct_buf[i].the_other_double = 1.0;
+    }
+       
+    /* set up the sends */
+    MPI_Isend (small_struct_buf, 1, newtype[0], 1, 0, comm, &aReq[0]);
+    MPI_Isend (big_struct_buf, 1, newtype[1], 1, 1, comm, &aReq[1]);
+  }
+  else if (rank == 1) {
+    /* initialize buffers */
+    for (i = 0; i < SMALL_SIZE; i++) {
+      small_struct_buf[i].the_double = 2.0;
+      small_struct_buf[i].the_char = 'b';
+    }
+
+    for (i = 0; i < BIG_SIZE; i++) {
+      big_struct_buf[i].the_double = 2.0;
+      big_struct_buf[i].the_char = 'b';
+      big_struct_buf[i].the_other_double = 2.0;
+    }
+
+    /* set up the receives... */
+    MPI_Irecv (big_struct_buf, BIG_SIZE, newtype[1],0,0, comm, &aReq[0]);
+    MPI_Irecv (small_struct_buf, SMALL_SIZE, newtype[0],0,1, comm, &aReq[1]);
+  }
+
+  if ((rank == 0) || (rank == 1)) {
+    /* wait on everything... */
+    MPI_Waitall (2, aReq, aStatus);
+  }
+
+  for (i = 0; i < 2; i++) {
+    MPI_Type_free (&newtype[i]);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/persistent.c b/teshsuite/smpi/isp/umpire/persistent.c
new file mode 100644 (file)
index 0000000..ea4c12b
--- /dev/null
@@ -0,0 +1,92 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* persistent.c -- do some MPI persistent calls */
+/* including freeing an active request - the effect of which */
+/* is implementation dependent - usually a detected error */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request aReq[2], free_req;
+  MPI_Status aStatus[2];
+
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Recv_init (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf0, 1, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      /* free an active request... */
+      free_req = aReq[1];
+      MPI_Request_free (&free_req);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv_init (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Send_init (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf1, 0, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      /* free an active request... */
+      free_req = aReq[1];
+      MPI_Request_free (&free_req);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Request_free (&aReq[0]);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/persistent2.c b/teshsuite/smpi/isp/umpire/persistent2.c
new file mode 100644 (file)
index 0000000..6b34a58
--- /dev/null
@@ -0,0 +1,91 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* persistent2.c -- do some persistent MPI calls including activating */
+/* a request twice - the effect of which is undefined - usually an error */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request aReq[2];
+  MPI_Status aStatus[2];
+
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Recv_init (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf0, 1, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      memset (buf0, 0, buf_size);
+
+      /* activate a request twice */
+      MPI_Start (&aReq[0]);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv_init (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Send_init (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf1, 0, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      /* activate a request twice */
+      MPI_Start (&aReq[0]);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Request_free (&aReq[0]);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/persistent3.c b/teshsuite/smpi/isp/umpire/persistent3.c
new file mode 100644 (file)
index 0000000..100d58a
--- /dev/null
@@ -0,0 +1,89 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* persistent3.c -- do some MPI persistent calls */
+/* including freeing an active request - the effect of which */
+/* is implementation dependent - usually a detected error */
+/* in this test, the error is made in only task rank 0... */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request aReq[2], free_req;
+  MPI_Status aStatus[2];
+
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2) {
+      printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Recv_init (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf0, 1, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      /* free an active request... */
+      free_req = aReq[1];
+      MPI_Request_free (&free_req);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv_init (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Send_init (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf1, 0, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Request_free (&aReq[0]);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/persistent4.c b/teshsuite/smpi/isp/umpire/persistent4.c
new file mode 100644 (file)
index 0000000..131a823
--- /dev/null
@@ -0,0 +1,90 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Nov 30 2000 */
+/* persistent3.c -- do some MPI persistent calls */
+/* including freeing an active request - the effect of which */
+/* is implementation dependent - usually a detected error */
+/* in this test, the error is made in only task rank 1... */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Request aReq[2], free_req;
+  MPI_Status aStatus[2];
+
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3) {
+    /* use at least 3 tasks so there is one non-mgr without error... */
+    printf ("not enough tasks\n");
+  }
+  else {
+    if (rank == 0) {
+      memset (buf0, 0, buf_size);
+
+      MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Recv_init (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf0, 1, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+    else if (rank == 1) {
+      memset (buf1, 1, buf_size);
+
+      MPI_Recv_init (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[0]);
+      MPI_Send_init (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &aReq[1]);
+
+      MPI_Start (&aReq[0]);
+      MPI_Start (&aReq[1]);
+
+      MPI_Waitall (2, aReq, aStatus);
+
+      memset (buf1, 0, buf_size);
+
+      MPI_Startall (2, aReq);
+
+      /* free an active request... */
+      free_req = aReq[1];
+      MPI_Request_free (&free_req);
+
+      MPI_Waitall (2, aReq, aStatus);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Request_free (&aReq[0]);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/probe-any_src-types-can-mismatch.c b/teshsuite/smpi/isp/umpire/probe-any_src-types-can-mismatch.c
new file mode 100644 (file)
index 0000000..b4e63bf
--- /dev/null
@@ -0,0 +1,79 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Oct 30 2002 */
+/* probe-any_src-types-can-mismatch.c -- do nondeterministic recv after */
+/* Probe; types can mismatch as a result but may not; require that we */
+/* detect the mismatch if occurs; OK to detect  (or not) if it doesn't... */
+/* adapted from MPI The Complete Reference, p. 78... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j;
+  double x;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* because the probe and the receives both use */
+  /* MPI_ANY_SOURCE, we are not guaranteed that the */
+  /* first recv matches the probed msg, thus types can mismatch... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      i = 0;
+
+      MPI_Send (&i, 1, MPI_INT, 2, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      x = 1.0;
+
+      MPI_Send (&x, 1, MPI_DOUBLE, 2, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      for (j = 0; j < 2; j++) {
+       MPI_Probe (MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+      
+       if (status.MPI_SOURCE == 0) {
+         MPI_Recv (&i, 1, MPI_INT, 
+                   MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+         if (status.MPI_SOURCE != 0)
+           printf ("(%d) Type mismatch from matching other message\n", rank);
+       }
+       else {
+         MPI_Recv (&x, 1, MPI_DOUBLE, 
+                   MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
+         if (status.MPI_SOURCE == 0)
+           printf ("(%d) Type mismatch from matching other message\n", rank);
+       }
+      }
+    }
+      
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/probe-any_tag-types-can-mismatch.c b/teshsuite/smpi/isp/umpire/probe-any_tag-types-can-mismatch.c
new file mode 100644 (file)
index 0000000..1aac3fd
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Oct 30 2002 */
+/* probe-any_tag-types-can-mismatch.c -- do nondeterministic recv after */
+/* Probe; types can mismatch as a result but may not; require that we */
+/* detect the mismatch if occurs; OK to detect  (or not) if it doesn't... */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j;
+  double x;
+  MPI_Status status;
+  MPI_Request req0, req1;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* because the probe and the receives both use */
+  /* MPI_ANY_TAG, we are not guaranteed that the */
+  /* first recv matches the probed msg, thus types can mismatch... */
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      i = 0;
+      x = 1.0;
+
+      MPI_Isend (&i, 1, MPI_INT, 1, 0, MPI_COMM_WORLD, &req0);
+
+      MPI_Isend (&x, 1, MPI_DOUBLE, 1, 1, MPI_COMM_WORLD, &req1);
+
+      MPI_Wait (&req1, &status);
+
+      MPI_Wait (&req0, &status);
+    }
+  else if (rank == 1) 
+    {
+      for (j = 0; j < 2; j++) {
+       MPI_Probe (0, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+      
+       if (status.MPI_TAG == 0) {
+         MPI_Recv (&i, 1, MPI_INT, 0, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+
+         if (status.MPI_TAG != 0)
+           printf ("(%d) Type mismatch from matching other message\n", rank);
+       }
+       else {
+         MPI_Recv (&x, 1, MPI_DOUBLE, 0, 
+                   MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+
+         if (status.MPI_TAG == 0)
+           printf ("(%d) Type mismatch from matching other message\n", rank);
+       }
+      }
+    }
+      
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/probe-deadlock.c b/teshsuite/smpi/isp/umpire/probe-deadlock.c
new file mode 100644 (file)
index 0000000..e41ece3
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Jan 3 2002 */
+/* no-error-probe.c -- do some MPI calls without any errors */
+
+
+#include <stdio.h>
+#include "mpi.h"
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j;
+  double x;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      i = 0;
+
+      MPI_Probe (1, 0, MPI_COMM_WORLD, &status);
+      
+      MPI_Send (&i, 1, MPI_INT, 1, 0, MPI_COMM_WORLD);
+
+      MPI_Recv (&x, 1, MPI_DOUBLE, 1, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      x = 1.0;
+
+      MPI_Probe (0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Recv (&i, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+      MPI_Send (&x, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);
+    }
+      
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/pt2pt-byte-int-mismatch.c b/teshsuite/smpi/isp/umpire/pt2pt-byte-int-mismatch.c
new file mode 100644 (file)
index 0000000..36c71f5
--- /dev/null
@@ -0,0 +1,405 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Thu Oct 17, 2002 */
+/* pt2pt-byte-int-mismatch.c -- do lots pt-2-pt ops type mismatches */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/pt2pt-byte-int-mismatch.c,v 1.1 2002/10/24 17:04:56 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+#define BUF_SIZE 128
+#define NUM_SEND_TYPES 8
+#define NUM_PERSISTENT_SEND_TYPES 4
+#define NUM_BSEND_TYPES 2
+#define NUM_COMPLETION_MECHANISMS 8
+#define NUM_RECV_TYPES 2
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int bbuf[(BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES];
+  int buf[BUF_SIZE * 2 * NUM_SEND_TYPES];
+  int i, j, k, l, m, at_size, send_t_number, index, outcount, total, flag;
+  int num_errors, error_count, indices[2 * NUM_SEND_TYPES];
+  MPI_Request aReq[2 * NUM_SEND_TYPES];
+  MPI_Status aStatus[2 * NUM_SEND_TYPES];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Buffer_attach (bbuf, sizeof(int) * 
+                    (BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES);
+
+  if (rank == 0) {
+    /* set up persistent sends... */
+    send_t_number = NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES;
+
+    MPI_Send_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Send_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+    send_t_number++;
+
+    MPI_Bsend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Bsend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+
+    send_t_number++;
+
+    MPI_Rsend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Rsend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+
+    send_t_number++;
+
+    MPI_Ssend_init (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT, 
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+    MPI_Ssend_init (&buf[(send_t_number * 2 + 1) * BUF_SIZE], 
+                   BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                   comm, &aReq[send_t_number * 2 + 1]);
+  }
+
+  for (m = 0; m < NUM_RECV_TYPES; m++) {
+    if ((m == 1) && (rank == 1)) {
+      /* set up the persistent receives... */
+      for (j = 0; j < NUM_SEND_TYPES * 2; j+=2) {
+       MPI_Recv_init (&buf[j * BUF_SIZE], 
+                      BUF_SIZE, MPI_INT, 0, j, comm, &aReq[j]);
+       MPI_Recv_init (&buf[(j + 1) * BUF_SIZE], 
+                      BUF_SIZE * sizeof(int), 
+                      MPI_BYTE, 0, j + 1, comm, &aReq[j + 1]);
+      }
+    }
+
+    for (l = 0; l < (NUM_COMPLETION_MECHANISMS * 2); l++) {
+      for (k = 0; k < (NUM_COMPLETION_MECHANISMS * 2); k++) {
+       if (rank == 0) {
+         /* initialize all of the send buffers */
+         for (j = 0; j < NUM_SEND_TYPES; j++) {
+           for (i = 0; i < BUF_SIZE; i++) {
+             buf[2 * j * BUF_SIZE + i] = i;
+             buf[((2 * j + 1) * BUF_SIZE) + i] = BUF_SIZE - 1 - i;
+           }
+         }
+       }
+       else if (rank == 1) {
+         /* zero out all of the receive buffers */
+         bzero (buf, sizeof(int) * BUF_SIZE * 2 * NUM_SEND_TYPES);
+       }
+
+       MPI_Barrier(MPI_COMM_WORLD);
+
+       if (rank == 0) {
+         /* set up transient sends... */
+         send_t_number = 0;
+    
+         MPI_Isend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                    1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Isend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                    BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                    comm, &aReq[send_t_number * 2 + 1]);
+
+         send_t_number++;
+       
+         MPI_Ibsend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                     1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Ibsend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                     BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                     comm, &aReq[send_t_number * 2 + 1]);
+
+         send_t_number++;
+
+         /* Barrier to ensure receives are posted for rsends... */
+         MPI_Barrier(MPI_COMM_WORLD);
+         
+         MPI_Irsend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                   1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Irsend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                     BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                     comm, &aReq[send_t_number * 2 + 1]);
+
+         send_t_number++;
+
+         MPI_Issend (&buf[send_t_number * 2 * BUF_SIZE], BUF_SIZE, MPI_INT,
+                     1, send_t_number * 2, comm, &aReq[send_t_number * 2]);
+         MPI_Issend (&buf[(send_t_number * 2 + 1) * BUF_SIZE],
+                     BUF_SIZE, MPI_INT, 1, send_t_number * 2 + 1, 
+                     comm, &aReq[send_t_number * 2 + 1]);
+
+         /* just to be paranoid */
+         send_t_number++;
+         assert (send_t_number == 
+                 NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES);
+
+         /* start the persistent sends... */
+         if (k % 2) {
+           MPI_Startall (NUM_PERSISTENT_SEND_TYPES * 2, 
+                         &aReq[2 * send_t_number]);
+         }
+         else {
+           for (j = 0; j < NUM_PERSISTENT_SEND_TYPES * 2; j++) {
+             MPI_Start (&aReq[2 * send_t_number + j]);
+           }
+         }
+       
+         /* complete the sends */
+         switch (k/2) {
+         case 0:
+           /* use MPI_Wait */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Wait (&aReq[j], &aStatus[j]);
+           }
+           break;
+         
+         case 1:
+           /* use MPI_Waitall */
+           MPI_Waitall (NUM_SEND_TYPES * 2, aReq, aStatus);
+           break;
+
+         case 2:
+           /* use MPI_Waitany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Waitany (NUM_SEND_TYPES * 2, aReq, &index, aStatus);
+           }
+           
+           break;
+       
+         case 3:
+           /* use MPI_Waitsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             MPI_Waitsome (NUM_SEND_TYPES * 2, aReq, 
+                           &outcount, indices, aStatus);
+
+             total += outcount;
+           }
+
+           break;
+
+         case 4:
+           /* use MPI_Test */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+           
+             while (!flag) {
+               MPI_Test (&aReq[j], &flag, &aStatus[j]);
+             }
+           }
+         
+           break;
+       
+         case 5:
+           /* use MPI_Testall */
+           flag = 0;
+           while (!flag) {
+             MPI_Testall (NUM_SEND_TYPES * 2, aReq, &flag, aStatus);
+           }
+         
+           break;
+       
+         case 6:
+           /* use MPI_Testany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+             while (!flag) {
+               MPI_Testany (NUM_SEND_TYPES * 2, aReq, 
+                            &index, &flag, aStatus);
+             }
+           }
+
+           break;
+       
+         case 7:
+           /* use MPI_Testsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             outcount = 0;
+
+             while (!outcount) {
+               MPI_Testsome (NUM_SEND_TYPES * 2, aReq, 
+                             &outcount, indices, aStatus);
+             }
+
+             total += outcount;
+           }
+
+           break;
+
+         default:
+           assert (0);
+           break;
+         }
+       }
+       else if (rank == 1) {
+         /* start receives for all of the sends */
+         if (m == 0) {
+           for (j = 0; j < NUM_SEND_TYPES * 2; j+=2) {
+             MPI_Irecv (&buf[j * BUF_SIZE], 
+                        BUF_SIZE, MPI_INT, 0, j, comm, &aReq[j]);
+             MPI_Irecv (&buf[(j + 1) * BUF_SIZE], 
+                        BUF_SIZE * sizeof(int), 
+                        MPI_BYTE, 0, j + 1, comm, &aReq[j + 1]);
+           }
+         }
+         else {
+           /* start the persistent receives... */
+           if (l % 2) {
+             MPI_Startall (NUM_SEND_TYPES * 2, aReq);
+           }
+           else {
+             for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+               MPI_Start (&aReq[j]);
+             }
+           }
+         }
+
+         /* Barrier to ensure receives are posted for rsends... */
+         MPI_Barrier(MPI_COMM_WORLD);
+       
+         /* complete all of the receives... */
+         switch (l/2) {
+         case 0: 
+           /* use MPI_Wait */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Wait (&aReq[j], &aStatus[j]);
+           }
+           break;
+           
+         case 1:
+           /* use MPI_Waitall */
+           MPI_Waitall (NUM_SEND_TYPES * 2, aReq, aStatus);
+           break;
+
+         case 2:
+           /* use MPI_Waitany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             MPI_Waitany (NUM_SEND_TYPES * 2, aReq, &index, aStatus);
+           }
+           
+           break;
+       
+         case 3:
+           /* use MPI_Waitsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             MPI_Waitsome (NUM_SEND_TYPES * 2, aReq, 
+                           &outcount, indices, aStatus);
+
+             total += outcount;
+           }
+
+           break;
+           
+         case 4:
+           /* use MPI_Test */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+             
+             while (!flag) {
+               MPI_Test (&aReq[j], &flag, &aStatus[j]);
+             }
+           }
+           
+           break;
+           
+         case 5:
+           /* use MPI_Testall */
+           flag = 0;
+           while (!flag) {
+             MPI_Testall (NUM_SEND_TYPES * 2, aReq, &flag, aStatus);
+           }
+           
+           break;
+           
+         case 6:
+           /* use MPI_Testany */
+           for (j = 0; j < NUM_SEND_TYPES * 2; j++) {
+             flag = 0;
+             while (!flag) {
+               MPI_Testany (NUM_SEND_TYPES * 2, aReq, 
+                            &index, &flag, aStatus);
+             }
+           }
+           
+           break;
+           
+         case 7:
+           /* use MPI_Testsome */
+           total = 0;
+           while (total < NUM_SEND_TYPES * 2) {
+             outcount = 0;
+
+             while (!outcount) {
+               MPI_Testsome (NUM_SEND_TYPES * 2, aReq, 
+                             &outcount, indices, aStatus);
+             }
+             
+             total += outcount;
+           }
+           
+           break;
+           
+         default:
+           assert (0);
+           break;
+         }
+       }
+       else {
+         /* Barrier to ensure receives are posted for rsends... */
+         MPI_Barrier(MPI_COMM_WORLD);
+       }
+      }
+    }
+  }
+
+  MPI_Barrier(MPI_COMM_WORLD);
+
+  if (rank == 0) {
+    /* free the persistent send requests */
+    for (i = 2* (NUM_SEND_TYPES - NUM_PERSISTENT_SEND_TYPES);
+        i < 2 * NUM_SEND_TYPES; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+  else if (rank == 1) {
+    /* free the persistent receive requests */
+    for (i = 0; i < 2 * NUM_SEND_TYPES; i++) {
+      MPI_Request_free (&aReq[i]);
+    }
+  }
+
+
+  MPI_Buffer_detach (bbuf, &at_size);
+
+  assert (at_size == 
+         sizeof(int) * (BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/remote_group-no-error.c b/teshsuite/smpi/isp/umpire/remote_group-no-error.c
new file mode 100644 (file)
index 0000000..0b01269
--- /dev/null
@@ -0,0 +1,101 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive.c -- use all group constructors correctly */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/remote_group-no-error.c,v 1.1 2002/07/30 21:34:43 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define INTERCOMM_CREATE_TAG 666
+
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i;
+  MPI_Group newgroup; 
+  MPI_Group newgroup2; 
+  MPI_Comm temp;
+  MPI_Comm intercomm = MPI_COMM_NULL;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  if (nprocs < 3) {
+      printf ("requires at least 3 tasks\n");
+  }
+  else {
+    /* create the groups */
+    /* need lots of stuff for this constructor... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp);
+
+    if (rank % 3) {
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                           (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                           nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      MPI_Comm_remote_group (intercomm, &newgroup);
+      
+      MPI_Comm_free (&intercomm);
+    }
+    else {
+      MPI_Comm_group (temp, &newgroup);
+    }
+
+    MPI_Comm_free (&temp);
+      
+    MPI_Group_free (&newgroup);
+
+    MPI_Barrier (comm);
+
+    /* create the groups again and free with an alias... */
+    /* need lots of stuff for this constructor... */
+    MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp);
+
+    if (rank % 3) {
+      MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, 
+                           (((nprocs % 3) == 2) && ((rank % 3) == 2)) ?
+                           nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3),
+                           INTERCOMM_CREATE_TAG, &intercomm);
+
+      MPI_Comm_remote_group (intercomm, &newgroup);
+
+      MPI_Comm_free (&intercomm);
+    }
+    else {
+      MPI_Comm_group (temp, &newgroup);
+    }
+
+    MPI_Comm_free (&temp);
+      
+    newgroup2 = newgroup;
+    MPI_Group_free (&newgroup2);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/send-recv-ok.c b/teshsuite/smpi/isp/umpire/send-recv-ok.c
new file mode 100644 (file)
index 0000000..c85f143
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- Mode: C; -*- */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+    }
+  else if (rank == 1)
+    {
+      MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+      memset (buf1, 1, buf_size);
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/sendrecv-deadlock.c b/teshsuite/smpi/isp/umpire/sendrecv-deadlock.c
new file mode 100644 (file)
index 0000000..1f8f98f
--- /dev/null
@@ -0,0 +1,73 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else
+    {
+      if (rank == 0)
+       {
+         memset (buf0, 0, buf_size);
+
+         MPI_Sendrecv (buf0, buf_size, MPI_INT, 1, 0,
+                       buf1, buf_size, MPI_INT, 1, 0,
+                       MPI_COMM_WORLD, &status);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
+       }
+      else if (rank == 1)
+       {
+         memset (buf1, 1, buf_size);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+       }
+      else if (rank == 2)
+       {
+         memset (buf1, 1, buf_size);
+
+         MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+
+         MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
+       }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-commit-twice.c b/teshsuite/smpi/isp/umpire/type-commit-twice.c
new file mode 100644 (file)
index 0000000..4d25326
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+/* type-commit-twice.c -- do a type commit twice w/ the same type */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-commit-twice.c,v 1.4 2002/07/30 21:34:43 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Datatype newtype;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+
+  MPI_Type_contiguous (128, MPI_INT, &newtype);
+  MPI_Type_commit (&newtype);
+
+  /* COMMITTING TWICE IS NOT AN ERROR - SEE:
+     http://www.mpi-forum.org/docs/mpi-20-html/node50.htm#Node50
+     AT MOST, UMPIRE SHOULD PROVIDE A CLEAR WARNING ABOUT MINOR 
+     PERFORMANCE CONSEQUENCE (JUST A WASTED FUNCTION CALL)... */
+  MPI_Type_commit (&newtype);
+
+  MPI_Barrier (comm);
+
+  MPI_Type_free (&newtype);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-error-exhaustive-with-isends.c b/teshsuite/smpi/isp/umpire/type-no-error-exhaustive-with-isends.c
new file mode 100644 (file)
index 0000000..b2ceace
--- /dev/null
@@ -0,0 +1,1046 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive-with-isends.c -- send with weird types */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-error-exhaustive-with-isends.c,v 1.4 2002/10/24 17:04:56 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+
+typedef struct _test_basic_struct_t
+{
+  double the_double;
+  char the_char;
+}
+test_basic_struct_t;
+
+
+typedef struct _test_lb_ub_struct_t
+{
+  double dontsend_double1;
+  double the_double_to_send;
+  char   the_chars[8]; /* only send the first one... */
+  double dontsend_double2;
+}
+test_lb_ub_struct_t;
+
+
+#define TYPE_CONSTRUCTOR_COUNT 7
+#define MSG_COUNT              3
+
+/*
+*/
+#define RUN_TYPE_STRUCT
+#define RUN_TYPE_VECTOR
+#define RUN_TYPE_HVECTOR
+#define RUN_TYPE_INDEXED
+#define RUN_TYPE_HINDEXED
+#define RUN_TYPE_CONTIGUOUS
+/*
+*/
+#define RUN_TYPE_STRUCT_LB_UB
+/*
+*/
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i, j, k, basic_extent;
+  int blocklens[4], displs[4];
+  MPI_Datatype structtypes[4]; 
+  MPI_Datatype newtype[TYPE_CONSTRUCTOR_COUNT]; 
+  MPI_Request aReq[TYPE_CONSTRUCTOR_COUNT];
+  MPI_Status aStatus[TYPE_CONSTRUCTOR_COUNT];
+#ifdef RUN_TYPE_STRUCT
+  test_basic_struct_t struct_buf[MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_VECTOR
+  test_basic_struct_t vector_buf[7*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_HVECTOR
+  test_basic_struct_t hvector_buf[44*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_INDEXED
+  test_basic_struct_t indexed_buf[132*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_HINDEXED
+  test_basic_struct_t hindexed_buf[272*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_CONTIGUOUS
+  test_basic_struct_t contig_buf[2720*MSG_COUNT];
+#endif
+#ifdef RUN_TYPE_STRUCT_LB_UB
+  test_lb_ub_struct_t struct_lb_ub_send_buf[MSG_COUNT];
+  test_basic_struct_t struct_lb_ub_recv_buf[MSG_COUNT];
+#endif
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  structtypes[0] = MPI_DOUBLE;
+  structtypes[1] = MPI_CHAR;
+  blocklens[0] = blocklens[1] = 1;
+  displs[0] = 0;
+  displs[1] = sizeof(double);
+
+  MPI_Barrier (comm);
+
+  /* create the types */
+  MPI_Type_struct (2, blocklens, displs, structtypes, &newtype[0]);
+  
+  MPI_Type_extent (newtype[0], &basic_extent);
+  if (basic_extent != sizeof (test_basic_struct_t)) {
+    fprintf (stderr, "(%d): Unexpected extent for struct\n");
+    MPI_Abort (MPI_COMM_WORLD, 666);
+  }
+
+  MPI_Type_vector (2, 3, 4, newtype[0], &newtype[1]);
+  MPI_Type_hvector (3, 2, 15 * sizeof (test_basic_struct_t), 
+                   newtype[1], &newtype[2]);
+  displs[1] = 2;
+  MPI_Type_indexed (2, blocklens, displs, newtype[2], &newtype[3]);
+  displs[1] = 140 * sizeof (test_basic_struct_t);
+  MPI_Type_hindexed (2, blocklens, displs, newtype[3], &newtype[4]);
+  MPI_Type_contiguous (10, newtype[4], &newtype[5]);
+
+  structtypes[0] = MPI_LB;
+  structtypes[1] = MPI_DOUBLE;
+  structtypes[2] = MPI_CHAR;
+  structtypes[3] = MPI_UB;
+  blocklens[0] = blocklens[1] = blocklens[2] = blocklens[3] = 1;
+  displs[0] = -sizeof(double);
+  displs[1] = 0;
+  displs[2] = sizeof(double);
+  displs[3] = 2*sizeof(double)+8*sizeof(char);
+
+  MPI_Type_struct (4, blocklens, displs, structtypes, &newtype[6]);
+
+#ifdef RUN_TYPE_STRUCT 
+  MPI_Type_commit (&newtype[0]);
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+  MPI_Type_commit (&newtype[1]);
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+  MPI_Type_commit (&newtype[2]);
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+  MPI_Type_commit (&newtype[3]);
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+  MPI_Type_commit (&newtype[4]);
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+  MPI_Type_commit (&newtype[5]);
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB 
+#ifndef RUN_TYPE_STRUCT 
+  /* need the struct type for the receive... */
+  MPI_Type_commit (&newtype[0]);
+#endif
+  MPI_Type_commit (&newtype[6]);
+#endif
+
+  if (rank == 0) {
+    /* initialize buffers */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      struct_buf[i].the_double = 1.0;
+      struct_buf[i].the_char = 'a';
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      for (j = 0; j < 7; j++) {
+       vector_buf[i*7 + j].the_double = 1.0;
+       vector_buf[i*7 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      for (j = 0; j < 44; j++) {
+       hvector_buf[i*44 + j].the_double = 1.0;
+       hvector_buf[i*44 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      for (j = 0; j < 132; j++) {
+       indexed_buf[i*132 + j].the_double = 1.0;
+       indexed_buf[i*132 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      for (j = 0; j < 272; j++) {
+       hindexed_buf[i*272 + j].the_double = 1.0;
+       hindexed_buf[i*272 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 2720; j++) {
+       contig_buf[i*2720 + j].the_double = 1.0;
+       contig_buf[i*2720 + j].the_char = 'a';
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      struct_lb_ub_send_buf[i].dontsend_double1 = 1.0;
+      struct_lb_ub_send_buf[i].the_double_to_send = 1.0;
+      for (j = 0; j < 8; j++)
+       struct_lb_ub_send_buf[i].the_chars[j] = 'a';
+      struct_lb_ub_send_buf[i].dontsend_double2 = 1.0;
+#endif
+    }
+       
+    /* set up the sends */
+#ifdef RUN_TYPE_STRUCT
+    MPI_Isend (struct_buf, MSG_COUNT, newtype[0], 1, 0, comm, &aReq[0]);
+#else
+    aReq[0] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+    MPI_Isend (vector_buf, MSG_COUNT, newtype[1], 1, 1, comm, &aReq[1]);
+#else
+    aReq[1] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+    MPI_Isend (hvector_buf, MSG_COUNT, newtype[2], 1, 2, comm, &aReq[2]);
+#else
+    aReq[2] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+    MPI_Isend (indexed_buf, MSG_COUNT, newtype[3], 1, 3, comm, &aReq[3]);
+#else
+    aReq[3] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+    MPI_Isend (hindexed_buf, MSG_COUNT, newtype[4], 1, 4, comm, &aReq[4]);
+#else
+    aReq[4] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+    MPI_Isend (contig_buf, MSG_COUNT, newtype[5], 1, 5, comm, &aReq[5]);
+#else
+    aReq[5] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+    MPI_Isend (&(struct_lb_ub_send_buf[0].the_double_to_send), 
+              MSG_COUNT, newtype[6], 1, 6, comm, &aReq[6]);
+#else
+    aReq[6] = MPI_REQUEST_NULL;
+#endif
+  }
+  else if (rank == 1) {
+    /* initialize buffers */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      struct_buf[i].the_double = 2.0;
+      struct_buf[i].the_char = 'b';
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      for (j = 0; j < 7; j++) {
+       vector_buf[i*7 + j].the_double = 2.0;
+       vector_buf[i*7 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      for (j = 0; j < 44; j++) {
+       hvector_buf[i*44 + j].the_double = 2.0;
+       hvector_buf[i*44 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      for (j = 0; j < 132; j++) {
+       indexed_buf[i*132 + j].the_double = 2.0;
+       indexed_buf[i*132 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      for (j = 0; j < 272; j++) {
+       hindexed_buf[i*272 + j].the_double = 2.0;
+       hindexed_buf[i*272 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 2720; j++) {
+       contig_buf[i*2720 + j].the_double = 2.0;
+       contig_buf[i*2720 + j].the_char = 'b';
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      struct_lb_ub_recv_buf[i].the_double = 2.0;
+      struct_lb_ub_recv_buf[i].the_char = 'b';
+#endif
+    }
+
+    /* set up the receives... */
+#ifdef RUN_TYPE_STRUCT
+    MPI_Irecv (struct_buf, MSG_COUNT, newtype[0], 0, 0, comm, &aReq[0]);
+#else
+    aReq[0] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+    MPI_Irecv (vector_buf, MSG_COUNT, newtype[1], 0, 1, comm, &aReq[1]);
+#else
+    aReq[1] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+    MPI_Irecv (hvector_buf, MSG_COUNT, newtype[2], 0, 2, comm, &aReq[2]);
+#else
+    aReq[2] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+    MPI_Irecv (indexed_buf, MSG_COUNT, newtype[3], 0, 3, comm, &aReq[3]);
+#else
+    aReq[3] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+    MPI_Irecv (hindexed_buf, MSG_COUNT, newtype[4], 0, 4, comm, &aReq[4]);
+#else
+    aReq[4] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+    MPI_Irecv (contig_buf, MSG_COUNT, newtype[5], 0, 5, comm, &aReq[5]);
+#else
+    aReq[5] = MPI_REQUEST_NULL;
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+    MPI_Irecv (struct_lb_ub_recv_buf, 
+              MSG_COUNT, newtype[0], 0, 6, comm, &aReq[6]);
+#else
+    aReq[6] = MPI_REQUEST_NULL;
+#endif
+  }
+
+  if (rank == 0) {
+    /* muck the holes... */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      /* no holes in struct_buf... */
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      /* one hole in vector_buf... */
+      vector_buf[i*7 + 3].the_double = 3.0;
+      vector_buf[i*7 + 3].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      /* eight holes in hvector_buf... */
+      /* hole in first vector, first block... */
+      hvector_buf[i*44 + 3].the_double = 3.0;
+      hvector_buf[i*44 + 3].the_char = 'c';
+      /* hole in second vector, first block... */
+      hvector_buf[i*44 + 10].the_double = 3.0;
+      hvector_buf[i*44 + 10].the_char = 'c';
+      /* hole in between first and second vector blocks... */
+      hvector_buf[i*44 + 14].the_double = 3.0;
+      hvector_buf[i*44 + 14].the_char = 'c';
+      /* hole in first vector, second block... */
+      hvector_buf[i*44 + 18].the_double = 3.0;
+      hvector_buf[i*44 + 18].the_char = 'c';
+      /* hole in second vector, second block... */
+      hvector_buf[i*44 + 25].the_double = 3.0;
+      hvector_buf[i*44 + 25].the_char = 'c';
+      /* hole in between second and third vector blocks... */
+      hvector_buf[i*44 + 29].the_double = 3.0;
+      hvector_buf[i*44 + 29].the_char = 'c';
+      /* hole in first vector, third block... */
+      hvector_buf[i*44 + 33].the_double = 3.0;
+      hvector_buf[i*44 + 33].the_char = 'c';
+      /* hole in second vector, third block... */
+      hvector_buf[i*44 + 40].the_double = 3.0;
+      hvector_buf[i*44 + 40].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      /* sixty holes in indexed_buf... */
+      /* hole in first vector, first block, first hvector... */
+      indexed_buf[i*132 + 3].the_double = 3.0;
+      indexed_buf[i*132 + 3].the_char = 'c';
+      /* hole in second vector, first block, first hvector... */
+      indexed_buf[i*132 + 10].the_double = 3.0;
+      indexed_buf[i*132 + 10].the_char = 'c';
+      /* hole in between first and second vector blocks, first hvector... */
+      indexed_buf[i*132 + 14].the_double = 3.0;
+      indexed_buf[i*132 + 14].the_char = 'c';
+      /* hole in first vector, second block, first hvector... */
+      indexed_buf[i*132 + 18].the_double = 3.0;
+      indexed_buf[i*132 + 18].the_char = 'c';
+      /* hole in second vector, second block, first hvector... */
+      indexed_buf[i*132 + 25].the_double = 3.0;
+      indexed_buf[i*132 + 25].the_char = 'c';
+      /* hole in between second and third vector blocks, first hvector... */
+      indexed_buf[i*132 + 29].the_double = 3.0;
+      indexed_buf[i*132 + 29].the_char = 'c';
+      /* hole in first vector, third block, first hvector... */
+      indexed_buf[i*132 + 33].the_double = 3.0;
+      indexed_buf[i*132 + 33].the_char = 'c';
+      /* hole in second vector, third block, first hvector... */
+      indexed_buf[i*132 + 40].the_double = 3.0;
+      indexed_buf[i*132 + 40].the_char = 'c';
+      /* hole in between hvectors... */
+      for (j = 0; j < 44; j++) {
+       indexed_buf[i*132 + 44 + j].the_double = 3.0;
+       indexed_buf[i*132 + 44 + j].the_char = 'c';
+      }
+      /* hole in first vector, first block, second hvector... */
+      indexed_buf[i*132 + 3 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 3 + 88].the_char = 'c';
+      /* hole in second vector, first block, second hvector... */
+      indexed_buf[i*132 + 10 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 10 + 88].the_char = 'c';
+      /* hole in between first and second vector blocks, second hvector... */
+      indexed_buf[i*132 + 14 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 14 + 88].the_char = 'c';
+      /* hole in first vector, second block, second hvector... */
+      indexed_buf[i*132 + 18 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 18 + 88].the_char = 'c';
+      /* hole in second vector, second block, second hvector... */
+      indexed_buf[i*132 + 25 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 25 + 88].the_char = 'c';
+      /* hole in between second and third vector blocks, second hvector... */
+      indexed_buf[i*132 + 29 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 29 + 88].the_char = 'c';
+      /* hole in first vector, third block, second hvector... */
+      indexed_buf[i*132 + 33 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 33 + 88].the_char = 'c';
+      /* hole in second vector, third block, second hvector... */
+      indexed_buf[i*132 + 40 + 88].the_double = 3.0;
+      indexed_buf[i*132 + 40 + 88].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      /* one hundred twenty eight holes in hindexed_buf... */
+      /* hole in first vector, first block, first hvector, index 1... */
+      hindexed_buf[i*272 + 3].the_double = 3.0;
+      hindexed_buf[i*272 + 3].the_char = 'c';
+      /* hole in second vector, first block, first hvector, index 1... */
+      hindexed_buf[i*272 + 10].the_double = 3.0;
+      hindexed_buf[i*272 + 10].the_char = 'c';
+      /* hole between first & second vector blocks, hvector 1, index 1... */
+      hindexed_buf[i*272 + 14].the_double = 3.0;
+      hindexed_buf[i*272 + 14].the_char = 'c';
+      /* hole in first vector, second block, first hvector, index 1... */
+      hindexed_buf[i*272 + 18].the_double = 3.0;
+      hindexed_buf[i*272 + 18].the_char = 'c';
+      /* hole in second vector, second block, first hvector, index 1... */
+      hindexed_buf[i*272 + 25].the_double = 3.0;
+      hindexed_buf[i*272 + 25].the_char = 'c';
+      /* hole between second & third vector blocks, hvector 1, index 1... */
+      hindexed_buf[i*272 + 29].the_double = 3.0;
+      hindexed_buf[i*272 + 29].the_char = 'c';
+      /* hole in first vector, third block, first hvector, index 1... */
+      hindexed_buf[i*272 + 33].the_double = 3.0;
+      hindexed_buf[i*272 + 33].the_char = 'c';
+      /* hole in second vector, third block, first hvector, index 1... */
+      hindexed_buf[i*272 + 40].the_double = 3.0;
+      hindexed_buf[i*272 + 40].the_char = 'c';
+      /* hole in between hvectors, index 1... */
+      for (j = 0; j < 44; j++) {
+       hindexed_buf[i*272 + 44 + j].the_double = 3.0;
+       hindexed_buf[i*272 + 44 + j].the_char = 'c';
+      }
+      /* hole in first vector, first block, second hvector, index 1... */
+      hindexed_buf[i*272 + 3 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 3 + 88].the_char = 'c';
+      /* hole in second vector, first block, second hvector, index 1... */
+      hindexed_buf[i*272 + 10 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 10 + 88].the_char = 'c';
+      /* hole between first & second vector blocks, hvector 2, index 1... */
+      hindexed_buf[i*272 + 14 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 14 + 88].the_char = 'c';
+      /* hole in first vector, second block, second hvector, index 1... */
+      hindexed_buf[i*272 + 18 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 18 + 88].the_char = 'c';
+      /* hole in second vector, second block, second hvector, index 1... */
+      hindexed_buf[i*272 + 25 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 25 + 88].the_char = 'c';
+      /* hole between second & third vector blocks, hvector 2, index 1... */
+      hindexed_buf[i*272 + 29 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 29 + 88].the_char = 'c';
+      /* hole in first vector, third block, second hvector, index 1... */
+      hindexed_buf[i*272 + 33 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 33 + 88].the_char = 'c';
+      /* hole in second vector, third block, second hvector, index 1... */
+      hindexed_buf[i*272 + 40 + 88].the_double = 3.0;
+      hindexed_buf[i*272 + 40 + 88].the_char = 'c';
+      /* indexed hole... */
+      for (j = 0; j < 8; j++) {
+       hindexed_buf[i*272 + 132 + j].the_double = 3.0;
+       hindexed_buf[i*272 + 132 + j].the_char = 'c';
+      }
+      /* hole in first vector, first block, first hvector, index 2... */
+      hindexed_buf[i*272 + 3 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 3 + 140].the_char = 'c';
+      /* hole in second vector, first block, first hvector, index 2... */
+      hindexed_buf[i*272 + 10 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 10 + 140].the_char = 'c';
+      /* hole between first & second vector blocks, hvector 1, index 2... */
+      hindexed_buf[i*272 + 14 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 14 + 140].the_char = 'c';
+      /* hole in first vector, second block, first hvector, index 2... */
+      hindexed_buf[i*272 + 18 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 18 + 140].the_char = 'c';
+      /* hole in second vector, second block, first hvector, index 2... */
+      hindexed_buf[i*272 + 25 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 25 + 140].the_char = 'c';
+      /* hole between second & third vector blocks, hvector 1, index 2... */
+      hindexed_buf[i*272 + 29 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 29 + 140].the_char = 'c';
+      /* hole in first vector, third block, first hvector, index 2... */
+      hindexed_buf[i*272 + 33 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 33 + 140].the_char = 'c';
+      /* hole in second vector, third block, first hvector, index 2... */
+      hindexed_buf[i*272 + 40 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 40 + 140].the_char = 'c';
+      /* hole in between hvectors, index 2... */
+      for (j = 0; j < 44; j++) {
+       hindexed_buf[i*272 + 44 + j + 140].the_double = 3.0;
+       hindexed_buf[i*272 + 44 + j + 140].the_char = 'c';
+      }
+      /* hole in first vector, first block, second hvector, index 2... */
+      hindexed_buf[i*272 + 3 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 3 + 88 + 140].the_char = 'c';
+      /* hole in second vector, first block, second hvector, index 2... */
+      hindexed_buf[i*272 + 10 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 10 + 88 + 140].the_char = 'c';
+      /* hole between first & second vector blocks, hvector 2, index 2... */
+      hindexed_buf[i*272 + 14 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 14 + 88 + 140].the_char = 'c';
+      /* hole in first vector, second block, second hvector, index 2... */
+      hindexed_buf[i*272 + 18 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 18 + 88 + 140].the_char = 'c';
+      /* hole in second vector, second block, second hvector, index 2... */
+      hindexed_buf[i*272 + 25 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 25 + 88 + 140].the_char = 'c';
+      /* hole between second & third vector blocks, hvector 2, index 2... */
+      hindexed_buf[i*272 + 29 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 29 + 88 + 140].the_char = 'c';
+      /* hole in first vector, third block, second hvector, index 2... */
+      hindexed_buf[i*272 + 33 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 33 + 88 + 140].the_char = 'c';
+      /* hole in second vector, third block, second hvector, index 2... */
+      hindexed_buf[i*272 + 40 + 88 + 140].the_double = 3.0;
+      hindexed_buf[i*272 + 40 + 88 + 140].the_char = 'c';
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 10; j++) {
+       /* hole in first vector, first block, first hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 3].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 3].the_char = 'c';
+       /* hole in second vector, first block, first hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 10].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 10].the_char = 'c';
+       /* hole between first & second vector blocks, hvector 1, index 1... */
+       contig_buf[i*2720 + j*272 + 14].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 14].the_char = 'c';
+       /* hole in first vector, second block, first hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 18].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 18].the_char = 'c';
+       /* hole in second vector, second block, first hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 25].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 25].the_char = 'c';
+       /* hole between second & third vector blocks, hvector 1, index 1... */
+       contig_buf[i*2720 + j*272 + 29].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 29].the_char = 'c';
+       /* hole in first vector, third block, first hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 33].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 33].the_char = 'c';
+       /* hole in second vector, third block, first hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 40].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 40].the_char = 'c';
+       /* hole in between hvectors, index 1... */
+       for (k = 0; k < 44; k++) {
+         contig_buf[i*2720 + j*272 + 44 + k].the_double = 3.0;
+         contig_buf[i*2720 + j*272 + 44 + k].the_char = 'c';
+       }
+       /* hole in first vector, first block, second hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 3 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 3 + 88].the_char = 'c';
+       /* hole in second vector, first block, second hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 10 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 10 + 88].the_char = 'c';
+       /* hole between first & second vector blocks, hvector 2, index 1... */
+       contig_buf[i*2720 + j*272 + 14 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 14 + 88].the_char = 'c';
+       /* hole in first vector, second block, second hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 18 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 18 + 88].the_char = 'c';
+       /* hole in second vector, second block, second hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 25 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 25 + 88].the_char = 'c';
+       /* hole between second & third vector blocks, hvector 2, index 1... */
+       contig_buf[i*2720 + j*272 + 29 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 29 + 88].the_char = 'c';
+       /* hole in first vector, third block, second hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 33 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 33 + 88].the_char = 'c';
+       /* hole in second vector, third block, second hvector, index 1... */
+       contig_buf[i*2720 + j*272 + 40 + 88].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 40 + 88].the_char = 'c';
+       /* indexed hole... */
+       for (k = 0; k < 8; k++) {
+         contig_buf[i*2720 + j*272 + 132 + k].the_double = 3.0;
+         contig_buf[i*2720 + j*272 + 132 + k].the_char = 'c';
+       }
+       /* hole in first vector, first block, first hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 3 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 3 + 140].the_char = 'c';
+       /* hole in second vector, first block, first hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 10 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 10 + 140].the_char = 'c';
+       /* hole between first & second vector blocks, hvector 1, index 2... */
+       contig_buf[i*2720 + j*272 + 14 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 14 + 140].the_char = 'c';
+       /* hole in first vector, second block, first hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 18 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 18 + 140].the_char = 'c';
+       /* hole in second vector, second block, first hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 25 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 25 + 140].the_char = 'c';
+       /* hole between second & third vector blocks, hvector 1, index 2... */
+       contig_buf[i*2720 + j*272 + 29 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 29 + 140].the_char = 'c';
+       /* hole in first vector, third block, first hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 33 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 33 + 140].the_char = 'c';
+       /* hole in second vector, third block, first hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 40 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 40 + 140].the_char = 'c';
+       /* hole in between hvectors, index 2... */
+       for (k = 0; k < 44; k++) {
+         contig_buf[i*2720 + j*272 + 44 + k + 140].the_double = 3.0;
+         contig_buf[i*2720 + j*272 + 44 + k + 140].the_char = 'c';
+       }
+       /* hole in first vector, first block, second hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_char = 'c';
+       /* hole in second vector, first block, second hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_char = 'c';
+       /* hole between first & second vector blocks, hvector 2, index 2... */
+       contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_char = 'c';
+       /* hole in first vector, second block, second hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_char = 'c';
+       /* hole in second vector, second block, second hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_char = 'c';
+       /* hole between second & third vector blocks, hvector 2, index 2... */
+       contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_char = 'c';
+       /* hole in first vector, third block, second hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_char = 'c';
+       /* hole in second vector, third block, second hvector, index 2... */
+       contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_double = 3.0;
+       contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_char = 'c';
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      /* muck the double member and char member being sent... */
+      struct_lb_ub_send_buf[i].dontsend_double1 = 3.0;
+      for (j = 1; j < 8; j++)
+       struct_lb_ub_send_buf[i].the_chars[j] = 'c';
+      struct_lb_ub_send_buf[i].dontsend_double2 = 3.0;
+#endif
+    }
+  }
+       
+  if ((rank == 0) || (rank == 1)) {
+    /* wait on everything... */
+    MPI_Waitall (TYPE_CONSTRUCTOR_COUNT, aReq, aStatus);
+  }
+
+  if (rank == 1) {
+    /* check the holes... */
+    for (i = 0; i < MSG_COUNT; i++) {
+#ifdef RUN_TYPE_STRUCT
+      /* no holes in struct_buf... */
+#endif
+
+#ifdef RUN_TYPE_VECTOR
+      /* one hole in vector_buf... */
+      assert ((vector_buf[i*7 + 3].the_double == 2.0) &&
+             (vector_buf[i*7 + 3].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_HVECTOR
+      /* eight holes in hvector_buf... */
+      /* hole in first vector, first block... */
+      assert ((hvector_buf[i*44 + 3].the_double == 2.0) && 
+             (hvector_buf[i*44 + 3].the_char == 'b'));
+      /* hole in second vector, first block... */
+      assert ((hvector_buf[i*44 + 10].the_double == 2.0) &&
+             (hvector_buf[i*44 + 10].the_char == 'b'));
+      /* hole in between first and second vector blocks... */
+      assert ((hvector_buf[i*44 + 14].the_double == 2.0) &&
+             (hvector_buf[i*44 + 14].the_char == 'b'));
+      /* hole in first vector, second block... */
+      assert ((hvector_buf[i*44 + 18].the_double == 2.0) &&
+             (hvector_buf[i*44 + 18].the_char == 'b'));
+      /* hole in second vector, second block... */
+      assert ((hvector_buf[i*44 + 25].the_double == 2.0) &&
+             (hvector_buf[i*44 + 25].the_char == 'b'));
+      /* hole in between second and third vector blocks... */
+      assert ((hvector_buf[i*44 + 29].the_double == 2.0) &&
+             (hvector_buf[i*44 + 29].the_char == 'b'));
+      /* hole in first vector, third block... */
+      assert ((hvector_buf[i*44 + 33].the_double == 2.0) &&
+             (hvector_buf[i*44 + 33].the_char == 'b'));
+      /* hole in second vector, third block... */
+      assert ((hvector_buf[i*44 + 40].the_double == 2.0) &&
+             (hvector_buf[i*44 + 40].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_INDEXED
+      /* sixty holes in indexed_buf... */
+      /* hole in first vector, first block, first hvector... */
+      assert ((indexed_buf[i*132 + 3].the_double == 2.0) &&
+             (indexed_buf[i*132 + 3].the_char == 'b'));
+      /* hole in second vector, first block, first hvector... */
+      assert ((indexed_buf[i*132 + 10].the_double == 2.0) &&
+             (indexed_buf[i*132 + 10].the_char == 'b'));
+      /* hole in between first and second vector blocks, first hvector... */
+      assert ((indexed_buf[i*132 + 14].the_double == 2.0) &&
+             (indexed_buf[i*132 + 14].the_char == 'b'));
+      /* hole in first vector, second block, first hvector... */
+      assert ((indexed_buf[i*132 + 18].the_double == 2.0) &&
+             (indexed_buf[i*132 + 18].the_char == 'b'));
+      /* hole in second vector, second block, first hvector... */
+      assert ((indexed_buf[i*132 + 25].the_double == 2.0) &&
+             (indexed_buf[i*132 + 25].the_char == 'b'));
+      /* hole in between second and third vector blocks, first hvector... */
+      assert ((indexed_buf[i*132 + 29].the_double == 2.0) &&
+             (indexed_buf[i*132 + 29].the_char == 'b'));
+      /* hole in first vector, third block, first hvector... */
+      assert ((indexed_buf[i*132 + 33].the_double == 2.0) &&
+             (indexed_buf[i*132 + 33].the_char == 'b'));
+      /* hole in second vector, third block, first hvector... */
+      assert ((indexed_buf[i*132 + 40].the_double == 2.0) &&
+             (indexed_buf[i*132 + 40].the_char == 'b'));
+      /* hole in between hvectors... */
+      for (j = 0; j < 44; j++) {
+       assert ((indexed_buf[i*132 + 44 + j].the_double == 2.0) &&
+               (indexed_buf[i*132 + 44 + j].the_char == 'b'));
+      }
+      /* hole in first vector, first block, second hvector... */
+      assert ((indexed_buf[i*132 + 3 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 3 + 88].the_char == 'b'));
+      /* hole in second vector, first block, second hvector... */
+      assert ((indexed_buf[i*132 + 10 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 10 + 88].the_char == 'b'));
+      /* hole in between first and second vector blocks, second hvector... */
+      assert ((indexed_buf[i*132 + 14 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 14 + 88].the_char == 'b'));
+      /* hole in first vector, second block, second hvector... */
+      assert ((indexed_buf[i*132 + 18 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 18 + 88].the_char == 'b'));
+      /* hole in second vector, second block, second hvector... */
+      assert ((indexed_buf[i*132 + 25 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 25 + 88].the_char == 'b'));
+      /* hole in between second and third vector blocks, second hvector... */
+      assert ((indexed_buf[i*132 + 29 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 29 + 88].the_char == 'b'));
+      /* hole in first vector, third block, second hvector... */
+      assert ((indexed_buf[i*132 + 33 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 33 + 88].the_char == 'b'));
+      /* hole in second vector, third block, second hvector... */
+      assert ((indexed_buf[i*132 + 40 + 88].the_double == 2.0) &&
+             (indexed_buf[i*132 + 40 + 88].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_HINDEXED
+      /* one hundred twenty eight holes in hindexed_buf... */
+      /* hole in first vector, first block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 3].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3].the_char == 'b'));
+      /* hole in second vector, first block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 10].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 1, index 1... */
+      assert ((hindexed_buf[i*272 + 14].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14].the_char == 'b'));
+      /* hole in first vector, second block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 18].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18].the_char == 'b'));
+      /* hole in second vector, second block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 25].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 1, index 1... */
+      assert ((hindexed_buf[i*272 + 29].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29].the_char == 'b'));
+      /* hole in first vector, third block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 33].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33].the_char == 'b'));
+      /* hole in second vector, third block, first hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 40].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40].the_char == 'b'));
+      /* hole in between hvectors, index 1... */
+      for (j = 0; j < 44; j++) {
+       assert ((hindexed_buf[i*272 + 44 + j].the_double == 2.0) &&
+               (hindexed_buf[i*272 + 44 + j].the_char == 'b'));
+      }
+      /* hole in first vector, first block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 3 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3 + 88].the_char == 'b'));
+      /* hole in second vector, first block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 10 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10 + 88].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 2, index 1... */
+      assert ((hindexed_buf[i*272 + 14 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14 + 88].the_char == 'b'));
+      /* hole in first vector, second block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 18 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18 + 88].the_char == 'b'));
+      /* hole in second vector, second block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 25 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25 + 88].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 2, index 1... */
+      assert ((hindexed_buf[i*272 + 29 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29 + 88].the_char == 'b'));
+      /* hole in first vector, third block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 33 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33 + 88].the_char == 'b'));
+      /* hole in second vector, third block, second hvector, index 1... */
+      assert ((hindexed_buf[i*272 + 40 + 88].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40 + 88].the_char == 'b'));
+      /* indexed hole... */
+      for (j = 0; j < 8; j++) {
+       assert ((hindexed_buf[i*272 + 132 + j].the_double == 2.0) &&
+               (hindexed_buf[i*272 + 132 + j].the_char == 'b'));
+      }
+      /* hole in first vector, first block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 3 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3 + 140].the_char == 'b'));
+      /* hole in second vector, first block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 10 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10 + 140].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 1, index 2... */
+      assert ((hindexed_buf[i*272 + 14 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14 + 140].the_char == 'b'));
+      /* hole in first vector, second block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 18 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18 + 140].the_char == 'b'));
+      /* hole in second vector, second block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 25 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25 + 140].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 1, index 2... */
+      assert ((hindexed_buf[i*272 + 29 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29 + 140].the_char == 'b'));
+      /* hole in first vector, third block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 33 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33 + 140].the_char == 'b'));
+      /* hole in second vector, third block, first hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 40 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40 + 140].the_char == 'b'));
+      /* hole in between hvectors, index 2... */
+      for (j = 0; j < 44; j++) {
+       assert ((hindexed_buf[i*272 + 44 + j + 140].the_double == 2.0) &&
+               (hindexed_buf[i*272 + 44 + j + 140].the_char == 'b'));
+      }
+      /* hole in first vector, first block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 3 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 3 + 88 + 140].the_char == 'b'));
+      /* hole in second vector, first block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 10 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 10 + 88 + 140].the_char == 'b'));
+      /* hole between first & second vector blocks, hvector 2, index 2... */
+      assert ((hindexed_buf[i*272 + 14 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 14 + 88 + 140].the_char == 'b'));
+      /* hole in first vector, second block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 18 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 18 + 88 + 140].the_char == 'b'));
+      /* hole in second vector, second block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 25 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 25 + 88 + 140].the_char == 'b'));
+      /* hole between second & third vector blocks, hvector 2, index 2... */
+      assert ((hindexed_buf[i*272 + 29 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 29 + 88 + 140].the_char == 'b'));
+      /* hole in first vector, third block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 33 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 33 + 88 + 140].the_char == 'b'));
+      /* hole in second vector, third block, second hvector, index 2... */
+      assert ((hindexed_buf[i*272 + 40 + 88 + 140].the_double == 2.0) &&
+             (hindexed_buf[i*272 + 40 + 88 + 140].the_char == 'b'));
+#endif
+
+#ifdef RUN_TYPE_CONTIGUOUS
+      for (j = 0; j < 10; j++) {
+       /* hole in first vector, first block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 3].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3].the_char == 'b'));
+       /* hole in second vector, first block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 10].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 1, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 14].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14].the_char == 'b'));
+       /* hole in first vector, second block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 18].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18].the_char == 'b'));
+       /* hole in second vector, second block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 25].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 1, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 29].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29].the_char == 'b'));
+       /* hole in first vector, third block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 33].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33].the_char == 'b'));
+       /* hole in second vector, third block, first hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 40].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40].the_char == 'b'));
+       /* hole in between hvectors, index 1... */
+       for (k = 0; k < 44; k++) {
+         assert ((contig_buf[i*2720 + j*272 + 44 + k].the_double == 2.0) &&
+                 (contig_buf[i*2720 + j*272 + 44 + k].the_char == 'b'));
+       }
+       /* hole in first vector, first block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 3 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3 + 88].the_char == 'b'));
+       /* hole in second vector, first block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 10 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10 + 88].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 2, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 14 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14 + 88].the_char == 'b'));
+       /* hole in first vector, second block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 18 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18 + 88].the_char == 'b'));
+       /* hole in second vector, second block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 25 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25 + 88].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 2, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 29 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29 + 88].the_char == 'b'));
+       /* hole in first vector, third block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 33 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33 + 88].the_char == 'b'));
+       /* hole in second vector, third block, second hvector, index 1... */
+       assert ((contig_buf[i*2720 + j*272 + 40 + 88].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40 + 88].the_char == 'b'));
+       /* indexed hole... */
+       for (k = 0; k < 8; k++) {
+         assert ((contig_buf[i*2720 + j*272 + 132 + k].the_double == 2.0) &&
+                 (contig_buf[i*2720 + j*272 + 132 + k].the_char == 'b'));
+       }
+       /* hole in first vector, first block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 3 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3 + 140].the_char == 'b'));
+       /* hole in second vector, first block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 10 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10 + 140].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 1, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 14 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14 + 140].the_char == 'b'));
+       /* hole in first vector, second block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 18 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18 + 140].the_char == 'b'));
+       /* hole in second vector, second block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 25 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25 + 140].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 1, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 29 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29 + 140].the_char == 'b'));
+       /* hole in first vector, third block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 33 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33 + 140].the_char == 'b'));
+       /* hole in second vector, third block, first hvector, index 2... */
+       assert ((contig_buf[i*2720 + j*272 + 40 + 140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40 + 140].the_char == 'b'));
+       /* hole in between hvectors, index 2... */
+       for (k = 0; k < 44; k++) {
+         assert ((contig_buf[i*2720+j*272+44+k+140].the_double == 2.0) &&
+                 (contig_buf[i*2720 +j*272+44+k+140].the_char == 'b'));
+       }
+       /* hole in first vector, first block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+3+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_char == 'b'));
+       /* hole in second vector, first block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+10+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_char == 'b'));
+       /* hole between first & second vector blocks, hvector 2, index 2... */
+       assert ((contig_buf[i*2720+j*272+14+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_char == 'b'));
+       /* hole in first vector, second block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+18+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_char == 'b'));
+       /* hole in second vector, second block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+25+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_char == 'b'));
+       /* hole between second & third vector blocks, hvector 2, index 2... */
+       assert ((contig_buf[i*2720+j*272+29+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_char == 'b'));
+       /* hole in first vector, third block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+33+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_char == 'b'));
+       /* hole in second vector, third block, second hvector, index 2... */
+       assert ((contig_buf[i*2720+j*272+40+88+140].the_double == 2.0) &&
+               (contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_char == 'b'));
+      }
+#endif
+
+#ifdef RUN_TYPE_STRUCT_LB_UB
+      /* no holes in struct_lb_ub_recv_buf... */
+#endif
+    }
+  }
+       
+  for (i = 0; i < TYPE_CONSTRUCTOR_COUNT; i++) {
+    MPI_Type_free (&newtype[i]);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-error-exhaustive.c b/teshsuite/smpi/isp/umpire/type-no-error-exhaustive.c
new file mode 100644 (file)
index 0000000..22e2eb2
--- /dev/null
@@ -0,0 +1,85 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-error-exhaustive.c -- use all type constructors correctly */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-error-exhaustive.c,v 1.1 2002/05/29 16:09:50 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define TYPE_CONSTRUCTOR_COUNT 6
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i;
+  int blocklens[2], displs[2];
+  MPI_Datatype newtype[TYPE_CONSTRUCTOR_COUNT]; 
+  MPI_Datatype newtype2[TYPE_CONSTRUCTOR_COUNT]; 
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  newtype2[0] = MPI_DOUBLE;
+  newtype2[1] = MPI_CHAR;
+  blocklens[0] = blocklens[1] = 1;
+  displs[0] = 0;
+  displs[1] = 8;
+
+  MPI_Barrier (comm);
+
+  /* create the types */
+  MPI_Type_struct (2, blocklens, displs, newtype2, &newtype[0]);
+  MPI_Type_vector (2, 3, 4, newtype[0], &newtype[1]);
+  MPI_Type_hvector (3, 2, 192, newtype[1], &newtype[2]);
+  displs[1] = 2;
+  MPI_Type_indexed (2, blocklens, displs, newtype[2], &newtype[3]);
+  displs[1] = 512;
+  MPI_Type_hindexed (2, blocklens, displs, newtype[3], &newtype[4]);
+  displs[1] = 8;
+  MPI_Type_contiguous (10, newtype[4], &newtype[5]);
+
+  for (i = 0; i < TYPE_CONSTRUCTOR_COUNT; i++)
+    MPI_Type_free (&newtype[i]);
+
+  MPI_Barrier (comm);
+
+  /* create the types again and free with an alias... */
+  MPI_Type_struct (2, blocklens, displs, newtype2, &newtype[0]);
+  MPI_Type_vector (2, 3, 4, newtype[0], &newtype[1]);
+  MPI_Type_hvector (3, 2, 192, newtype[1], &newtype[2]);
+  displs[1] = 2;
+  MPI_Type_indexed (2, blocklens, displs, newtype[2], &newtype[3]);
+  displs[1] = 512;
+  MPI_Type_hindexed (2, blocklens, displs, newtype[3], &newtype[4]);
+  displs[1] = 8;
+  MPI_Type_contiguous (10, newtype[4], &newtype[5]);
+
+  for (i = 0; i < TYPE_CONSTRUCTOR_COUNT; i++) {
+    newtype2[i] = newtype[i];
+    MPI_Type_free (&newtype2[i]);
+  }
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-error.c b/teshsuite/smpi/isp/umpire/type-no-error.c
new file mode 100644 (file)
index 0000000..2cac143
--- /dev/null
@@ -0,0 +1,49 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
+
+/* type-no-error.c -- construct a type and free it */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-error.c,v 1.1 2002/05/29 16:09:51 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Datatype newtype, newtype2;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+  MPI_Type_contiguous (128, MPI_INT, &newtype);
+  MPI_Type_free (&newtype);
+  MPI_Barrier (comm);
+  /* now with an alias... */
+  MPI_Type_contiguous (128, MPI_INT, &newtype);
+  newtype2 = newtype;
+  MPI_Type_free (&newtype2);
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-free-exhaustive.c b/teshsuite/smpi/isp/umpire/type-no-free-exhaustive.c
new file mode 100644 (file)
index 0000000..a321842
--- /dev/null
@@ -0,0 +1,64 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov)  */
+
+/* type-no-free-exhaustive.c -- use all type constructors without freeing */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-free-exhaustive.c,v 1.1 2002/05/29 16:09:51 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define TYPE_CONSTRUCTOR_COUNT 6
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  int i;
+  int blocklens[2], displs[2];
+  MPI_Datatype newtype[TYPE_CONSTRUCTOR_COUNT]; 
+  MPI_Datatype newtype2[TYPE_CONSTRUCTOR_COUNT]; 
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  newtype2[0] = MPI_DOUBLE;
+  newtype2[1] = MPI_CHAR;
+  blocklens[0] = blocklens[1] = 1;
+  displs[0] = 0;
+  displs[1] = 8;
+
+  MPI_Barrier (comm);
+
+  /* create the types */
+  MPI_Type_struct (2, blocklens, displs, newtype2, &newtype[0]);
+  MPI_Type_vector (2, 3, 4, newtype[0], &newtype[1]);
+  MPI_Type_hvector (3, 2, 192, newtype[1], &newtype[2]);
+  displs[1] = 2;
+  MPI_Type_indexed (2, blocklens, displs, newtype[2], &newtype[3]);
+  displs[1] = 512;
+  MPI_Type_hindexed (2, blocklens, displs, newtype[3], &newtype[4]);
+  displs[1] = 8;
+  MPI_Type_contiguous (10, newtype[4], &newtype[5]);
+
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-free.c b/teshsuite/smpi/isp/umpire/type-no-free.c
new file mode 100644 (file)
index 0000000..19abfd9
--- /dev/null
@@ -0,0 +1,44 @@
+/* -*- Mode: C; -*- */
+/* Creator: Jeffrey Vetter (vetter3@llnl.gov) Thu Feb 24 2000 */
+
+/* type-no-free.c -- do a type commit and no free */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-free.c,v 1.2 2000/12/04 19:09:46 bronis Exp $";
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int comm = MPI_COMM_WORLD;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Datatype newtype;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (comm, &nprocs);
+  MPI_Comm_rank (comm, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (comm);
+  MPI_Type_contiguous (128, MPI_INT, &newtype);
+  MPI_Type_commit (&newtype);
+  MPI_Barrier (comm);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-free2.c b/teshsuite/smpi/isp/umpire/type-no-free2.c
new file mode 100644 (file)
index 0000000..a9c7898
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Dec 10 2002 */
+
+/* type-no-free2.c -- create many types, failing to free some */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-free2.c,v 1.2 2003/01/13 18:31:48 bronis Exp $";
+#endif
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* 10000 breaks umpire due to running out of memory as of 12/12/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS                  10
+#define TYPES_PER_ITERATION          3
+#define TYPES_LOST_PER_ITERATION     1
+#define TYPES_TO_COMMIT              1
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j;
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Datatype newtype[TYPES_PER_ITERATION];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  for (i = 0; i < ITERATIONS; i++) {
+    for (j = 0; j < TYPES_PER_ITERATION; j++) {
+      MPI_Type_contiguous (128, MPI_INT, &newtype[j]);
+
+      if (j >= TYPES_PER_ITERATION - TYPES_TO_COMMIT) {
+       MPI_Type_commit (&newtype[j]);
+      }
+
+      if (j < TYPES_PER_ITERATION - TYPES_LOST_PER_ITERATION) {
+       MPI_Type_free (&newtype[j]);
+      }
+    }
+
+    if (((i % (ITERATIONS/10)) == 0) && (rank == 0))
+      printf ("iteration %d completed\n", i);
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/type-no-free3.c b/teshsuite/smpi/isp/umpire/type-no-free3.c
new file mode 100644 (file)
index 0000000..8fc526b
--- /dev/null
@@ -0,0 +1,101 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Tue Dec 10 2002 */
+
+/* type-no-free3.c -- create many types, failing to free some */
+/*                    much like type-no-free2.c but use types */
+/*                    to communicate and thus exercise umpire more */
+
+#ifndef lint
+static char *rcsid =
+  "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-free3.c,v 1.2 2003/01/13 18:31:49 bronis Exp $";
+#endif
+
+/* NOTE: Some value of ITERATIONS will imply resource exhaustion */
+/*       either in Umpire or MPI no matter how things are implemented */
+/*       the best we can hope for is to fail gracefully... */
+/* 10000 breaks umpire due to running out of memory as of 12/12/02... */
+/* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
+#define ITERATIONS                  10
+#define TYPES_PER_ITERATION          3
+#define TYPES_LOST_PER_ITERATION     1
+#define TYPES_TO_COMMIT              1
+
+
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  int i, j, partner, buf_j;
+  int buf[buf_size * TYPES_TO_COMMIT];
+  char processor_name[128];
+  int namelen = 128;
+  MPI_Datatype newtype[TYPES_PER_ITERATION];
+  MPI_Request reqs[TYPES_TO_COMMIT];
+  MPI_Status statuses[TYPES_TO_COMMIT];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  if (nprocs < 2) {
+    printf ("Not enough tasks\n");
+    MPI_Finalize();
+
+    return 0;
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if ((nprocs % 2 == 0) ||
+      (rank != nprocs - 1)) {
+    partner = (rank % 2) ? rank - 1 : rank + 1;
+
+    for (i = 0; i < ITERATIONS; i++) {
+      for (j = 0; j < TYPES_PER_ITERATION; j++) {
+       MPI_Type_contiguous (buf_size, MPI_INT, &newtype[j]);
+
+       buf_j = j + TYPES_TO_COMMIT - TYPES_PER_ITERATION;
+
+       if (buf_j >= 0) {
+         MPI_Type_commit (&newtype[j]);
+
+         if (rank % 2) {
+           MPI_Irecv (&buf[buf_j*buf_size], 1, newtype[j],
+                      partner, buf_j, MPI_COMM_WORLD, &reqs[buf_j]);
+         }
+         else {
+           MPI_Isend (&buf[buf_j*buf_size], 1, newtype[j],
+                      partner, buf_j, MPI_COMM_WORLD, &reqs[buf_j]);
+         }
+       }
+
+       if (j < TYPES_PER_ITERATION - TYPES_LOST_PER_ITERATION) {
+         MPI_Type_free (&newtype[j]);
+       }
+      }
+      
+      MPI_Waitall (TYPES_TO_COMMIT, reqs, statuses);
+    }
+  }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  printf ("(%d) Finished normally\n", rank);
+  MPI_Finalize ();
+
+  return 0;
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/wait-deadlock.c b/teshsuite/smpi/isp/umpire/wait-deadlock.c
new file mode 100644 (file)
index 0000000..67acdc0
--- /dev/null
@@ -0,0 +1,63 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status status;
+  MPI_Request req;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+       int i;
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Wait (&req, &status);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf1, 1, buf_size);
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &req);
+
+      MPI_Wait (&req, &status);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/waitall-deadlock.c b/teshsuite/smpi/isp/umpire/waitall-deadlock.c
new file mode 100644 (file)
index 0000000..5cf0a88
--- /dev/null
@@ -0,0 +1,73 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* no-error.c -- do some MPI calls without any errors */
+
+#include <stdio.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  MPI_Status statuses[2];
+  MPI_Request reqs[2];
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  /* this code is very similar to no-error-waitall-any_src.c */
+  /* but deadlocks since task 2's send and recv are inverted... */
+  if (nprocs < 3)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Send (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD);
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 0, buf_size);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &reqs[0]);
+
+      MPI_Isend (buf0, buf_size, MPI_INT, 2, 1, MPI_COMM_WORLD, &reqs[1]);
+
+      MPI_Waitall (2, reqs, statuses);
+
+      MPI_Recv (buf1, buf_size, MPI_INT, 0, 1, MPI_COMM_WORLD, statuses);
+
+      MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+    }
+  else if (rank == 2)
+    {
+      MPI_Recv (buf1, buf_size, MPI_INT, 1, 1, MPI_COMM_WORLD, statuses);
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
diff --git a/teshsuite/smpi/isp/umpire/waitany-deadlock.c b/teshsuite/smpi/isp/umpire/waitany-deadlock.c
new file mode 100644 (file)
index 0000000..76dcb1b
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- Mode: C; -*- */
+/* Creator: Bronis R. de Supinski (bronis@llnl.gov) Fri Mar  17 2000 */
+/* waitany-deadlock.c -- deadlock involving MPI_Waitany call */
+
+#include <stdio.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define buf_size 128
+
+int
+main (int argc, char **argv)
+{
+  int nprocs = -1;
+  int rank = -1;
+  char processor_name[128];
+  int namelen = 128;
+  int buf0[buf_size];
+  int buf1[buf_size];
+  int buf2[buf_size];
+  int i, flipbit, done;
+  MPI_Status status;
+
+  /* init */
+  MPI_Init (&argc, &argv);
+  MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
+  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+  MPI_Get_processor_name (processor_name, &namelen);
+  printf ("(%d) is alive on %s\n", rank, processor_name);
+  fflush (stdout);
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  if (nprocs < 2)
+    {
+      printf ("not enough tasks\n");
+    }
+  else if (rank == 0)
+    {
+      MPI_Request reqs[3];
+
+      MPI_Irecv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[0]);
+      MPI_Irecv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[1]);
+      MPI_Irecv (buf2, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &reqs[2]);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Waitany (i, reqs, &done, &status);
+
+       assert (done == (i - 1));
+
+       /* don't let next one start until after waitany call... */
+       MPI_Send (&flipbit, 1, MPI_INT, 1, i, MPI_COMM_WORLD);
+      }
+    }
+  else if (rank == 1)
+    {
+      memset (buf0, 1, buf_size);
+
+      for (i = 3; i > 0; i--) {
+       MPI_Recv (&flipbit, 1, MPI_INT, 0, i, MPI_COMM_WORLD, &status);
+       
+       MPI_Send (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
+      }
+    }
+
+  MPI_Barrier (MPI_COMM_WORLD);
+
+  MPI_Finalize ();
+  printf ("(%d) Finished normally\n", rank);
+}
+
+/* EOF */
index 89e50a9..bb5d8af 100644 (file)
@@ -62,6 +62,7 @@ set(tools_src
 set(bin_files
   ${bin_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/colorize.pl
+  ${CMAKE_CURRENT_SOURCE_DIR}/generate_tesh
   PARENT_SCOPE
   )
 set(txt_files