mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 22:25:48 -04:00
MAINT: Add retries and delay to parameters
but these are now required... which isn't great
This commit is contained in:
parent
bce1e8cf3d
commit
859caaaad5
2 changed files with 28 additions and 5 deletions
|
|
@ -29,6 +29,7 @@ c
|
|||
double precision ascale, bscale, tscale, hscale
|
||||
logical ignore,diagh
|
||||
integer mh,ind
|
||||
integer max_retries,retry_delay
|
||||
|
||||
* **** external functions ****
|
||||
logical driver_parse_boolean
|
||||
|
|
@ -98,7 +99,7 @@ c
|
|||
$ mt_log,1,diagh))
|
||||
$ call errquit('driver_input: rtdb put failed',0, RTDB_ERR)
|
||||
c
|
||||
c socket ipi_client ip:port
|
||||
c socket ipi_client ip:port retries delay
|
||||
c
|
||||
else if (inp_compare(.false.,'socket', field)) then
|
||||
if (inp_a(f2)) then
|
||||
|
|
@ -114,6 +115,22 @@ c
|
|||
> ipname(1:ind)))
|
||||
> call errquit('driver_input: rtdb put failed',8,RTDB_ERR)
|
||||
end if
|
||||
|
||||
if (.not. inp_i(max_retries)) call errquit(
|
||||
& 'driver_input: failed to read retries integer', 0,
|
||||
& INPUT_ERR)
|
||||
if (.not. inp_i(retry_delay)) call errquit(
|
||||
& 'driver_input: failed to read delay float', 0,
|
||||
& INPUT_ERR)
|
||||
|
||||
if (.not. rtdb_put(rtdb,'driver:socket_retries',mt_int,1,
|
||||
& max_retries)) call errquit(
|
||||
& 'driver_input: rtdb put failed', 10, RTDB_ERR)
|
||||
|
||||
if (.not. rtdb_put(rtdb,'driver:socket_delay',mt_int,1,
|
||||
& retry_delay)) call errquit(
|
||||
& 'driver_input: rtdb put failed', 11, RTDB_ERR)
|
||||
|
||||
diagh = .true.
|
||||
if (.not. rtdb_put(rtdb,'driver:socket',
|
||||
$ mt_log,1,diagh))
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@
|
|||
integer rion(2),fion(2),nion,nion0
|
||||
real*8 unita(3,3),invunita(3,3),stress(3,3),energy
|
||||
real*8 cpu1,cpu2
|
||||
real*8 retry_delay_seconds
|
||||
integer max_retries
|
||||
integer max_retries, retry_delay_seconds
|
||||
|
||||
* **** external functions ****
|
||||
logical task_gradient
|
||||
|
|
@ -102,14 +101,21 @@
|
|||
|
||||
statebuffer(1:13) = "READY "
|
||||
|
||||
if (.not. rtdb_get(rtdb, 'driver:socket_retries', mt_int, 1,
|
||||
> max_retries)) then
|
||||
max_retries = 30
|
||||
end if
|
||||
if (.not. rtdb_get(rtdb, 'driver:socket_delay', mt_int, 1,
|
||||
> retry_delay_seconds)) then
|
||||
retry_delay_seconds = 2
|
||||
end if
|
||||
|
||||
if (taskid.eq.MASTER) then
|
||||
write(luout,*)
|
||||
write(luout,*) "== i-PI Socket Client Driver =="
|
||||
write(luout,'(" Connected to = ",A)') socket_ip
|
||||
write(luout,'(" Number of atoms =",I8)') nion
|
||||
write(luout,*)
|
||||
retry_delay_seconds = 2.0
|
||||
max_retries = 30
|
||||
call util_talker(ip,inet,ii-1,port,sock,max_retries,
|
||||
> retry_delay_seconds)
|
||||
write(luout,*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue