fix cray compilation

This commit is contained in:
edoapra 2024-11-06 13:16:51 -08:00
parent 48aff729a4
commit b3166ff87d
No known key found for this signature in database
GPG key ID: 9E6A0B70826967BA

View file

@ -51,6 +51,7 @@ fi
if [[ "$FC" = "ftn" ]] ; then
MPIF90="ftn"
MPICC="cc"
MPICXX="CC"
else
if ! [ -x "$(command -v mpif90)" ]; then
echo
@ -68,7 +69,11 @@ else
fi
fi
if [[ -z "${FC}" ]]; then
FC=$($MPIF90 -show|cut -d " " -f 1)
if [[ ! -z ${PE_ENV} ]]; then
FC=ftn
else
FC=$($MPIF90 -show|cut -d " " -f 1)
fi
fi
if [[ -z "${BLAS_SIZE}" ]]; then
@ -85,7 +90,11 @@ if [[ -z "${CC}" ]]; then
CC=cc
fi
if [[ -z "${CXX}" ]]; then
CXX=c++
if [[ ! -z ${PE_ENV} ]]; then
CXX=CC
else
CXX=c++
fi
fi
if [[ ${FC} == flang ]] || [[ ${PE_ENV} == AOCC ]]; then
GOTCLANG=1
@ -128,6 +137,8 @@ if [[ ${FC} == ifort ]] || [[ ${FC} == ifx ]] || [[ ${PE_ENV} == INTEL ]] ; then
# CPP="cpp -E"
fi
#set USE_MANUALCPP=1 on Crays
if [[ ! -z ${PE_ENV} ]]; then export USE_MANUALCPP=1; fi
if [[ ! -z "$MKLROOT" ]] ; then
if [[ ${BLAS_SIZE} == 8 ]]; then
SCALAPACK_FCFLAGS+=" -I${MKLROOT}/include/intel64/ilp64"
@ -246,6 +257,7 @@ export SCALAPACK_FCFLAGS+="${MYLINK}"
export LIBS="${MYLINK}"
export FC=$MPIF90
export CC=$MPICC
echo FC is $MPIF90 CC is $MPICC CXX is $MPICXX
FC=$MPIF90 CC=$MPICC CXX=$MPICXX ../configure \
$sixty4_int \
CFLAGS="$MYCFLAGS" \
@ -264,13 +276,8 @@ unset SCALAPACK_FCFLAGS
unset SCALAPACK_LDFLAGS
echo mpif90 is `which mpif90`
echo MPIF90 is "$MPIF90"
if [[ "$USE_MANUALCPP" == 1 ]]; then
echo @@@@ MANUALCPP @@@
make FC="$SRCDIR/remove_xcompiler $SRCDIR/manual_cpp mpif90" -j4
else
make FC=$MPIF90 CC=$MPICC CXX=$MPICXX -j4
fi
if [[ "$USE_MANUALCPP" == 1 ]]; then echo @@@@ MANUALCPP @@@; fi
make FC=$MPIF90 CC=$MPICC CXX=$MPICXX -j4
if [[ "$?" != "0" ]]; then
echo " "
echo "Elpa compilation failed"