Whamcloud - gitweb
fix typo and grammar in a comment.
[fs/lustre-release.git] / lustre / tests / mdsrate-stat-small.sh
index 926bde5..1503416 100644 (file)
@@ -17,7 +17,7 @@ init_test_env $@
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$(basename $0 .sh).machines}
+MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 TESTDIR=$MOUNT
 
 # Requirements
@@ -42,7 +42,7 @@ log "===== $0 ====== "
 
 check_and_setup_lustre
 
-generate_machine_file $NODES_TO_USE $MACHINEFILE
+generate_machine_file $NODES_TO_USE $MACHINEFILE || error "can not generate machinefile"
 
 $LFS setstripe $TESTDIR -i 0 -c 1
 get_stripe $TESTDIR
@@ -63,8 +63,7 @@ else
         NUM_THREADS=$NUM_CLIENTS
     fi
 
-    $MPIRUN -np ${NUM_THREADS} -machinefile ${MACHINEFILE} \
-        ${MPIRUN_OPTIONS} ${COMMAND} 2>&1
+    mpi_run -np ${NUM_THREADS} -machinefile ${MACHINEFILE} ${COMMAND} 2>&1
     [ ${PIPESTATUS[0]} != 0 ] && error "Error running mdsrate, aborting..."
 
 fi
@@ -81,7 +80,7 @@ else
     echo "Running stats on 1 node(s)."
     echo "+" ${COMMAND}
 
-    $MPIRUN -np 1 -machinefile ${MACHINEFILE} ${MPIRUN_OPTIONS} ${COMMAND} | tee ${LOG}
+    mpi_run -np 1 -machinefile ${MACHINEFILE} ${COMMAND} | tee ${LOG}
     
     if [ ${PIPESTATUS[0]} != 0 ]; then
         [ -f $LOG ] && cat $LOG
@@ -98,7 +97,7 @@ else
     echo "Running stats on ${NUM_CLIENTS} node(s)."
     echo "+" ${COMMAND}
 
-    $MPIRUN -np ${NUM_CLIENTS} -machinefile ${MACHINEFILE} ${MPIRUN_OPTIONS} ${COMMAND} | tee ${LOG}
+    mpi_run -np ${NUM_CLIENTS} -machinefile ${MACHINEFILE} ${COMMAND} | tee ${LOG}
 
     if [ ${PIPESTATUS[0]} != 0 ]; then
         [ -f $LOG ] && cat $LOG
@@ -108,6 +107,7 @@ else
 fi
 
 equals_msg `basename $0`: test complete, cleaning up
+rm -f $MACHINEFILE
 zconf_umount_clients $NODES_TO_USE $MOUNT
 check_and_cleanup_lustre
 #rm -f $LOG