3 # This is a simple heterogeneous test which exploits the mpicc command and
4 # mpirun. This is an example of how heterogeneous programs may be built and
8 # Parameters for all programs and systems
13 programs="sendrecv sendrecv2 sendrecv3 sendrecv4 getelm"
14 # Extra files needed for each program.
15 sendrecvfiles="test.c"
16 sendrecvargs="-nolongdouble"
17 sendrecv2files="dtypes.c gcomm.c"
18 sendrecv3files="dtypes.c gcomm.c"
19 sendrecv4files="dtypes.c gcomm.c"
23 # arch1 is local, arch2 is remote
35 -noclean) noclean=1 ;;
36 -debug) debug_args="-p4dbg 99 -p4rdbg 99" ;;
37 -mpichdebug) debug_args="$debug_args -mpichdebug" ;;
38 -xxgdb) mpirun_args="-xxgdb" ;;
40 -force | -rebuild) rebuild=1 ;;
41 -alpha) arch2=alpha ; name2=ptera ;;
43 echo "Test heterogeneous operation of MPICH with ch_p4 using"
44 echo "the versions of MPICH built in the current tree."
45 echo "Should be run on a sun4; it rsh's to other machines as"
49 *) echo "Unrecognized argument $arg"
55 arches="$arch1 $arch2"
58 # Fixup for brain-dead automounters
59 mypwd=`echo $mypwd | sed s%/tmp_mnt%%g`
61 # Build local versions
63 for pgm in $programs ; do
64 eval extrafiles=$"${pgm}files"
65 $mpihome/lib/$arch1/$device/mpicc -o $pgm.$arch1 $pgm.c $extrafiles
69 # Build remote versions
70 for pgm in $programs ; do
71 eval extrafiles=$"${pgm}files"
72 $rshcmd -n $name2 "(cd $mypwd ; $mpihome/lib/$arch2/$device/mpicc \
73 -o $pgm.$arch2 $pgm.c $extrafiles)"
77 for pgm in $programs ; do
78 echo "Running $pgm..."
79 eval extraargs=$"${pgm}args"
80 $mpihome/lib/$arch1/$device/mpirun $mpirun_args \
81 -arch $arch1 -np 1 -arch $arch2 -np 1 $pgm.%a $debug_args \
85 # Remove the executables
86 if [ -z "$noclean" ] ; then
87 for arch in $arches ; do
88 for pgm in $programs ; do