TABLE OF CONTENTS


ABINIT/initmpi_seq [ Functions ]

[ Top ] [ Functions ]

NAME

  initmpi_seq

FUNCTION

  Initializes the MPI information for a sequential use of other routines.

COPYRIGHT

  Copyright (C) 2004-2018 ABINIT group (XG)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .
  For the initials of contributors, see
  ~abinit/doc/developers/contributors.txt.

INPUTS

OUTPUT

  mpi_enreg=information about MPI parallelization

PARENTS

      atm2fft,bethe_salpeter,bsepostproc,calc_vhxc_me,cut3d,debug_tools
      dfpt_atm2fft,dfpt_nstpaw,dieltcel,eph,fftprof,ks_ddiago
      linear_optics_paw,m_cut3d,m_dvdb,m_fft,m_fft_prof,m_fftcore,m_gsphere
      m_hamiltonian,m_ioarr,m_kxc,m_mpinfo,m_pawpwij,m_ppmodel,m_screening
      m_wfd,m_wfk,mlwfovlp_qp,mrggkk,mrgscr,partial_dos_fractions,pawmknhat
      pawmknhat_psipsi,pawsushat,posdoppler,scfcv,screening,sigma,suscep_stat
      susk,suskmm,ujdet,vdw_kernelgen,wfk_analyze

CHILDREN

      nullify_mpi_enreg

SOURCE

 36 #if defined HAVE_CONFIG_H
 37 #include "config.h"
 38 #endif
 39 
 40 #include "abi_common.h"
 41 
 42 subroutine initmpi_seq(mpi_enreg)
 43 
 44  use defs_basis
 45  use defs_abitypes
 46  use m_xmpi
 47  use m_errors
 48  use m_profiling_abi
 49 
 50  use m_mpinfo, only : nullify_mpi_enreg
 51 
 52 !This section has been created automatically by the script Abilint (TD).
 53 !Do not modify the following lines by hand.
 54 #undef ABI_FUNC
 55 #define ABI_FUNC 'initmpi_seq'
 56 !End of the abilint section
 57 
 58  implicit none
 59 
 60 !Arguments ------------------------------------
 61  type(MPI_type),intent(out) :: mpi_enreg
 62 
 63 ! ***********************************************************************
 64 
 65  DBG_ENTER("COLL")
 66 
 67 !Set default seq values for scalars
 68  mpi_enreg%bandpp=1
 69  mpi_enreg%me=0
 70  mpi_enreg%me_band=0
 71  mpi_enreg%me_cell=0
 72  mpi_enreg%me_fft=0
 73  mpi_enreg%me_g0=1
 74  mpi_enreg%me_img=0
 75  mpi_enreg%me_hf=0
 76  mpi_enreg%me_kpt=0
 77  mpi_enreg%me_pert=0
 78  mpi_enreg%me_spinor=0
 79  mpi_enreg%me_wvl=0
 80  mpi_enreg%my_natom=0       ! Should be natom
 81  mpi_enreg%my_isppoltab=0   ! Should be (1,0) if nsppol=1 or (1,1) if nsppol=2
 82  mpi_enreg%ngfft3_ionic=1
 83  mpi_enreg%my_nimage=1
 84  mpi_enreg%nproc=1
 85  mpi_enreg%nproc_atom=1
 86  mpi_enreg%nproc_band=1
 87  mpi_enreg%nproc_cell=1
 88  mpi_enreg%nproc_fft=1
 89  mpi_enreg%nproc_img=1
 90  mpi_enreg%nproc_hf=1
 91  mpi_enreg%nproc_kpt=1
 92  mpi_enreg%nproc_pert=1
 93  mpi_enreg%nproc_spinor=1
 94  mpi_enreg%nproc_wvl=1
 95  mpi_enreg%paralbd=0
 96  mpi_enreg%paral_img=0
 97  mpi_enreg%paral_hf=0
 98  mpi_enreg%paral_kgb=0
 99  mpi_enreg%paral_pert=0
100  mpi_enreg%paral_spinor=0
101  mpi_enreg%pw_unbal_thresh=-1._dp
102 
103 !Set default seq values for communicators
104  mpi_enreg%comm_world          = xmpi_world
105  mpi_enreg%comm_atom           = xmpi_comm_self
106  mpi_enreg%comm_band           = xmpi_comm_self
107  mpi_enreg%comm_bandspinor     = xmpi_comm_self
108  mpi_enreg%comm_bandfft        = xmpi_comm_self
109  mpi_enreg%comm_bandspinorfft  = xmpi_comm_self
110  mpi_enreg%comm_cell           = xmpi_comm_self
111  mpi_enreg%comm_cell_pert      = xmpi_comm_self
112  mpi_enreg%comm_fft            = xmpi_comm_self
113  mpi_enreg%comm_hf             = xmpi_comm_self 
114  mpi_enreg%comm_img            = xmpi_comm_self 
115  mpi_enreg%comm_kpt            = xmpi_comm_self
116  mpi_enreg%comm_kptband        = xmpi_comm_self
117  mpi_enreg%comm_pert           = xmpi_comm_self
118  mpi_enreg%comm_spinor         = xmpi_comm_self
119  mpi_enreg%comm_spinorfft      = xmpi_comm_self
120  mpi_enreg%comm_wvl            = xmpi_comm_self
121 
122 !Nullify all pointers
123  call nullify_mpi_enreg(mpi_enreg)
124 
125 !Allocate and nullify distribfft datastructure
126 ! This is not good since distribfft is not initialized here (even with 0s). 
127 ! It can be dangerous if use with no care (Valgrind might complain)
128  ABI_DATATYPE_ALLOCATE(mpi_enreg%distribfft,)
129 
130  DBG_EXIT("COLL")
131 
132 end subroutine initmpi_seq