Commit c02fe5f9 authored by giannozz's avatar giannozz

check_stop should not depend upon module input_parameters - first step

towards elimination


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13759 c92efa57-630b-4861-b058-cf58834340f0
parent 6de60f8a
......@@ -39,11 +39,11 @@ MODULE check_stop
! ... internal procedures
!
!-----------------------------------------------------------------------
!!!SUBROUTINE check_stop_init( max_seconds_ )
SUBROUTINE check_stop_init( )
SUBROUTINE check_stop_init( max_seconds_ )
!-----------------------------------------------------------------------
!
USE input_parameters, ONLY : max_seconds_ => max_seconds
! FIXME: following line to be removed
USE input_parameters, ONLY : max_second__ => max_seconds
USE io_global, ONLY : stdout
USE io_files, ONLY : prefix, exit_file
#if defined(__TRAP_SIGUSR1) || defined(__TERMINATE_GRACEFULLY)
......@@ -51,7 +51,7 @@ MODULE check_stop
#endif
!
IMPLICIT NONE
!!!INTEGER, INTENT(IN), OPTIONAL :: max_seconds_
REAL(dp), INTENT(IN), OPTIONAL :: max_seconds_
!
IF ( tinit ) &
WRITE( UNIT = stdout, &
......@@ -61,8 +61,11 @@ MODULE check_stop
!
exit_file = TRIM( prefix ) // '.EXIT'
!
IF ( max_seconds_ > 0.0_DP ) max_seconds = max_seconds_
!!! IF ( PRESENT(max_seconds_) ) max_seconds = max_seconds_
IF ( PRESENT(max_seconds_) ) THEN
max_seconds = max_seconds_
ELSE IF ( max_second__ > 0.0_dp ) THEN
max_seconds = max_second__
END IF
!
init_second = f_wall()
tinit = .TRUE.
......
......@@ -210,8 +210,9 @@ SUBROUTINE iosys()
USE read_pseudo_mod, ONLY : readpp
USE qmmm, ONLY : qmmm_config
USE qmmm, ONLY : qmmm_config
USE check_stop, ONLY : check_stop_init
!
! ... CONTROL namelist
!
......@@ -221,7 +222,7 @@ SUBROUTINE iosys()
pseudo_dir, disk_io, tefield, dipfield, lberry, &
gdir, nppstr, wf_collect,lelfield,lorbm,efield, &
nberrycyc, lkpoint_dir, efield_cart, lecrpa, &
vdw_table_name, memory, tqmmm, &
vdw_table_name, memory, tqmmm, max_seconds, &
efield_phase, gate
!
......@@ -294,9 +295,10 @@ SUBROUTINE iosys()
!
! ... CARDS
!
USE input_parameters, ONLY : k_points, xk, wk, nk1, nk2, nk3, &
k1, k2, k3, nkstot
USE input_parameters, ONLY : nconstr_inp, trd_ht, rd_ht, cell_units
USE input_parameters, ONLY : k_points, xk, wk, nk1, nk2, nk3, &
k1, k2, k3, nkstot
USE input_parameters, ONLY : nconstr_inp, trd_ht, rd_ht, cell_units
USE input_parameters, ONLY : deallocate_input_parameters
!
USE constraints_module, ONLY : init_constraint
USE read_namelists_module, ONLY : read_namelists, sm_not_set
......@@ -305,7 +307,6 @@ SUBROUTINE iosys()
USE tsvdw_module, ONLY : vdw_isolated, vdw_econv_thr
USE us, ONLY : spline_ps_ => spline_ps
!
USE input_parameters, ONLY : deallocate_input_parameters
USE wyckoff, ONLY : nattot, sup_spacegroup
USE qexsd_module, ONLY : qexsd_input_obj
USE qes_types_module, ONLY: input_type
......@@ -1614,6 +1615,8 @@ SUBROUTINE iosys()
CALL pw_init_qexsd_input(qexsd_input_obj, obj_tagname="input")
CALL deallocate_input_parameters ()
!
CALL check_stop_init ( max_seconds )
!
! ... Initialize temporary directory(-ies)
!
CALL check_tempdir ( tmp_dir, exst, parallelfs )
......
......@@ -12,7 +12,6 @@ SUBROUTINE run_driver ( srvaddress, exit_status )
!!
USE io_global, ONLY : stdout, ionode, ionode_id
USE parameters, ONLY : ntypx, npk, lmaxx
USE check_stop, ONLY : check_stop_init
USE mp_global, ONLY : mp_bcast, mp_global_end, intra_image_comm
USE control_flags, ONLY : gamma_only, conv_elec, istep, ethr, lscf, lmd
USE cellmd, ONLY : lmovecell
......@@ -70,8 +69,6 @@ SUBROUTINE run_driver ( srvaddress, exit_status )
!
CALL plugin_initialization()
!
CALL check_stop_init()
!
! ... We do a fake run so that the G vectors are initialized
! ... based on the pw input. This is needed to guarantee smooth energy
! ... upon PW restart in NPT runs. Probably can be done in a smarter way
......
......@@ -40,7 +40,7 @@ SUBROUTINE run_pwscf ( exit_status )
USE control_flags, ONLY : conv_ions, istep, nstep, restart, lmd, lbfgs
USE command_line_options, ONLY : command_line
USE force_mod, ONLY : lforce, lstres, sigma, force
USE check_stop, ONLY : check_stop_init, check_stop_now
USE check_stop, ONLY : check_stop_now
USE mp_images, ONLY : intra_image_comm
USE extrapolation, ONLY : update_file, update_pot
USE scf, ONLY : rho
......@@ -88,8 +88,6 @@ SUBROUTINE run_pwscf ( exit_status )
!
CALL plugin_initialization()
!
CALL check_stop_init()
!
CALL setup ()
!
CALL qmmm_update_positions()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment