Skip to content

Commit

Permalink
Fix caching logic in Turbomole calculator (#448)
Browse files Browse the repository at this point in the history
- install meson from PyPI to avoid broken 0.57.x release from MSYS2
  • Loading branch information
awvwgk authored Mar 2, 2021
1 parent 943f424 commit f6b888f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/fortran-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ jobs:
mingw-w64-${{ matrix.arch }}-gcc-fortran
mingw-w64-${{ matrix.arch }}-openblas
mingw-w64-${{ matrix.arch }}-lapack
mingw-w64-${{ matrix.arch }}-meson
mingw-w64-${{ matrix.arch }}-python
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-ninja
- name: Install meson
run: pip install meson==0.56

- name: Configure build
run: meson setup ${{ env.BUILD_DIR }} -Dla_backend=netlib --warnlevel=0
env:
Expand Down
6 changes: 3 additions & 3 deletions src/extern/turbomole.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ subroutine external_turbomole(n,at,xyz,nel,nopen,grd,eel,g,dip,lsolv)
inquire(file='gradient', exist=exist)
if (exist .and. grd) then
call rdtm(n,grd,eel,g,xyz_cached)
cache = any(abs(xyz_cached - xyz) < 1.e-10_wp)
cache = all(abs(xyz_cached - xyz) < 1.e-10_wp)
end if
if (.not.cache) then
call wrtm(n,at,xyz)
Expand All @@ -60,7 +60,7 @@ subroutine external_turbomole(n,at,xyz,nel,nopen,grd,eel,g,dip,lsolv)
inquire(file='gradient', exist=exist)
if (exist .and. grd) then
call rdtm(n,grd,eel,g,xyz_cached)
cache = any(abs(xyz_cached - xyz) < 1.e-10_wp)
cache = all(abs(xyz_cached - xyz) < 1.e-10_wp)
end if
if (.not.cache) then
call wrtm(n,at,xyz)
Expand All @@ -83,7 +83,7 @@ subroutine external_turbomole(n,at,xyz,nel,nopen,grd,eel,g,dip,lsolv)
inquire(file='gradient', exist=exist)
if (exist .and. grd) then
call rdtm(n,grd,eel,g,xyz_cached)
cache = any(abs(xyz_cached - xyz) < 1.e-10_wp)
cache = all(abs(xyz_cached - xyz) < 1.e-10_wp)
end if
if (.not.cache) then
call wrtm(n,at,xyz)
Expand Down

0 comments on commit f6b888f

Please # to comment.