#! /bin/sh -f

# set -x
### ifort_which=`which ifort`
### if [ "$ifort_which"  != '/fs/ssm/main/opt/intelcomp/intelcomp-2016.1.156/intelcomp_2016.1.156_multi/compilers_and_libraries_2016.1.150/linux/bin/intel64/ifort' ] ; then
###  SSM_DOMAIN_BASE='/fs/ssm' ; export SSM_DOMAIN_BASE
###  . ssmuse-sh -d main/opt/intelcomp/intelcomp-2016.1.156
###  # which ifort
### fi
if [ -z "$SSMUSE_PLATFORMS" ] ; then
 . /fs/ssm/main/env/ssmuse-boot.sh
fi
type ifort >> /dev/null 2>>/dev/null && STats=$? || STats=$?
# if [ type ifort >> /dev/null 2>>/dev/null ] ; then
if [ $STats -eq 0 ] ; then
 :
else
 # . ssmuse-sh -d hpco/exp/intelpsxe-cluster-19.0.3.199 -d hpco/exp/intelpsxe-impi-19.0.3.199
   . ssmuse-sh -x /fs/ssm/hpco/exp/intelpsxe-cluster-19.0.3.199 -x /fs/ssm/hpco/exp/openmpi/openmpi-3.1.2--hpcx-2.4.0-mofed-4.6--intel-19.0.3.199
   . ssmuse-sh -x /fs/ssm/hpco/exp/openmpi-setup/openmpi-setup-0.1
fi
exec ifort "$@"
