test.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. CORES=16;
  3. export EXEC=examples/bin/fmm_cheb
  4. # List arrays and corresponding executable option prefix
  5. declare -a opt_array=(nodes cores mpi_proc threads testcase n_pts m_pts m q tol depth unif adap max_time);
  6. declare -a opt_names=( - - - omp test N M m q tol d unif adap -);
  7. for (( i=0; i<${#opt_names[@]}; i++ )) ; do # Declare arrays
  8. eval "declare -a ${opt_array[$i]}=()";
  9. done
  10. # Set run parameters
  11. nodes+=( 1 1 1 1 ) # Number of compute nodes
  12. cores+=( ${CORES} ${CORES} ${CORES} ${CORES} ) # Number of CPU cores / node
  13. mpi_proc+=( 1 1 1 1 ) # Number of MPI processes
  14. threads+=( ${CORES} ${CORES} ${CORES} ${CORES} ) # Number of OpenMP threads / MPI process
  15. testcase+=( 1 1 1 1 ) # test case: 1) Laplace (smooth) 2) Laplace (discontinuous) ...
  16. n_pts+=( $((8**1)) $((8**1)) $((8**1)) $((8**1)) ) # Total number of points for tree construction
  17. m_pts+=( 1 1 1 1 ) # Maximum number of points per octant
  18. m+=( 10 10 10 10 ) # Multipole order
  19. q+=( 14 14 14 14 ) # Chebyshev order
  20. tol+=( 1e-4 1e-5 1e-6 1e-7 ) # Refinement tolerance
  21. depth+=( 15 15 15 15 ) # Octree maximum depth
  22. unif+=( 0 0 0 0 ) # Uniform point distribution
  23. adap+=( 1 1 1 1 ) # Adaptive refinement
  24. max_time+=( 1000000 1000000 1000000 1000000 ) # Maximum run time
  25. WORK_DIR=$(dirname ${PWD}/$0)/..
  26. TERM_WIDTH=$(stty size | cut -d ' ' -f 2)
  27. source ${WORK_DIR}/scripts/.submit_jobs.sh | cut -b -${TERM_WIDTH}