mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-27 21:55:30 -04:00
commit
e8b338ffcf
7 changed files with 68 additions and 44 deletions
|
|
@ -2145,6 +2145,7 @@ ifneq ($(TARGET),LINUX)
|
|||
GOTCLANG= $(shell $(_CC) -dM -E - </dev/null 2> /dev/null |grep __clang__|head -1|cut -c19)
|
||||
ifeq ($(GOTCLANG),1)
|
||||
COPTIONS += -fPIC
|
||||
COPTIONS += -Wno-deprecated-non-prototype
|
||||
endif
|
||||
|
||||
GOTFREEBSD= $(shell uname -o 2>&1|awk ' /FreeBSD/ {print "1";exit}')
|
||||
|
|
@ -2772,7 +2773,10 @@ ifneq ($(TARGET),LINUX)
|
|||
ifeq ($(_FC),crayftn)
|
||||
# Jeff: Cray Fortran supports preprocessing as of version 8.2.2 (at least)
|
||||
# EXPLICITF = FALSE
|
||||
FOPTIONS += -hsystem_alloc -hoverindex
|
||||
FOPTIONS += -hoverindex
|
||||
FOPTIONS += -dC # fix rt-tddft hacking for derived types
|
||||
FOPTIONS += -ef # create f90 .mod
|
||||
LDOPTIONS += -hsystem_alloc
|
||||
# workaround for vectorization failures with cce 11
|
||||
FOPTIONS += -hfp1
|
||||
ifdef BUILD_OPENBLAS
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ patch -p0 -s -N < ../makesys.patch
|
|||
# patch for pgi/nvfortran missing -march=armv8
|
||||
patch -p0 -s -N < ../arm64_fopt.patch
|
||||
patch -p1 -s -N < ../9402df5604e69f86f58953e3883f33f98c930baf.patch
|
||||
patch -p0 -s -N < ../crayftn.patch
|
||||
if [[ -z "${FORCETARGET}" ]]; then
|
||||
FORCETARGET=" "
|
||||
UNAME_S=$(uname -s)
|
||||
|
|
@ -111,20 +112,21 @@ if [[ ${FC} == ftn ]]; then
|
|||
# echo ' '
|
||||
# echo 'openblas installation not ready for crayftn '
|
||||
# echo ' '
|
||||
if ! [ -x "$(command -v gfortran)" ]; then
|
||||
echo " please load the gcc module (not prgenv)"
|
||||
echo " by executing"
|
||||
echo " module load gcc "
|
||||
echo " "
|
||||
exit 1
|
||||
fi
|
||||
FC=gfortran
|
||||
CCORG=${CC}
|
||||
CC=clang
|
||||
export PATH=/opt/cray/pe/cce/default/cce-clang/x86_64/bin:$PATH
|
||||
FORCETARGET+=' FC=gfortran CC=clang '
|
||||
# if ! [ -x "$(command -v gfortran)" ]; then
|
||||
# echo " please load the gcc module (not prgenv)"
|
||||
# echo " by executing"
|
||||
# echo " module load gcc "
|
||||
# echo " "
|
||||
# exit 1
|
||||
# fi
|
||||
# FC=gfortran
|
||||
# CCORG=${CC}
|
||||
# CC=clang
|
||||
# export PATH=/opt/cray/pe/cce/default/cce-clang/x86_64/bin:$PATH
|
||||
# FORCETARGET+=' FC=gfortran CC=clang '
|
||||
# exit 1
|
||||
# exit 1
|
||||
# exit 1
|
||||
_FC=crayftn
|
||||
fi
|
||||
fi
|
||||
if [[ -n ${FC} ]] && [[ ${FC} == xlf ]] || [[ ${FC} == xlf_r ]] || [[ ${FC} == xlf90 ]]|| [[ ${FC} == xlf90_r ]]; then
|
||||
|
|
@ -134,6 +136,9 @@ if [[ -n ${FC} ]] && [[ ${FC} == xlf ]] || [[ ${FC} == xlf_r ]] || [[ ${FC} ==
|
|||
elif [[ -n ${FC} ]] && [[ "${FC}" == "flang" ]] || [[ "${FC}" == "amdflang" ]]; then
|
||||
FORCETARGET+=' F_COMPILER=FLANG '
|
||||
LAPACK_FPFLAGS_VAL=" -O1 -g -Kieee"
|
||||
elif [[ "${_FC}" == "crayftn" ]] ; then
|
||||
# FORCETARGET+=' F_COMPILER=FLANG '
|
||||
LAPACK_FPFLAGS_VAL=" -s integer64 -ef "
|
||||
elif [[ -n ${FC} ]] && [[ "${FC}" == "pgf90" ]] || [[ "${FC}" == "nvfortran" ]]; then
|
||||
FORCETARGET+=' F_COMPILER=PGI '
|
||||
if [[ "${FC}" == "nvfortran" ]]; then
|
||||
|
|
@ -222,7 +227,7 @@ if [[ ! -z "${USE_OPENMP}" ]]; then
|
|||
fi
|
||||
GOTFREEBSD=$(uname -o 2>&1|awk ' /FreeBSD/ {print "1";exit}')
|
||||
MYMAKE=make
|
||||
MAKEJ=" -j4"
|
||||
MAKEJ=" -j3 "
|
||||
if [[ "${GOTFREEBSD}" == 1 ]]; then
|
||||
MAKEJ=" "
|
||||
MYMAKE=gmake
|
||||
|
|
@ -240,7 +245,9 @@ else
|
|||
$MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKEJ >& openblas.log
|
||||
fi
|
||||
if [[ "$?" != "0" ]]; then
|
||||
tail -500 openblas.log
|
||||
echo error code '$?'
|
||||
ls -l openblas.log
|
||||
tail -n 500 openblas.log
|
||||
echo " "
|
||||
echo "OpenBLAS compilation failed"
|
||||
echo " "
|
||||
|
|
@ -248,6 +255,9 @@ if [[ "$?" != "0" ]]; then
|
|||
fi
|
||||
|
||||
mkdir -p ../../lib
|
||||
if [[ "${_FC}" == "crayftn" ]] ; then
|
||||
cd lapack-netlib/SRC; ar rUv ../../libopenblas*-*.a la_constants.o ;cd ../..
|
||||
fi
|
||||
if [[ $(uname -s) == "Linux" ]]; then
|
||||
if [ -x "$(command -v xx-info)" ]; then
|
||||
MYSTRIP=$(xx-info)-strip
|
||||
|
|
|
|||
10
src/libext/openblas/crayftn.patch
Normal file
10
src/libext/openblas/crayftn.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- Makefile.system.org 2023-07-26 19:26:30.000000000 -0700
|
||||
+++ Makefile.system 2023-07-26 19:26:54.000000000 -0700
|
||||
@@ -1323,6 +1323,7 @@
|
||||
ifeq ($(F_COMPILER), CRAY)
|
||||
CCOMMON_OPT += -DF_INTERFACE_INTEL
|
||||
FCOMMON_OPT += -hnopattern
|
||||
+FCOMMON_OPT += -ef
|
||||
ifdef INTERFACE64
|
||||
ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -s integer64
|
||||
|
|
@ -22,7 +22,7 @@ c
|
|||
double precision mp2y, scfy
|
||||
double precision mp2z, scfz
|
||||
double precision ndip(3)
|
||||
logical ga_create_atom_blocked
|
||||
integer ga_create_atom_blocked
|
||||
external ga_create_atom_blocked
|
||||
integer geom
|
||||
c
|
||||
|
|
|
|||
|
|
@ -665,11 +665,11 @@ c
|
|||
& cstatus,
|
||||
& fstatus
|
||||
3 format(/
|
||||
$ ' heap = ', i10,' doubles',' = ',f8.1,' Mbytes',/,
|
||||
$ ' stack = ', i10,' doubles',' = ',f8.1,' Mbytes',/,
|
||||
$ ' global = ', i10,' doubles',' = ',f8.1,' Mbytes',
|
||||
$ ' heap = ', i12,' doubles',' = ',f10.1,' Mbytes',/,
|
||||
$ ' stack = ', i12,' doubles',' = ',f10.1,' Mbytes',/,
|
||||
$ ' global = ', i12,' doubles',' = ',f10.1,' Mbytes',
|
||||
& ' ',A,/,
|
||||
$ ' total = ', i10,' doubles',' = ',f8.1,' Mbytes',/,
|
||||
$ ' total = ', i12,' doubles',' = ',f10.1,' Mbytes',/,
|
||||
$ ' verify = ', a3,/,
|
||||
$ ' hardfail = ', a3,//)
|
||||
c
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ c DM in last position is the scf DM
|
|||
enddo
|
||||
elseif (adft) then
|
||||
call adft_reduce(nbf_xc, nctrs, int_mb(icetobfr), tmat, ipol,
|
||||
& dbl_mb(irdens_atom), nbf_xc_mxnbf_ce)
|
||||
& dbl_mb(irdens_atom))
|
||||
else
|
||||
call util_ga_mat_reduce(nbf_ao, nctrs, int_mb(icetobfr), g_dens,
|
||||
& ipol, dbl_mb(irdens_atom), 'absmax',
|
||||
|
|
@ -1044,25 +1044,3 @@ c
|
|||
return
|
||||
end
|
||||
|
||||
subroutine adft_reduce(nbf, nat, cetobfr, coef, ipol, rdens_atom)
|
||||
implicit none
|
||||
integer nbf, nat, ipol, mxnbf
|
||||
integer cetobfr(2,nat)
|
||||
double precision rdens_atom(nat,nat,ipol),coef(nbf,ipol)
|
||||
double precision dabsmax
|
||||
external dabsmax
|
||||
|
||||
integer iat,istart,iend
|
||||
|
||||
rdens_atom(:,:,:) = 0d0
|
||||
|
||||
do iat=1,nat
|
||||
istart = cetobfr(1,iat)
|
||||
iend = cetobfr(2,iat)
|
||||
rdens_atom(1,iat,1) = dabsmax(iend-istart+1,coef(istart,1))
|
||||
if (ipol.gt.1) then
|
||||
rdens_atom(1,iat,2) = dabsmax(iend-istart+1,coef(istart,2))
|
||||
endif
|
||||
enddo
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -327,5 +327,27 @@ c
|
|||
enddo
|
||||
return
|
||||
end
|
||||
subroutine adft_reduce(nbf, nat, cetobfr, coef, ipol, rdens_atom)
|
||||
implicit none
|
||||
integer nbf, nat, ipol, mxnbf
|
||||
integer cetobfr(2,nat)
|
||||
double precision rdens_atom(nat,nat,ipol),coef(nbf,ipol)
|
||||
double precision dabsmax
|
||||
external dabsmax
|
||||
|
||||
integer iat,istart,iend
|
||||
|
||||
rdens_atom(:,:,:) = 0d0
|
||||
|
||||
do iat=1,nat
|
||||
istart = cetobfr(1,iat)
|
||||
iend = cetobfr(2,iat)
|
||||
rdens_atom(1,iat,1) = dabsmax(iend-istart+1,coef(istart,1))
|
||||
if (ipol.gt.1) then
|
||||
rdens_atom(1,iat,2) = dabsmax(iend-istart+1,coef(istart,2))
|
||||
endif
|
||||
enddo
|
||||
|
||||
end
|
||||
C>
|
||||
C> @}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue