Skip to content

Commit 95163db

Browse files
authored
circumvent segfault due to optional arg in gcc build (#318)
2 parents bf4e605 + f318b4f commit 95163db

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/legacy_algos/protonate.f90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ end subroutine protonate
210210
!--------------------------------------------------------------------------------------------
211211
! A quick single point xtb calculation and calculate LMOs
212212
!--------------------------------------------------------------------------------------------
213-
subroutine xtblmo(env,print)
213+
subroutine xtblmo(env,pr)
214214
use crest_parameters
215215
use iomod
216216
use crest_data
@@ -220,7 +220,7 @@ subroutine xtblmo(env,print)
220220
character(len=:),allocatable :: jobcall
221221
integer :: io,T,Tn
222222
character(len=*),parameter :: pipe = ' > xtb.out 2>/dev/null'
223-
logical, optional :: print ! leave the xtb.out file (e.g. for msreact mode)
223+
logical, optional :: pr ! leave the xtb.out file (e.g. for msreact mode)
224224

225225
!---- setting threads
226226
call new_ompautoset(env,'auto',1,T,Tn)
@@ -241,7 +241,9 @@ subroutine xtblmo(env,print)
241241

242242
!---- cleanup
243243
call remove(fname)
244-
if (.not. print) call remove('xtb.out')
244+
if(present(pr))then
245+
if (.not. pr) call rmrf('xtb.out')
246+
endif
245247
call remove('energy')
246248
call remove('charges')
247249
call remove('xtbrestart')

src/legacy_algos/tautomerize.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ subroutine protsmall(env,prot,tim)
227227
call getcwd(thispath)
228228
!--- do the xTB calculation for the LMOs
229229
call tim%start(1,'LMO calc.')
230-
call xtblmo(env)
230+
call xtblmo(env,.true.)
231231
call tim%stop(1)
232232
inquire (file='coordprot.0',exist=ex)
233233
if (.not.ex) then

0 commit comments

Comments
 (0)