fixes for nvidia cray env. detection of Zen cpus

This commit is contained in:
edoapra 2021-10-08 18:24:32 -07:00
parent 214369de0a
commit de2f979be5
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0

View file

@ -36,10 +36,15 @@ fi
GOTAVX=$(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx/ {print "Y"}')
GOTAVX2=$(echo ${CPU_FLAGS_2} | tr 'A-Z' 'a-z'| awk ' /avx2/ {print "Y"}')
GOTAVX512=$(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx512f/{print "Y"}')
GOTCLZERO=$(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /clzero/{print "Y"}')
if [[ "${GOTAVX2}" == "Y" ]]; then
echo "forcing Haswell target when AVX2 is available"
FORCETARGET=" TARGET=HASWELL "
fi
if [[ "${GOTCLZERO}" == "Y" ]]; then
echo "forcing Zen target when CLZERO is available"
FORCETARGET=" TARGET=ZEN "
fi
if [[ "${GOTAVX512}" == "Y" ]]; then
echo "forcing Haswell target on SkyLake"
FORCETARGET=" TARGET=HASWELL "
@ -65,6 +70,8 @@ fi
#cray ftn wrapper
if [[ ${FC} == ftn ]]; then
FCORG=ftn
CRAY_ACCEL_TARGET_ORG=$CRAY_ACCEL_TARGET
unset CRAY_ACCEL_TARGET
if [[ ${PE_ENV} == PGI ]]; then
FC=pgf90
# _CC=pgcc
@ -80,6 +87,9 @@ if [[ ${FC} == ftn ]]; then
fi
if [[ ${PE_ENV} == NVIDIA ]]; then
FC=nvfortran
FORCETARGET+=' CC=gcc '
CC=gcc
unset CPATH
fi
if [[ ${PE_ENV} == CRAY ]]; then
# echo ' '
@ -186,3 +196,6 @@ fi
if [[ -n ${CCORG} ]]; then
CC=${CCORG}
fi
if [[ -n ${CRAY_ACCEL_TARGET_ORG} ]]; then
CRAY_ACCEL_TARGET=$CRAY_ACCEL_TARGET_ORG
fi