Merge pull request #640 from edoapra/libext

cd fitting fixes
This commit is contained in:
Edoardo Aprà 2022-08-18 10:44:01 -07:00 committed by GitHub
commit 7063b04d39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 13 deletions

View file

@ -2,6 +2,8 @@ name: NWChem_CI_archs
on:
push:
paths-ignore:
- .gitlab-ci.yml
pull_request:
release:
schedule:

View file

@ -1,5 +1,9 @@
name: lint_python
on: [pull_request, push]
on:
push:
paths-ignore:
- .gitlab-ci.yml
pull_request:
jobs:
lint_python:
runs-on: ubuntu-latest

View file

@ -373,6 +373,14 @@ c
c write(*,*)' Dbl_MB(icgtf) = ',(Dbl_MB(icgtf+i),i=0,nbf_cd-1)
c write(*,*)' CD_coef = ',(CD_coef(i,ifit),i=1,nbf_cd)
endif
if(oprint.and.me.eq.0.and..not.derfit )then
write(LuOut,*)
write(LuOut,'(a,f14.6,a,1pe13.6)')
& ' CD fit integrated density:',rho_int,
& ' Lagrange Mult.: ',alpha
write(LuOut,*)
call util_flush(LuOut)
end if
enddo
endif
if(.not.ma_pop_stack(lscr))
@ -383,14 +391,6 @@ c write(*,*)' CD_coef = ',(CD_coef(i,ifit),i=1,nbf_cd)
& call errquit('dft_fitcd: cannot pop stack',6, MA_ERR)
if(oprint.and.me.eq.0.and..not.derfit )then
write(LuOut,*)
write(LuOut,'(a,f14.6,a,1pe13.6)')
& ' CD fit integrated density:',rho_int,
& ' Lagrange Mult.: ',alpha
write(LuOut,*)
call util_flush(LuOut)
end if
return
end

View file

@ -270,11 +270,11 @@ c
! Standard cd fitting needs the coefficients for the full
! density in each spin channel to get the right Fock
! matrices
elseif (CDFIT .and. (ipol.gt.1)) then
call daxpy(nbf_cd,1.0d0,cd_coef(1,2),1,cd_coef(1,1),1)
call dcopy(nbf_cd,cd_coef(1,1),1,cd_coef(1,2),1)
endif
endif
if ((.not.adft).and.CDFIT .and. (ipol.gt.1)) then
call daxpy(nbf_cd,1.0d0,cd_coef(1,2),1,cd_coef(1,1),1)
call dcopy(nbf_cd,cd_coef(1,1),1,cd_coef(1,2),1)
endif
c
if (oprint_intermediate_xc)then

13
src/tools/dra_f2c.patch Normal file
View file

@ -0,0 +1,13 @@
--- ga-5.8.1/pario/dra/fortran.c 2021-12-24 09:41:28.000000000 -0800
+++ ga-5.8.1/pario/dra/fortran.c.new 2022-08-17 19:06:12.000000000 -0700
@@ -43,6 +43,10 @@
)
{
ga_f2cstring(name, nlen, cname, DRA_MAX_NAME);
+ /* workaround for flen=0 on macos-12 */
+ if (flen == 0 ){
+ flen = strlen(filename);
+ }
ga_f2cstring(filename, flen, cfilename, DRA_MAX_FNAME);
return drai_create(type, dim1, dim2, cname, cfilename,
mode, reqdim1, reqdim2,d_a);

View file

@ -215,6 +215,7 @@ if [[ -d "ga-5.8.1" ]]; then
./nompif_patch.sh $GA_DIR
./ptstride_patch.sh $GA_DIR
patch -p0 -s -N < ./fujitsu.patch
patch -p0 -s -N < ./dra_f2c.patch
echo patched
touch ga-5.8.1/patched581
fi