Changeset 2579 for palm/trunk/SCRIPTS
- Timestamp:
- Oct 25, 2017 4:45:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmtest
r2515 r2579 58 58 } 59 59 60 get_core_array() { 61 for i in 1 2 4 8 16 32; do 62 if [[ $i -le ${1} ]]; then 63 printf "$i " 64 fi 65 done 66 } 60 67 61 68 configure() { … … 93 100 palm_installer_test() { 94 101 hrule 95 printf "Testing with \"${1}\"... " 96 local input_dir=${tester_prefix}/JOBS/${1}/INPUT 97 local monitoring_dir=${tester_prefix}/JOBS/${1}/MONITORING 98 local test_dir=${trunk_dir}/INSTALL 99 if [[ ! -f ${test_dir}/${1}_p3d ]] || [[ ! -f ${test_dir}/${1}_rc ]]; then 102 local name=${1} 103 local cores=${2} 104 printf "Testing with \"${name}\" on ${cores} core(s)... " 105 local job_id=${name}_${cores} 106 local input_dir=${tester_prefix}/JOBS/${job_id}/INPUT 107 local monitoring_dir=${tester_prefix}/JOBS/${job_id}/MONITORING 108 if [[ ! -f ${test_dir}/${name}_p3d ]] || [[ ! -f ${test_dir}/${name}_rc ]]; then 100 109 printf " test not found\n" 101 110 return 1 … … 104 113 mkdir -p ${input_dir} 105 114 mkdir -p ${monitoring_dir} 106 cp ${test_dir}/${ 1}_p3d ${input_dir}/${1}_p3d107 cp ${test_dir}/${ 1}_rc ${monitoring_dir}/${1}_rc_reference108 [[ -f ${test_dir}/${ 1}_topo ]] && cp ${test_dir}/${1}_topo ${input_dir}/109 bash ${trunk_dir}/SCRIPTS/palmrun -d ${ 1} -a "d3#" -h "${configuration}" -X "$cores" -T "$cores" -v -B > ${monitoring_dir}/${1}_stdout 2>&1110 grep -A 99999 "Run-control output" ${monitoring_dir}/${ 1}_rc 1> ${monitoring_dir}/RC 2> /dev/null111 grep -A 99999 "Run-control output" ${monitoring_dir}/${ 1}_rc_reference 1> ${monitoring_dir}/RC_REF 2> /dev/null115 cp ${test_dir}/${name}_p3d ${input_dir}/${job_id}_p3d 116 cp ${test_dir}/${name}_rc ${monitoring_dir}/${job_id}_rc_reference 117 [[ -f ${test_dir}/${name}_topo ]] && cp ${test_dir}/${name}_topo ${input_dir}/${job_id}_topo 118 bash ${trunk_dir}/SCRIPTS/palmrun -d ${job_id} -a "d3#" -h "${configuration}" -X "$cores" -T "$cores" -v -B > ${monitoring_dir}/${job_id}_stdout 2>&1 119 grep -A 99999 "Run-control output" ${monitoring_dir}/${job_id}_rc 1> ${monitoring_dir}/RC 2> /dev/null 120 grep -A 99999 "Run-control output" ${monitoring_dir}/${job_id}_rc_reference 1> ${monitoring_dir}/RC_REF 2> /dev/null 112 121 diff_output=$(diff ${monitoring_dir}/RC_REF ${monitoring_dir}/RC) 113 122 rm ${monitoring_dir}/RC ${monitoring_dir}/RC_REF … … 124 133 palm_installer_test_suite() { 125 134 for test_path in ${fnames}; do 126 testname_p3d=$(basename $test_path) 127 palm_installer_test "${testname_p3d%_p3d}" 135 for n_core in $(get_core_array $max_cores); do 136 testname_p3d=$(basename $test_path) 137 palm_installer_test "${testname_p3d%_p3d}" "${n_core}" 138 done 128 139 done 129 140 hrule … … 143 154 existing_trunk_dir=$(readlink -f "${SCRIPT_LOCATION}/../") 144 155 145 cores=$(get_number_of_cpu_cores)156 max_cores=$(get_number_of_cpu_cores) 146 157 test_id=$(date +%Y-%m-%d_%H%M%S) 147 158 do_plots=1 … … 156 167 (N) test_id="$OPTARG";; 157 168 (p) do_plots=0;; 158 (X) cores=$OPTARG;;169 (X) max_cores=$OPTARG;; 159 170 (\?) printf "\n +++ unknown option $OPTARG \n"; 160 171 exit;; … … 163 174 tester_prefix=${existing_working_dir}/tests/${test_id} 164 175 trunk_dir=${tester_prefix}/trunk 176 test_dir=${trunk_dir}/INSTALL 165 177 166 178 mkdir -p ${tester_prefix} … … 169 181 ln -s ${existing_trunk_dir} 170 182 183 184 171 185 configure 172 186 build
Note: See TracChangeset
for help on using the changeset viewer.