.job.sh 975 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. eval $nodes_;
  3. eval $cores_;
  4. eval $mpi_proc_;
  5. eval $threads_;
  6. eval $testcase_;
  7. eval $n_pts_;
  8. eval $m_;
  9. eval $q_;
  10. eval $tol_;
  11. eval $depth_;
  12. eval $unif_;
  13. eval $adap_;
  14. eval $max_time_;
  15. eval $fname_;
  16. eval $args_;
  17. WORK_DIR=${PWD}
  18. cd ${WORK_DIR}
  19. #export KMP_AFFINITY=verbose
  20. for (( k=0; k<${#nodes[@]}; k++ )) ; do
  21. if [ "${nodes[k]}" == "${NODES}" ] &&
  22. [ "${mpi_proc[k]}" == "${MPI_PROC}" ]; then
  23. export OMP_NUM_THREADS=${threads[k]};
  24. # CPU only
  25. EXEC_=${EXEC};
  26. FNAME=${RESULT_DIR}/$(basename ${EXEC_})_${fname[k]}.out;
  27. if [ -f ${EXEC_} ] && [ ! -s ${FNAME} ] ; then
  28. printf '%*s\n\n' "100" ' ' | tr ' ' "#" | tee -a ${FNAME};
  29. printf "COMMAND: ${EXEC_} ${args[k]}\n" | tee -a ${FNAME};
  30. ${TIMEOUT} ${max_time[k]} time mpirun -np ${mpi_proc[k]} ${EXEC_} ${args[k]} &> >(tee -a ${FNAME});
  31. printf '\n%*s\n\n' "100" ' ' | tr ' ' "#" | tee -a ${FNAME};
  32. fi;
  33. fi;
  34. done;