diff --git a/scripts/run_benchmark.py b/scripts/run_benchmark.py index cda4bdcf4..8e90f08e1 100755 --- a/scripts/run_benchmark.py +++ b/scripts/run_benchmark.py @@ -85,7 +85,6 @@ def detect_cpu(self): knm_pattern = re.compile(".*72.*") skx_pattern = re.compile(".*[86543]1.*") bdw_pattern = re.compile(".*(E5-[421]6|E7-[84]8|E3-12|D-?15).*") - clx_pattern = re.compile(".*Genuine.*") if re.match(knl_pattern, model_string): self.cpu_model = "knl" elif re.match(knm_pattern, model_string): @@ -94,8 +93,6 @@ def detect_cpu(self): self.cpu_model = "skx" elif re.match(bdw_pattern, model_string): self.cpu_model = "bdw" - elif re.match(clx_pattern, model_string): - self.cpu_model = "clx" else: self.unknown_cpu = True logging.info("Can't detect which cpu model currently using, will use default settings, which may not be the optimal one.") diff --git a/scripts/run_intelcaffe.sh b/scripts/run_intelcaffe.sh index 88bb78107..4cab72058 100755 --- a/scripts/run_intelcaffe.sh +++ b/scripts/run_intelcaffe.sh @@ -157,8 +157,6 @@ function detect_cpu else cpu_model_="unknown" fi - elif [[ $model_string == *"Genuine"* ]]; then - cpu_model_="clx" else model_num=`echo $model_string | awk '{print $4}'` if [[ $model_num =~ ^[8|6|5|4|3]1 ]]; then diff --git a/scripts/set_env.sh b/scripts/set_env.sh index 30614e35f..d8fcd878f 100755 --- a/scripts/set_env.sh +++ b/scripts/set_env.sh @@ -113,15 +113,21 @@ function clear_shm min_shm_size=40 shm_unit="G" + localhost=$(hostname) + for node in "${nodenames[@]}" do if [ "${node}" == "" ]; then echo "Warning: empty node name." continue fi - - ssh ${node} "$clear_command" - shm_line=`ssh ${node} "$check_shm_command"` + if [ $localhost == $node ];then + `$clear_command` + shm_line=$(eval $check_shm_command) + else + ssh ${node} "$clear_command" + shm_line=`ssh ${node} "$check_shm_command"` + fi shm_string=`echo $shm_line | awk -F ' ' '{print $(NF-2)}'` unit="${shm_string:(-1)}" shm_size=${shm_string::-1} @@ -140,7 +146,11 @@ function kill_zombie_processes kill_command="for process in ep_server caffe mpiexec.hydra; do for i in \$(ps -e | grep -w \$process | awk -F ' ' '{print \$1}'); do kill -9 \$i; echo \"\$process \$i killed.\"; done done" for node in "${nodenames[@]}" do - ssh ${node} "$kill_command" + if [ $localhost == $node ];then + eval "$kill_command" + else + ssh ${node} "$kill_command" + fi done }