Skip to content

Commit

Permalink
Merge pull request #1061 from edoapra/simint2025
Browse files Browse the repository at this point in the history
Simint updates
  • Loading branch information
nwchemgit authored Jan 11, 2025
2 parents 0da5c01 + 48a2dd9 commit f023f05
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,15 @@ jobs:
ubuntu_ver=$(cat /etc/os-release | grep VERSION_ID |cut -d \" -f 2)
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
sudo apt-get purge -y azure-cli || true
sudo apt-get purge -y google-cloud-cli microsoft-edge-stable dotnet-sdk-7.0 dotnet-sdk-6.0 google-chrome-stable firefox
sudo apt-get purge -y temurin-17-jdk temurin-11-jdk temurin-8-jdk
sudo apt-get purge -y google-cloud-cli microsoft-edge-stable dotnet-sdk-* google-chrome-stable firefox
sudo apt-get purge -y temurin-*
if [[ $ubuntu_ver == "20.04" ]]; then
sudo apt-get purge -y llvm-12-dev llvm-11-dev llvm-10-dev
sudo apt-get purge -y llvm-*-dev
sudo apt-get purge -y hhvm
sudo apt-get purge -y libgl1-mesa-dri
fi
if [[ $ubuntu_ver == "22.04" ]]; then
sudo apt-get purge -y llvm-13-dev llvm-14-dev llvm-15-dev
sudo apt-get purge -y llvm-*-dev
fi
sudo apt-get -y clean
sudo apt-get autoremove -y
Expand Down
2 changes: 1 addition & 1 deletion src/NWints/simint/libsimint_source/build_simint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ else
VEC=scalar
fi
echo VEC $VEC
if [[ "${VEC}" == "avx512" ]]; then
if [[ -z "${CC}" ]]; then
CC=cc
fi
echo CC is $CC
if [[ "${VEC}" == "avx512" ]]; then
GCC_EXTRA=$(echo $CC | cut -c 1-3)
if [ "$GCC_EXTRA" == gcc ]; then
let GCCVERSIONGT5=$(expr `${CC} -dumpversion | cut -f1 -d.` \> 5)
Expand Down
109 changes: 87 additions & 22 deletions src/NWints/simint/source/nwcsim_hf2.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
block data nwcsim_shpair
*
* $Id$
*
implicit none
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/cache1,cache2,cache3,cache4
data cache1,cache2,cache3,cache4/-1,-1,-1,-1/
end

#ifdef USE_SIMINT
subroutine nwcsim_hf2(ij_basis,i_sh,j_sh,
J kl_basis,k_sh,l_sh,
Expand All @@ -23,15 +33,25 @@ subroutine nwcsim_hf2(ij_basis,i_sh,j_sh,
character*10 pname
integer*4 zerod
parameter(zerod=0)
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/cache1,cache2,cache3,cache4
pname="nwcsim_hf2"
c
c match ijkl shell to simint shell

c
call simint_create_multi_shellpair(1, smnt_sh(i_sh,ij_basis), 1,
S smnt_sh(j_sh,ij_basis), bra_msh, smnt_screen_method)
call simint_create_multi_shellpair(1,smnt_sh(k_sh,kl_basis),
S 1,smnt_sh(l_sh,kl_basis), ket_msh, smnt_screen_method)
if(i_sh.ne.cache1.or.j_sh.ne.cache2) then
call simint_create_multi_shellpair(1, smnt_sh(i_sh,ij_basis),1,
S smnt_sh(j_sh,ij_basis), bra_msh, smnt_screen_method)
cache1=i_sh+10000000*ij_basis
cache2=j_sh+10000000*ij_basis
endif
if(k_sh.ne.cache3.or.l_sh.ne.cache4) then
call simint_create_multi_shellpair(1,smnt_sh(k_sh,kl_basis),
S 1,smnt_sh(l_sh,kl_basis), ket_msh, smnt_screen_method)
cache3=k_sh+10000000*kl_basis
cache4=l_sh+10000000*kl_basis
endif
#ifdef DEBUG
write(6,'(a,2i10)') ' basis tags ',ij_basis,kl_basis
write(6,'(4i10)') i_sh,j_sh,k_sh,l_sh
Expand Down Expand Up @@ -84,15 +104,25 @@ subroutine nwcsim_hf2_3c(i_basis,i_sh,jk_basis,j_sh,k_sh,
#include "mafdecls.fh"
integer i
character*10 pname
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/ cache1,cache2,cache3,cache4
pname="nwcsim_hf2_3c"
c
c match ijkl shell to simint shell

c
call simint_create_multi_shellpair(1,smnt_sh(i_sh,i_basis),
S 1,zero_sh(j_sh,i_basis), bra_msh, smnt_screen_method)
if(i_sh.ne.cache1.or.cache2.ne.0) then
call simint_create_multi_shellpair(1,smnt_sh(i_sh,i_basis),
S 1,zero_sh(j_sh,i_basis), bra_msh, smnt_screen_method)
cache1=i_sh+10000000*i_basis
cache2=0
endif
if(j_sh.ne.cache3.or.k_sh.ne.cache4) then
call simint_create_multi_shellpair(1, smnt_sh(j_sh,jk_basis), 1,
S smnt_sh(k_sh,jk_basis), ket_msh, smnt_screen_method)
cache3=j_sh+10000000*jk_basis
cache4=k_sh+10000000*jk_basis
endif
ncomputed = simint_compute_eri(bra_msh, ket_msh, smnt_screen_tol,
C scr, eri)
#ifdef DEBUG
Expand Down Expand Up @@ -121,16 +151,24 @@ subroutine nwcsim_hf2_2c(i_basis,i_sh,j_basis,j_sh,
#include "mafdecls.fh"
#define DEBUG_ 1
integer i
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/ cache1,cache2,cache3,cache4
character*10 pname
pname="nwcsim_hf2_2c"
c
c match ijkl shell to simint shell

c
call simint_create_multi_shellpair(1,smnt_sh(i_sh,i_basis),
S 1,zero_sh(i_sh,i_basis), bra_msh, smnt_screen_method)
call simint_create_multi_shellpair(1, smnt_sh(j_sh,j_basis), 1,
S zero_sh(j_sh,j_basis), ket_msh, smnt_screen_method)
if(i_sh.ne.cache1) then
call simint_create_multi_shellpair(1,smnt_sh(i_sh,i_basis),
S 1,zero_sh(i_sh,i_basis), bra_msh, smnt_screen_method)
cache1=i_sh+10000000*i_basis
endif
if(j_sh.ne.cache3) then
call simint_create_multi_shellpair(1, smnt_sh(j_sh,j_basis), 1,
S zero_sh(j_sh,j_basis), ket_msh, smnt_screen_method)
cache3=j_sh+10000000*j_basis
endif
ncomputed = simint_compute_eri(bra_msh, ket_msh,
S smnt_screen_tol,
C scr, eri)
Expand Down Expand Up @@ -162,6 +200,8 @@ subroutine nwcsim_hf2d(ij_basis,i_sh,j_sh,
c type(c_simint_multi_shellpair), target :: bra_msh, ket_msh
integer i
character*10 pname
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/ cache1,cache2,cache3,cache4
pname="nwcsim_hf2d"
c
c match ijkl shell to simint shell
Expand All @@ -170,10 +210,18 @@ subroutine nwcsim_hf2d(ij_basis,i_sh,j_sh,
c call simint_initialize_multi_shellpair(bra_msh)
c call simint_initialize_multi_shellpair(ket_msh)

call simint_create_multi_shellpair(1, smnt_sh(i_sh,ij_basis), 1,
S smnt_sh(j_sh,ij_basis), bra_msh, smnt_screen_method)
call simint_create_multi_shellpair(1,smnt_sh(k_sh,kl_basis),
if(i_sh.ne.cache1.or.j_sh.ne.cache2) then
call simint_create_multi_shellpair(1, smnt_sh(i_sh,ij_basis),1,
S smnt_sh(j_sh,ij_basis), bra_msh, smnt_screen_method)
cache1=i_sh+10000000*ij_basis
cache2=j_sh+10000000*ij_basis
endif
if(k_sh.ne.cache3.or.l_sh.ne.cache4) then
call simint_create_multi_shellpair(1,smnt_sh(k_sh,kl_basis),
S 1,smnt_sh(l_sh,kl_basis), ket_msh, smnt_screen_method)
cache3=k_sh+10000000*kl_basis
cache4=l_sh+10000000*kl_basis
endif

ncomputed = simint_compute_eri_deriv(smnt_deriv,bra_msh, ket_msh,
S smnt_screen_tol,
Expand Down Expand Up @@ -205,6 +253,8 @@ subroutine nwcsim_hf2d_2c(i_basis,i_sh,
c type(c_simint_multi_shellpair), target :: bra_msh, ket_msh
integer i
character*10 pname
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/ cache1,cache2,cache3,cache4
pname="nwcsim_hf2d_2c"
c
c match ijkl shell to simint shell
Expand All @@ -213,10 +263,16 @@ subroutine nwcsim_hf2d_2c(i_basis,i_sh,
c call simint_initialize_multi_shellpair(bra_msh)
c call simint_initialize_multi_shellpair(ket_msh)

call simint_create_multi_shellpair(1, smnt_sh(i_sh,i_basis), 1,
S zero_sh(i_sh,i_basis), bra_msh, smnt_screen_method)
call simint_create_multi_shellpair(1, smnt_sh(j_sh,j_basis), 1,
S zero_sh(j_sh,j_basis), ket_msh, smnt_screen_method)
if(i_sh.ne.cache1) then
call simint_create_multi_shellpair(1, smnt_sh(i_sh,i_basis), 1,
S zero_sh(i_sh,i_basis), bra_msh, smnt_screen_method)
cache1=i_sh+10000000*i_basis
endif
if(j_sh.ne.cache3) then
call simint_create_multi_shellpair(1, smnt_sh(j_sh,j_basis), 1,
S zero_sh(j_sh,j_basis), ket_msh, smnt_screen_method)
cache3=j_sh+10000000*j_basis
endif

ncomputed = simint_compute_eri_deriv(smnt_deriv,bra_msh, ket_msh,
S smnt_screen_tol,
Expand Down Expand Up @@ -248,18 +304,27 @@ subroutine nwcsim_hf2d_3c(i_basis,i_sh,
c type(c_simint_multi_shellpair), target :: bra_msh, ket_msh
integer i
character*10 pname
integer cache1,cache2,cache3,cache4
common/nwcsim_shpair_cache/ cache1,cache2,cache3,cache4
pname="nwcsim_hf2d_3c"
c
c match ijkl shell to simint shell

c
c call simint_initialize_multi_shellpair(bra_msh)
c call simint_initialize_multi_shellpair(ket_msh)

call simint_create_multi_shellpair(1, smnt_sh(i_sh,i_basis), 1,
S zero_sh(i_sh,i_basis), bra_msh, smnt_screen_method)
call simint_create_multi_shellpair(1,smnt_sh(j_sh,jk_basis), 1,
S smnt_sh(k_sh,jk_basis), ket_msh, smnt_screen_method)
if(i_sh.ne.cache1.or.cache2.ne.0) then
call simint_create_multi_shellpair(1, smnt_sh(i_sh,i_basis), 1,
S zero_sh(i_sh,i_basis), bra_msh, smnt_screen_method)
cache1=i_sh+10000000*i_basis
cache2=0
endif
if(j_sh.ne.cache3.or.k_sh.ne.cache4) then
call simint_create_multi_shellpair(1,smnt_sh(j_sh,jk_basis), 1,
S smnt_sh(k_sh,jk_basis), ket_msh, smnt_screen_method)
cache3=j_sh+10000000*jk_basis
cache4=k_sh+10000000*jk_basis
endif

ncomputed = simint_compute_eri_deriv(smnt_deriv,bra_msh, ket_msh,
s smnt_screen_tol,
Expand Down
6 changes: 5 additions & 1 deletion src/libext/scalapack/build_scalapa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ fi
if [[ $(echo "$LAPACK_LIB" |awk '/lapack/ {print "Y"; exit}' ) == "Y" ]]; then
export USE_DCOMBSSQ=1
fi
if [[ $(echo ""$LAPACK_LIB |awk '/lfjlapack/ {print "Y"; exit}' ) == "Y" ]]; then
if [[ $(echo "$LAPACK_LIB" |awk '/lfjlapack/ {print "Y"; exit}' ) == "Y" ]]; then
export USE_DCOMBSSQ=1
fi
# ubuntu 24.04 openblas pkg does not contain dcombossq
if [[ $(echo "$LAPACK_LIB" |awk '/openblas/ {print "Y"; exit}' ) == "Y" ]]; then
export USE_DCOMBSSQ=1
fi
if [[ -z "$USE_DCOMBSSQ" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions travis/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ if [[ "$os" == "Linux" ]]; then
# try to use ubuntu flaky GA pkg
if [[ "$ARMCI_NETWORK" == "GA_DEBIAN" ]]; then
$MYSUDO apt-get install -y libglobalarrays-dev libarmci-mpi-dev
# hack
$MYSUDO ln -sf /usr/lib/x86_64-linux-gnu/libarmci.a /usr/lib/x86_64-linux-gnu/libarmci-openmpi.a
# # hack
# $MYSUDO ln -sf /usr/lib/x86_64-linux-gnu/libarmci.a /usr/lib/x86_64-linux-gnu/libarmci-openmpi.a
# export EXTERNAL_GA_PATH=/usr/lib/x86_64-linux-gnu/ga/openmpi
# export EXTERNAL_GA_PATH=/usr
# export EXTERNAL_ARMCI_PATH=/usr
Expand Down

0 comments on commit f023f05

Please sign in to comment.