textSortToSameCluster
上传用户:quxuerui
上传日期:2018-01-08
资源大小:41811k
文件大小:2k
源码类别:

网格计算

开发平台:

Java

  1. #!/usr/bin/env bash
  2. GRID_DIR=`dirname "$0"`
  3. GRID_DIR=`cd "$GRID_DIR"; pwd`
  4. source $GRID_DIR/../gridmix-env
  5. PROCESSES=""
  6. for ((i=0; i < $NUM_OF_SMALL_JOBS_PER_CLASS; i++))
  7. do
  8.     echo $i
  9.     $GRID_MIX_HOME/pipesort/text-sort.small  2>&1 > pipesort.small.$i.out &
  10.     PROCESSES="${PROCESSES} $!"
  11.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  12.     $GRID_MIX_HOME/streamsort/text-sort.small  2>&1 > streamsort.small.$i.out &
  13.     PROCESSES="${PROCESSES} $!"
  14.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  15.     $GRID_MIX_HOME/javasort/text-sort.small  2>&1 > javasort.small.$i.out & 
  16.     PROCESSES="${PROCESSES} $!"
  17.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  18. done
  19.     
  20. for ((i=0; i < $NUM_OF_MEDIUM_JOBS_PER_CLASS; i++))
  21. do
  22.     echo $i
  23.     $GRID_MIX_HOME/pipesort/text-sort.medium  2>&1 > pipesort.medium.$i.out &
  24.     PROCESSES="${PROCESSES} $!"
  25.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  26.     $GRID_MIX_HOME/streamsort/text-sort.medium  2>&1 > streamsort.medium.$i.out &
  27.     PROCESSES="${PROCESSES} $!"
  28.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  29.     $GRID_MIX_HOME/javasort/text-sort.medium  2>&1 > javasort.medium.$i.out & 
  30.     PROCESSES="${PROCESSES} $!"
  31.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  32. done
  33. for ((i=0; i < $NUM_OF_LARGE_JOBS_PER_CLASS; i++))
  34. do
  35.     echo $i
  36.     $GRID_MIX_HOME/pipesort/text-sort.large  2>&1 > pipesort.large.$i.out &
  37.     PROCESSES="${PROCESSES} $!"
  38.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  39.     $GRID_MIX_HOME/streamsort/text-sort.large  2>&1 > pipesort.large.$i.out &
  40.     PROCESSES="${PROCESSES} $!"
  41.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  42.     $GRID_MIX_HOME/javasort/text-sort.large  2>&1 > pipesort.large.$i.out &
  43.     PROCESSES="${PROCESSES} $!"
  44.     $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  45. done
  46. for APROC in ${PROCESSES}; do
  47.   wait ${APROC}
  48. done
  49.