+# dont change stuff below here unless you know what you're doing...
+
+# This is to allow use of yod, pdsh, etc.
+fanout() {
+ local clients=$1; shift
+ local tmpfile=$1; shift
+ local result
+ case $fanout_cmd in
+ 'pdsh')
+ $fanout_cmd $pdsh_args "$clients" "$@" >> $tmpfile 2>&1
+ echo $?
+ return
+ ;;
+ 'mpirun')
+ # horrible misuse of globals
+ $fanout_cmd -np $((ntask*nclnt)) "$@" >> $tmpfile 2>&1
+ echo $?
+ return
+ ;;
+ 'yod')
+ # and another
+ $fanout_cmd -np $((ntask*nclnt)) "$@" >> $tmpfile 2>&1
+ echo $?
+ return
+ ;;
+
+ *)
+ echo "255"
+ return
+ ;;
+ esac
+}