HP Insight Cluster Management Utility User Manual

Page 157

Advertising
background image

#-- custom code starts here --

#
# Xeon Phi support
#
# add the 'BRIDGEIPMASK' setting to the PXE-boot file
# to enable the bridge network for the MICs
iphex=`/opt/cmu/tools/cmu_dl_ip_to_hexa -i ${CMU_RCFG_IP}`
imageDir="/opt/cmu/image/${CMU_RCFG_IMAGENAME}"
pxeFile="${imageDir}/onesis_pxeboot/pxelinux.cfg/${iphex}"
sed -e "s|ONESIS=true$|ONESIS=true BRIDGEIPMASK=${CMU_RCFG_IP}/16|" < $pxeFile >
${pxeFile}-tmp
mv -f ${pxeFile}-tmp ${pxeFile}

#
# REMEMBER: all per-node files are "hidden" and end with .default
#

# configure this IP into the bridge conf file too
NETDIR=${CMU_RCFG_PATH}/etc/sysconfig/network-scripts
grep -v IPADDR ${NETDIR}/.ifcfg-br0.default > ${NETDIR}/.ifcfg-
br0.${CMU_RCFG_HOSTNAME}
echo "IPADDR=${CMU_RCFG_IP}" >> ${NETDIR}/.ifcfg-br0.${CMU_RCFG_HOSTNAME}

# determine the MIC hostnames and IPs
MIC0_HOSTNAME=${CMU_RCFG_HOSTNAME}-mic0
MIC1_HOSTNAME=${CMU_RCFG_HOSTNAME}-mic1
MIC0_IP=`grep ${MIC0_HOSTNAME} /etc/hosts | cut -d ' ' -f 1`
MIC1_IP=`grep ${MIC1_HOSTNAME} /etc/hosts | cut -d ' ' -f 1`

if [ -z "$MIC0_IP" ]; then
echo "Error determining mic0 IP address: not configured in /etc/hosts?"
exit 1
fi
if [ -z "$MIC1_IP" ]; then
echo "Error determining mic1 IP address: not configured in /etc/hosts?"
exit 1
fi

# Update Hostname and Network settings in micX.conf files
MIC_CONF_DIR=${CMU_RCFG_PATH}/etc/sysconfig/mic
MIC0_CONF=${MIC_CONF_DIR}/.mic0.conf.${CMU_RCFG_HOSTNAME}
MIC1_CONF=${MIC_CONF_DIR}/.mic1.conf.${CMU_RCFG_HOSTNAME}
rm -f ${MIC0_CONF} ${MIC1_CONF}
while read line; do
key=`echo "$line" | cut -d ' ' -f1`
if [ "$key" = "Hostname" ]; then
echo "Hostname $MIC0_HOSTNAME" >> ${MIC0_CONF}
continue
fi
if [ "$key" = "Network" ]; then
echo "Network StaticPair br0 ${MIC0_IP} no 16 1500" >> ${MIC0_CONF}
continue
fi
echo $line >> ${MIC0_CONF}
done < ${MIC_CONF_DIR}/.mic0.conf.default
while read line; do
key=`echo "$line" | cut -d ' ' -f1`
if [ "$key" = "Hostname" ]; then
echo "Hostname $MIC1_HOSTNAME" >> ${MIC1_CONF}
continue
fi
if [ "$key" = "Network" ]; then
echo "Network StaticPair br0 ${MIC1_IP} no 16 1500" >> ${MIC1_CONF}
continue
fi
echo $line >> ${MIC1_CONF}
done < ${MIC_CONF_DIR}/.mic1.conf.default

#
# Intel MIC filesystem has been manually moved

8.7 Support for Intel Xeon Phi cards

157

Advertising