Merge pull request #1227 from edoapra/nmcoef2c-error

updates
This commit is contained in:
NWChem: Open Source High-Performance Computational Chemistry 2025-12-22 17:26:50 -08:00 committed by GitHub
commit 4cac8afdec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18378 additions and 7278 deletions

View file

@ -92,6 +92,8 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_siosi3
let "myexit+=$?"
./runtests.mpi.unix procs $np adft_he2+
let "myexit+=$?"
./runtests.mpi.unix procs $np adft_siosi3
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_cr2
@ -192,6 +194,8 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np tddft_ac_co
let "myexit+=$?"
./runtests.mpi.unix procs $np h2o_bnl2007_tddft
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_xdm1
let "myexit+=$?"
./runtests.mpi.unix procs $np natom_iorb
@ -765,6 +769,8 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np rt_tddft_dplot
let "myexit+=$?"
./runtests.mpi.unix procs $np metagga_li4h4_1_m05_0
let "myexit+=$?"
if [[ "$what" != "flaky" ]]; then
echo
echo "the number of failed tests is" $myexit

View file

@ -1,14 +1,14 @@
echo
start metagga_dat
geometry
li 0.01002691 -0.94366842 1.43225550
h -1.37286946 0.02420936 0.52629308
h -0.02940706 3.13404608 -1.03053445
h 1.37316029 0.05159532 0.52604548
li 1.94807292 -1.21726078 -0.71290509
li -0.01236479 1.28755446 0.09274502
li -1.92253586 -1.25587660 -0.71259553
h -0.03460612 3.40646322 -0.30519899
li 1.41886094 -0.97519294 -0.00213685
h 0.52227920 0.01448403 -1.37641561
h -0.99294465 3.13015382 -0.16071498
h 0.52812846 0.02093224 1.36933229
li -0.72646082 -1.23567921 1.93800611
li 0.10745306 1.27247387 -0.00525518
li -0.73084646 -1.24632666 -1.93625430
h -0.26448317 3.39416572 0.20706284
end
charge +1
@ -36,4 +36,4 @@ driver
end
task dft optimize
task dft frequencies numerical
task dft frequencies

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,14 @@ wget https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3/dftd3.tgz
cd $NWCHEM_TOP/src/libext/openblas
VERSION=0.3.29
rm -rf OpenBLAS*gz
curl -L https://github.com/xianyi/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz
rm -rf OpenBLAS*
tries=1 ; until [ "$tries" -ge 6 ] ; do
if [ "$tries" -gt 1 ]; then sleep 9; echo attempt no. $tries ; fi
curl -L https://github.com/OpenMathLib/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz ;
# check tar.gz integrity
gzip -t OpenBLAS-${VERSION}.tar.gz >& /dev/null
if [ $? -eq 0 ]; then break ; fi
tries=$((tries+1)) ; done
cd $NWCHEM_TOP/src/libext/scalapack
COMMIT=a23c2cdc6586c427686f6097ae66bb54ef693571
rm -f scalapack-$COMMIT.zip

View file

@ -20,6 +20,7 @@ c::local
integer ip, j, index
logical warning
logical oldway
double precision factor2,summin
c
oldway = .false.
c
@ -38,7 +39,6 @@ c... number of integrals
& BASIS_ERR)
nbf = (l+1)*(l+2)/2
nint = nbf*nbf
if (.not.oldway) then
*
*...
*... normalize for overlap of basis function in all space
@ -68,6 +68,7 @@ c... number of integrals
*...
*
sum = 0.0d00
call dfill(nbf,0d0,scr(lscr-nbf+1),1)
do i = 1,np
do j = i,np
*debug: write(6,*)' '
@ -81,15 +82,20 @@ c... number of integrals
& xyz,z(j),cc(j),1,1,l,
& xyz,dumexp,dumcof,1,1,0,
& scr,nint,.false.,.false.,.false.,.false.,
& scr(1+nint),(lscr-nint))
& scr(1+nint),(lscr-nint-nbf))
if(oldway) then
* find minimum diagonal element
call find_min_diag_nmcoef2c(scr,nbf,factor)
call find_min_diag_nmcoef2c(scr,nbf,factor)
*debug: write(6,*)' sum 1 ', sum, factor
if(i.ne.j) factor = factor*2d0
sum = sum + factor
if(i.ne.j) factor = factor*2d0
sum = sum + factor
*debug: write(6,*)' sum 2 ', sum
else
call sum_diag_nmcoef2c(scr(lscr-nbf+1),scr,nbf,i.eq.j)
endif
enddo
enddo
if(.not.oldway) sum=minval(scr(lscr-nbf+1:lscr))
*debug: write(6,*)' sum final ', sum
factor = 1.0d00/sqrt(sum)
*debug: write(6,*)' factor ',factor
@ -97,38 +103,6 @@ c... number of integrals
cc(i) = cc(i)*factor
enddo
c
else
call hf2 (
& xyz,z,cc,np,1,l,
& xyz,dumexp,dumcof,1,1,0,
& xyz,z,cc,np,1,l,
& xyz,dumexp,dumcof,1,1,0,
& scr,nint,.false.,.false.,.false.,.false.,
& scr(1+nint),(lscr-nint))
*
crak:--
c.. find minimum diagonal element
c
factor = abs(scr(1))
index = 0
do i = 1,nbf
do j = 1,nbf
index = index + 1
if (i.eq.j) then
if (abs(scr(index)).gt.1.0d-05) then
factor = min(factor,abs(scr(index)))
endif
*debug: write(6,*)'factor ',factor,' val ',scr(index)
endif
enddo
enddo
factor = 1.0d00/sqrt(factor)
c
c... normalize contraction coefficients
do i = 1, np
cc(i) = cc(i)*factor
enddo
endif
*debug:* compute sum of squares
*debug: factor = 0.0d00
*debug: do ip = 1,np
@ -189,17 +163,30 @@ c
*debug: write(6,*)' nr = ',nr
factor = abs(buf(1,1))
negative = buf(1,1).lt.0.0d00
do i = 1,nr
do j = 1,nr
if (i.eq.j) then
*debug: write(6,10000)i,j,buf(i,j)
if (abs(buf(i,j)).lt.factor) then
factor = abs(buf(i,j))
negative = buf(i,j) .lt. 0.0d00
endif
endif
enddo
do i = 2,nr
*debug: write(6,10000)i,buf(i,i)
if (abs(buf(i,i)).lt.factor) then
factor = abs(buf(i,i))
negative = buf(i,i) .lt. 0.0d00
endif
enddo
if (negative) factor = -1.0d00*factor
10000 format(' findbuffer(',i3,',',i3,') =',1pd20.10)
write(6,*) ' findmin factor ',factor
10000 format(' findbuffer(',i3,') =',1pd20.10)
end
subroutine sum_diag_nmcoef2c(test,scr,nbf,ieqj)
implicit none
integer nbf
logical ieqj
double precision test(*),scr(nbf,*)
c
integer k
double precision fact
c
fact=1d0
if(.not.ieqj) fact=2d0
do k=1,nbf
test(k) = test(k) + fact*scr(k,k)
enddo
return
end

View file

@ -10,7 +10,7 @@ else
rm -rf OpenBLAS*
tries=1 ; until [ "$tries" -ge 6 ] ; do
if [ "$tries" -gt 1 ]; then sleep 9; echo attempt no. $tries ; fi
curl -L https://github.com/xianyi/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz ;
curl -L https://github.com/OpenMathLib/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz ;
# check tar.gz integrity
gzip -t OpenBLAS-${VERSION}.tar.gz >& /dev/null
if [ $? -eq 0 ]; then break ; fi