Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit c1fe578

Browse files
daisydenGerrit Code Review
authored andcommitted
Merge "Don't use ssh in local test" into master_clean
2 parents f30126d + 7dc778b commit c1fe578

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

scripts/run_benchmark.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ def detect_cpu(self):
8585
knm_pattern = re.compile(".*72.*")
8686
skx_pattern = re.compile(".*[86543]1.*")
8787
bdw_pattern = re.compile(".*(E5-[421]6|E7-[84]8|E3-12|D-?15).*")
88-
clx_pattern = re.compile(".*Genuine.*")
8988
if re.match(knl_pattern, model_string):
9089
self.cpu_model = "knl"
9190
elif re.match(knm_pattern, model_string):
@@ -94,8 +93,6 @@ def detect_cpu(self):
9493
self.cpu_model = "skx"
9594
elif re.match(bdw_pattern, model_string):
9695
self.cpu_model = "bdw"
97-
elif re.match(clx_pattern, model_string):
98-
self.cpu_model = "clx"
9996
else:
10097
self.unknown_cpu = True
10198
logging.info("Can't detect which cpu model currently using, will use default settings, which may not be the optimal one.")

scripts/run_intelcaffe.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ function detect_cpu
157157
else
158158
cpu_model_="unknown"
159159
fi
160-
elif [[ $model_string == *"Genuine"* ]]; then
161-
cpu_model_="clx"
162160
else
163161
model_num=`echo $model_string | awk '{print $4}'`
164162
if [[ $model_num =~ ^[8|6|5|4|3]1 ]]; then

scripts/set_env.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,21 @@ function clear_shm
113113
min_shm_size=40
114114
shm_unit="G"
115115

116+
localhost=$(hostname)
117+
116118
for node in "${nodenames[@]}"
117119
do
118120
if [ "${node}" == "" ]; then
119121
echo "Warning: empty node name."
120122
continue
121123
fi
122-
123-
ssh ${node} "$clear_command"
124-
shm_line=`ssh ${node} "$check_shm_command"`
124+
if [ $localhost == $node ];then
125+
`$clear_command`
126+
shm_line=$(eval $check_shm_command)
127+
else
128+
ssh ${node} "$clear_command"
129+
shm_line=`ssh ${node} "$check_shm_command"`
130+
fi
125131
shm_string=`echo $shm_line | awk -F ' ' '{print $(NF-2)}'`
126132
unit="${shm_string:(-1)}"
127133
shm_size=${shm_string::-1}
@@ -140,7 +146,11 @@ function kill_zombie_processes
140146
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"
141147
for node in "${nodenames[@]}"
142148
do
143-
ssh ${node} "$kill_command"
149+
if [ $localhost == $node ];then
150+
eval "$kill_command"
151+
else
152+
ssh ${node} "$kill_command"
153+
fi
144154
done
145155
}
146156

0 commit comments

Comments
 (0)