@@ -162,26 +162,8 @@ endif
162162# Test for Compiler and MPI Setup
163163# ######################################################################
164164
165- setenv BASEDIR ` awk ' {print $2}' $ETCDIR /BASEDIR.rc`
166-
167- if ( ` echo $BASEDIR | grep -i mvapich2` ! = ' ' ) then
168- set MPI = mvapich2
169- else if ( ` echo $BASEDIR | grep -i mpich` ! = ' ' ) then
170- set MPI = mpich
171- else if ( ` echo $BASEDIR | grep -i openmpi` ! = ' ' ) then
172- set MPI = openmpi
173- else if ( ` echo $BASEDIR | grep -i hpcx` ! = ' ' ) then
174- set MPI = openmpi
175- else if ( ` echo $BASEDIR | grep -i impi` ! = ' ' ) then
176- set MPI = intelmpi
177- else if ( ` echo $BASEDIR | grep -i intelmpi` ! = ' ' ) then
178- set MPI = intelmpi
179- else if ( ` echo $BASEDIR | grep -i mpt` ! = ' ' ) then
180- set MPI = mpt
181- else
182- # Assume default is Intel MPI in case of older baselibs
183- set MPI = intelmpi
184- endif
165+ # Get MPI stack from CMake
166+ set MPI_STACK = @MPI_STACK@
185167
186168# ######################################################################
187169# Enter Experiment Specific Run Parameters
@@ -717,7 +699,7 @@ echo $GROUP > $HOME/.GROUProot
717699
718700/bin/rm -f $EXPDIR /SETENV.commands
719701
720- if( $MPI == openmpi ) then
702+ if( $MPI_STACK == openmpi ) then
721703
722704# This turns off an annoying warning when running
723705# Open MPI on a system where TMPDIRs are on a networked
730712# The below settings seem to be recommended for hybrid
731713# systems using MVAPICH2 but could change
732714
733- else if( $MPI == mvapich ) then
715+ else if( $MPI_STACK == mvapich ) then
734716
735717cat > $EXPDIR /SETENV.commands << EOF
736718 setenv MV2_ENABLE_AFFINITY 0
@@ -739,7 +721,7 @@ cat > $EXPDIR/SETENV.commands << EOF
739721 setenv MV2_GATHERV_SSEND_THRESHOLD 256
740722EOF
741723
742- else if( $MPI == mpt ) then
724+ else if( $MPI_STACK == mpt ) then
743725
744726cat > $EXPDIR /SETENV.commands << EOF
745727
@@ -768,7 +750,7 @@ cat > $EXPDIR/SETENV.commands << EOF
768750
769751EOF
770752
771- else if( $MPI == intelmpi ) then
753+ else if( $MPI_STACK == intelmpi ) then
772754
773755cat > $EXPDIR /SETENV.commands << EOF
774756#setenv MPS_STAT_LEVEL 4
0 commit comments