From faf83a5335d2f0fe7390bf63f9c5068b167b9beb Mon Sep 17 00:00:00 2001 From: edoapra Date: Wed, 17 Aug 2022 19:15:36 -0700 Subject: [PATCH 1/5] workaround for f2c second string conversion on macos-11 --- src/tools/dra_f2c.patch | 13 +++++++++++++ src/tools/get-tools-github | 1 + 2 files changed, 14 insertions(+) create mode 100644 src/tools/dra_f2c.patch diff --git a/src/tools/dra_f2c.patch b/src/tools/dra_f2c.patch new file mode 100644 index 0000000000..919044f7e9 --- /dev/null +++ b/src/tools/dra_f2c.patch @@ -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); diff --git a/src/tools/get-tools-github b/src/tools/get-tools-github index bdd686d268..e32d5b4bd4 100755 --- a/src/tools/get-tools-github +++ b/src/tools/get-tools-github @@ -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 From 1dc1d91f541326547d7740192242c619e79669e6 Mon Sep 17 00:00:00 2001 From: edoapra Date: Wed, 17 Aug 2022 19:18:48 -0700 Subject: [PATCH 2/5] ignore .gitlab-ci.yml --- .github/workflows/github_actions_archs.yml | 2 ++ .github/workflows/lint_python.yml | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github_actions_archs.yml b/.github/workflows/github_actions_archs.yml index 196ea7b829..086aa05ff2 100644 --- a/.github/workflows/github_actions_archs.yml +++ b/.github/workflows/github_actions_archs.yml @@ -2,6 +2,8 @@ name: NWChem_CI_archs on: push: + paths-ignore: + - .gitlab-ci.yml pull_request: release: schedule: diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index c5486de17e..249349c71a 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -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 From 638d905955696bc79f61d8c8698a9ea0120a3e4c Mon Sep 17 00:00:00 2001 From: edoapra Date: Wed, 17 Aug 2022 23:43:52 -0700 Subject: [PATCH 3/5] print lagrange multipliers result for both spins --- src/nwdft/coulomb/dft_fitcd.F | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/nwdft/coulomb/dft_fitcd.F b/src/nwdft/coulomb/dft_fitcd.F index 8fe425f560..e1691e267d 100644 --- a/src/nwdft/coulomb/dft_fitcd.F +++ b/src/nwdft/coulomb/dft_fitcd.F @@ -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 From 8004dcd338fbca219bdbd8ed3073770e8fa78fb1 Mon Sep 17 00:00:00 2001 From: edoapra Date: Wed, 17 Aug 2022 23:45:00 -0700 Subject: [PATCH 4/5] fix for case when cdfit && havehfxc && ipol=2 --- src/nwdft/xc/xc_getvxc.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nwdft/xc/xc_getvxc.F b/src/nwdft/xc/xc_getvxc.F index 70c1813c78..356f016692 100644 --- a/src/nwdft/xc/xc_getvxc.F +++ b/src/nwdft/xc/xc_getvxc.F @@ -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 (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 From 328bab61f962714a364f4ffc53d581d493d7d8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edoardo=20Apr=C3=A0?= Date: Thu, 18 Aug 2022 00:20:57 -0700 Subject: [PATCH 5/5] adft fix --- src/nwdft/xc/xc_getvxc.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nwdft/xc/xc_getvxc.F b/src/nwdft/xc/xc_getvxc.F index 356f016692..2d56ffec8c 100644 --- a/src/nwdft/xc/xc_getvxc.F +++ b/src/nwdft/xc/xc_getvxc.F @@ -272,7 +272,7 @@ c ! matrices endif endif - if (CDFIT .and. (ipol.gt.1)) then + 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