Skip to content

Commit

Permalink
Merge branch 'nwchemgit:master' into remove-bgj-crap
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhammond committed May 16, 2021
2 parents 168a31c + 16a03cb commit e069175
Show file tree
Hide file tree
Showing 81 changed files with 1,286 additions and 172 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ jobs:
nwchem_modules: "nwdft solvation driver"
fc: gfortran-10
use_simint: 1
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
armci_network: mpi-ts
nwchem_modules: "nwdft solvation driver"
fc: nvfortran
cc: gcc
use_simint: 1
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: mpi-ts
nwchem_modules: "nwdft solvation driver"
fc: ifort
cc: icc
use_simint: 1
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
Expand Down Expand Up @@ -166,7 +182,7 @@ jobs:
with:
path: |
~/cache
key: ${{ matrix.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-simd${{ steps.get-simd.outputs.simd }}-nwchemcache-v004
key: ${{ matrix.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-simd${{ steps.get-simd.outputs.simd }}-nwchemcache-v005
- name: build environment
run: |
pwd
Expand Down
15 changes: 15 additions & 0 deletions contrib/getfiles.nwchem
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
#
# $Id$
cd $NWCHEM_TOP/src/nwpw/nwpwlib/nwpwxc/
rm -f dftd3.tgz
wget https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/dftd3.tgz
cd $NWCHEM_TOP/src/libext/openblas
VERSION=0.3.13
rm -rf OpenBLAS*gz
curl -L https://github.com/xianyi/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz
cd $NWCHEM_TOP/src/libext/scalapack
COMMIT=bc6cad585362aa58e05186bb85d4b619080c45a9
rm -f scalapack-$COMMIT.zip
curl -L https://github.com/Reference-ScaLAPACK/scalapack/archive/$COMMIT.zip -o scalapack-$COMMIT.zip

47 changes: 41 additions & 6 deletions src/NWints/simint/libsimint_source/build_simint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ if [ -z "$(command -v python3)" ]; then
echo please install python3
exit 1
fi
if [ -z "$(command -v curl)" ] && [ -z "$(command -v wget)" ]; then
echo curl and wget not installed
echo please install curl or wget
exit 1
fi
if [ -z "$(command -v patch)" ]; then
echo patch not installed
echo please install patch
exit 1
fi
UNAME_S=$(uname -s)
if [[ ${UNAME_S} == Linux ]]; then
CPU_FLAGS=$(cat /proc/cpuinfo | grep flags |tail -n 1)
Expand Down Expand Up @@ -41,6 +51,19 @@ else
VEC=scalar
fi
echo VEC $VEC
if [[ "${VEC}" == "avx512" ]]; then
if [[ -z "${CC}" ]]; then
CC=cc
fi
let GCCVERSIONGT5=$(expr `${CC} -dumpversion | cut -f1 -d.` \> 5)
if [[ ${GCCVERSIONGT5} != 1 ]]; then
echo
echo you have gcc version $(${CC} -dumpversion | cut -f1 -d.)
echo gcc version 6 and later needed for skylake
echo
exit 1
fi
fi
SRC_HOME=`pwd`
DERIV=1
if [[ -z "${SIMINT_MAXAM}" ]]; then
Expand All @@ -50,8 +73,16 @@ fi
PERMUTE_SLOW=${SIMINT_MAXAM}
GITHUB_USERID=edoapra
rm -rf simint.l${SIMINT_MAXAM}_p${PERMUTE_SLOW}_d${DERIVE}* *-chem-simint-generator-?????? simint-chem-simint-generator.tar.gz simint_lib
curl -L https://github.com/${GITHUB_USERID}/simint-generator/tarball/master -o simint-chem-simint-generator.tar.gz
#curl -LJ https://github.com/simint-chem/simint-generator/tarball/master -o simint-chem-simint-generator.tar.gz

GITHUB_URL=https://github.com/${GITHUB_USERID}/simint-generator/tarball/master
#GITHUB_URL=https://github.com/simint-chem/simint-generator/tarball/master
TAR_NAME=simint-chem-simint-generator.tar.gz
if [ ! -z "$(command -v curl)" ] ; then
curl -L "${GITHUB_URL}" -o "${TAR_NAME}"
else
wget -O "${TAR_NAME}" "${GITHUB_URL}"
fi

tar xzf simint-chem-simint-generator.tar.gz
cd *-simint-generator-???????
rm -f generator_types.patch
Expand Down Expand Up @@ -112,7 +143,10 @@ if [[ ${CMAKE_VER} -lt 3 ]]; then
echo define the CMAKE env. variable
exit 1
fi
$CMAKE ../
if [[ -z "${SIMINT_BUILD_TYPE}" ]]; then
SIMINT_BUILD_TYPE=Release
fi
$CMAKE -DCMAKE_BUILD_TYPE="${SIMINT_BUILD_TYPE}" ../
make -j2
cd ..
#./create.py -g build/generator/ostei -l 6 -p 4 -d 1 simint.l6_p4_d1
Expand Down Expand Up @@ -167,9 +201,10 @@ elif [ ${FC} == xlf ] || [ ${FC} == xlf_r ] || [ ${FC} == xlf90 ]|| [ ${FC} ==
Fortran_FLAGS=" -qintsize=8 -qextname -qpreprocess"
elif [ ${FC} == ifort ]; then
Fortran_FLAGS="-i8 -fpp"
fi
if [[ -z "${SIMINT_BUILD_TYPE}" ]]; then
SIMINT_BUILD_TYPE=Release
elif [ ${FC} == nvfortran ] || [ ${FC} == pgf90 ] ; then
Fortran_FLAGS="-i8 -cpp"
CC=gcc
CXX=g++
fi
echo Fortran_FLAGS equal "$Fortran_FLAGS"
FC="${FC}" CXX="${CXX}" $CMAKE \
Expand Down
11 changes: 5 additions & 6 deletions src/NWints/simint/source/nwcsim_facef90.F
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ subroutine nwcsim_init(rtdb,nbas,bases,num_der)
& call errquit(pname//'Exiting ',8, BASIS_ERR)
if (.not. geom_cent_get(geom, iat, tag,
& coord, q))call errquit
& (pname//'Exiting ',9, GEOM_ERR)
nwcsim_noshell(bas)=nwcsim_noshell(bas)+1
call simint_initialize_shell(
S smnt_sh(nwcsim_noshell(bas),bas))
Expand All @@ -124,10 +125,8 @@ subroutine nwcsim_init(rtdb,nbas,bases,num_der)
c
c memory allocation
c
isz_2e4c = max(isz_2e4c,
S simint_eri_worksize(num_der, max_ang))
mem_2e4c = max(mem_2e4c,
S simint_eri_workmem(num_der, max_ang))
S simint_eri_worksize(num_der, max_ang))
enddo ! basis loop
endif
c
Expand All @@ -136,16 +135,16 @@ subroutine nwcsim_init(rtdb,nbas,bases,num_der)
c SIMINT_PRIM_SCREEN_STAT needs 4 more doubles
c isz_2e4c = isz_2e4c + 4
c
call util_align(isz_2e4c,SIMINT_SIMD_LEN)
call util_align(mem_2e4c,SIMINT_SIMD_LEN)
c
iszb_2e4c=isz_2e4c
c iszb_2e4c=isz_2e4c

if(num_der.eq.1) then
memb_2e4c = mem_2e4c + mem_2e4c/5
else
memb_2e4c = mem_2e4c + mem_2e4c/10 ! +10% to be safe
endif
call util_align(isz_2e4c,SIMINT_SIMD_LEN)
call util_align(mem_2e4c,SIMINT_SIMD_LEN)
call util_align(memb_2e4c,SIMINT_SIMD_LEN)
mem_2e3c = mem_2e4c
mem_2e2c = mem_2e4c
Expand Down
4 changes: 2 additions & 2 deletions src/basis/bas_input.F
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ subroutine bas_input_body(basis, osegment, oIs_rel, oHas_Star)
integer nltypes ! No. of known angular momentum types
integer nsptypes ! No. of known sp type shells
integer nopts ! No. of options
parameter (nltypes = 7, nsptypes = 3, nopts = 6)
parameter (nltypes = 8, nsptypes = 3, nopts = 6)
character*1 ltypes(nltypes)
character*2 sptypes(nsptypes)
character*8 opts(nopts)
Expand All @@ -374,7 +374,7 @@ subroutine bas_input_body(basis, osegment, oIs_rel, oHas_Star)
cc AJL/Begin/SPIN-POLARISED ECPs
integer channel ! Both (Default)=0; Alpha=1; Beta=2
cc AJL/End
data ltypes /'s','p','d','f','g','h','i'/
data ltypes /'s','p','d','f','g','h','i','k'/
data sptypes / 'sp', 'l ', 'ul'/
data spvalues/ -1 , -1 , -1 /
data opts / 'except', 'library', 'file', 'rel', 'nelec' ,
Expand Down
3 changes: 2 additions & 1 deletion src/basis/basis.F
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ logical function bas_print(basisin)
integer atn, len_tag, len_ele
character*2 symbol
character*16 element
character*3 ctype(0:6),cltype(2)
character*3 ctype(0:7),cltype(2)
character*3 shell_type
*. . . . . . . . . . . ! Room for tag+space+(+element+) = 16+1+1+16+1
character*35 buffer
Expand All @@ -683,6 +683,7 @@ logical function bas_print(basisin)
ctype(4)='G'
ctype(5)='H'
ctype(6)='I'
ctype(7)='K'
cltype(1)='SP'
cltype(2)='SPD'
bas_print = .true.
Expand Down
6 changes: 6 additions & 0 deletions src/ccsd/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ ifeq ($(HAVE_SET_GA_PROPERTY),Y)
LIB_DEFINES += -DHAVE_SET_GA_PROPERTY
endif

ifdef USE_OPENACC_TRPDRV
OBJ_OPTIMIZE += ccsd_trpdrv_openacc.o
USES_BLAS += ccsd_trpdrv_openacc.F
FOPTIONS += -acc -gpu=managed -cuda -cudalib=cublas
endif


ifeq ($(ARMCI_NETWORK),MPI-PR)
LIB_DEFINES += -DACC_STRIPS
Expand Down
29 changes: 29 additions & 0 deletions src/ccsd/aoccsd2.F
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ subroutine aoccsd(basis,ncor,nocc,nvir,ndel,nact,nbf,maxit,
logical oconverged, occd, use_trpdrv_nb
logical use_trpdrv_omp, use_trpdrv_bgp2
logical use_trpdrv_omp_mp
logical use_trpdrv_openacc
logical use_trpdrv_offload
c
#include "ccsd_len.fh"
Expand Down Expand Up @@ -717,6 +718,9 @@ subroutine ccsd_iterdrv2(rtdb,basis,nsh,ncor,nocc,nvir,nact,nbf,
if (.not. rtdb_get(rtdb, 'ccsd:use_trpdrv_omp_mp', mt_log, 1,
1 use_trpdrv_omp_mp))
2 use_trpdrv_omp_mp=.false.
if (.not. rtdb_get(rtdb, 'ccsd:use_trpdrv_openacc', mt_log, 1,
1 use_trpdrv_openacc))
2 use_trpdrv_openacc=.false.
if (.not. rtdb_get(rtdb, 'ccsd:use_trpdrv_offload', mt_log, 1,
1 use_trpdrv_offload))
2 use_trpdrv_offload=.false.
Expand Down Expand Up @@ -976,6 +980,31 @@ subroutine ccsd_iterdrv2(rtdb,basis,nsh,ncor,nocc,nvir,nact,nbf,
$ dbl_mb(k_trp_Kka), dbl_mb(k_trp_Jij), dbl_mb(k_trp_Jkj),
$ dbl_mb(k_trp_Kij), dbl_mb(k_trp_Kkj), dbl_mb(k_trp_Dja),
$ dbl_mb(k_trp_Djka), dbl_mb(k_trp_Djia))
c
else if (use_trpdrv_openacc) then
#if defined(USE_OPENACC_TRPDRV)
#ifndef USE_F90_ALLOCATABLE
#error You must set USE_F90_ALLOCATABLE if USE_OPENACC_TRPDRV is set!
#endif
if (iam.eq.0.and.oprint) then
write(luout,1808) nvpass,util_wallsec()
call util_flush(luout)
endif
1808 format(' commencing triples evaluation - openacc version',i8,
I ' at ',f20.2,' secs')
call ccsd_trpdrv_openacc(dbl_mb(k_t1),
$ f1n,f1t,f2n,f2t,f3n,f3t,f4n,f4t,
$ eorb,g_objo,g_objv,g_coul,g_exch,ncor,nocc,nvir,iprt,
$ empt(1),empt(2),oseg_lo,oseg_hi,kchunk,
$ dbl_mb(k_trp_Tij), dbl_mb(k_trp_Tkj), dbl_mb(k_trp_Tia),
$ dbl_mb(k_trp_Tka), dbl_mb(k_trp_Xia), dbl_mb(k_trp_Xka),
$ dbl_mb(k_trp_Jia), dbl_mb(k_trp_Jka), dbl_mb(k_trp_Kia),
$ dbl_mb(k_trp_Kka), dbl_mb(k_trp_Jij), dbl_mb(k_trp_Jkj),
$ dbl_mb(k_trp_Kij), dbl_mb(k_trp_Kkj), dbl_mb(k_trp_Dja),
$ dbl_mb(k_trp_Djka), dbl_mb(k_trp_Djia))
#else
call errquit('aoccsd: trpdrv_openacc disabled ',0,0)
#endif
c
elseif (use_trpdrv_omp_mp) then
#ifndef TRPMIXP_OFF
Expand Down
Loading

0 comments on commit e069175

Please sign in to comment.