Commit 34781504 authored by ccavazzoni's avatar ccavazzoni

- more implicit world communicator clean-up


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent eabe3e24
......@@ -330,7 +330,7 @@ CONTAINS
file_p = .FALSE.
IF ( ionode ) INQUIRE( FILE = TRIM( mbfile ), EXIST = file_p )
call mp_bcast(file_p, ionode_id)
call mp_bcast(file_p, ionode_id,world_comm)
IF ( file_p ) THEN
......
......@@ -252,6 +252,7 @@ remainder.o : ../../Modules/constants.o
remainder.o : ../../Modules/io_global.o
remainder.o : ../../Modules/kind.o
remainder.o : ../../Modules/mp.o
remainder.o : ../../Modules/mp_world.o
remainder.o : basic_structures.o
remainder.o : compact_product.o
remainder.o : energies_gww.o
......
......@@ -20,6 +20,7 @@ SUBROUTINE remainder(options, qp)
USE polarization, ONLY : polaw,free_memory_polaw,read_polaw, initialize_polaw
USE compact_product
USE mp, ONLY : mp_sum, mp_bcast
USE mp_world, ONLY : world_comm
USE para_gww, ONLY : is_my_time, is_my_pola, is_my_state
USE energies_gww, ONLY : quasi_particles
USE constants, ONLY : RYTOEV
......@@ -239,6 +240,7 @@ SUBROUTINE addconduction_remainder(qp, options)
USE polarization, ONLY : polaw, free_memory_polaw, read_polaw, invert_v_pot, invert_ortho_polaw,&
& orthonormalize_inverse, orthonormalize_vpot_para
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE para_gww, ONLY : is_my_pola
USE energies_gww, ONLY : quasi_particles
......@@ -376,7 +378,7 @@ SUBROUTINE addconduction_remainder(qp, options)
enddo
deallocate(gf_t)
endif
call mp_bcast(sene, ionode_id)
call mp_bcast(sene, ionode_id, world_comm)
do ii=1,options%max_i-wup%nums_occ
qp%ene_remainder(ii+wup%nums_occ,1)=qp%ene_remainder(ii+wup%nums_occ,1)-0.5d0*dble(sene(ii))
write(*,*) 'REMAINDER CONDUCTION', ii, 0.5d0*sene(ii)
......@@ -407,6 +409,7 @@ SUBROUTINE addconduction_remainder(qp, options)
USE polarization, ONLY : polaw, free_memory_polaw, read_polaw, invert_v_pot, invert_ortho_polaw,&
& orthonormalize_inverse, write_polaw, orthonormalize_vpot
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE para_gww, ONLY : is_my_pola
......
......@@ -416,6 +416,7 @@ write_wannier_matrix.o : ../../Modules/io_files.o
write_wannier_matrix.o : ../../Modules/io_global.o
write_wannier_matrix.o : ../../Modules/kind.o
write_wannier_matrix.o : ../../Modules/mp.o
write_wannier_matrix.o : ../../Modules/mp_world.o
write_wannier_matrix.o : ../../PW/src/pwcom.o
write_wannier_matrix.o : wannier_gw.o
diago_cg.o : ../../include/f_defs.h
......
......@@ -99,6 +99,7 @@
USE io_global, ONLY : stdout,ionode,ionode_id
USE io_files, ONLY : prefix
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE lsda_mod, ONLY :nspin
implicit none
......@@ -130,7 +131,7 @@
do iw=1,nbnd
if(ionode) read(iunu) u_trans(1:nbnd,iw,is)
call mp_bcast(u_trans(1:nbnd,iw,is),ionode_id)
call mp_bcast(u_trans(1:nbnd,iw,is),ionode_id,world_comm)
enddo
enddo
if(ionode) close(iunu)
......
......@@ -177,6 +177,7 @@ CONTAINS
USE io_global, ONLY : ionode_id
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
IMPLICIT NONE
!
......@@ -190,7 +191,7 @@ CONTAINS
! if ierr < 0 errore writes the message but does not stop
ierr = -1
pause_p = .TRUE.
!call mp_bcast(pause_p, ionode_id)
!call mp_bcast(pause_p, ionode_id, world_comm)
ELSE
! if ierr > 0 it stops
ierr = 1
......@@ -216,6 +217,7 @@ CONTAINS
LOGICAL FUNCTION auto_check (ndr, outdir)
USE io_global, ONLY: ionode, ionode_id
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
IMPLICIT NONE
INTEGER, INTENT(IN) :: ndr ! I/O unit number
CHARACTER(LEN=*), INTENT(IN) :: outdir
......@@ -241,7 +243,7 @@ CONTAINS
auto_check = restart_p
END IF
CALL mp_bcast(auto_check, ionode_id)
CALL mp_bcast(auto_check, ionode_id, world_comm)
return
......@@ -311,6 +313,7 @@ CONTAINS
SUBROUTINE card_autopilot( input_line )
USE io_global, ONLY: ionode, ionode_id
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
IMPLICIT NONE
INTEGER :: i, j, linelen
CHARACTER(LEN=256) :: input_line
......@@ -761,6 +764,7 @@ CONTAINS
SUBROUTINE parse_mailbox ()
USE io_global, ONLY: ionode, ionode_id
USE mp, ONLY : mp_bcast, mp_barrier
USE mp_world, ONLY : world_comm
IMPLICIT NONE
INTEGER :: i
CHARACTER(LEN=256) :: input_line
......
......@@ -3,6 +3,7 @@ autopilot.o : input_parameters.o
autopilot.o : io_global.o
autopilot.o : kind.o
autopilot.o : mp.o
autopilot.o : mp_world.o
autopilot.o : parser.o
basic_algebra_routines.o : kind.o
becmod.o : control_flags.o
......@@ -139,8 +140,6 @@ mm_dispersion.o : mp_world.o
mp.o : io_global.o
mp.o : kind.o
mp.o : parallel_include.o
mp_atoms.o : mp.o
mp_atoms.o : parallel_include.o
mp_bands.o : mp.o
mp_bands.o : parallel_include.o
mp_base.o : kind.o
......@@ -260,6 +259,7 @@ read_xml.o : ../iotk/src/iotk_unit_interf.o
read_xml.o : input_parameters.o
read_xml.o : io_global.o
read_xml.o : mp.o
read_xml.o : mp_world.o
read_xml.o : read_namelists.o
read_xml.o : read_xml_cards.o
read_xml.o : read_xml_fields.o
......
This diff is collapsed.
......@@ -924,7 +924,7 @@ MODULE read_namelists_module
CALL mp_bcast( occupation_constraints, ionode_id, intra_image_comm )
!
! ... real space ...
CALL mp_bcast( real_space, ionode_id)
CALL mp_bcast( real_space, ionode_id, intra_image_comm )
CALL mp_bcast( adaptive_thr, ionode_id, intra_image_comm )
CALL mp_bcast( conv_thr_init, ionode_id, intra_image_comm )
CALL mp_bcast( conv_thr_multi, ionode_id, intra_image_comm )
......
......@@ -12,6 +12,7 @@ MODULE read_xml_module
!
USE io_global, ONLY : ionode, ionode_id, xmlinputunit => qestdin
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE iotk_module, ONLY : iotk_attlenx
!
! ...default and checkin of fields
......@@ -144,9 +145,9 @@ CONTAINS
!
! ... bcast the read attributes
!
CALL mp_bcast( calculation, ionode_id )
CALL mp_bcast( prefix, ionode_id )
CALL mp_bcast( title, ionode_id )
CALL mp_bcast( calculation, ionode_id, world_comm )
CALL mp_bcast( prefix, ionode_id, world_comm )
CALL mp_bcast( title, ionode_id, world_comm )
!
! ... fixing some default values using the calculation variable
......@@ -245,7 +246,7 @@ CONTAINS
ENDIF
ENDIF
!
CALL mp_bcast( found_al, ionode_id)
CALL mp_bcast( found_al, ionode_id, world_comm)
!
IF (found_al) THEN
CALL card_bcast( 'ATOMIC_LIST' )
......@@ -347,7 +348,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'CONSTRAINTS' )
!
......@@ -407,7 +408,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'OCCUPATIONS' )
!
......@@ -438,7 +439,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'CLIMBING_IMAGES' )
!
......@@ -558,7 +559,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'CONSTRAINTS' )
!
......@@ -588,7 +589,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'OCCUPATIONS' )
!
......@@ -619,7 +620,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'CLIMBING_IMAGES' )
!
......@@ -650,7 +651,7 @@ CONTAINS
!
END IF
!
CALL mp_bcast ( found, ionode_id )
CALL mp_bcast ( found, ionode_id, world_comm )
!
IF ( found ) CALL card_bcast( 'PLOT_WANNIER' )
!
......
......@@ -102,6 +102,7 @@ path_opt_routines.o : ../../Modules/constants.o
path_opt_routines.o : ../../Modules/io_global.o
path_opt_routines.o : ../../Modules/kind.o
path_opt_routines.o : ../../Modules/mp.o
path_opt_routines.o : ../../Modules/mp_world.o
path_opt_routines.o : path_io_units_module.o
path_opt_routines.o : path_variables.o
path_read_cards_module.o : ../../Modules/constants.o
......@@ -118,6 +119,7 @@ path_reparametrisation.o : ../../Modules/basic_algebra_routines.o
path_reparametrisation.o : ../../Modules/io_global.o
path_reparametrisation.o : ../../Modules/kind.o
path_reparametrisation.o : ../../Modules/mp.o
path_reparametrisation.o : ../../Modules/mp_world.o
path_reparametrisation.o : ../../Modules/splinelib.o
path_reparametrisation.o : path_io_units_module.o
path_reparametrisation.o : path_variables.o
......
......@@ -19,6 +19,7 @@ MODULE path_opt_routines
USE path_variables, ONLY : ds, pos, grad
USE io_global, ONLY : meta_ionode, meta_ionode_id
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
!
USE basic_algebra_routines
!
......@@ -46,7 +47,7 @@ MODULE path_opt_routines
!
END IF
!
CALL mp_bcast( pos, meta_ionode_id )
CALL mp_bcast( pos, meta_ionode_id, world_comm )
!
RETURN
!
......@@ -66,7 +67,7 @@ MODULE path_opt_routines
!
END IF
!
CALL mp_bcast( pos, meta_ionode_id )
CALL mp_bcast( pos, meta_ionode_id, world_comm )
!
RETURN
!
......@@ -128,8 +129,8 @@ MODULE path_opt_routines
!
END IF
!
CALL mp_bcast( pos, meta_ionode_id )
CALL mp_bcast( posold, meta_ionode_id )
CALL mp_bcast( pos, meta_ionode_id, world_comm )
CALL mp_bcast( posold, meta_ionode_id, world_comm )
!
RETURN
!
......@@ -294,7 +295,7 @@ MODULE path_opt_routines
!
END IF
!
CALL mp_bcast( pos, meta_ionode_id )
CALL mp_bcast( pos, meta_ionode_id, world_comm )
!
DEALLOCATE( t )
DEALLOCATE( g )
......@@ -488,7 +489,7 @@ MODULE path_opt_routines
!
! ... and distribute it
!
CALL mp_bcast( pos, meta_ionode_id )
CALL mp_bcast( pos, meta_ionode_id, world_comm )
!
DEALLOCATE( df, dx, f, x, f_last, x_last, mask )
!
......
......@@ -19,6 +19,7 @@ MODULE path_reparametrisation
USE path_io_units_module, ONLY : iunpath
USE io_global, ONLY : meta_ionode, meta_ionode_id
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
!
USE basic_algebra_routines
!
......@@ -82,7 +83,7 @@ MODULE path_reparametrisation
!
END IF
!
CALL mp_bcast( pos, meta_ionode_id )
CALL mp_bcast( pos, meta_ionode_id, world_comm )
!
RETURN
!
......
......@@ -17,6 +17,7 @@ program fd
USE mp_global, ONLY : mp_startup,mpime,kunit
USE environment,ONLY : environment_start
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE cell_base, ONLY : tpiba2, alat,omega, at, bg, ibrav, celldm
USE ions_base, ONLY : amass, nat, atm, zv, tau, ntyp => nsp, ityp
USE kinds, ONLY : dp
......@@ -106,9 +107,9 @@ program fd
call system('mkdir '//trim(fd_outfile_dir))
endif
CALL mp_bcast( outdir, ionode_id )
CALL mp_bcast( tmp_dir, ionode_id )
CALL mp_bcast( prefix, ionode_id )
CALL mp_bcast( outdir, ionode_id, world_comm )
CALL mp_bcast( tmp_dir, ionode_id, world_comm )
CALL mp_bcast( prefix, ionode_id, world_comm )
!reading the xml file
call read_file
......
......@@ -8,6 +8,7 @@ fd.o : ../../Modules/ions_base.o
fd.o : ../../Modules/kind.o
fd.o : ../../Modules/mp.o
fd.o : ../../Modules/mp_global.o
fd.o : ../../Modules/mp_world.o
fd.o : ../../Modules/recvec.o
fd.o : ../../PW/src/pwcom.o
fd.o : ../../PW/src/symm_base.o
......
......@@ -523,6 +523,7 @@ pw_export.o : ../../Modules/kind.o
pw_export.o : ../../Modules/mp.o
pw_export.o : ../../Modules/mp_global.o
pw_export.o : ../../Modules/mp_wave.o
pw_export.o : ../../Modules/mp_world.o
pw_export.o : ../../Modules/parameters.o
pw_export.o : ../../Modules/uspp.o
pw_export.o : ../../Modules/version.o
......@@ -624,6 +625,7 @@ wfck2r.o : ../../Modules/io_global.o
wfck2r.o : ../../Modules/kind.o
wfck2r.o : ../../Modules/mp.o
wfck2r.o : ../../Modules/mp_global.o
wfck2r.o : ../../Modules/mp_world.o
wfck2r.o : ../../Modules/noncol.o
wfck2r.o : ../../Modules/recvec.o
wfck2r.o : ../../Modules/wavefunctions.o
......
......@@ -868,7 +868,7 @@ SUBROUTINE write_wfng ( output_file_name, real_or_complex, symm_type, &
igwx = MAXVAL ( igwf_l2g ( 1 : local_pw ) )
CALL mp_max ( igwx, intra_pool_comm )
IF ( ipsour .NE. ionode_id ) &
CALL mp_get ( igwx, igwx, mpime, ionode_id, ipsour, 1 )
CALL mp_get ( igwx, igwx, mpime, ionode_id, ipsour, 1, world_comm )
ierr = 0
IF ( ik .GE. iks .AND. ik .LE. ike .AND. igwx .NE. ngk_g ( ik ) ) &
ierr = 1
......@@ -2728,7 +2728,7 @@ SUBROUTINE write_vkbg (output_file_name, symm_type, wfng_kgrid, &
igwx = MAXVAL ( igwf_l2g ( 1 : local_pw ) )
CALL mp_max ( igwx, intra_pool_comm )
IF ( ipsour .NE. ionode_id ) &
CALL mp_get ( igwx, igwx, mpime, ionode_id, ipsour, 1 )
CALL mp_get ( igwx, igwx, mpime, ionode_id, ipsour, 1, world_comm )
ierr = 0
IF ( ik .GE. iks .AND. ik .LE. ike .AND. igwx .NE. ngk_g ( ik ) ) &
ierr = 1
......
......@@ -42,9 +42,10 @@
ik, nk, kunit, ispin, nspin, scal, wf0, t0, wfm, tm, ngw, gamma_only, nbnd, igl, ngwl )
!
USE mp_wave
USE mp, ONLY: mp_sum, mp_get, mp_bcast, mp_max
USE mp, ONLY: mp_sum, mp_get, mp_max
USE mp_global, ONLY: mpime, nproc, root, me_pool, my_pool_id, &
nproc_pool, intra_pool_comm, root_pool, world_comm
nproc_pool, intra_pool_comm, root_pool
USE mp_world, ONLY: world_comm
USE io_global, ONLY: ionode, ionode_id
USE iotk_module
!
......@@ -141,7 +142,7 @@
CALL errore(' write_restart_wfc ',' wrong size ngl ', ierr )
IF( ipsour /= ionode_id ) THEN
CALL mp_get( igwx, igwx, mpime, ionode_id, ipsour, 1 )
CALL mp_get( igwx, igwx, mpime, ionode_id, ipsour, 1, world_comm )
ENDIF
IF(ionode) THEN
......@@ -219,7 +220,6 @@
SUBROUTINE write_restart_wfc2(iuni, nbnd)
USE io_global, ONLY: ionode, ionode_id
USE mp, ONLY: mp_bcast
IMPLICIT NONE
INTEGER, INTENT(in) :: iuni, nbnd
LOGICAL :: twrite = .false.
......@@ -276,6 +276,7 @@ PROGRAM pw_export
USE iotk_module
USE mp_global, ONLY : mp_startup, mpime, kunit
USE mp, ONLY: mp_bcast
USE mp_world, ONLY: world_comm
USE environment, ONLY : environment_start
!
IMPLICIT NONE
......@@ -332,16 +333,16 @@ PROGRAM pw_export
! ... Broadcasting variables
!
tmp_dir = trimcheck( outdir )
CALL mp_bcast( outdir, ionode_id )
CALL mp_bcast( tmp_dir, ionode_id )
CALL mp_bcast( prefix, ionode_id )
CALL mp_bcast( pp_file, ionode_id )
CALL mp_bcast( uspp_spsi, ionode_id )
CALL mp_bcast( ascii, ionode_id )
CALL mp_bcast( single_file, ionode_id )
CALL mp_bcast( raw, ionode_id )
CALL mp_bcast( pseudo_dir, ionode_id )
CALL mp_bcast( psfile, ionode_id )
CALL mp_bcast( outdir, ionode_id, world_comm )
CALL mp_bcast( tmp_dir, ionode_id, world_comm )
CALL mp_bcast( prefix, ionode_id, world_comm )
CALL mp_bcast( pp_file, ionode_id, world_comm )
CALL mp_bcast( uspp_spsi, ionode_id, world_comm )
CALL mp_bcast( ascii, ionode_id, world_comm )
CALL mp_bcast( single_file, ionode_id, world_comm )
CALL mp_bcast( raw, ionode_id, world_comm )
CALL mp_bcast( pseudo_dir, ionode_id, world_comm )
CALL mp_bcast( psfile, ionode_id, world_comm )
!
......
......@@ -26,6 +26,7 @@ PROGRAM wfck2r
USE klist, ONLY : xk , nks
USE io_global, ONLY : ionode, ionode_id, stdout
USE mp, ONLY : mp_bcast, mp_barrier
USE mp_world, ONLY : world_comm
USE wavefunctions_module, ONLY : evc
USE io_files, ONLY : nwordwfc, iunwfc
USE gvect, ONLY : ngm, g
......@@ -76,8 +77,8 @@ PROGRAM wfck2r
! ... Broadcast variables
!
CALL mp_bcast( tmp_dir, ionode_id )
CALL mp_bcast( prefix, ionode_id )
CALL mp_bcast( tmp_dir, ionode_id, world_comm )
CALL mp_bcast( prefix, ionode_id, world_comm )
!
! Now allocate space for pwscf variables, read and check them.
......
......@@ -803,7 +803,7 @@ CONTAINS
do proc_i = 1, nproc-1
call mp_get(phi, phi, mpime, 0, proc_i, 0)
call mp_get(phi, phi, mpime, 0, proc_i, 0, world_comm)
if (ionode) then
......@@ -835,7 +835,7 @@ CONTAINS
do proc_i = 1, nproc-1
call mp_get(d2phi_dk2, d2phi_dk2, mpime, 0, proc_i, 0)
call mp_get(d2phi_dk2, d2phi_dk2, mpime, 0, proc_i, 0, world_comm)
if (mpime == 0) then
......
......@@ -40,7 +40,8 @@ SUBROUTINE lr_readin
USE control_flags, ONLY : tqr, twfcollect, ethr
USE iotk_module
USE charg_resp, ONLY : w_T_prefix, omeg, w_T_npol, epsil
USE mp, ONLY : mp_bcast,mp_barrier
USE mp, ONLY : mp_bcast
USE mp_world, ONLY : world_comm
USE mp_global, ONLY : my_pool_id, intra_image_comm, &
& intra_bgrp_comm, nproc_image, &
& nproc_pool, nproc_pool_file, &
......@@ -213,7 +214,7 @@ SUBROUTINE lr_readin
ENDIF
!
CALL bcast_lr_input
CALL mp_bcast(auto_rs, ionode_id)
CALL mp_bcast(auto_rs, ionode_id, world_comm)
#endif
!
current_k = 1 ! Required for restart runs as this never gets initalised
......
......@@ -291,6 +291,7 @@ lr_readin.o : ../../Modules/io_global.o
lr_readin.o : ../../Modules/kind.o
lr_readin.o : ../../Modules/mp.o
lr_readin.o : ../../Modules/mp_global.o
lr_readin.o : ../../Modules/mp_world.o
lr_readin.o : ../../Modules/paw_variables.o
lr_readin.o : ../../Modules/recvec.o
lr_readin.o : ../../Modules/uspp.o
......
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