[QE-developers] on parallel HDF5 in QE

H. Lee hjunlee at gmail.com
Wed Feb 26 21:01:42 CET 2020


Dear developers:

I have one simple question about the parallel HDF5 in QE.

Regarding HDF5, the User’s Guide for Quantum ESPRESSO(v.6.5) reads the
following:

...
It is possible to use a library with disabled parallelism, but one has to
add manually the flag
-D__HDF5_SERIAL to the MANUAL_DFLAGS in the make.inc file.
...

I understood that the above indicates that QE can use parallel HDF5, but
can also use serial HDF5.

However, after checking source codes, QE seems not to exploit parallel HDF5
in any places; it seems to me that all "read and write" using HDF5 are done
in only one rank and we should gather (merge) or scatter (split) data
before reading and writing.
That is, I understand that the current QE doesn't exploit parallel HDF5.

Do I understand correctly?

For your info, I attached below some part of the subroutine write_wfc.

Sincerely,

Hyungjun Lee

...
      me_in_group     = mp_rank( intra_group_comm )
      nproc_in_group  = mp_size( intra_group_comm )
      ionode_in_group = ( me_in_group == root_in_group )
      !



      igwx = MAXVAL( igl(1:ngwl) )
      CALL mp_max( igwx, intra_group_comm )
      npol = 1
      IF ( nspin == 4 ) npol = 2
      npwx = SIZE( wfc, 1 ) / npol
      !



      IF ( ionode_in_group ) THEN
#if defined  __HDF5
         CALL qeh5_openfile(h5file, TRIM(filename)//'.hdf5',action =
'write')
         CALL qeh5_add_attribute( h5file%id, "ik", ik )
         CALL qeh5_add_attribute( h5file%id, "xk", xk, 1, [3])
         CALL qeh5_add_attribute( h5file%id, "ispin", ispin )
         IF (gamma_only) THEN
            CALL qeh5_add_attribute(h5file%id, "gamma_only", ".TRUE.")
         ELSE
            CALL qeh5_add_attribute( h5file%id, "gamma_only", ".FALSE." )
         END IF
         CALL qeh5_add_attribute( h5file%id, "scale_factor", scalef )
         CALL qeh5_add_attribute( h5file%id, "ngw", ngw )
         CALL qeh5_add_attribute( h5file%id, "igwx", igwx )
         CALL qeh5_add_attribute( h5file%id, "npol", npol )
         CALL qeh5_add_attribute( h5file%id, "nbnd", nbnd )
#else
         OPEN ( UNIT = iuni, FILE = TRIM(filename)//'.dat', &
              FORM='unformatted', STATUS = 'unknown' )
         WRITE(iuni) ik, xk, ispin, gamma_only, scalef
         WRITE(iuni) ngw, igwx, npol, nbnd
#endif
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20200226/38027450/attachment.html>


More information about the developers mailing list