mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-29 06:35:39 -04:00
nvfortran & nvc updates
This commit is contained in:
parent
6a1cf99da9
commit
af4a646fa0
2 changed files with 10 additions and 3 deletions
|
|
@ -45,8 +45,6 @@ UNAME_S=$(uname -s)
|
|||
if [[ ${UNAME_S} == Linux ]]; then
|
||||
export ARFLAGS=rU
|
||||
fi
|
||||
MYCFLAGS+=" -Wno-error=implicit-function-declaration "
|
||||
MYCFLAGS+=" -Wno-error=format "
|
||||
if [[ ${UNAME_S} == Darwin ]]; then
|
||||
MYLINK+=" -Wl,-no_compact_unwind"
|
||||
if [[ -z "$HOMEBREW_PREFIX" ]]; then
|
||||
|
|
@ -83,6 +81,12 @@ else
|
|||
# CFLAGS+="-I`${NWCHEM_TOP}/src/tools/guess-mpidefs --mpi_include`"
|
||||
fi
|
||||
fi
|
||||
GOTNVC=$( "$MPICC" -dM -E - </dev/null 2> /dev/null |grep __NVCOMPILER\ |cut -d " " -f 3)
|
||||
echo GOTNVC $GOTNVC
|
||||
if [[ ${GOTNVC} != 1 ]]; then
|
||||
MYCFLAGS+=" -Wno-error=implicit-function-declaration "
|
||||
MYCFLAGS+=" -Wno-error=format "
|
||||
fi
|
||||
if [[ -z "${FC}" ]]; then
|
||||
if [[ ! -z ${PE_ENV} ]]; then
|
||||
FC=ftn
|
||||
|
|
@ -222,7 +226,7 @@ fi
|
|||
if [[ ${CC} == ifort ]] ; then
|
||||
MYFCFLAGS+=" -O3 -xhost "
|
||||
elif [[ ${FC} == nvfortran ]] || [[ ${PE_ENV} == NVIDIA ]] ; then
|
||||
MYCFLAGS+=" -tp native"
|
||||
MYFCFLAGS+=" -tp native"
|
||||
elif [[ ${FC_EXTRA} == gfortran ]] ; then
|
||||
MYFCFLAGS+=" -O3 -g -mtune=native -march=native "
|
||||
# MYFCFLAGS+=" -Wno-lto-type-mismatch "
|
||||
|
|
|
|||
|
|
@ -277,10 +277,13 @@ if [[ -z "$PE_ENV" ]] ; then
|
|||
fi
|
||||
#fix for clang 12 error in implicit-function-declaration
|
||||
GOTCLANG=$( "$MPICC" -dM -E - </dev/null 2> /dev/null |grep __clang__|head -1|cut -c19)
|
||||
GOTNVC=$( "$MPICC" -dM -E - </dev/null 2> /dev/null |grep __NVCOMPILER\ |cut -d " " -f 3)
|
||||
if [[ `${MPICC} -dM -E - < /dev/null 2> /dev/null | grep -c GNU` > 0 ]] ; then
|
||||
if [[ ${GOTNVC} != 1 ]]; then
|
||||
let GCCVERSIONGT12=$(expr `${MPICC} -dumpversion | cut -f1 -d.` \> 12)
|
||||
let GCCVERSIONGT13=$(expr `${MPICC} -dumpversion | cut -f1 -d.` \> 13)
|
||||
let GCCVERSIONGT14=$(expr `${MPICC} -dumpversion | cut -f1 -d.` \> 14)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${GOTCLANG} == "1" ]] || [[ ${GCCVERSIONGT12} == "1" ]] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue