Skip to content

Commit

Permalink
Use distributed compiler version for Intel MPI
Browse files Browse the repository at this point in the history
This creates a consistent versioning for Intel MPI when the version
string extracted from mpiicc has oddball modifiers like
"2017 Update 2" or "2018 Beta 1"

Fixes openhpc#479
  • Loading branch information
Chuck Atkins committed Jul 6, 2017
1 parent 2a9be76 commit 923c842
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions components/mpi-families/impi-devel/SPECS/intel-mpi.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ BuildArch: x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
AutoReq: no

BuildRequires:-post-build-checks
BuildRequires: -post-build-checks

Requires: prun%{PROJ_DELIM}
Requires: intel-mpi-doc >= %{year}
Expand Down Expand Up @@ -65,10 +65,19 @@ if [ -d ${topDir} ];then

for dir in ${versions}; do
if [ -e ${topDir}/${dir}/linux/mpi/intel64/bin/mpiicc ];then
version=`grep "^MPIVERSION=" ${topDir}/${dir}/linux/mpi/intel64/bin/mpiicc | cut -d '"' -f2 | sed 's| Update |\.|'`
version=`grep "^MPIVERSION=" ${topDir}/${dir}/linux/mpi/intel64/bin/mpiicc | cut -d '"' -f2`
if [ -z "${version}" ];then
echo "Error: unable to determine MPI version"
exit 1
elif [ "${version:0:2}" = "20" -a -e ${topDir}/${dir}/linux/bin/intel64/icc ];then
# Starting with 2017, the MPI versions distributed with
# Parallel Studio are versioned to match the compiler
# version they're shipped with. Rather than extracting a
# version string from mpiicc that would be similar to, but not
# the same as the compiler version, we just use the actual
# compiler version that it's shipped with. This is extracted
# using the same logic as the compiler modules
version=`${topDir}/${dir}/linux/bin/intel64/icc -V 2>&1 | grep Version | awk -F 'Version' '{print $2}' | awk '{print $1}'`
fi

echo "--> Installing OpenHPC-style modulefile for MPI version=${version}"
Expand Down

0 comments on commit 923c842

Please sign in to comment.