fix slow ifort on mac

This commit is contained in:
edoapra 2022-09-27 16:50:55 -07:00
parent 764ae58379
commit 778a5760b8
No known key found for this signature in database
GPG key ID: E6E392F4E14FB937
2 changed files with 24 additions and 0 deletions

View file

@ -1,4 +1,7 @@
#!/usr/bin/env bash
if [[ -z "$TRAVIS_BUILD_DIR" ]] ; then
TRAVIS_BUILD_DIR=$(pwd)
fi
os=`uname`
dist="ubuntu"
arch=`uname -m`
@ -52,6 +55,9 @@ echo DISTR is "$DISTR"
"$IONEAPI_ROOT"/installer "$IONEAPI_ROOT"/vtune_profiler "$IONEAPI_ROOT"/tbb || true
fi
source "$IONEAPI_ROOT"/setvars.sh --force || true
#fix slow ifort https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/slow-execution-of-ifort-icpc-on-MacOSX-catalina/m-p/1203190
$TRAVIS_BUILD_DIR/travis/fix_xcodebuild.sh
cp xcodebuild "$IONEAPI_ROOT"/compiler/latest/mac/bin/intel64/.
export I_MPI_F90="$FC"
ls -lrta $IONEAPI_ROOT ||true
rm -f *dmg || true

18
travis/fix_xcodebuild.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
rm -f xcodebuild
INTEL_OSXSDK_VER=`xcodebuild -sdk macosx -version | grep SDKVersion`
INTEL_OSXSDK_PATH=`xcodebuild -sdk macosx -version Path`
echo $INTEL_OSXSDK_PATH
cat > xcodebuild <<EOF
#!/bin/bash
#https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/slow-execution-of-ifort-icpc-on-MacOSX-catalina/m-p/1203190
INTEL_OSXSDK_VER="$INTEL_OSXSDK_VER"
INTEL_OSXSDK_PATH="$INTEL_OSXSDK_PATH"
case "\$4" in
"")
echo \$INTEL_OSXSDK_VER;;
*)
echo \$INTEL_OSXSDK_PATH;;
esac
EOF
chmod +x xcodebuild