LCOV - code coverage report
Current view: top level - src/57_iovars - m_outvar_i_n.F90 (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 666 666
Test Date: 2026-11-09 20:57:54 Functions: 100.0 % 1 1
Branches: 86.4 % 1016 878

             Branch data     Line data    Source code
       1                 :             : !!****m* ABINIT/m_outvar_i_n
       2                 :             : !! NAME
       3                 :             : !!  m_outvar_i_n
       4                 :             : !!
       5                 :             : !! FUNCTION
       6                 :             : !!
       7                 :             : !! COPYRIGHT
       8                 :             : !!  Copyright (C) 1998-2026 ABINIT group (DCA, XG, GMR, MM)
       9                 :             : !!  This file is distributed under the terms of the
      10                 :             : !!  GNU General Public License, see ~abinit/COPYING
      11                 :             : !!  or http://www.gnu.org/copyleft/gpl.txt .
      12                 :             : !!
      13                 :             : !! SOURCE
      14                 :             : 
      15                 :             : #if defined HAVE_CONFIG_H
      16                 :             : #include "config.h"
      17                 :             : #endif
      18                 :             : 
      19                 :             : #include "abi_common.h"
      20                 :             : 
      21                 :             : module m_outvar_i_n
      22                 :             : 
      23                 :             :  use defs_basis
      24                 :             :  use m_errors
      25                 :             :  use m_abicore
      26                 :             :  use m_errors
      27                 :             :  use m_results_out
      28                 :             :  use m_errors
      29                 :             :  use m_dtset
      30                 :             : 
      31                 :             :  use m_parser,  only : prttagm, prttagm_images, ab_dimensions
      32                 :             : 
      33                 :             :  implicit none
      34                 :             : 
      35                 :             :  private
      36                 :             : !!***
      37                 :             : 
      38                 :             :  public :: outvar_i_n
      39                 :             : !!***
      40                 :             : 
      41                 :             : contains
      42                 :             : !!***
      43                 :             : 
      44                 :             : !!****f* ABINIT/outvar_i_n
      45                 :             : !! NAME
      46                 :             : !! outvar_i_n
      47                 :             : !!
      48                 :             : !! FUNCTION
      49                 :             : !! Echo variables between acell and natom (by alphabetic order) for the ABINIT code.
      50                 :             : !!
      51                 :             : !! INPUTS
      52                 :             : !!  dtsets(0:ndtset_alloc)=<type datafiles_type>contains all input variables
      53                 :             : !!  iout=unit number for echoed output
      54                 :             : !!  jdtset_(0:ndtset_alloc)=actual index of the dataset (equal to dtsets(:)%jdtset)
      55                 :             : !!  marr=maximum number of numbers in an array (might need to be increased ... !)
      56                 :             : !!  multivals= <type ab_dimensions>  either 0 or 1 , depending whether the
      57                 :             : !!     dimension has different values for different datasets
      58                 :             : !!  mxvals= <type ab_dimensions>
      59                 :             : !!     maximum size of some arrays along all datasets, including
      60                 :             : !!         lpawu      =maximal value of input lpawu for all the datasets
      61                 :             : !!         gw_nqlwl   =maximal value of input gw_nqlwl for all the datasets
      62                 :             : !!         mband      =maximum number of bands
      63                 :             : !!         natom      =maximal value of input natom for all the datasets
      64                 :             : !!         natpawu    =maximal value of number of atoms on which +U is applied for all the datasets
      65                 :             : !!         natsph     =maximal value of input natsph for all the datasets
      66                 :             : !!         natvshift  =maximal value of input natvshift for all the datasets
      67                 :             : !!         nconeq     =maximal value of input nconeq for all the datasets
      68                 :             : !!         nimage     =maximal value of input nimage for all the datasets
      69                 :             : !!         nkptgw     =maximal value of input nkptgw for all the datasets
      70                 :             : !!         nkpthf     =maximal value of input nkpthf for all the datasets
      71                 :             : !!         nkpt       =maximal value of input nkpt for all the datasets
      72                 :             : !!         nnos       =maximal value of input nnos for all the datasets
      73                 :             : !!         nqptdm     =maximal value of input nqptdm for all the datasets
      74                 :             : !!         nspinor    =maximal value of input nspinor for all the datasets
      75                 :             : !!         nsppol     =maximal value of input nsppol for all the datasets
      76                 :             : !!         nsym       =maximum number of symmetries
      77                 :             : !!         ntypat     =maximum number of type of atoms
      78                 :             : !!         nzchempot  =maximal value of input nzchempot for all the datasets
      79                 :             : !!  ndtset=number of datasets
      80                 :             : !!  ndtset_alloc=number of datasets, corrected for allocation of at least
      81                 :             : !!      one data set. Use for most dimensioned arrays.
      82                 :             : !!  npsp=number of pseudopotentials
      83                 :             : !!  nqptdm=the number of q vectors provided by the user to calculate DM in GW
      84                 :             : !!  prtvol_glob= if 0, minimal output volume, if 1, no restriction.
      85                 :             : !!  response_(0:ndtset_alloc)= 1 if response variables must be output, 0 otherwise,
      86                 :             : !!   for different datasets
      87                 :             : !!  results_out(0:ndtset_alloc)=<type results_out_type>contains the results
      88                 :             : !!   needed for outvars, including evolving variables
      89                 :             : !!
      90                 :             : !! OUTPUT
      91                 :             : !!
      92                 :             : !! NOTES
      93                 :             : !! Note that this routine is called only by the processor me==0 .
      94                 :             : !! In consequence, no use of message and wrtout routine.
      95                 :             : !! The lines of code needed to output the defaults are preserved
      96                 :             : !! (see last section of the routine, but are presently disabled)
      97                 :             : !!
      98                 :             : !! SOURCE
      99                 :             : 
     100                 :        4528 : subroutine outvar_i_n (dtsets,iout,&
     101                 :        4528 : & jdtset_,marr,multivals,mxvals,ncid,ndtset,ndtset_alloc,npsp,prtvol_glob,&
     102                 :        4528 : & response_,results_out,strimg)
     103                 :             : 
     104                 :             : !Arguments ------------------------------------
     105                 :             : !scalars
     106                 :             :  integer,intent(in) :: iout,marr,ndtset
     107                 :             :  integer,intent(in) :: ndtset_alloc,prtvol_glob,ncid,npsp
     108                 :             : !arrays
     109                 :             :  integer,intent(in) :: jdtset_(0:ndtset_alloc),response_(ndtset_alloc)
     110                 :             :  type(ab_dimensions),intent(in) :: multivals,mxvals
     111                 :             :  type(dataset_type),intent(in) :: dtsets(0:ndtset_alloc)
     112                 :             :  type(results_out_type),intent(in) :: results_out(0:ndtset_alloc)
     113                 :             :  character(len=8),intent(in) :: strimg(mxvals%nimage)
     114                 :             : 
     115                 :             : !Local variables-------------------------------
     116                 :             : !scalars
     117                 :             :  integer,parameter :: nkpt_max=50
     118                 :             :  integer :: allowed,allowed_sum,iatom,idtset,ii,iimage,ikpt,kptopt,narr
     119                 :             :  integer :: multival,multi_natfix,multi_natfixx,multi_natfixy,multi_natfixz
     120                 :             :  integer :: multi_atsph,multi_occopt
     121                 :             :  integer :: natfix,natfixx,natfixy,natfixz,natnd,natom
     122                 :             :  integer :: ndtset_kptopt,nimage,nqpt,nkpt_eff
     123                 :             :  integer :: ntypalch,ntypat,size1,size2,test_write,tnkpt
     124                 :             :  real(dp) :: kpoint
     125                 :             :  character(len=1) :: firstchar_gpu
     126                 :             : !arrays
     127                 :        4528 :  integer,allocatable :: iatfixio_(:,:),iatfixx_(:,:),iatfixy_(:,:)
     128                 :        4528 :  integer,allocatable :: iatfixz_(:,:),intarr(:,:),istwfk_2(:,:)
     129                 :        4528 :  integer,allocatable :: jdtset_kptopt(:),natfix_(:),natfixx_(:),natfixy_(:)
     130                 :        4528 :  integer,allocatable :: natfixz_(:)
     131                 :        4528 :  integer,allocatable :: narrm(:)
     132                 :        4528 :  integer,allocatable :: nimagem(:),prtimg(:,:)
     133                 :        4528 :  real(dp),allocatable :: dprarr(:,:),dprarr_images(:,:,:)
     134                 :             : 
     135                 :             : ! *************************************************************************
     136                 :             : 
     137                 :             : !###########################################################
     138                 :             : !### 01. Initial allocations and initialisations.
     139                 :             : 
     140                 :             :  DBG_ENTER("COLL")
     141                 :             : 
     142   [ -  +  +  -  :       18112 :  ABI_MALLOC(dprarr,(marr,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     143   [ -  +  +  -  :       22640 :  ABI_MALLOC(dprarr_images,(marr,mxvals%nimage,0:ndtset_alloc))
          -  +  +  -  -  
          +  +  -  +  -  
          +  -  -  +  -  
                      + ]
     144   [ -  +  +  -  :       18112 :  ABI_MALLOC(intarr,(marr,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     145   [ -  +  +  -  :       13584 :  ABI_MALLOC(narrm,(0:ndtset_alloc))
          +  -  +  -  -  
                +  -  + ]
     146   [ -  +  +  -  :        9056 :  ABI_MALLOC(nimagem,(0:ndtset_alloc))
             -  +  -  + ]
     147   [ -  +  +  -  :       18112 :  ABI_MALLOC(prtimg,(mxvals%nimage,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   +  - ]
     148                 :             : 
     149         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc
     150                 :       30002 :    nimagem(idtset)=dtsets(idtset)%nimage
     151                 :             :  end do
     152                 :             : 
     153                 :        4528 :  firstchar_gpu=' '
     154   [ +  +  -  + ]:       25474 :  if (maxval(dtsets(1:ndtset_alloc)%gpu_option)/=ABI_GPU_DISABLED) firstchar_gpu='-'
     155                 :             : 
     156                 :             : !if(multivals%natom==0)natom=dtsets(1)%natom
     157                 :        4528 :  natom=dtsets(1)%natom
     158                 :             : !if(multivals%nimage==0)nimage=dtsets(1)%nimage
     159                 :        4528 :  nimage=dtsets(1)%nimage
     160                 :             : !if(multivals%ntypalch==0)ntypalch=dtsets(1)%ntypalch
     161                 :        4528 :  ntypalch=dtsets(1)%ntypalch
     162                 :             : !if(multivals%ntypat==0)ntypat=dtsets(1)%ntypat
     163                 :        4528 :  ntypat=dtsets(1)%ntypat
     164                 :             : 
     165                 :        4528 :  natnd=dtsets(1)%natnd
     166                 :             : 
     167                 :             : !###########################################################
     168                 :             : !### 02. Specific treatment for partially fixed atoms. Also compute multi_occopt for nband
     169                 :             : 
     170                 :             : !Must treat separately the translation of iatfix from the internal
     171                 :             : !representation to the input/output representation
     172   [ -  +  +  -  :        9056 :  ABI_MALLOC(natfix_,(0:ndtset_alloc))
             -  +  -  + ]
     173   [ -  +  +  -  :       18112 :  ABI_MALLOC(iatfixio_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     174   [ -  +  +  -  :        9056 :  ABI_MALLOC(natfixx_,(0:ndtset_alloc))
             -  +  -  + ]
     175   [ -  +  +  -  :       13584 :  ABI_MALLOC(iatfixx_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  -  
                +  -  + ]
     176   [ -  +  +  -  :        9056 :  ABI_MALLOC(natfixy_,(0:ndtset_alloc))
             -  +  -  + ]
     177   [ -  +  +  -  :       13584 :  ABI_MALLOC(iatfixy_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  -  
                +  -  + ]
     178   [ -  +  +  -  :        9056 :  ABI_MALLOC(natfixz_,(0:ndtset_alloc))
             -  +  -  + ]
     179   [ -  +  +  -  :       13584 :  ABI_MALLOC(iatfixz_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  -  
                +  +  - ]
     180   [ +  +  +  +  :      199956 :  natfix_(0:ndtset_alloc)=0 ; iatfixio_(:,0:ndtset_alloc)=0
                   +  + ]
     181   [ +  +  +  +  :      199956 :  natfixx_(0:ndtset_alloc)=0 ; iatfixx_(:,0:ndtset_alloc)=0
                   +  + ]
     182   [ +  +  +  +  :      199956 :  natfixy_(0:ndtset_alloc)=0 ; iatfixy_(:,0:ndtset_alloc)=0
                   +  + ]
     183   [ +  +  +  +  :      199956 :  natfixz_(0:ndtset_alloc)=0 ; iatfixz_(:,0:ndtset_alloc)=0
                   +  + ]
     184                 :       25474 :  natfixx=-1; natfixy=-1; natfixz=-1;nimage=-1;
     185         [ +  + ]:       25474 :  do idtset=1,ndtset_alloc
     186                 :             : !  DEBUG
     187                 :             : !  write(std_out,*)' outvar_i_n : iatfix_ for idtset= ',idtset
     188                 :             : !  ENDDEBUG
     189         [ +  + ]:      116642 :    do iatom=1,dtsets(idtset)%natom
     190                 :             : !    First look whether the atom is fixed along the three directions
     191         [ +  + ]:       91168 :      if( dtsets(idtset)%iatfix(1,iatom)+ &
     192                 :             : &     dtsets(idtset)%iatfix(2,iatom)+ &
     193                 :       20946 : &     dtsets(idtset)%iatfix(3,iatom)   ==3 )then
     194                 :         344 :        natfix_(idtset)=natfix_(idtset)+1
     195                 :             : !      DEBUG
     196                 :             : !      write(std_out,*)' outvar_i_n: iatom,natfix_(idtset)=',iatom,natfix_(idtset)
     197                 :             : !      ENDDEBUG
     198                 :         344 :        iatfixio_(natfix_(idtset),idtset)=iatom
     199                 :             :      else
     200                 :             : !      Now examine each direction, one at a time
     201         [ +  + ]:       90824 :        if( dtsets(idtset)%iatfix(1,iatom) ==1)then
     202                 :          24 :          natfixx_(idtset)=natfixx_(idtset)+1
     203                 :          24 :          iatfixx_(natfixx_(idtset),idtset)=iatom
     204                 :             :        end if
     205         [ +  + ]:       90824 :        if( dtsets(idtset)%iatfix(2,iatom) ==1)then
     206                 :          24 :          natfixy_(idtset)=natfixy_(idtset)+1
     207                 :          24 :          iatfixy_(natfixy_(idtset),idtset)=iatom
     208                 :             :        end if
     209         [ +  + ]:       90824 :        if( dtsets(idtset)%iatfix(3,iatom) ==1)then
     210                 :          28 :          natfixz_(idtset)=natfixz_(idtset)+1
     211                 :          28 :          iatfixz_(natfixz_(idtset),idtset)=iatom
     212                 :             :        end if
     213                 :             :      end if
     214                 :             :    end do
     215                 :             : !  DEBUG
     216                 :             : !  write(std_out,*)' natfix ...'
     217                 :             : !  write(std_out,*)natfix_(idtset),natfixx_(idtset),natfixy_(idtset),natfixz_(idtset)
     218                 :             : !  ENDDEBUG
     219                 :             :  end do
     220                 :             : 
     221                 :        4528 :  multi_natfix=0
     222         [ +  + ]:        4528 :  if(ndtset_alloc>1)then
     223         [ +  + ]:       22554 :    do idtset=1,ndtset_alloc
     224         [ -  + ]:       22554 :      if(natfix_(1)/=natfix_(idtset))multi_natfix=1
     225                 :             :    end do
     226                 :             :  end if
     227         [ +  - ]:        4528 :  if(multi_natfix==0)natfix=natfix_(1)
     228                 :             : 
     229                 :        4528 :  multi_natfixx=0
     230         [ +  + ]:        4528 :  if(ndtset_alloc>1)then
     231         [ +  + ]:       22554 :    do idtset=1,ndtset_alloc
     232         [ +  + ]:       22554 :      if(natfixx_(1)/=natfixx_(idtset))multi_natfixx=1
     233                 :             :    end do
     234                 :             :  end if
     235         [ +  + ]:        4528 :  if(multi_natfixx==0)natfixx=natfixx_(1)
     236                 :             : 
     237                 :        4528 :  multi_natfixy=0
     238         [ +  + ]:        4528 :  if(ndtset_alloc>1)then
     239         [ +  + ]:       22554 :    do idtset=1,ndtset_alloc
     240         [ +  + ]:       22554 :      if(natfixy_(1)/=natfixy_(idtset))multi_natfixy=1
     241                 :             :    end do
     242                 :             :  end if
     243         [ +  + ]:        4528 :  if(multi_natfixy==0)natfixy=natfixy_(1)
     244                 :             : 
     245                 :        4528 :  multi_natfixz=0
     246         [ +  + ]:        4528 :  if(ndtset_alloc>1)then
     247         [ +  + ]:       22554 :    do idtset=1,ndtset_alloc
     248         [ +  + ]:       22554 :      if(natfixz_(1)/=natfixz_(idtset))multi_natfixz=1
     249                 :             :    end do
     250                 :             :  end if
     251         [ +  + ]:        4528 :  if(multi_natfixz==0)natfixz=natfixz_(1)
     252                 :             : 
     253                 :             : 
     254                 :        4528 :  multi_occopt=0
     255         [ +  + ]:        4528 :  if(ndtset_alloc>1)then
     256         [ +  + ]:       22554 :    do idtset=1,ndtset_alloc
     257         [ +  + ]:       22554 :      if(dtsets(1)%occopt/=dtsets(idtset)%occopt)multi_occopt=1
     258                 :             :    end do
     259                 :             :  end if
     260                 :             : 
     261                 :             : !write(ab_out,*)' outvar_i_n : I '
     262                 :             : !call flush(ab_out)
     263                 :             : !###########################################################
     264                 :             : !### 03. Print all the input variables (I)
     265                 :             : !##
     266                 :             : 
     267                 :             : !iatfix
     268                 :        4528 :  narr=natfix                    ! default size for all datasets
     269         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     270                 :       25474 :    narrm(idtset)=natfix_(idtset)
     271         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%natom
     272         [ +  + ]:       45564 :    intarr(1:narrm(idtset),idtset)=iatfixio_(1:narrm(idtset),idtset)
     273                 :             :  end do
     274                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     275                 :        4528 : & narrm,ncid,ndtset_alloc,'iatfix','INT',multi_natfix)
     276                 :             : 
     277                 :             : !iatfixx
     278                 :        4528 :  narr=natfixx                   ! default size for all datasets
     279         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     280                 :       25474 :    narrm(idtset)=natfixx_(idtset)
     281         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%natom
     282         [ +  + ]:       45244 :    intarr(1:narrm(idtset),idtset)=iatfixx_(1:narrm(idtset),idtset)
     283                 :             :  end do
     284                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     285                 :        4528 : & narrm,ncid,ndtset_alloc,'iatfixx','INT',multi_natfixx)
     286                 :             : 
     287                 :             : !iatfixy
     288                 :        4528 :  narr=natfixy                   ! default size for all datasets
     289         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     290                 :       25474 :    narrm(idtset)=natfixy_(idtset)
     291         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%natom
     292         [ +  + ]:       45244 :    intarr(1:narrm(idtset),idtset)=iatfixy_(1:narrm(idtset),idtset)
     293                 :             :  end do
     294                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     295                 :        4528 : & narrm,ncid,ndtset_alloc,'iatfixy','INT',multi_natfixy)
     296                 :             : 
     297                 :             : !iatfixz
     298                 :        4528 :  narr=natfixz                   ! default size for all datasets
     299         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     300                 :       25474 :    narrm(idtset)=natfixz_(idtset)
     301         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%natom
     302         [ +  + ]:       45248 :    intarr(1:narrm(idtset),idtset)=iatfixz_(1:narrm(idtset),idtset)
     303                 :             :  end do
     304                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     305                 :        4528 : & narrm,ncid,ndtset_alloc,'iatfixz','INT',multi_natfixz)
     306                 :             : 
     307                 :             : !iatnd
     308   [ +  +  +  + ]:    19931918 :  intarr = 0
     309                 :        4528 :  narr=natom ! default size for all datasets
     310         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     311                 :       25474 :    narrm(idtset)=dtsets(idtset)%natnd
     312         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%natom
     313         [ +  + ]:       45292 :    intarr(1:narrm(idtset),idtset)= dtsets(idtset)%iatnd(1:narrm(idtset))
     314                 :             :  end do
     315                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'iatnd','INT',multivals%natom)
     316                 :             : 
     317                 :             : !iatsph
     318                 :        4528 :  multi_atsph=1
     319                 :        4528 :  narr=dtsets(1)%natsph          ! default size for all datasets
     320         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     321                 :       25474 :    narrm(idtset)=dtsets(idtset)%natsph
     322         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%natsph
     323                 :             : !  Need to be printed only if there is some occurrence of prtdos==3 or pawfatbnd
     324         [ +  - ]:       25474 :    if (narrm(idtset)>0) then
     325         [ +  + ]:      131812 :      intarr(1:narrm(idtset),idtset)=dtsets(idtset)%iatsph(1:narrm(idtset))
     326                 :             :    end if
     327   [ +  +  +  + ]:       30002 :    if(dtsets(idtset)%prtdos==3.or.dtsets(idtset)%pawfatbnd>0)then
     328                 :          84 :      narrm(idtset)=dtsets(idtset)%natsph
     329                 :             :    else
     330                 :       25390 :      narrm(idtset)=0
     331                 :             :    end if
     332                 :             :  end do
     333   [ +  +  +  +  :       25474 :  if (ndtset_alloc==1.and.sum(narrm(1:ndtset_alloc))==1) multi_atsph=0
                   +  + ]
     334                 :             : 
     335                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     336                 :        4528 :               narrm,ncid,ndtset_alloc,'iatsph','INT',multi_atsph) ! Emulating the case of multiple narr
     337                 :             : 
     338         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%ibte_abs_tol
     339                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_abs_tol','DPR',0)
     340                 :             : 
     341         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%ibte_alpha_mix
     342                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_alpha_mix','DPR',0)
     343                 :             : 
     344         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ibte_niter
     345                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_niter','INT',0)
     346                 :             : 
     347         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ibte_prep
     348                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_prep','INT',0)
     349                 :             : 
     350         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%iboxcut
     351                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iboxcut','INT',0)
     352                 :             : 
     353         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%icoulomb
     354                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'icoulomb','INT',0)
     355                 :             : 
     356         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%icutcoul
     357                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'icutcoul','INT',0)
     358                 :             : 
     359         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ieig2rf
     360                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ieig2rf','INT',0)
     361                 :             : 
     362         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%imgmov
     363                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'imgmov','INT',0)
     364                 :             : 
     365         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%imgwfstor
     366                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'imgwfstor','INT',0)
     367                 :             : 
     368         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%inclvkb
     369                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'inclvkb','INT',0)
     370                 :             : 
     371         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%intxc
     372                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'intxc','INT',0)
     373                 :             : 
     374         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%invovl_blksliced
     375                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'invovl_blksliced',&
     376                 :        4528 : &             'INT',0,firstchar=firstchar_gpu)
     377                 :             : 
     378         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ionmov
     379                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ionmov','INT',0)
     380                 :             : 
     381         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%iprcel
     382                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iprcel','INT',0)
     383                 :             : 
     384         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%iprcfc
     385                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iprcfc','INT',0)
     386                 :             : 
     387         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irandom
     388                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irandom','INT',0)
     389                 :             : 
     390         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdbscoup
     391                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdbscoup','INT',0)
     392                 :             : 
     393         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdbseig
     394                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdbseig','INT',0)
     395                 :             : 
     396         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdbsreso
     397                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdbsreso','INT',0)
     398                 :             : 
     399         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdchkprdm
     400                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdchkprdm','INT',0)
     401                 :             : 
     402         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdddk
     403                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdddk','INT',0)
     404                 :             : 
     405         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irddelfd
     406                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddelfd','INT',0)
     407                 :             : 
     408         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irddkdk
     409                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddkdk','INT',0)
     410                 :             : 
     411         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irddkde
     412                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddkde','INT',0)
     413                 :             : 
     414         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdden
     415                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdden','INT',0)
     416                 :             : 
     417         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irddvdb
     418                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddvdb','INT',0)
     419                 :             : 
     420         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdefmas
     421                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdefmas','INT',0)
     422                 :             : 
     423         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdhaydock
     424                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdhaydock','INT',0)
     425                 :             : 
     426   [ +  +  +  +  :       29770 :  if (any(dtsets(:)%usekden==1)) then
                   +  + ]
     427         [ +  + ]:         412 :    intarr(1,:)=dtsets(:)%irdkden
     428                 :          84 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdkden','INT',0)
     429                 :             :  end if
     430                 :             : 
     431         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdpawden
     432                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdpawden','INT',0)
     433                 :             : 
     434         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdqps
     435                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdqps','INT',0)
     436                 :             : 
     437         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdscr
     438                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdscr','INT',0)
     439                 :             : 
     440         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdsuscep
     441                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdsuscep','INT',0)
     442                 :             : 
     443         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdvdw
     444                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdvdw','INT',0)
     445                 :             : 
     446         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdwfk
     447                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfk','INT',0)
     448                 :             : 
     449         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdwfkfine
     450                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfkfine','INT',0)
     451                 :             : 
     452         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdwfmq
     453                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfmq','INT',0)
     454                 :             : 
     455         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%irdwfq
     456                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfq','INT',0)
     457                 :             : 
     458         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ird1den
     459                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ird1den','INT',0)
     460                 :             : 
     461         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ird1wf
     462                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ird1wf','INT',0)
     463                 :             : 
     464         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%iscf
     465                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iscf','INT',0)
     466                 :             : 
     467         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%isecur
     468                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'isecur','INT',0)
     469                 :             : 
     470         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%istatimg
     471                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'istatimg','INT',0)
     472                 :             : 
     473         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%istatr
     474                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'istatr','INT',0)
     475                 :             : 
     476         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%istatshft
     477                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'istatshft','INT',0)
     478                 :             : 
     479         [ +  + ]:        4528 :  if (allocated(dtsets(0)%istwfk)) then
     480                 :             :    ! istwfk (must first restore the default istwf=0 for non-allowed k points)
     481   [ -  +  +  -  :       17760 :    ABI_MALLOC(istwfk_2,(mxvals%nkpt,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     482   [ +  +  +  + ]:      694198 :    istwfk_2=0;allowed_sum=0
     483         [ +  + ]:       25128 :    do idtset=1,ndtset_alloc
     484                 :       20688 :      nqpt=dtsets(idtset)%nqpt
     485         [ +  + ]:      376382 :      do ikpt=1,dtsets(idtset)%nkpt
     486                 :             :        allowed=1
     487         [ +  + ]:     1405016 :        do ii=1,3
     488                 :     1053762 :          kpoint=dtsets(idtset)%kpt(ii,ikpt)/dtsets(idtset)%kptnrm
     489   [ +  +  +  + ]:     1053762 :          if(nqpt/=0.and.response_(idtset)==0)kpoint=kpoint+dtsets(idtset)%qptn(ii)
     490   [ +  +  +  + ]:     1725462 :          if(abs(kpoint)>1.d-10.and.abs(kpoint-0.5_dp)>1.e-10_dp )allowed=0
     491                 :             :        end do
     492                 :             :        allowed_sum=allowed_sum+allowed
     493         [ +  + ]:      371942 :        if(allowed==1)istwfk_2(ikpt,idtset)=dtsets(idtset)%istwfk(ikpt)
     494                 :             :      end do
     495                 :             :    end do
     496                 :             : 
     497                 :             :    !istwfk
     498                 :       29568 :    tnkpt=0
     499   [ +  +  +  + ]:    18542424 :    intarr(1:marr,0:ndtset_alloc)=0 ! default value
     500         [ +  + ]:       25128 :    do idtset=1,ndtset_alloc
     501                 :       20688 :      nkpt_eff=dtsets(idtset)%nkpt
     502   [ +  +  +  + ]:       20688 :      if(prtvol_glob==0 .and. nkpt_eff>nkpt_max)then
     503                 :        1388 :        nkpt_eff=nkpt_max
     504                 :        1388 :        tnkpt=1
     505                 :             :      end if
     506   [ +  +  +  +  :      199362 :      if((multivals%nkpt/=0).and.(sum(istwfk_2(1:nkpt_eff,idtset))==0)) nkpt_eff=0
                   +  + ]
     507                 :       20688 :      narrm(idtset)=nkpt_eff
     508         [ +  + ]:      139566 :      intarr(1:narrm(idtset),idtset)=istwfk_2(1:narrm(idtset),idtset)
     509                 :             :    end do
     510                 :             : 
     511                 :        4440 :    call prttagm(dprarr,intarr,iout,jdtset_,1,marr,nkpt_eff,narrm,ncid,ndtset_alloc,'istwfk','INT',multivals%nkpt)
     512                 :             : 
     513   [ +  +  +  +  :      152068 :    if(tnkpt==1 .and. sum(istwfk_2(1:nkpt_eff,1:ndtset_alloc))/=0 ) &
                   +  + ]
     514                 :         110 :      write(iout,'(23x,a,i3,a)' ) 'outvar_i_n : Printing only first ',nkpt_max,' k-points.'
     515         [ -  + ]:        4440 :    ABI_FREE(istwfk_2)
     516                 :             :  end if
     517                 :             : 
     518                 :             : !ivalence
     519         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ivalence
     520                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ivalence','INT',0)
     521                 :             : 
     522                 :             : !ixc
     523         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ixc
     524                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixc','INT',0)
     525                 :             : 
     526                 :             : !ixcpositron
     527         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ixcpositron
     528                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixcpositron','INT',0)
     529                 :             : 
     530                 :             : !ixcrot
     531         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ixcrot
     532                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixcrot','INT',0)
     533                 :             : 
     534                 :             : !ixc_sigma
     535         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ixc_sigma
     536                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixc_sigma','INT',0)
     537                 :             : 
     538                 :             : !write(ab_out,*)' outvar_i_n : J '
     539                 :             : !call flush(ab_out)
     540                 :             : !###########################################################
     541                 :             : !### 03. Print all the input variables (J)
     542                 :             : !##
     543                 :             : 
     544         [ +  + ]:        4528 :  if (ndtset > 0) write(iout,"(1x,a16,1x,(t22,10i5))") 'jdtset',jdtset_(1:ndtset)
     545                 :             : 
     546         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%jellslab
     547                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'jellslab','INT',0)
     548                 :             : 
     549         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%jfielddir(1)
     550         [ +  + ]:       30002 :  intarr(2,:)=dtsets(:)%jfielddir(2)
     551         [ +  + ]:       30002 :  intarr(3,:)=dtsets(:)%jfielddir(3)
     552                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'jfielddir','INT',0)
     553                 :             : 
     554                 :             : !jpawu
     555   [ +  +  +  + ]:       56696 :  prtimg(:,:)=1
     556         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc
     557                 :       25474 :    narrm(idtset)=dtsets(idtset)%ntypat
     558         [ +  + ]:       25474 :    if (idtset==0) narrm(idtset)=mxvals%ntypat
     559         [ +  + ]:       56228 :    do iimage=1,nimagem(idtset)
     560         [ +  - ]:       51700 :      if (narrm(idtset)>0) then
     561         [ +  + ]:       59708 :        dprarr_images(1:narrm(idtset),iimage,idtset)=dtsets(idtset)%jpawu(1:narrm(idtset),iimage)
     562                 :             :      end if
     563                 :             :    end do
     564                 :             :  end do
     565                 :             :  call prttagm_images(dprarr_images,iout,jdtset_,1,marr,narrm,&
     566                 :        4528 : & ncid,ndtset_alloc,'jpawu','ENE',mxvals%nimage,nimagem,ndtset,prtimg,strimg)
     567                 :             : 
     568                 :             : 
     569                 :             : !write(ab_out,*)' outvar_i_n : K '
     570                 :             : !call flush(ab_out)
     571                 :             : !###########################################################
     572                 :             : !### 03. Print all the input variables (K)
     573                 :             : !##
     574                 :             : 
     575                 :             : !kberry
     576                 :        4528 :  narr=3*dtsets(1)%nberry ! default size for all datasets
     577         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     578         [ +  + ]:       30002 :    if(idtset/=0)then
     579                 :       20946 :      narrm(idtset)=3*dtsets(idtset)%nberry
     580         [ +  - ]:       20946 :      if (narrm(idtset)>0)&
     581         [ +  + ]:       41892 : &     intarr(1:narrm(idtset),idtset)= reshape(dtsets(idtset)%kberry(1:3,1:dtsets(idtset)%nberry), [narrm(idtset)] )
     582                 :             :    else
     583                 :        4528 :      narrm(idtset)=3*mxvals%nberry
     584         [ +  - ]:        4528 :      if (narrm(idtset)>0)&
     585         [ +  + ]:        9056 : &     intarr(1:narrm(idtset),idtset)=reshape(dtsets(idtset)%kberry(1:3,1:mxvals%nberry), [narrm(idtset)] )
     586                 :             :    end if
     587                 :             :  end do
     588                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'kberry','INT',multivals%nberry)
     589                 :             : 
     590                 :             :  ! kpt
     591         [ +  + ]:        4528 :  if (allocated(dtsets(0)%kpt)) then
     592                 :     4034238 :    tnkpt=0
     593         [ +  + ]:     4034238 :    dprarr(:,0)=0
     594                 :        4440 :    narr=3*dtsets(1)%nkpt            ! default size for all datasets
     595   [ +  +  +  + ]:        4440 :    if(prtvol_glob==0 .and. narr>3*nkpt_max)then
     596                 :         190 :      narr=3*nkpt_max
     597                 :         190 :      tnkpt=1
     598                 :             :    end if
     599                 :             : 
     600         [ +  + ]:       25128 :    do idtset=1,ndtset_alloc       ! specific size for each dataset
     601                 :       20688 :      narrm(idtset)=3*dtsets(idtset)%nkpt
     602         [ +  - ]:       20688 :      if (narrm(idtset)>0) then
     603         [ +  + ]:       41376 :        dprarr(1:narrm(idtset),idtset)=reshape(dtsets(idtset)%kpt(1:3,1:dtsets(idtset)%nkpt), [narrm(idtset)] )
     604                 :             :      end if
     605                 :             : 
     606   [ +  +  +  + ]:       25128 :      if(prtvol_glob==0 .and. narrm(idtset)>3*nkpt_max)then
     607                 :        1388 :        narrm(idtset)=3*nkpt_max
     608                 :        1388 :        tnkpt=1
     609                 :             :      end if
     610                 :             : 
     611                 :             :    end do
     612                 :        4440 :    call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr, narrm,ncid,ndtset_alloc,'kpt','DPR',multivals%nkpt)
     613         [ +  + ]:        4440 :    if(tnkpt==1) write(iout,'(23x,a,i3,a)' ) 'outvar_i_n : Printing only first ',nkpt_max,' k-points.'
     614                 :             :  end if
     615                 :             : 
     616                 :             :  !intarr(1,:)=dtsets(:)%kptbounds
     617                 :             :  !call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'kptbounds','INT',0)
     618                 :             : 
     619                 :             : !kptgw
     620                 :        4528 :  narr=3*dtsets(1)%nkptgw ! default size for all datasets
     621         [ +  + ]:     4409296 :  dprarr(:,0)=zero
     622         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     623         [ +  + ]:       30002 :    if(idtset/=0)then
     624                 :       20946 :      narrm(idtset)=3*dtsets(idtset)%nkptgw
     625         [ +  + ]:       20946 :      if (narrm(idtset)>0)&
     626         [ +  + ]:        1952 : &     dprarr(1:narrm(idtset),idtset) = reshape(dtsets(idtset)%kptgw(1:3,1:dtsets(idtset)%nkptgw), [narrm(idtset)])
     627                 :             :    else
     628                 :        4528 :      narrm(idtset)=mxvals%nkptgw
     629         [ +  + ]:        4528 :      if (narrm(idtset)>0)&
     630         [ +  + ]:         632 : &     dprarr(1:narrm(idtset),idtset) = reshape(dtsets(idtset)%kptgw(1:3,1:mxvals%nkptgw), [narrm(idtset)] )
     631                 :             :    end if
     632                 :             :  end do
     633                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'kptgw','DPR',multivals%nkptgw)
     634                 :             : 
     635                 :             : 
     636                 :             :  ! kptns_hf
     637   [ +  +  +  +  :       25474 :  if (sum(dtsets(1:ndtset_alloc)%usefock) /=0 .and. allocated(dtsets(0)%kptns_hf)) then
                   +  - ]
     638                 :       74828 :    tnkpt=0
     639         [ +  + ]:       74828 :    dprarr(:,0)=0
     640         [ +  + ]:         892 :    do idtset=1,ndtset_alloc       ! specific size for each dataset
     641         [ +  + ]:         752 :      if(dtsets(idtset)%usefock/=0)then
     642                 :         520 :        narrm(idtset)=3*dtsets(idtset)%nkpthf
     643                 :         520 :        narr=narrm(idtset)
     644         [ +  - ]:         520 :        if (narrm(idtset)>0) then
     645         [ +  + ]:        1040 :          dprarr(1:narrm(idtset),idtset)=reshape(dtsets(idtset)%kptns_hf(1:3,1:dtsets(idtset)%nkpthf), [narrm(idtset)] )
     646                 :             :        end if
     647                 :             :      else
     648                 :         232 :        narrm(idtset)=0
     649                 :             :      end if
     650   [ +  +  +  + ]:         892 :      if(prtvol_glob==0 .and. narrm(idtset)>3*nkpt_max)then
     651                 :          48 :        narrm(idtset)=3*nkpt_max
     652                 :          48 :        narr=narrm(idtset)
     653                 :          48 :        tnkpt=1
     654                 :             :      end if
     655                 :             :    end do
     656                 :         140 :    call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'kptns_hf','DPR',multivals%nkpthf)
     657         [ +  + ]:         140 :    if(tnkpt==1) write(iout,'(23x,a,i3,a)' ) 'outvar_i_n : Printing only first ',nkpt_max,' k-points.'
     658                 :             :  end if
     659                 :             : 
     660         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%kptnrm
     661                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'kptnrm','DPR',0)
     662                 :             : 
     663         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%kptopt
     664                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'kptopt','INT',0)
     665                 :             : 
     666                 :             : !kptrlatt
     667   [ +  +  +  + ]:       25474 :  if(sum((dtsets(1:ndtset_alloc)%kptopt)**2)/=0)then
     668                 :        3154 :    ndtset_kptopt=0
     669                 :        3154 :    intarr(1:9,0)=reshape( dtsets(0)%kptrlatt, [9] )
     670   [ -  +  +  -  :        6308 :    ABI_MALLOC(jdtset_kptopt,(0:ndtset_alloc))
             -  +  +  - ]
     671                 :             : !  Define the set of datasets for which kptopt>0
     672         [ +  + ]:       15522 :    do idtset=1,ndtset_alloc
     673                 :       12368 :      kptopt=dtsets(idtset)%kptopt
     674         [ +  + ]:       15522 :      if(kptopt>0)then
     675                 :       11476 :        ndtset_kptopt=ndtset_kptopt+1
     676                 :       11476 :        jdtset_kptopt(ndtset_kptopt)=jdtset_(idtset)
     677                 :       11476 :        intarr(1:9,ndtset_kptopt)=reshape( dtsets(idtset)%kptrlatt , [9] )
     678                 :             :      end if
     679                 :             :    end do
     680         [ +  + ]:        3154 :    if(ndtset_kptopt>0)then
     681                 :        3150 :      call prttagm(dprarr,intarr,iout,jdtset_kptopt,6,marr,9,narrm,ncid,ndtset_kptopt,'kptrlatt','INT',0)
     682                 :             :    end if
     683         [ -  + ]:        3154 :    ABI_FREE(jdtset_kptopt)
     684                 :             :  end if
     685                 :             : 
     686         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%kptrlen
     687                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'kptrlen','DPR',0)
     688                 :             : 
     689         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%kssform
     690                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'kssform','INT',0)
     691                 :             : 
     692                 :             : !write(ab_out,*)' outvar_i_n : L '
     693                 :             : !call flush(ab_out)
     694                 :             : !###########################################################
     695                 :             : !### 03. Print all the input variables (L)
     696                 :             : !##
     697                 :             : 
     698                 :             : !lambsig
     699         [ +  + ]:       30002 :  do idtset=0, ndtset_alloc
     700         [ +  + ]:       62172 :    do ii = 1, ntypat
     701                 :       57644 :      dprarr(ii,idtset) = dtsets(idtset)%lambsig(ii)
     702                 :             :    end do ! end loop over ntypat
     703                 :             :  end do ! end loop over datasets
     704                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,ntypat,narrm,ncid,ndtset_alloc,'lambsig','DPR',0)
     705                 :             : 
     706                 :             : !lexexch
     707                 :        4528 :  narr=mxvals%ntypat             ! default size for all datasets
     708         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     709                 :       25474 :    narrm(idtset)=dtsets(idtset)%ntypat
     710         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%ntypat
     711   [ +  -  +  + ]:       62172 :    if (narrm(idtset)>0) intarr(1:narrm(idtset),idtset)=dtsets(idtset)%lexexch(1:narrm(idtset))
     712                 :             :  end do
     713                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr, narrm,ncid,ndtset_alloc,'lexexch','INT',multivals%ntypat)
     714                 :             : 
     715                 :             : !ldaminushalf
     716                 :             :  narr=mxvals%ntypat             ! default size for all datasets
     717         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     718                 :       25474 :    narrm(idtset)=dtsets(idtset)%ntypat
     719         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%ntypat
     720   [ +  -  +  + ]:       62172 :    if (narrm(idtset)>0) intarr(1:narrm(idtset),idtset)=dtsets(idtset)%ldaminushalf(1:narrm(idtset))
     721                 :             :  end do
     722                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,narrm,ncid,ndtset_alloc,'ldaminushalf','INT',multivals%ntypat)
     723                 :             : 
     724                 :             : !localrdwf
     725         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%localrdwf
     726                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'localrdwf','INT',0)
     727                 :             : 
     728                 :             : !lpawu
     729                 :             :  narr=mxvals%ntypat                    ! default size for all datasets
     730         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     731                 :       25474 :    narrm(idtset)=dtsets(idtset)%ntypat
     732         [ +  + ]:       25474 :    if(idtset==0)narrm(idtset)=mxvals%ntypat
     733   [ +  -  +  + ]:       62172 :    if (narrm(idtset)>0) intarr(1:narrm(idtset),idtset)=dtsets(idtset)%lpawu(1:narrm(idtset))
     734                 :             :  end do
     735                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,narrm,ncid,ndtset_alloc,'lpawu','INT',multivals%ntypat)
     736                 :             : 
     737                 :             : #if defined HAVE_LOTF
     738                 :             :  if (any(dtsets(:)%ionmov==23)) then
     739                 :             :    intarr(1,:)=dtsets(:)%lotf_classic
     740                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_classic','INT',0)
     741                 :             :    intarr(1,:)=dtsets(:)%lotf_nitex
     742                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_nitex','INT',0)
     743                 :             :    intarr(1,:)=dtsets(:)%lotf_nneigx
     744                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_nneigx','INT',0)
     745                 :             :    intarr(1,:)=dtsets(:)%lotf_version
     746                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_version','INT',0)
     747                 :             :  end if
     748                 :             : #endif
     749                 :             : 
     750         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%lw_flexo
     751                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lw_flexo','INT',0)
     752                 :             : 
     753         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%lw_qdrpl
     754                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lw_qdrpl','INT',0)
     755                 :             : 
     756         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%lw_natopt
     757                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lw_natopt','INT',0)
     758                 :             : 
     759                 :             : !write(ab_out,*)' outvar_i_n : M '
     760                 :             : !call flush(ab_out)
     761                 :             : !###########################################################
     762                 :             : !### 03. Print all the input variables (M)
     763                 :             : !##
     764                 :             : 
     765         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%macro_uj
     766                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'macro_uj','INT',0)
     767                 :             : 
     768         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%magcon_lambda
     769                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'magcon_lambda','DPR',0)
     770                 :             : 
     771         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%magconon
     772                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'magconon','INT',0)
     773                 :             : 
     774         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%magpen
     775                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'magpen','ENE',0)
     776                 :             : 
     777         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%maxestep
     778                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'maxestep','ENE',0)
     779                 :             : 
     780         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%max_ncpus
     781                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'max_ncpus','INT',0)
     782                 :             : 
     783         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%maxnsym
     784                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,4,marr,1,narrm,ncid,ndtset_alloc,'maxnsym','INT',0)
     785                 :             : 
     786         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%mbpt_sciss
     787                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mbpt_sciss','ENE',0)
     788                 :             : 
     789   [ +  +  +  +  :       29662 :  if (any(mod(dtsets(:)%wfoptalg,10)==1)) then
                   +  + ]
     790         [ +  + ]:         748 :    intarr(1,:)=dtsets(:)%mdeg_filter
     791                 :         116 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mdeg_filter','INT',0)
     792                 :             :  end if
     793                 :             : 
     794         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%mdf_epsinf
     795                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mdf_epsinf','DPR',0)
     796                 :             : 
     797         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%mdtemp(1)
     798         [ +  + ]:       30002 :  dprarr(2,:)=dtsets(:)%mdtemp(2)
     799                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,2,narrm,ncid,ndtset_alloc,'mdtemp','DPR',0)
     800                 :             : 
     801         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%mdwall
     802                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mdwall','LEN',0)
     803                 :             : 
     804         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mem_test
     805                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mem_test','INT',0)
     806                 :             : 
     807         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%mep_mxstep
     808                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mep_mxstep','LEN',0)
     809                 :             : 
     810         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mep_solver
     811                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mep_solver','INT',0)
     812                 :             : 
     813         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mffmem
     814                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mffmem','INT',0)
     815                 :             : 
     816                 :             : !mixalch
     817   [ +  +  +  + ]:       56696 :  prtimg(:,:)=1
     818         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc
     819         [ +  + ]:       25474 :    if(idtset/=0)then
     820                 :       20946 :      size1=dtsets(idtset)%npspalch ; size2=dtsets(idtset)%ntypalch
     821                 :             :    else
     822                 :        4528 :      size1=npsp ; size2=mxvals%ntypat
     823                 :             :    end if
     824                 :       25474 :    narrm(idtset)=size1*size2
     825         [ +  + ]:       56228 :    do iimage=1,nimagem(idtset)
     826         [ +  + ]:       51700 :      if (narrm(idtset)>0) then
     827                 :             :        dprarr_images(1:narrm(idtset),iimage,idtset)=&
     828         [ +  + ]:        9264 : &       reshape(results_out(idtset)%mixalch(1:size1,1:size2,iimage), [narrm(idtset)] )
     829                 :             :      end if
     830                 :             :    end do
     831                 :             :  end do
     832                 :             :  call prttagm_images(dprarr_images,iout,jdtset_,1,marr,narrm,ncid,ndtset_alloc,'mixalch','DPR',&
     833                 :        4528 : & mxvals%nimage,nimagem,ndtset,prtimg,strimg)
     834                 :             : 
     835         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mixprec
     836                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mixprec','INT',0)
     837                 :             : 
     838                 :             : !mixesimgf
     839         [ +  + ]:     4409296 :  dprarr(1:marr,0)=zero              ! default value
     840                 :        4528 :  narr=mxvals%nimage                 ! default size for all datasets
     841   [ +  +  +  +  :       25450 :  if(any(abs(dtsets(1:ndtset_alloc)%imgmov-6)==0))then
                   +  + ]
     842                 :           8 :    multival=multivals%nimage
     843         [ +  + ]:          32 :    do idtset=1,ndtset_alloc           ! specific size and array for each dataset
     844                 :          24 :      narrm(idtset)=dtsets(idtset)%nimage
     845         [ +  + ]:          80 :      dprarr(1:narrm(idtset),idtset)=dtsets(idtset)%mixesimgf(1:narrm(idtset))
     846                 :             :    end do
     847                 :             :  else
     848                 :        4520 :    multival=0
     849         [ +  + ]:       25442 :    narrm(1:ndtset_alloc)=narr
     850   [ +  +  +  + ]:    15520862 :    dprarr(1:marr,1:ndtset_alloc)=zero
     851                 :             :  endif
     852                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'mixesimgf','DPR',multival)
     853                 :             : 
     854         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mkmem
     855                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,5,marr,1,narrm,ncid,ndtset_alloc,'mkmem','INT',0)
     856                 :             : 
     857   [ +  +  +  + ]:       25474 :  if(sum(response_(:))/=0)then
     858         [ +  + ]:        6920 :    intarr(1,:)=dtsets(:)%mkqmem
     859                 :        1012 :    call prttagm(dprarr,intarr,iout,jdtset_,5,marr,1,narrm,ncid,ndtset_alloc,'mkqmem','INT',0)
     860                 :             :  end if
     861                 :             : 
     862   [ +  +  +  + ]:       25474 :  if(sum(response_(:))/=0)then
     863         [ +  + ]:        6920 :    intarr(1,:)=dtsets(:)%mk1mem
     864                 :        1012 :    call prttagm(dprarr,intarr,iout,jdtset_,5,marr,1,narrm,ncid,ndtset_alloc,'mk1mem','INT',0)
     865                 :             :  end if
     866                 :             : 
     867                 :        4528 :  test_write=0
     868         [ +  + ]:       25474 :  do idtset=1,ndtset_alloc
     869   [ +  -  +  + ]:       25474 :    if(dtsets(idtset)%mpatpol(1)/=1 .or. dtsets(idtset)%mpatpol(2)/=dtsets(idtset)%natom)test_write=1
     870                 :             :  enddo
     871         [ +  + ]:        4528 :  if(test_write==1)then
     872         [ +  + ]:          44 :    intarr(1,:)=dtsets(:)%mpatpol(1)
     873         [ +  + ]:          44 :    intarr(2,:)=dtsets(:)%mpatpol(2)
     874                 :           8 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,2,narrm,ncid,ndtset_alloc,'mpatpol','INT',0)
     875                 :             :  endif
     876                 :             : 
     877         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mpdir(1)
     878         [ +  + ]:       30002 :  intarr(2,:)=dtsets(:)%mpdir(2)
     879         [ +  + ]:       30002 :  intarr(3,:)=dtsets(:)%mpdir(3)
     880                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'mpdir','INT',0)
     881                 :             : 
     882         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mqgrid
     883                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mqgrid','INT',0)
     884                 :             : 
     885         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%mqgriddg
     886                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mqgriddg','INT',0)
     887                 :             : 
     888                 :             : !###########################################################
     889                 :             : !### 03. Print all the input variables (N)
     890                 :             : !##
     891                 :             : 
     892         [ +  + ]:       30002 :  intarr(1,:)=natfix_(:)
     893                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfix','INT',0)
     894                 :             : 
     895         [ +  + ]:       30002 :  intarr(1,:)=natfixx_(:)
     896                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfixx','INT',0)
     897                 :             : 
     898         [ +  + ]:       30002 :  intarr(1,:)=natfixy_(:)
     899                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfixy','INT',0)
     900                 :             : 
     901         [ +  + ]:       30002 :  intarr(1,:)=natfixz_(:)
     902                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfixz','INT',0)
     903                 :             : 
     904         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%natnd
     905                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natnd','INT',0)
     906                 :             : 
     907         [ +  + ]:       30002 :  intarr(1,:)=dtsets(0:ndtset_alloc)%natom
     908                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natom','INT',0,forceprint=2)
     909                 :             : 
     910                 :             : !natsph
     911                 :             : !Need to be printed only if there is some occurrence of prtdos==3 or
     912                 :             : !pawfatbnd>0
     913                 :        4528 :  narr=1                      ! default size for all datasets
     914         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     915                 :       25474 :    narrm(idtset)=1
     916                 :       25474 :    intarr(1,idtset)=dtsets(idtset)%natsph
     917                 :             : 
     918   [ +  +  +  + ]:       30002 :    if(dtsets(idtset)%prtdos==3.or.dtsets(idtset)%pawfatbnd>0)then
     919                 :             :      narrm(idtset)=1
     920                 :             :    else
     921                 :       25390 :      narrm(idtset)=0
     922                 :             :    end if
     923                 :             :  end do
     924   [ +  +  +  +  :       25474 :  if (ndtset_alloc==1.and.sum(narrm(1:ndtset_alloc))==1) multi_atsph=0
                   +  + ]
     925                 :             :  ! Emulating multiple size for narrm
     926                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'natsph','INT',multi_atsph)
     927                 :             : 
     928                 :             : !natsph_extra
     929         [ +  + ]:       30002 :  intarr(1,:)=dtsets(0:ndtset_alloc)%natsph_extra
     930                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natsph_extra','INT',0)
     931                 :             : 
     932         [ +  + ]:        4528 :  if(dtsets(1)%occopt==2)then
     933                 :         152 :    narr=dtsets(1)%nkpt*dtsets(1)%nsppol                      ! default size for all datasets
     934                 :             :  else
     935                 :             :    narr=1
     936                 :             :  end if
     937                 :             : 
     938         [ +  + ]:       30002 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     939         [ +  + ]:       25474 :    if(dtsets(idtset)%occopt==2)then
     940                 :         856 :      narrm(idtset)=dtsets(idtset)%nkpt*dtsets(idtset)%nsppol
     941                 :             :    else
     942                 :       24618 :      narrm(idtset)=1
     943                 :             :    end if
     944                 :             : 
     945         [ +  - ]:       30002 :    if (narrm(idtset)>0) then
     946         [ +  + ]:       52148 :      intarr(1:narrm(idtset),idtset)=dtsets(idtset)%nband(1:narrm(idtset))
     947                 :             :    end if
     948                 :             :  end do
     949                 :             : 
     950                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,&
     951                 :        4528 :               narrm,ncid,ndtset_alloc,'nband','INT',multivals%nkpt+multivals%nsppol+multi_occopt)
     952                 :             : 
     953         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%natvshift
     954                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'natvshift','INT',0)
     955                 :             : 
     956   [ +  +  +  + ]:       25474 :  if(sum(dtsets(1:ndtset_alloc)%usefock)/=0)then
     957         [ +  + ]:        1032 :    intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbandhf
     958                 :         140 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbandhf','INT',0)
     959                 :             :  end if
     960                 :             : 
     961         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbandkss
     962                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbandkss','INT',0)
     963                 :             : 
     964         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbdblock
     965                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbdblock','INT',0)
     966                 :             : 
     967         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbdbuf
     968                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbdbuf','INT',0)
     969                 :             : 
     970         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nberry
     971                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nberry','INT',0)
     972                 :             : 
     973                 :             :  !:intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nb_protected
     974                 :             :  !:call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nb_protected','INT',0)
     975                 :             : 
     976                 :             :  !intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nb_per_slice
     977                 :             :  !call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nb_per_slice','INT',0)
     978                 :             : 
     979         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nc_xccc_gspace
     980                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nc_xccc_gspace','INT',0)
     981                 :             : 
     982         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nconeq
     983                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nconeq','INT',0)
     984                 :             : 
     985         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nctime
     986                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nctime','INT',0)
     987                 :             : 
     988                 :             : !ndtset
     989         [ +  + ]:        4528 :  if(ndtset>0)then
     990         [ +  + ]:       25964 :    intarr(1,:)=ndtset
     991                 :        3182 :    intarr(1,0)=0
     992                 :        3182 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ndtset','INT',0)
     993                 :             :  end if
     994                 :             : 
     995         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ndivsm
     996                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ndivsm','INT',0)
     997                 :             : 
     998                 :             :  !intarr(1,:)=dtsets(:)%nkpath
     999                 :             :  !call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkpath','INT',0)
    1000                 :             : 
    1001         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ndynimage
    1002                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ndynimage','INT',0)
    1003                 :             : 
    1004         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%neb_algo
    1005                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'neb_algo','INT',0)
    1006                 :             : 
    1007         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%neb_cell_algo
    1008                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'neb_cell_algo','INT',0)
    1009                 :             : 
    1010         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%neb_spring(1)
    1011         [ +  + ]:       30002 :  dprarr(2,:)=dtsets(:)%neb_spring(2)
    1012                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,2,narrm,ncid,ndtset_alloc,'neb_spring','DPR',0)
    1013                 :             : 
    1014         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nfreqim
    1015                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqim','INT',0)
    1016                 :             : 
    1017         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nfreqim_conv
    1018                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqim_conv','INT',0)
    1019                 :             : 
    1020         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nfreqre
    1021                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqre','INT',0)
    1022                 :             : 
    1023         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nfreqsp
    1024                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqsp','INT',0)
    1025                 :             : 
    1026         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ngfft(1)
    1027         [ +  + ]:       30002 :  intarr(2,:)=dtsets(:)%ngfft(2)
    1028         [ +  + ]:       30002 :  intarr(3,:)=dtsets(:)%ngfft(3)
    1029                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'ngfft','INT',0)
    1030                 :             : 
    1031         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ngfftdg(1)
    1032         [ +  + ]:       30002 :  intarr(2,:)=dtsets(:)%ngfftdg(2)
    1033         [ +  + ]:       30002 :  intarr(3,:)=dtsets(:)%ngfftdg(3)
    1034                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'ngfftdg','INT',0)
    1035                 :             : 
    1036         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nimage
    1037                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nimage','INT',0)
    1038                 :             : 
    1039         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nkpt
    1040                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkpt','INT',0)
    1041                 :             : 
    1042         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nkptgw
    1043                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkptgw','INT',0)
    1044                 :             : 
    1045   [ +  +  +  + ]:       25474 :  if(sum(dtsets(1:ndtset_alloc)%usefock)/=0)then
    1046         [ +  + ]:        1032 :    intarr(1,:)=dtsets(:)%nkpthf
    1047                 :         140 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkpthf','INT',0)
    1048                 :             :  end if
    1049                 :             : 
    1050         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nline
    1051                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nline','INT',0)
    1052                 :             : 
    1053         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nslice
    1054                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nslice','INT',0)
    1055                 :             : 
    1056         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nblock_lobpcg
    1057                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nblock_lobpcg','INT',0)
    1058                 :             : 
    1059         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nloalg(1)
    1060                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nloc_alg','INT',0)
    1061                 :             : 
    1062         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nloalg(2)*(dtsets(:)%nloalg(3)+1)
    1063                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nloc_mem','INT',0)
    1064                 :             : 
    1065         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nnos
    1066                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nnos','INT',0)
    1067                 :             : 
    1068         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nnsclo
    1069                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nnsclo','INT',0)
    1070                 :             : 
    1071         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nnsclohf
    1072                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nnsclohf','INT',0)
    1073                 :             : 
    1074         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nomegasf
    1075                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nomegasf','INT',0)
    1076                 :             : 
    1077         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nomegasi
    1078                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nomegasi','INT',0)
    1079                 :             : 
    1080         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nomegasrd
    1081                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nomegasrd','INT',0)
    1082                 :             : 
    1083         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nonlinear_info
    1084                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nonlinear_info','INT',0)
    1085                 :             : 
    1086         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nonlop_ylm_count
    1087                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nonlop_ylm_count','INT',0)
    1088                 :             : 
    1089         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%noseinert
    1090                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'noseinert','DPR',0)
    1091                 :             : 
    1092         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npband
    1093                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npband','INT',0,firstchar="-")
    1094                 :             : 
    1095         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npfft
    1096                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npfft','INT',0,firstchar="-")
    1097                 :             : 
    1098         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nphf
    1099                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nphf','INT',0,firstchar="-")
    1100                 :             : 
    1101         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npimage
    1102                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npimage','INT',0,firstchar="-")
    1103                 :             : 
    1104         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%np_spkpt
    1105                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'np_spkpt','INT',0,firstchar='-')
    1106                 :             : 
    1107         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nppert
    1108                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nppert','INT',0,firstchar="-")
    1109                 :             : 
    1110   [ +  -  +  + ]:        4528 :  if(multivals%ntypat/=0 .or. (multivals%ntypat==0 .and. ntypat/=npsp) )then
    1111         [ +  + ]:         144 :    intarr(1,:)=dtsets(:)%npsp
    1112                 :          32 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npsp','INT',0)
    1113                 :             :  end if
    1114                 :             : 
    1115         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npspinor
    1116                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npspinor','INT',0,firstchar="-")
    1117                 :             : 
    1118         [ +  + ]:       30002 :  intarr(1,:)=dtsets(0:ndtset_alloc)%npulayit
    1119                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npulayit','INT',0)
    1120                 :             : 
    1121         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npweps
    1122                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npweps','INT',0)
    1123                 :             : 
    1124         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npwkss
    1125                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npwkss','INT',0)
    1126                 :             : 
    1127         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npwsigx
    1128                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npwsigx','INT',0)
    1129                 :             : 
    1130         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npwwfn
    1131                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npwwfn','INT',0)
    1132                 :             : 
    1133         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%np_slk
    1134                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'np_slk','INT',0,firstchar="-")
    1135                 :             : 
    1136         [ +  + ]:       30002 :  dprarr(1,:)=dtsets(:)%nqfd
    1137                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nqfd','DPR',0)
    1138                 :             : 
    1139         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nqpt
    1140                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nqpt','INT',0)
    1141                 :             : 
    1142         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nqptdm
    1143                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'nqptdm','INT',0)
    1144                 :             : 
    1145         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%npvel
    1146                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npvel','INT',0)
    1147                 :             : 
    1148         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nscforder
    1149                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nscforder','INT',0)
    1150                 :             : 
    1151                 :             : !nshiftk
    1152   [ +  +  +  + ]:       25474 :  if(sum((dtsets(1:ndtset_alloc)%kptopt)**2)/=0)then
    1153                 :        3154 :    ndtset_kptopt=0
    1154         [ +  + ]:        6308 :    intarr(1:1,0)=dtsets(0)%nshiftk
    1155   [ -  +  +  -  :        9462 :    ABI_MALLOC(jdtset_kptopt,(0:ndtset_alloc))
          +  -  +  -  -  
                +  +  - ]
    1156                 :             : !  Define the set of datasets for which kptopt>0
    1157         [ +  + ]:       15522 :    do idtset=1,ndtset_alloc
    1158                 :       12368 :      kptopt=dtsets(idtset)%kptopt
    1159         [ +  + ]:       15522 :      if(kptopt>0)then
    1160                 :       11476 :        ndtset_kptopt=ndtset_kptopt+1
    1161                 :       11476 :        jdtset_kptopt(ndtset_kptopt)=jdtset_(idtset)
    1162         [ +  + ]:       22952 :        intarr(1:1,ndtset_kptopt)=dtsets(idtset)%nshiftk
    1163                 :             :      end if
    1164                 :             :    end do
    1165         [ +  + ]:        3154 :    if(ndtset_kptopt>0)then
    1166                 :        3150 :      call prttagm(dprarr,intarr,iout,jdtset_kptopt,2,marr,1,narrm,ncid,ndtset_kptopt,'nshiftk','INT',0)
    1167                 :             :    end if
    1168         [ -  + ]:        3154 :    ABI_FREE(jdtset_kptopt)
    1169                 :             :  end if
    1170                 :             : 
    1171         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nspden
    1172                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nspden','INT',0)
    1173                 :             : 
    1174         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nspinor
    1175                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nspinor','INT',0)
    1176                 :             : 
    1177         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nsppol
    1178                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nsppol','INT',0)
    1179                 :             : 
    1180         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nstep
    1181                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nstep','INT',0)
    1182                 :             : 
    1183         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nstep_mixed
    1184                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nstep_mixed','INT',0)
    1185                 :             : 
    1186         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nsym
    1187                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nsym','INT',0)
    1188                 :             : 
    1189         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ntime
    1190                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntime','INT',0)
    1191                 :             : 
    1192         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ntimimage
    1193                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntimimage','INT',0)
    1194                 :             : 
    1195         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ntypalch
    1196                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntypalch','INT',0)
    1197                 :             : 
    1198         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%ntypat
    1199                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntypat','INT',0,forceprint=2)
    1200                 :             : 
    1201                 :             : !nucdipmom
    1202         [ +  + ]:     4409296 :  dprarr(:,0)=0.0_dp
    1203                 :        4528 :  narr=3*natom ! default size for all datasets
    1204         [ +  + ]:       25474 :  do idtset=1,ndtset_alloc       ! specific size for each dataset
    1205                 :       20946 :    narrm(idtset)=3*dtsets(idtset)%natom
    1206         [ +  - ]:       20946 :    if (narrm(idtset)>0) then
    1207         [ +  + ]:       41892 :      dprarr(1:narrm(idtset),idtset)= reshape(dtsets(idtset)%nucdipmom(1:3,1:dtsets(idtset)%natom), [narrm(idtset)])
    1208                 :             :    end if
    1209   [ +  +  +  +  :      390146 :    if(sum(abs( dtsets(idtset)%nucdipmom(1:3,1:dtsets(idtset)%natom))) < tol12 ) narrm(idtset)=0
                   +  + ]
    1210                 :             :  end do
    1211                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,narrm,ncid,ndtset_alloc,'nucdipmom','DPR',multivals%natom)
    1212                 :             : 
    1213         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nucefg
    1214                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nucefg','INT',0)
    1215                 :             : 
    1216         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nucfc
    1217                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nucfc','INT',0)
    1218                 :             : 
    1219         [ +  + ]:       30002 :  intarr(1,:)=dtsets(:)%nwfshist
    1220                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nwfshist','INT',0)
    1221                 :             : 
    1222         [ +  + ]:       30002 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nzchempot
    1223                 :        4528 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'nzchempot','INT',0)
    1224                 :             : 
    1225                 :             : !###########################################################
    1226                 :             : !## Deallocation for generic arrays, and for i-n variables
    1227                 :             : 
    1228         [ -  + ]:        4528 :  ABI_FREE(dprarr)
    1229         [ -  + ]:        4528 :  ABI_FREE(intarr)
    1230         [ -  + ]:        4528 :  ABI_FREE(narrm)
    1231         [ -  + ]:        4528 :  ABI_FREE(nimagem)
    1232         [ -  + ]:        4528 :  ABI_FREE(dprarr_images)
    1233         [ -  + ]:        4528 :  ABI_FREE(prtimg)
    1234                 :             : 
    1235         [ -  + ]:        4528 :  ABI_FREE(natfix_)
    1236         [ -  + ]:        4528 :  ABI_FREE(iatfixio_)
    1237         [ -  + ]:        4528 :  ABI_FREE(natfixx_)
    1238         [ -  + ]:        4528 :  ABI_FREE(iatfixx_)
    1239         [ -  + ]:        4528 :  ABI_FREE(natfixy_)
    1240         [ -  + ]:        4528 :  ABI_FREE(iatfixy_)
    1241         [ -  + ]:        4528 :  ABI_FREE(natfixz_)
    1242         [ -  + ]:        4528 :  ABI_FREE(iatfixz_)
    1243                 :             : 
    1244                 :             :  DBG_EXIT("COLL")
    1245                 :             : 
    1246                 :        4528 : end subroutine outvar_i_n
    1247                 :             : !!***
    1248                 :             : 
    1249                 :             : end module m_outvar_i_n
    1250                 :             : !!***
        

Generated by: LCOV version 2.3-1