mirror of https://gitlab.com/QEF/q-e.git
io part of parallelization on images moved to image_io_routines. First step
for NEB cleaning. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6974 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
22842ec988
commit
c673310ef8
|
@ -17,13 +17,14 @@ SUBROUTINE neb_loop( )
|
|||
!
|
||||
USE path_base, ONLY : initialize_path, search_mep
|
||||
USE path_routines, ONLY : iosys_path
|
||||
USE path_io_routines, ONLY : io_path_start, io_path_stop, path_summary
|
||||
USE path_io_routines, ONLY : path_summary
|
||||
USE image_io_routines, ONLY : io_image_start, io_image_stop
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
CALL iosys_path()
|
||||
!
|
||||
CALL io_path_start()
|
||||
CALL io_image_start()
|
||||
!
|
||||
CALL initialize_path()
|
||||
!
|
||||
|
@ -31,7 +32,7 @@ SUBROUTINE neb_loop( )
|
|||
!
|
||||
CALL search_mep()
|
||||
!
|
||||
CALL io_path_stop()
|
||||
CALL io_image_stop()
|
||||
!
|
||||
RETURN
|
||||
!
|
||||
|
|
|
@ -553,6 +553,7 @@ ksstates.o : ../Modules/mp_global.o
|
|||
ksstates.o : ../Modules/recvec.o
|
||||
ksstates.o : ../Modules/xml_io_base.o
|
||||
ksstates.o : cp_interfaces.o
|
||||
main_loops.o : ../Modules/image_io_routines.o
|
||||
main_loops.o : ../Modules/ions_base.o
|
||||
main_loops.o : ../Modules/kind.o
|
||||
main_loops.o : ../Modules/path_base.o
|
||||
|
@ -864,11 +865,11 @@ spline.o : ../Modules/kind.o
|
|||
stop_run.o : ../Modules/constraints_module.o
|
||||
stop_run.o : ../Modules/control_flags.o
|
||||
stop_run.o : ../Modules/environment.o
|
||||
stop_run.o : ../Modules/image_io_routines.o
|
||||
stop_run.o : ../Modules/io_files.o
|
||||
stop_run.o : ../Modules/io_global.o
|
||||
stop_run.o : ../Modules/metadyn_vars.o
|
||||
stop_run.o : ../Modules/mp_global.o
|
||||
stop_run.o : ../Modules/path_io_routines.o
|
||||
stop_run.o : ../Modules/path_variables.o
|
||||
stop_run.o : ../Modules/recvec.o
|
||||
stress.o : ../Modules/cell_base.o
|
||||
|
|
|
@ -18,7 +18,7 @@ SUBROUTINE stop_run( flag )
|
|||
USE io_files, ONLY : prefix
|
||||
USE environment, ONLY : environment_end
|
||||
USE path_variables, ONLY : path_deallocation
|
||||
USE path_io_routines, ONLY : io_path_stop
|
||||
USE image_io_routines, ONLY : io_image_stop
|
||||
USE constraints_module, ONLY : deallocate_constraint
|
||||
USE metadyn_vars, ONLY : deallocate_metadyn_vars
|
||||
USE mp_global, ONLY : mp_global_end
|
||||
|
@ -32,7 +32,7 @@ SUBROUTINE stop_run( flag )
|
|||
!
|
||||
CALL environment_end( program_name )
|
||||
!
|
||||
IF ( lpath ) CALL io_path_stop()
|
||||
IF ( lpath ) CALL io_image_stop()
|
||||
!
|
||||
CALL deallocate_modules_var()
|
||||
!
|
||||
|
|
|
@ -30,6 +30,7 @@ fft_scalar.o \
|
|||
fft_types.o \
|
||||
funct.o \
|
||||
griddim.o \
|
||||
image_io_routines.o \
|
||||
input_parameters.o \
|
||||
io_files.o \
|
||||
io_global.o \
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
!
|
||||
! Copyright (C) 2002-2006 Quantum ESPRESSO group
|
||||
! This file is distributed under the terms of the
|
||||
! GNU General Public License. See the file `License'
|
||||
! in the root directory of the present distribution,
|
||||
! or http://www.gnu.org/copyleft/gpl.txt .
|
||||
!
|
||||
!
|
||||
!----------------------------------------------------------------------------
|
||||
MODULE image_io_routines
|
||||
!----------------------------------------------------------------------------
|
||||
!
|
||||
! ... This module contains all subroutines used for I/O in image
|
||||
! ... parallelization
|
||||
!
|
||||
! ... from the orignal path_io Written by Carlo Sbraccia ( 2003-2006 )
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE io_global, ONLY : meta_ionode, meta_ionode_id
|
||||
USE mp, ONLY : mp_bcast
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
PRIVATE
|
||||
!
|
||||
PUBLIC :: io_image_start, io_image_stop
|
||||
!
|
||||
CONTAINS
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE io_image_start()
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
USE io_global, ONLY : stdout
|
||||
USE io_global, ONLY : ionode, ionode_id
|
||||
USE mp_global, ONLY : me_image, root_image
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
!
|
||||
! ... the I/O node is set again according to the number of parallel
|
||||
! ... images that have been required: for each parallel image there
|
||||
! ... is only one node that does I/O
|
||||
!
|
||||
ionode = ( me_image == root_image )
|
||||
ionode_id = root_image
|
||||
!
|
||||
! ... stdout is connected to a file ( different for each image )
|
||||
! ... via unit 117 ( only root_image performs I/O )
|
||||
!
|
||||
IF ( ionode ) stdout = 117
|
||||
!
|
||||
RETURN
|
||||
!
|
||||
END SUBROUTINE io_image_start
|
||||
!
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE io_image_stop()
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
USE io_global, ONLY : stdout, io_global_start
|
||||
USE mp_global, ONLY : mpime, root
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
!
|
||||
! ... the original I/O node is set again
|
||||
!
|
||||
CALL io_global_start( mpime, root )
|
||||
!
|
||||
! ... stdout is reconnected to standard output unit
|
||||
!
|
||||
stdout = 6
|
||||
!
|
||||
RETURN
|
||||
!
|
||||
END SUBROUTINE io_image_stop
|
||||
!
|
||||
END MODULE image_io_routines
|
|
@ -78,6 +78,10 @@ griddim.o : io_global.o
|
|||
griddim.o : kind.o
|
||||
griddim.o : mp.o
|
||||
griddim.o : mp_global.o
|
||||
image_io_routines.o : io_global.o
|
||||
image_io_routines.o : kind.o
|
||||
image_io_routines.o : mp.o
|
||||
image_io_routines.o : mp_global.o
|
||||
input_parameters.o : kind.o
|
||||
input_parameters.o : parameters.o
|
||||
input_parameters.o : wannier_new.o
|
||||
|
@ -270,6 +274,7 @@ wave_base.o : mp.o
|
|||
wave_base.o : mp_global.o
|
||||
wave_base.o : random_numbers.o
|
||||
wavefunctions.o : kind.o
|
||||
wrappers.o : io_global.o
|
||||
wrappers.o : kind.o
|
||||
write_upf_v2.o : ../iotk/src/iotk_module.o
|
||||
write_upf_v2.o : kind.o
|
||||
|
|
|
@ -26,63 +26,12 @@ MODULE path_io_routines
|
|||
!
|
||||
PRIVATE
|
||||
!
|
||||
PUBLIC :: io_path_start, io_path_stop
|
||||
PUBLIC :: path_summary
|
||||
PUBLIC :: read_restart
|
||||
PUBLIC :: write_restart, write_dat_files, write_output
|
||||
PUBLIC :: new_image_init, get_new_image, stop_other_images
|
||||
!
|
||||
CONTAINS
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE io_path_start()
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
USE io_global, ONLY : stdout
|
||||
USE io_global, ONLY : ionode, ionode_id
|
||||
USE mp_global, ONLY : me_image, root_image
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
!
|
||||
! ... the I/O node is set again according to the number of parallel
|
||||
! ... images that have been required: for each parallel image there
|
||||
! ... is only one node that does I/O
|
||||
!
|
||||
ionode = ( me_image == root_image )
|
||||
ionode_id = root_image
|
||||
!
|
||||
! ... stdout is connected to a file ( different for each image )
|
||||
! ... via unit 117 ( only root_image performs I/O )
|
||||
!
|
||||
IF ( ionode ) stdout = 117
|
||||
!
|
||||
RETURN
|
||||
!
|
||||
END SUBROUTINE io_path_start
|
||||
!
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE io_path_stop()
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
USE io_global, ONLY : stdout, io_global_start
|
||||
USE mp_global, ONLY : mpime, root
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
!
|
||||
! ... the original I/O node is set again
|
||||
!
|
||||
CALL io_global_start( mpime, root )
|
||||
!
|
||||
! ... stdout is reconnected to standard output unit
|
||||
!
|
||||
stdout = 6
|
||||
!
|
||||
RETURN
|
||||
!
|
||||
END SUBROUTINE io_path_stop
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE path_summary()
|
||||
|
|
|
@ -694,9 +694,9 @@ phescf.o : phcom.o
|
|||
phescf.o : ramanm.o
|
||||
phonon.o : ../Modules/check_stop.o
|
||||
phonon.o : ../Modules/environment.o
|
||||
phonon.o : ../Modules/image_io_routines.o
|
||||
phonon.o : ../Modules/io_global.o
|
||||
phonon.o : ../Modules/mp_global.o
|
||||
phonon.o : ../Modules/path_io_routines.o
|
||||
phonon.o : ph_restart.o
|
||||
phonon.o : phcom.o
|
||||
phonon.o : save_ph_input.o
|
||||
|
|
|
@ -47,7 +47,7 @@ PROGRAM phonon
|
|||
USE ph_restart, ONLY : ph_writefile, destroy_status_run
|
||||
USE save_ph, ONLY : clean_input_variables
|
||||
USE mp_global, ONLY: mp_startup, nimage
|
||||
USE path_io_routines, ONLY : io_path_start
|
||||
USE image_io_routines, ONLY : io_image_start
|
||||
USE environment, ONLY: environment_start
|
||||
|
||||
!
|
||||
|
@ -62,7 +62,7 @@ PROGRAM phonon
|
|||
!
|
||||
#ifdef __PARA
|
||||
CALL mp_startup ( )
|
||||
IF (nimage>1) CALL io_path_start()
|
||||
IF (nimage>1) CALL io_image_start()
|
||||
#endif
|
||||
CALL environment_start ( code )
|
||||
!
|
||||
|
|
|
@ -564,6 +564,7 @@ gen_us_dy.o : ../Modules/kind.o
|
|||
gen_us_dy.o : ../Modules/splinelib.o
|
||||
gen_us_dy.o : ../Modules/uspp.o
|
||||
gen_us_dy.o : pwcom.o
|
||||
gen_us_test.o : ../Modules/kind.o
|
||||
gen_us_vkb0.o : ../Modules/cell_base.o
|
||||
gen_us_vkb0.o : ../Modules/constants.o
|
||||
gen_us_vkb0.o : ../Modules/io_global.o
|
||||
|
@ -1029,6 +1030,7 @@ pwcom.o : ../Modules/recvec.o
|
|||
pwscf.o : ../Modules/check_stop.o
|
||||
pwscf.o : ../Modules/control_flags.o
|
||||
pwscf.o : ../Modules/environment.o
|
||||
pwscf.o : ../Modules/image_io_routines.o
|
||||
pwscf.o : ../Modules/io_global.o
|
||||
pwscf.o : ../Modules/mp_global.o
|
||||
pwscf.o : ../Modules/parameters.o
|
||||
|
@ -1092,6 +1094,7 @@ read_pseudo.o : ../Modules/read_uspp.o
|
|||
read_pseudo.o : ../Modules/upf.o
|
||||
read_pseudo.o : ../Modules/upf_to_internal.o
|
||||
read_pseudo.o : ../Modules/uspp.o
|
||||
read_pseudo.o : ../Modules/wrappers.o
|
||||
realus.o : ../Modules/atom.o
|
||||
realus.o : ../Modules/cell_base.o
|
||||
realus.o : ../Modules/constants.o
|
||||
|
@ -1297,13 +1300,13 @@ spinor.o : ../Modules/kind.o
|
|||
stop_run.o : ../Modules/constraints_module.o
|
||||
stop_run.o : ../Modules/control_flags.o
|
||||
stop_run.o : ../Modules/environment.o
|
||||
stop_run.o : ../Modules/image_io_routines.o
|
||||
stop_run.o : ../Modules/input_parameters.o
|
||||
stop_run.o : ../Modules/io_files.o
|
||||
stop_run.o : ../Modules/io_global.o
|
||||
stop_run.o : ../Modules/metadyn_vars.o
|
||||
stop_run.o : ../Modules/mm_dispersion.o
|
||||
stop_run.o : ../Modules/mp_global.o
|
||||
stop_run.o : ../Modules/path_io_routines.o
|
||||
stop_run.o : ../Modules/path_variables.o
|
||||
stop_run.o : buffers.o
|
||||
stop_run.o : pwcom.o
|
||||
|
|
|
@ -18,7 +18,8 @@ PROGRAM pwscf
|
|||
USE path_variables, ONLY : conv_path
|
||||
USE check_stop, ONLY : check_stop_init
|
||||
USE path_base, ONLY : initialize_path, search_mep
|
||||
USE path_io_routines, ONLY : io_path_start, path_summary
|
||||
USE path_io_routines, ONLY : path_summary
|
||||
USE image_io_routines, ONLY : io_image_start
|
||||
USE mp_global, ONLY : mp_startup
|
||||
#if defined(__MS2)
|
||||
USE ms2, ONLY : MS2_enabled, &
|
||||
|
@ -58,7 +59,7 @@ PROGRAM pwscf
|
|||
!
|
||||
IF ( lpath ) THEN
|
||||
!
|
||||
CALL io_path_start()
|
||||
CALL io_image_start()
|
||||
!
|
||||
CALL initialize_path()
|
||||
!
|
||||
|
|
|
@ -22,7 +22,7 @@ SUBROUTINE stop_run( flag )
|
|||
iunefieldp, iuntmp
|
||||
USE buffers, ONLY : close_buffer
|
||||
USE path_variables, ONLY : path_deallocation
|
||||
USE path_io_routines, ONLY : io_path_stop
|
||||
USE image_io_routines, ONLY : io_image_stop
|
||||
USE london_module, ONLY : dealloca_london
|
||||
USE constraints_module, ONLY : deallocate_constraint
|
||||
USE metadyn_vars, ONLY : deallocate_metadyn_vars
|
||||
|
@ -42,7 +42,7 @@ SUBROUTINE stop_run( flag )
|
|||
#endif
|
||||
IF ( flag2 ) THEN
|
||||
!
|
||||
CALL io_path_stop()
|
||||
CALL io_image_stop()
|
||||
!
|
||||
ELSE
|
||||
!
|
||||
|
|
|
@ -6,5 +6,8 @@ fft_stick.o : fftw.c
|
|||
fftw.o :
|
||||
fftw.o :
|
||||
indici.o : ../include/c_defs.h
|
||||
md5.o :
|
||||
md5_from_file.o : ../include/c_defs.h
|
||||
md5_from_file.o :
|
||||
memstat.o : ../include/c_defs.h
|
||||
stack.o : ../include/c_defs.h
|
||||
|
|
Loading…
Reference in New Issue