|
Packit |
857059 |
#!/bin/bash
|
|
Packit |
857059 |
# [ICS VERSION STRING: unknown]
|
|
Packit |
857059 |
# This is a bash sourced config file which defines variables used in
|
|
Packit |
857059 |
# fast fabric tools. Command line arguments will override these settings.
|
|
Packit |
857059 |
# Assignments should be scripted such that this file does not override
|
|
Packit |
857059 |
# exported environment settings, as shown in the defaults below
|
|
Packit |
857059 |
|
|
Packit |
857059 |
if [ "$CONFIG_DIR" = "" ]
|
|
Packit |
857059 |
then
|
|
Packit |
857059 |
CONFIG_DIR=/etc
|
|
Packit |
857059 |
export CONFIG_DIR
|
|
Packit |
857059 |
fi
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Override default location for HOSTS_FILE
|
|
Packit |
857059 |
export HOSTS_FILE=${HOSTS_FILE:-$CONFIG_DIR/opa/hosts}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Override default location for CHASSIS_FILE
|
|
Packit |
857059 |
export CHASSIS_FILE=${CHASSIS_FILE:-$CONFIG_DIR/opa/chassis}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Override default location for ESM_CHASSIS_FILE
|
|
Packit |
857059 |
export ESM_CHASSIS_FILE=${ESM_CHASSIS_FILE:-$CONFIG_DIR/opa/esm_chassis}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Override default location for OPASWITCHES_FILE
|
|
Packit |
857059 |
export OPASWITCHES_FILE=${OPASWITCHES_FILE:-$CONFIG_DIR/opa/switches}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Override default location for PORTS_FILE
|
|
Packit |
857059 |
export PORTS_FILE=${PORTS_FILE:-$CONFIG_DIR/opa/ports}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Default suffix for IPoIB host names
|
|
Packit |
857059 |
# the special value "NONE" is used to indicate a value of ""
|
|
Packit |
857059 |
# this value can be used in ff_host_basename_to_ipoib and ff_host_basename
|
|
Packit |
857059 |
# below to convert between IPoIB and Ethernet hostnames
|
|
Packit |
857059 |
export FF_IPOIB_SUFFIX=${FF_IPOIB_SUFFIX:--opa}
|
|
Packit |
857059 |
# Alternatively a IPoIB prefix can be provided, commented out
|
|
Packit |
857059 |
# examples in ff_host_basename and ff_host_basename can be enabled if desired
|
|
Packit |
857059 |
export FF_IPOIB_PREFIX=${FF_IPOIB_PREFIX:-opa-}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Default management host
|
|
Packit |
857059 |
export MGMT_HOST=${MGMT_HOST:-localhost}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# The shell functions below are only defined if no existing function/command
|
|
Packit |
857059 |
# with given name, hence allowing use of shell functions or creation of a
|
|
Packit |
857059 |
# command for this operation
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# shell Function to convert a basic hostname into an IPoIB hostname
|
|
Packit |
857059 |
# if FF_IPOIB_SUFFIX is "", this should return $1 unmodified
|
|
Packit |
857059 |
# such that commands can be used with -i "" to skip IPoIB operations
|
|
Packit |
857059 |
# (special value of NONE will be converted to "" before this is called)
|
|
Packit |
857059 |
if ! type ff_host_basename_to_ipoib >/dev/null 2>/dev/null
|
|
Packit |
857059 |
then
|
|
Packit |
857059 |
function ff_host_basename_to_ipoib()
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
# $1 = hostname provided
|
|
Packit |
857059 |
echo "$1$FF_IPOIB_SUFFIX"
|
|
Packit |
857059 |
# comment out line above and uncomment line below if using prefixes
|
|
Packit |
857059 |
#echo "$FF_IPOIB_PREFIX$1"
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
fi
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# shell Function to convert a hostname into a basic hostname
|
|
Packit |
857059 |
# (eg. remove IPoIB suffix, etc) should match result of "hostname -s" on host
|
|
Packit |
857059 |
# if FF_IPOIB_SUFFIX is "", this should return $1 unmodified
|
|
Packit |
857059 |
# such that commands can be used with -i "" to skip IPoIB operations
|
|
Packit |
857059 |
# (special value of NONE will be converted to "" before this is called)
|
|
Packit |
857059 |
if ! type ff_host_basename >/dev/null 2>/dev/null
|
|
Packit |
857059 |
then
|
|
Packit |
857059 |
function ff_host_basename()
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
# $1 = hostname provided (could be ethernet or IPoIB name)
|
|
Packit |
857059 |
echo "$1"|sed -e "s/$FF_IPOIB_SUFFIX\$//"
|
|
Packit |
857059 |
# comment out line above and uncomment line below if using prefixes
|
|
Packit |
857059 |
#echo "$1"|sed -e "s/^$FF_IPOIB_PREFIX//"
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
fi
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# input to opahostadmin configipoib indicating which mode to
|
|
Packit |
857059 |
# use for IP configuration of ipoib interface, valid values are one of
|
|
Packit |
857059 |
# static, dhcp, auto
|
|
Packit |
857059 |
# for auto, if not found in resolver, will configure static, otherwise uses dhcp
|
|
Packit |
857059 |
export FF_IPOIB_CONFIG=${FF_IPOIB_CONFIG:-static}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# IP netmask for IPoIB subnet [-m option], only used for static
|
|
Packit |
857059 |
# if "" default will be determined based on class of IP address [A, B, C]
|
|
Packit |
857059 |
export FF_IPOIB_NETMASK=${FF_IPOIB_NETMASK:-}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# IPOIB Connected Mode. Legal values are "yes" (connected) and "no" (datagram).
|
|
Packit |
857059 |
export FF_IPOIB_CONNECTED=${FF_IPOIB_CONNECTED:-no}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Maximum parallel processes for opahostadmin, opachassisadmin, opaswitchadmin
|
|
Packit |
857059 |
# and -p option on other commands
|
|
Packit |
857059 |
# set to 1 to avoid parallel execution
|
|
Packit |
857059 |
# 1000 is a reasonable default. If a larger number is needed, it is recommended
|
|
Packit |
857059 |
# consideration is given to ulimit -u, memory consumption by many scp/ssh sessions,
|
|
Packit |
857059 |
# and the total number of TCP connections the system can handle.
|
|
Packit |
857059 |
export FF_MAX_PARALLEL=${FF_MAX_PARALLEL:-1000}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# If the systems are slow for some reason, this can be used to provide a
|
|
Packit |
857059 |
# multiplier for all timeouts in opahostadmin, opachassisadmin, opaswitchadmin
|
|
Packit |
857059 |
export FF_TIMEOUT_MULT=${FF_TIMEOUT_MULT:-2}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# where to put result files from FastFabric runs of
|
|
Packit |
857059 |
# opahostadmin, opachassisadmin, opaswitchadmin
|
|
Packit |
857059 |
#export FF_RESULT_DIR=${FF_RESULT_DIR:-.}
|
|
Packit |
857059 |
export FF_RESULT_DIR=${FF_RESULT_DIR:-$HOME}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# IntelOPA product to install during opahostadmin load and upgrade
|
|
Packit |
857059 |
export FF_PRODUCT=${FF_PRODUCT:-IntelOPA-Basic.`cat /usr/lib/opa/tools/osid_wrapper`}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# IntelOPA product version to install during opahostadmin load and upgrade
|
|
Packit |
857059 |
export FF_PRODUCT_VERSION=${FF_PRODUCT_VERSION:-`cat /etc/opa/version_wrapper 2>/dev/null`}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# IntelOPA packages to install during opahostadmin load [-P option]
|
|
Packit |
857059 |
#export FF_PACKAGES=${FF_PACKAGES:-oftools ipoib mpi pgas}
|
|
Packit |
857059 |
#export FF_PACKAGES=${FF_PACKAGES:-oftools ipoib psm_mpi pgas}
|
|
Packit |
857059 |
export FF_PACKAGES=${FF_PACKAGES:-oftools ipoib psm_mpi}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Additional INSTALL options during opahostadmin load [-I option]
|
|
Packit |
857059 |
#export FF_INSTALL_OPTIONS=${FF_INSTALL_OPTIONS:- -E ibacm}
|
|
Packit |
857059 |
export FF_INSTALL_OPTIONS=${FF_INSTALL_OPTIONS:- }
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Additional INSTALL options during opahostadmin upgrade [-U option]
|
|
Packit |
857059 |
#export FF_UPGRADE_OPTIONS=${FF_UPGRADE_OPTIONS:- -E ibacm}
|
|
Packit |
857059 |
export FF_UPGRADE_OPTIONS=${FF_UPGRADE_OPTIONS:- }
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# where to upload server specific files to during opauploadall, opacaptureall
|
|
Packit |
857059 |
# [-d option]
|
|
Packit |
857059 |
export UPLOADS_DIR=${UPLOADS_DIR:-./uploads}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# where to download server specific files from during opadownloadall
|
|
Packit |
857059 |
# [-d option]
|
|
Packit |
857059 |
export DOWNLOADS_DIR=${DOWNLOADS_DIR:-./downloads}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# where to save history and baselines for cluster analysis and health checks
|
|
Packit |
857059 |
# [-d option]
|
|
Packit |
857059 |
export FF_ANALYSIS_DIR=${FF_ANALYSIS_DIR:-/var/usr/lib/opa/analysis}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# topology input file(s) to use for opafabricanalysis, opaallanalysis and
|
|
Packit |
857059 |
# opareports operations. The %P marker will be replaced with the
|
|
Packit |
857059 |
# local HFI port/fabric selection string (for example 0:0 or 1:2) for
|
|
Packit |
857059 |
# the fabric being selected (see PORTS_FILE for more information)
|
|
Packit |
857059 |
# if this file is not found, or the value of this parameter is "NONE"
|
|
Packit |
857059 |
# no topology input file will be used
|
|
Packit |
857059 |
export FF_TOPOLOGY_FILE=${FF_TOPOLOGY_FILE:-$CONFIG_DIR/opa/topology.%P.xml}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# How to login to host systems during opahostadmin
|
|
Packit |
857059 |
# At this time only ssh is supported.
|
|
Packit |
857059 |
# Note: at present opacmdall and opascpall always assume password-less ssh/scp
|
|
Packit |
857059 |
export FF_LOGIN_METHOD=${FF_LOGIN_METHOD:-ssh}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# initial user name (cannot be root if CFG_LOGIN_METHOD=telnet)
|
|
Packit |
857059 |
export FF_USERNAME=${FF_USERNAME:-root}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# password for FF_USERNAME (not needed if password-less ssh configured)
|
|
Packit |
857059 |
export FF_PASSWORD=${FF_PASSWORD:-}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# if FF_USERNAME is not root, what is the root password needed when
|
|
Packit |
857059 |
# suing to root
|
|
Packit |
857059 |
export FF_ROOTPASS=${FF_ROOTPASS:=}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# How to login to chassis
|
|
Packit |
857059 |
# can be ssh or telnet
|
|
Packit |
857059 |
export FF_CHASSIS_LOGIN_METHOD=${FF_CHASSIS_LOGIN_METHOD:-ssh}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# password for admin (not needed if password-less ssh configured)
|
|
Packit |
857059 |
export FF_CHASSIS_ADMIN_PASSWORD=${FF_CHASSIS_ADMIN_PASSWORD:-adminpass}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#base device number for IPoIB devices - IPoIB devices in the systems will
|
|
Packit |
857059 |
# be named "ib($FF_IPOIB_BASE_DEV_NUM) ib($FF_IPOIB_BASE_DEV_NUM+1) ..."
|
|
Packit |
857059 |
# On Silvertstorm stack it will be "ib1 ib2 ...."
|
|
Packit |
857059 |
# On OFED stack it will be "ib0 ib1 ..."
|
|
Packit |
857059 |
export FF_IPOIB_BASE_DEV_NUM=${FF_IPOIB_BASE_DEV_NUM:-0}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# shell Function to return the base IPoIB device number for this stack type.
|
|
Packit |
857059 |
# For Silverstorm stack installations this function should return 1, for
|
|
Packit |
857059 |
# OFED stack installations this should return 0.
|
|
Packit |
857059 |
if ! type ff_ipoib_base_dev_num >/dev/null 2>/dev/null
|
|
Packit |
857059 |
then
|
|
Packit |
857059 |
function ff_ipoib_base_dev_num()
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
# No arguments to this function
|
|
Packit |
857059 |
# $host is supplied as an arguemnt when this function is called
|
|
Packit |
857059 |
# but it is ignored here. This is a hack to limit the number of
|
|
Packit |
857059 |
# changes required.
|
|
Packit |
857059 |
echo "$FF_IPOIB_BASE_DEV_NUM"
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
fi
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# options for opareport during opafabricanalysis health check
|
|
Packit |
857059 |
# alternative would be to use "-i seconds" instead of -C
|
|
Packit |
857059 |
# depending on fabric design, more strict link speed checks, such as
|
|
Packit |
857059 |
# -o slowconfiglinks or -o slowconnlinks may be appropriate
|
|
Packit |
857059 |
export FF_FABRIC_HEALTH=${FF_FABRIC_HEALTH:- -s -C -o errors -o slowlinks}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# list of CLI commands to issue during opachassisanalysis
|
|
Packit |
857059 |
export FF_CHASSIS_CMDS=${FF_CHASSIS_CMDS:-showAllConfig}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# single CLI command to issue to check overall health during opachassisanalysis
|
|
Packit |
857059 |
# hwCheck is prefered, but is not supported on older chassis FW
|
|
Packit |
857059 |
export FF_CHASSIS_HEALTH=${FF_CHASSIS_HEALTH:-hwCheck}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# list of CLI commands to issue during opaesmanalysis
|
|
Packit |
857059 |
export FF_ESM_CMDS=${FF_ESM_CMDS:-smConfig}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# list of analysis to perform during opaallanalysis
|
|
Packit |
857059 |
# pick appropriate type of SM to analyze
|
|
Packit |
857059 |
#export FF_ALL_ANALYSIS=${FF_ALL_ANALYSIS:-fabric chassis hostsm esm}
|
|
Packit |
857059 |
export FF_ALL_ANALYSIS=${FF_ALL_ANALYSIS:-fabric chassis}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# command to perform text files for baseline vs latest snapshot during
|
|
Packit |
857059 |
# fabric health analysis commands
|
|
Packit |
857059 |
#export FF_DIFF_CMD=${FF_DIFF_CMD:-diff}
|
|
Packit |
857059 |
export FF_DIFF_CMD=${FF_DIFF_CMD:-diff -C 1}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# location to find fastfabric mpi_apps for use by assorted fastfabric tools
|
|
Packit |
857059 |
# As needed they can be copied to a global filesystem and adjust this variable
|
|
Packit |
857059 |
# This MUST be a absolute path which exists on all nodes
|
|
Packit |
857059 |
export FF_MPI_APPS_DIR=${FF_MPI_APPS_DIR:-$HOME/mpi_apps}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#location of Cable Health Report files
|
|
Packit |
857059 |
export FF_CABLE_HEALTH_REPORT_DIR=${FF_CABLE_HEALTH_REPORT_DIR:-/var/opt/opafm/cablehealth}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Maximum number of cable health report files to maintain
|
|
Packit |
857059 |
export FF_CABLE_HEALTH_MAX_FILES=${FF_CABLE_HEALTH_MAX_FILES:- 255}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# env variables to set within each rank of MPI runs done by fastfabric directly
|
|
Packit |
857059 |
# alternatively the $FF_MPI_APPS_DIR/ofed.*.param files can be edited
|
|
Packit |
857059 |
# with appropriate values.
|
|
Packit |
857059 |
# example of PSM selection of vFabric by PKEY/SL
|
|
Packit |
857059 |
#export FF_MPI_ENV=${FF_MPI_ENV:-PSM2_PKEY=0xffff HFI_SL=0 PSM2_MTU=2048}
|
|
Packit |
857059 |
# example of PSM selection of path and vFabric by query to dist_sa
|
|
Packit |
857059 |
#export FF_MPI_ENV=${FF_MPI_ENV:-PSM2_PATH_REC=opp PSM2_IB_SERVICE_ID=0x1000117500000000}
|
|
Packit |
857059 |
# example of PSM selection of path and vFabric by default query to dist_sa
|
|
Packit |
857059 |
#export FF_MPI_ENV=${FF_MPI_ENV:-PSM2_PATH_REC=opp}
|
|
Packit |
857059 |
export FF_MPI_ENV=${FF_MPI_ENV:-}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# configuration of arguments for MPI performance deviation testing
|
|
Packit |
857059 |
# via $FF_MPI_APPS_DIR/deviation/deviation
|
|
Packit |
857059 |
# The defaults should work for most fabrics. This can be made stricter
|
|
Packit |
857059 |
# and/or specific to the fabric by using arguments such as -h hostname
|
|
Packit |
857059 |
# -bwthres and -latthres. Samples are provided for various topologies.
|
|
Packit |
857059 |
# See run_deviation or the user's guide for more
|
|
Packit |
857059 |
# information.
|
|
Packit |
857059 |
#export FF_DEVIATION_ARGS=${FF_DEVIATION_ARGS:--bwtol 20 -lattol 50 -c -v}
|
|
Packit |
857059 |
#export FF_DEVIATION_ARGS=${FF_DEVIATION_ARGS:--bwtol 20 -lattol 50 -c -h hostname}
|
|
Packit |
857059 |
export FF_DEVIATION_ARGS=${FF_DEVIATION_ARGS:--bwtol 20 -lattol 50 -c}
|
|
Packit |
857059 |
# 1 hop fabric, 100g links, x16 Hosts
|
|
Packit |
857059 |
#export FF_DEVIATION_ARGS==${FF_DEVIATION_ARGS:--bwthres 12000 -latthres 1.07 -c}
|
|
Packit |
857059 |
# 3 hop fabric, 100g links, x16 Hosts
|
|
Packit |
857059 |
#export FF_DEVIATION_ARGS==${FF_DEVIATION_ARGS:--bwthres 12000 -latthres 1.35 -c}
|
|
Packit |
857059 |
# 5 hop fabric, 100g links, x16 Hosts
|
|
Packit |
857059 |
#export FF_DEVIATION_ARGS==${FF_DEVIATION_ARGS:--bwthres 12000 -latthres 1.63 -c}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# location to find fastfabric shmem_apps for use by assorted fastfabric tools
|
|
Packit |
857059 |
# As needed they can be copied to a global filesystem and adjust this variable
|
|
Packit |
857059 |
# This MUST be a absolute path which exists on all nodes
|
|
Packit |
857059 |
export FF_SHMEM_APPS_DIR=${FF_SHMEM_APPS_DIR:-$HOME/shmem_apps}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#Serialize output of operations running in parallel
|
|
Packit |
857059 |
export FF_SERIALIZE_OUTPUT=${FF_SERIALIZE_OUTPUT:-yes}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Directory name for location of hostverify.sh script and output target directory
|
|
Packit |
857059 |
# on each host used by opaverifyhosts
|
|
Packit |
857059 |
export FF_HOSTVERIFY_DIR=${FF_HOSTVERIFY_DIR:-/root}
|