3 # Simple function used by run_*.sh scripts
8 if [ -z "${!name}" ]; then
9 echo "$0: $name must be set"
13 [ $failed ] && exit 1 || true
16 echoerr () { echo "$@" 1>&2 ; }
19 echoerr "$(date +'%F %H:%M:%S'): client load was signaled to terminate"
21 local PGID=$(ps -eo "%c %p %r" | awk "/ $PPID / {print \$3}")
28 local mpirun="$MPIRUN $MPIRUN_OPTIONS"
29 local command="$mpirun $@"
30 local mpilog=$TMP/mpi.log
33 if [ "$MPI_USER" != root -a $mpirun ]; then
34 echo "+ chmod 0777 $MOUNT"
36 command="su $MPI_USER sh -c \"$command \""
41 eval $command 2>&1 > $mpilog || true
44 if [ $rc -eq 0 ] && grep -q "p4_error: : [^0]" $mpilog ; then