webdataScanToSameCluster 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env bash
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS,
  10. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. # See the License for the specific language governing permissions and
  12. # limitations under the License.
  13. GRID_DIR=`dirname "$0"`
  14. GRID_DIR=`cd "$GRID_DIR"; pwd`
  15. source $GRID_DIR/../gridmix-env
  16. PROCESSES=""
  17. for ((i=0; i < $NUM_OF_MEDIUM_JOBS_PER_CLASS; i++))
  18. do
  19. echo $i
  20. $GRID_MIX_HOME/webdatascan/webdata_scan.medium 2>&1 > webdata_scan.medium.$i.out &
  21. PROCESSES="${PROCESSES} $!"
  22. $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  23. done
  24. for ((i=0; i < $NUM_OF_SMALL_JOBS_PER_CLASS; i++))
  25. do
  26. echo $i
  27. $GRID_MIX_HOME/webdatascan/webdata_scan.small 2>&1 > webdata_scan.small.$i.out &
  28. PROCESSES="${PROCESSES} $!"
  29. $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  30. done
  31. for ((i=0; i < $NUM_OF_LARGE_JOBS_PER_CLASS; i++))
  32. do
  33. echo $i
  34. $GRID_MIX_HOME/webdatascan/webdata_scan.large 2>&1 > webdata_scan.large.$i.out &
  35. PROCESSES="${PROCESSES} $!"
  36. $GRID_MIX_HOME/submissionScripts/sleep_if_too_busy
  37. done
  38. for APROC in ${PROCESSES}; do
  39. wait ${APROC}
  40. done