Skip to content

Commit

Permalink
Merge pull request dftbplus#1403 from bhourahine/trimWorkAround
Browse files Browse the repository at this point in the history
Works around trim(char( in inquire
  • Loading branch information
bhourahine authored Mar 6, 2024
2 parents 572c6fb + 55c0eab commit 8f9f775
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/phonons/initphonons.F90
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,6 @@ subroutine readMasses(value, geo, speciesMass)
type(fnode), pointer :: child, child2
type(string) :: modif
integer :: iSp
character(lc) :: strTmp
real(dp) :: mass, defmass

write(stdOut, "(/, A)") "set atomic masses as IUPAC defaults ..."
Expand Down Expand Up @@ -979,10 +978,13 @@ subroutine readDftbHessian(child)
type(fnode), pointer :: child2
type(string) :: filename
logical :: texist
character(lc) :: strTmp

call getChildValue(child, "Filename", filename, "hessian.out")

inquire(file=trim(char(filename)), exist=texist )
! workaround for NAG7.1 Build 7148 in Debug build
strTmp = char(filename)
inquire(file=strTmp, exist=texist )
if (texist) then
write(stdOut, "(/, A)") "read dftb hessian '"//trim(char(filename))//"'..."
else
Expand Down Expand Up @@ -1062,12 +1064,15 @@ subroutine readCp2kHessian(child)
integer :: n, j1, j2, p, q
type(string) :: filename
logical :: texist
character(lc) :: strTmp

nDerivs = 3 * nMovedAtom
allocate(dynMatrix(nDerivs,nDerivs))

call getChildValue(child, "Filename", filename, "hessian.cp2k")
inquire(file=trim(char(filename)), exist=texist )
! workaround for NAG7.1 Build 7148 in Debug build
strTmp = char(filename)
inquire(file=strTmp, exist=texist )
if (texist) then
write(stdOut, "(/, A)") "read cp2k hessian '"//trim(char(filename))//"'..."
else
Expand Down

0 comments on commit 8f9f775

Please sign in to comment.