HP Insight Cluster Management Utility User Manual
Page 155
compute"
#
#
# When you are finished editing this file, make sure you run the 'mk-sysimage'
# command with the path to the diskless image, like this:
#
# # /sbin/mk-sysimage ${CMU_RCFG_PATH}
#
#
#-- custom code starts here --
#
# Xeon Phi support
#
INTEL_MIC_FS=/opt/intel/mic/filesystem
# sync hosts file
cp /etc/hosts ${CMU_RCFG_PATH}/etc/
cp /etc/hosts ${CMU_RCFG_PATH}/${INTEL_MIC_FS}/mic0/etc/
cp /etc/hosts ${CMU_RCFG_PATH}/${INTEL_MIC_FS}/mic1/etc/
## configure a NODECLASS_REGEXP so that we can configure per-node file
## avoid duplicate NODECLASS entries!
##-**************************************************-##
## !!NOTE!!
## The ‘n\d+’ regular expression below expects to be
## able to apply to all compute nodes in this cluster.
## ADJUST ACCORDINGLY!!!
##-**************************************************-##
ADD_ENTRY_TO_FILE=/opt/cmu/diskless/oneSIS/cmu_add_entry_to_file
CONFFILE=${CMU_RCFG_PATH}/etc/sysimage.conf
grep -q "^NODECLASS_REGEXP" $CONFFILE | grep -q compute; rc=$?
if [ $rc != 0 ]; then
$ADD_ENTRY_TO_FILE -f ${CONFFILE} -k 'NODECLASS_REGEXP:' -e "NODECLASS_REGEXP n\d+
compute"
fi
# configure the bridge as a per-node config file
# (this is handled during PXE-booting, but we will
# configure this file too just to be safe)
BRIDGE_NIC=/etc/sysconfig/network-scripts/ifcfg-br0
grep -q "${BRIDGE_NIC}" $CONFFILE; rc=$?
if [ $rc != 0 ]; then
$ADD_ENTRY_TO_FILE -f ${CMU_RCFG_PATH}/etc/sysimage.conf -k 'LINKBACK:' -e
"LINKBACK ${BRIDGE_NIC} NODE -h"
fi
# configure micX.conf files as per-node config files
INTEL_MIC0_CONF=/etc/sysconfig/mic/mic0.conf
INTEL_MIC1_CONF=/etc/sysconfig/mic/mic1.conf
grep -q "${INTEL_MIC0_CONF}" $CONFFILE; rc=$?
if [ $rc != 0 ]; then
$ADD_ENTRY_TO_FILE -f ${CMU_RCFG_PATH}/etc/sysimage.conf -k 'LINKBACK:' -e
"LINKBACK ${INTEL_MIC0_CONF} NODE -h"
fi
grep -q "${INTEL_MIC1_CONF}" $CONFFILE; rc=$?
if [ $rc != 0 ]; then
$ADD_ENTRY_TO_FILE -f ${CMU_RCFG_PATH}/etc/sysimage.conf -k 'LINKBACK:' -e
"LINKBACK ${INTEL_MIC1_CONF} NODE -h"
fi
# HACK: manually configure the INTEL_MIC_FS
# We do this because we need /opt/intel/mic/filesystem to be a writeable directory
# so that the micX.image can be rebuilt when MPSS starts.
# We also need to configure per-node entries in /opt/intel/mic/filesystem/micX/.
# So we manually configure the /ram softlink here.
# We also install the code that will install the /opt/intel/mic/filesystem in /ram.
# The reconf-diskless-snapshot.sh script will create the per-node entries.
mv -f ${CMU_RCFG_PATH}/${INTEL_MIC_FS} ${CMU_RCFG_PATH}/${INTEL_MIC_FS}.default
ln -s /ram${INTEL_MIC_FS} ${CMU_RCFG_PATH}/${INTEL_MIC_FS}
file=${CMU_RCFG_PATH}/usr/local/sbin/make_intel_mic_fs
echo "#!/bin/bash" > ${file}
echo "rm -rf /ram${INTEL_MIC_FS}" >> ${file}
echo "mkdir -p /ram${INTEL_MIC_FS}" >> ${file}
echo "cp -rp ${INTEL_MIC_FS}.default/mic0 /ram${INTEL_MIC_FS}/" >> ${file}
echo "cp -rp ${INTEL_MIC_FS}.default/mic1 /ram${INTEL_MIC_FS}/" >> ${file}
echo "cp -p ${INTEL_MIC_FS}.default/mic0.image /ram${INTEL_MIC_FS}/" >> ${file}
echo "cp -p ${INTEL_MIC_FS}.default/mic1.image /ram${INTEL_MIC_FS}/" >> ${file}
echo "ln -s ${INTEL_MIC_FS}.default/base /ram${INTEL_MIC_FS}/base" >> ${file}
echo "ln -s ${INTEL_MIC_FS}.default/base.filelist /ram${INTEL_MIC_FS}/base.filelist" >> ${file}
echo "ln -s ${INTEL_MIC_FS}.default/common /ram${INTEL_MIC_FS}/common" >> ${file}
echo "ln -s ${INTEL_MIC_FS}.default/common.filelist /ram${INTEL_MIC_FS}/common.filelist" >> ${file}
echo "ln -s ${INTEL_MIC_FS}.default/mic0.filelist /ram${INTEL_MIC_FS}/mic0.filelist" >> ${file}
echo "ln -s ${INTEL_MIC_FS}.default/mic1.filelist /ram${INTEL_MIC_FS}/mic1.filelist" >> ${file}
echo "host=\`/bin/hostname\`" >> ${file}
echo "mv -f /ram${INTEL_MIC_FS}/mic0/etc/.fstab.\$host /ram${INTEL_MIC_FS}/mic0/etc/fstab" >> ${file}
echo "mv -f /ram${INTEL_MIC_FS}/mic1/etc/.fstab.\$host /ram${INTEL_MIC_FS}/mic1/etc/fstab" >> ${file}
echo "mv -f /ram${INTEL_MIC_FS}/mic0/etc/sysconfig/.hostname.\$host
8.7 Support for Intel Xeon Phi cards
155