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 % 674 674
Test Date: 2026-11-08 04:19:34 Functions: 100.0 % 1 1
Branches: 86.5 % 1024 886

             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                 :        4564 : subroutine outvar_i_n (dtsets,iout,&
     101                 :        4564 : & jdtset_,marr,multivals,mxvals,ncid,ndtset,ndtset_alloc,npsp,prtvol_glob,&
     102                 :        4564 : & 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                 :        4564 :  integer,allocatable :: iatfixio_(:,:),iatfixx_(:,:),iatfixy_(:,:)
     128                 :        4564 :  integer,allocatable :: iatfixz_(:,:),intarr(:,:),istwfk_2(:,:)
     129                 :        4564 :  integer,allocatable :: jdtset_kptopt(:),natfix_(:),natfixx_(:),natfixy_(:)
     130                 :        4564 :  integer,allocatable :: natfixz_(:)
     131                 :        4564 :  integer,allocatable :: narrm(:)
     132                 :        4564 :  integer,allocatable :: nimagem(:),prtimg(:,:)
     133                 :        4564 :  real(dp),allocatable :: dprarr(:,:),dprarr_images(:,:,:)
     134                 :             : 
     135                 :             : ! *************************************************************************
     136                 :             : 
     137                 :             : !###########################################################
     138                 :             : !### 01. Initial allocations and initialisations.
     139                 :             : 
     140                 :             :  DBG_ENTER("COLL")
     141                 :             : 
     142   [ -  +  +  -  :       18256 :  ABI_MALLOC(dprarr,(marr,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     143   [ -  +  +  -  :       22820 :  ABI_MALLOC(dprarr_images,(marr,mxvals%nimage,0:ndtset_alloc))
          -  +  +  -  -  
          +  +  -  +  -  
          +  -  -  +  -  
                      + ]
     144   [ -  +  +  -  :       18256 :  ABI_MALLOC(intarr,(marr,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     145   [ -  +  +  -  :       13692 :  ABI_MALLOC(narrm,(0:ndtset_alloc))
          +  -  +  -  -  
                +  -  + ]
     146   [ -  +  +  -  :        9128 :  ABI_MALLOC(nimagem,(0:ndtset_alloc))
             -  +  -  + ]
     147   [ -  +  +  -  :       18256 :  ABI_MALLOC(prtimg,(mxvals%nimage,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   +  - ]
     148                 :             : 
     149         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc
     150                 :       30238 :    nimagem(idtset)=dtsets(idtset)%nimage
     151                 :             :  end do
     152                 :             : 
     153                 :        4564 :  firstchar_gpu=' '
     154   [ +  +  -  + ]:       25674 :  if (maxval(dtsets(1:ndtset_alloc)%gpu_option)/=ABI_GPU_DISABLED) firstchar_gpu='-'
     155                 :             : 
     156                 :             : !if(multivals%natom==0)natom=dtsets(1)%natom
     157                 :        4564 :  natom=dtsets(1)%natom
     158                 :             : !if(multivals%nimage==0)nimage=dtsets(1)%nimage
     159                 :        4564 :  nimage=dtsets(1)%nimage
     160                 :             : !if(multivals%ntypalch==0)ntypalch=dtsets(1)%ntypalch
     161                 :        4564 :  ntypalch=dtsets(1)%ntypalch
     162                 :             : !if(multivals%ntypat==0)ntypat=dtsets(1)%ntypat
     163                 :        4564 :  ntypat=dtsets(1)%ntypat
     164                 :             : 
     165                 :        4564 :  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   [ -  +  +  -  :        9128 :  ABI_MALLOC(natfix_,(0:ndtset_alloc))
             -  +  -  + ]
     173   [ -  +  +  -  :       18256 :  ABI_MALLOC(iatfixio_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     174   [ -  +  +  -  :        9128 :  ABI_MALLOC(natfixx_,(0:ndtset_alloc))
             -  +  -  + ]
     175   [ -  +  +  -  :       13692 :  ABI_MALLOC(iatfixx_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  -  
                +  -  + ]
     176   [ -  +  +  -  :        9128 :  ABI_MALLOC(natfixy_,(0:ndtset_alloc))
             -  +  -  + ]
     177   [ -  +  +  -  :       13692 :  ABI_MALLOC(iatfixy_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  -  
                +  -  + ]
     178   [ -  +  +  -  :        9128 :  ABI_MALLOC(natfixz_,(0:ndtset_alloc))
             -  +  -  + ]
     179   [ -  +  +  -  :       13692 :  ABI_MALLOC(iatfixz_,(mxvals%natom,0:ndtset_alloc))
          -  +  +  -  -  
                +  +  - ]
     180   [ +  +  +  +  :      200816 :  natfix_(0:ndtset_alloc)=0 ; iatfixio_(:,0:ndtset_alloc)=0
                   +  + ]
     181   [ +  +  +  +  :      200816 :  natfixx_(0:ndtset_alloc)=0 ; iatfixx_(:,0:ndtset_alloc)=0
                   +  + ]
     182   [ +  +  +  +  :      200816 :  natfixy_(0:ndtset_alloc)=0 ; iatfixy_(:,0:ndtset_alloc)=0
                   +  + ]
     183   [ +  +  +  +  :      200816 :  natfixz_(0:ndtset_alloc)=0 ; iatfixz_(:,0:ndtset_alloc)=0
                   +  + ]
     184                 :       25674 :  natfixx=-1; natfixy=-1; natfixz=-1;nimage=-1;
     185         [ +  + ]:       25674 :  do idtset=1,ndtset_alloc
     186                 :             : !  DEBUG
     187                 :             : !  write(std_out,*)' outvar_i_n : iatfix_ for idtset= ',idtset
     188                 :             : !  ENDDEBUG
     189         [ +  + ]:      117162 :    do iatom=1,dtsets(idtset)%natom
     190                 :             : !    First look whether the atom is fixed along the three directions
     191         [ +  + ]:       91488 :      if( dtsets(idtset)%iatfix(1,iatom)+ &
     192                 :             : &     dtsets(idtset)%iatfix(2,iatom)+ &
     193                 :       21110 : &     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         [ +  + ]:       91144 :        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         [ +  + ]:       91144 :        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         [ +  + ]:       91144 :        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                 :        4564 :  multi_natfix=0
     222         [ +  + ]:        4564 :  if(ndtset_alloc>1)then
     223         [ +  + ]:       22754 :    do idtset=1,ndtset_alloc
     224         [ -  + ]:       22754 :      if(natfix_(1)/=natfix_(idtset))multi_natfix=1
     225                 :             :    end do
     226                 :             :  end if
     227         [ +  - ]:        4564 :  if(multi_natfix==0)natfix=natfix_(1)
     228                 :             : 
     229                 :        4564 :  multi_natfixx=0
     230         [ +  + ]:        4564 :  if(ndtset_alloc>1)then
     231         [ +  + ]:       22754 :    do idtset=1,ndtset_alloc
     232         [ +  + ]:       22754 :      if(natfixx_(1)/=natfixx_(idtset))multi_natfixx=1
     233                 :             :    end do
     234                 :             :  end if
     235         [ +  + ]:        4564 :  if(multi_natfixx==0)natfixx=natfixx_(1)
     236                 :             : 
     237                 :        4564 :  multi_natfixy=0
     238         [ +  + ]:        4564 :  if(ndtset_alloc>1)then
     239         [ +  + ]:       22754 :    do idtset=1,ndtset_alloc
     240         [ +  + ]:       22754 :      if(natfixy_(1)/=natfixy_(idtset))multi_natfixy=1
     241                 :             :    end do
     242                 :             :  end if
     243         [ +  + ]:        4564 :  if(multi_natfixy==0)natfixy=natfixy_(1)
     244                 :             : 
     245                 :        4564 :  multi_natfixz=0
     246         [ +  + ]:        4564 :  if(ndtset_alloc>1)then
     247         [ +  + ]:       22754 :    do idtset=1,ndtset_alloc
     248         [ +  + ]:       22754 :      if(natfixz_(1)/=natfixz_(idtset))multi_natfixz=1
     249                 :             :    end do
     250                 :             :  end if
     251         [ +  + ]:        4564 :  if(multi_natfixz==0)natfixz=natfixz_(1)
     252                 :             : 
     253                 :             : 
     254                 :        4564 :  multi_occopt=0
     255         [ +  + ]:        4564 :  if(ndtset_alloc>1)then
     256         [ +  + ]:       22754 :    do idtset=1,ndtset_alloc
     257         [ +  + ]:       22754 :      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                 :        4564 :  narr=natfix                    ! default size for all datasets
     269         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     270                 :       25674 :    narrm(idtset)=natfix_(idtset)
     271         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%natom
     272         [ +  + ]:       45868 :    intarr(1:narrm(idtset),idtset)=iatfixio_(1:narrm(idtset),idtset)
     273                 :             :  end do
     274                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     275                 :        4564 : & narrm,ncid,ndtset_alloc,'iatfix','INT',multi_natfix)
     276                 :             : 
     277                 :             : !iatfixx
     278                 :        4564 :  narr=natfixx                   ! default size for all datasets
     279         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     280                 :       25674 :    narrm(idtset)=natfixx_(idtset)
     281         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%natom
     282         [ +  + ]:       45548 :    intarr(1:narrm(idtset),idtset)=iatfixx_(1:narrm(idtset),idtset)
     283                 :             :  end do
     284                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     285                 :        4564 : & narrm,ncid,ndtset_alloc,'iatfixx','INT',multi_natfixx)
     286                 :             : 
     287                 :             : !iatfixy
     288                 :        4564 :  narr=natfixy                   ! default size for all datasets
     289         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     290                 :       25674 :    narrm(idtset)=natfixy_(idtset)
     291         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%natom
     292         [ +  + ]:       45548 :    intarr(1:narrm(idtset),idtset)=iatfixy_(1:narrm(idtset),idtset)
     293                 :             :  end do
     294                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     295                 :        4564 : & narrm,ncid,ndtset_alloc,'iatfixy','INT',multi_natfixy)
     296                 :             : 
     297                 :             : !iatfixz
     298                 :        4564 :  narr=natfixz                   ! default size for all datasets
     299         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     300                 :       25674 :    narrm(idtset)=natfixz_(idtset)
     301         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%natom
     302         [ +  + ]:       45552 :    intarr(1:narrm(idtset),idtset)=iatfixz_(1:narrm(idtset),idtset)
     303                 :             :  end do
     304                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,&
     305                 :        4564 : & narrm,ncid,ndtset_alloc,'iatfixz','INT',multi_natfixz)
     306                 :             : 
     307                 :             : !iatnd
     308   [ +  +  +  + ]:    19963930 :  intarr = 0
     309                 :        4564 :  narr=natom ! default size for all datasets
     310         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     311                 :       25674 :    narrm(idtset)=dtsets(idtset)%natnd
     312         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%natom
     313         [ +  + ]:       45596 :    intarr(1:narrm(idtset),idtset)= dtsets(idtset)%iatnd(1:narrm(idtset))
     314                 :             :  end do
     315                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'iatnd','INT',multivals%natom)
     316                 :             : 
     317                 :             : !iatsph
     318                 :        4564 :  multi_atsph=1
     319                 :        4564 :  narr=dtsets(1)%natsph          ! default size for all datasets
     320         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     321                 :       25674 :    narrm(idtset)=dtsets(idtset)%natsph
     322         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%natsph
     323                 :             : !  Need to be printed only if there is some occurrence of prtdos==3 or pawfatbnd
     324         [ +  - ]:       25674 :    if (narrm(idtset)>0) then
     325         [ +  + ]:      132400 :      intarr(1:narrm(idtset),idtset)=dtsets(idtset)%iatsph(1:narrm(idtset))
     326                 :             :    end if
     327   [ +  +  +  + ]:       30238 :    if(dtsets(idtset)%prtdos==3.or.dtsets(idtset)%pawfatbnd>0)then
     328                 :          84 :      narrm(idtset)=dtsets(idtset)%natsph
     329                 :             :    else
     330                 :       25590 :      narrm(idtset)=0
     331                 :             :    end if
     332                 :             :  end do
     333   [ +  +  +  +  :       25674 :  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                 :        4564 :               narrm,ncid,ndtset_alloc,'iatsph','INT',multi_atsph) ! Emulating the case of multiple narr
     337                 :             : 
     338         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%ibte_abs_tol
     339                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_abs_tol','DPR',0)
     340                 :             : 
     341         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%ibte_alpha_mix
     342                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_alpha_mix','DPR',0)
     343                 :             : 
     344         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ibte_niter
     345                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_niter','INT',0)
     346                 :             : 
     347         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ibte_prep
     348                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ibte_prep','INT',0)
     349                 :             : 
     350         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%iboxcut
     351                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iboxcut','INT',0)
     352                 :             : 
     353         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%icoulomb
     354                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'icoulomb','INT',0)
     355                 :             : 
     356         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%icutcoul
     357                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'icutcoul','INT',0)
     358                 :             : 
     359         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ieig2rf
     360                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ieig2rf','INT',0)
     361                 :             : 
     362         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%imgmov
     363                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'imgmov','INT',0)
     364                 :             : 
     365         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%imgwfstor
     366                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'imgwfstor','INT',0)
     367                 :             : 
     368         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%inclvkb
     369                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'inclvkb','INT',0)
     370                 :             : 
     371         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%intxc
     372                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'intxc','INT',0)
     373                 :             : 
     374         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%invovl_algo
     375                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'invovl_algo',&
     376                 :        4564 : &             'INT',0,firstchar='-')
     377                 :             : 
     378         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%invovl_blksliced
     379                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'invovl_blksliced',&
     380                 :        4564 : &             'INT',0,firstchar=firstchar_gpu)
     381                 :             : 
     382         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%invovl_dyn_prec
     383                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'invovl_dyn_prec',&
     384                 :        4564 : &             'INT',0)
     385                 :             : 
     386         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%invovl_precision
     387                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'invovl_precision',&
     388                 :        4564 : &             'DPR',0)
     389                 :             : 
     390         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%invovl_prec_ceil
     391                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'invovl_prec_ceil',&
     392                 :        4564 : &             'DPR',0)
     393                 :             : 
     394         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ionmov
     395                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ionmov','INT',0)
     396                 :             : 
     397         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%iprcel
     398                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iprcel','INT',0)
     399                 :             : 
     400         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%iprcfc
     401                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iprcfc','INT',0)
     402                 :             : 
     403         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irandom
     404                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irandom','INT',0)
     405                 :             : 
     406         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdbscoup
     407                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdbscoup','INT',0)
     408                 :             : 
     409         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdbseig
     410                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdbseig','INT',0)
     411                 :             : 
     412         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdbsreso
     413                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdbsreso','INT',0)
     414                 :             : 
     415         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdchkprdm
     416                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdchkprdm','INT',0)
     417                 :             : 
     418         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdddk
     419                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdddk','INT',0)
     420                 :             : 
     421         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irddelfd
     422                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddelfd','INT',0)
     423                 :             : 
     424         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irddkdk
     425                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddkdk','INT',0)
     426                 :             : 
     427         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irddkde
     428                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddkde','INT',0)
     429                 :             : 
     430         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdden
     431                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdden','INT',0)
     432                 :             : 
     433         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irddvdb
     434                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irddvdb','INT',0)
     435                 :             : 
     436         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdefmas
     437                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdefmas','INT',0)
     438                 :             : 
     439         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdhaydock
     440                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdhaydock','INT',0)
     441                 :             : 
     442   [ +  +  +  +  :       30006 :  if (any(dtsets(:)%usekden==1)) then
                   +  + ]
     443         [ +  + ]:         412 :    intarr(1,:)=dtsets(:)%irdkden
     444                 :          84 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdkden','INT',0)
     445                 :             :  end if
     446                 :             : 
     447         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdpawden
     448                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdpawden','INT',0)
     449                 :             : 
     450         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdqps
     451                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdqps','INT',0)
     452                 :             : 
     453         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdscr
     454                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdscr','INT',0)
     455                 :             : 
     456         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdsuscep
     457                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdsuscep','INT',0)
     458                 :             : 
     459         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdvdw
     460                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdvdw','INT',0)
     461                 :             : 
     462         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdwfk
     463                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfk','INT',0)
     464                 :             : 
     465         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdwfkfine
     466                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfkfine','INT',0)
     467                 :             : 
     468         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdwfmq
     469                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfmq','INT',0)
     470                 :             : 
     471         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%irdwfq
     472                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'irdwfq','INT',0)
     473                 :             : 
     474         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ird1den
     475                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ird1den','INT',0)
     476                 :             : 
     477         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ird1wf
     478                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ird1wf','INT',0)
     479                 :             : 
     480         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%iscf
     481                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'iscf','INT',0)
     482                 :             : 
     483         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%isecur
     484                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'isecur','INT',0)
     485                 :             : 
     486         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%istatimg
     487                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'istatimg','INT',0)
     488                 :             : 
     489         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%istatr
     490                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'istatr','INT',0)
     491                 :             : 
     492         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%istatshft
     493                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'istatshft','INT',0)
     494                 :             : 
     495         [ +  + ]:        4564 :  if (allocated(dtsets(0)%istwfk)) then
     496                 :             :    ! istwfk (must first restore the default istwf=0 for non-allowed k points)
     497   [ -  +  +  -  :       17904 :    ABI_MALLOC(istwfk_2,(mxvals%nkpt,0:ndtset_alloc))
          -  +  +  -  +  
          -  +  -  -  +  
                   -  + ]
     498   [ +  +  +  + ]:      697362 :    istwfk_2=0;allowed_sum=0
     499         [ +  + ]:       25328 :    do idtset=1,ndtset_alloc
     500                 :       20852 :      nqpt=dtsets(idtset)%nqpt
     501         [ +  + ]:      378118 :      do ikpt=1,dtsets(idtset)%nkpt
     502                 :             :        allowed=1
     503         [ +  + ]:     1411160 :        do ii=1,3
     504                 :     1058370 :          kpoint=dtsets(idtset)%kpt(ii,ikpt)/dtsets(idtset)%kptnrm
     505   [ +  +  +  + ]:     1058370 :          if(nqpt/=0.and.response_(idtset)==0)kpoint=kpoint+dtsets(idtset)%qptn(ii)
     506   [ +  +  +  + ]:     1735302 :          if(abs(kpoint)>1.d-10.and.abs(kpoint-0.5_dp)>1.e-10_dp )allowed=0
     507                 :             :        end do
     508                 :             :        allowed_sum=allowed_sum+allowed
     509         [ +  + ]:      373642 :        if(allowed==1)istwfk_2(ikpt,idtset)=dtsets(idtset)%istwfk(ikpt)
     510                 :             :      end do
     511                 :             :    end do
     512                 :             : 
     513                 :             :    !istwfk
     514                 :       29804 :    tnkpt=0
     515   [ +  +  +  + ]:    18574436 :    intarr(1:marr,0:ndtset_alloc)=0 ! default value
     516         [ +  + ]:       25328 :    do idtset=1,ndtset_alloc
     517                 :       20852 :      nkpt_eff=dtsets(idtset)%nkpt
     518   [ +  +  +  + ]:       20852 :      if(prtvol_glob==0 .and. nkpt_eff>nkpt_max)then
     519                 :        1388 :        nkpt_eff=nkpt_max
     520                 :        1388 :        tnkpt=1
     521                 :             :      end if
     522   [ +  +  +  +  :      201062 :      if((multivals%nkpt/=0).and.(sum(istwfk_2(1:nkpt_eff,idtset))==0)) nkpt_eff=0
                   +  + ]
     523                 :       20852 :      narrm(idtset)=nkpt_eff
     524         [ +  + ]:      141286 :      intarr(1:narrm(idtset),idtset)=istwfk_2(1:narrm(idtset),idtset)
     525                 :             :    end do
     526                 :             : 
     527                 :        4476 :    call prttagm(dprarr,intarr,iout,jdtset_,1,marr,nkpt_eff,narrm,ncid,ndtset_alloc,'istwfk','INT',multivals%nkpt)
     528                 :             : 
     529   [ +  +  +  +  :      153380 :    if(tnkpt==1 .and. sum(istwfk_2(1:nkpt_eff,1:ndtset_alloc))/=0 ) &
                   +  + ]
     530                 :         110 :      write(iout,'(23x,a,i3,a)' ) 'outvar_i_n : Printing only first ',nkpt_max,' k-points.'
     531         [ -  + ]:        4476 :    ABI_FREE(istwfk_2)
     532                 :             :  end if
     533                 :             : 
     534                 :             : !ivalence
     535         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ivalence
     536                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ivalence','INT',0)
     537                 :             : 
     538                 :             : !ixc
     539         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ixc
     540                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixc','INT',0)
     541                 :             : 
     542                 :             : !ixcpositron
     543         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ixcpositron
     544                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixcpositron','INT',0)
     545                 :             : 
     546                 :             : !ixcrot
     547         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ixcrot
     548                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixcrot','INT',0)
     549                 :             : 
     550                 :             : !ixc_sigma
     551         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ixc_sigma
     552                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ixc_sigma','INT',0)
     553                 :             : 
     554                 :             : !write(ab_out,*)' outvar_i_n : J '
     555                 :             : !call flush(ab_out)
     556                 :             : !###########################################################
     557                 :             : !### 03. Print all the input variables (J)
     558                 :             : !##
     559                 :             : 
     560         [ +  + ]:        4564 :  if (ndtset > 0) write(iout,"(1x,a16,1x,(t22,10i5))") 'jdtset',jdtset_(1:ndtset)
     561                 :             : 
     562         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%jellslab
     563                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'jellslab','INT',0)
     564                 :             : 
     565         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%jfielddir(1)
     566         [ +  + ]:       30238 :  intarr(2,:)=dtsets(:)%jfielddir(2)
     567         [ +  + ]:       30238 :  intarr(3,:)=dtsets(:)%jfielddir(3)
     568                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'jfielddir','INT',0)
     569                 :             : 
     570                 :             : !jpawu
     571   [ +  +  +  + ]:       57132 :  prtimg(:,:)=1
     572         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc
     573                 :       25674 :    narrm(idtset)=dtsets(idtset)%ntypat
     574         [ +  + ]:       25674 :    if (idtset==0) narrm(idtset)=mxvals%ntypat
     575         [ +  + ]:       56664 :    do iimage=1,nimagem(idtset)
     576         [ +  - ]:       52100 :      if (narrm(idtset)>0) then
     577         [ +  + ]:       60244 :        dprarr_images(1:narrm(idtset),iimage,idtset)=dtsets(idtset)%jpawu(1:narrm(idtset),iimage)
     578                 :             :      end if
     579                 :             :    end do
     580                 :             :  end do
     581                 :             :  call prttagm_images(dprarr_images,iout,jdtset_,1,marr,narrm,&
     582                 :        4564 : & ncid,ndtset_alloc,'jpawu','ENE',mxvals%nimage,nimagem,ndtset,prtimg,strimg)
     583                 :             : 
     584                 :             : 
     585                 :             : !write(ab_out,*)' outvar_i_n : K '
     586                 :             : !call flush(ab_out)
     587                 :             : !###########################################################
     588                 :             : !### 03. Print all the input variables (K)
     589                 :             : !##
     590                 :             : 
     591                 :             : !kberry
     592                 :        4564 :  narr=3*dtsets(1)%nberry ! default size for all datasets
     593         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     594         [ +  + ]:       30238 :    if(idtset/=0)then
     595                 :       21110 :      narrm(idtset)=3*dtsets(idtset)%nberry
     596         [ +  - ]:       21110 :      if (narrm(idtset)>0)&
     597         [ +  + ]:       42220 : &     intarr(1:narrm(idtset),idtset)= reshape(dtsets(idtset)%kberry(1:3,1:dtsets(idtset)%nberry), [narrm(idtset)] )
     598                 :             :    else
     599                 :        4564 :      narrm(idtset)=3*mxvals%nberry
     600         [ +  - ]:        4564 :      if (narrm(idtset)>0)&
     601         [ +  + ]:        9128 : &     intarr(1:narrm(idtset),idtset)=reshape(dtsets(idtset)%kberry(1:3,1:mxvals%nberry), [narrm(idtset)] )
     602                 :             :    end if
     603                 :             :  end do
     604                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'kberry','INT',multivals%nberry)
     605                 :             : 
     606                 :             :  ! kpt
     607         [ +  + ]:        4564 :  if (allocated(dtsets(0)%kpt)) then
     608                 :     4039794 :    tnkpt=0
     609         [ +  + ]:     4039794 :    dprarr(:,0)=0
     610                 :        4476 :    narr=3*dtsets(1)%nkpt            ! default size for all datasets
     611   [ +  +  +  + ]:        4476 :    if(prtvol_glob==0 .and. narr>3*nkpt_max)then
     612                 :         190 :      narr=3*nkpt_max
     613                 :         190 :      tnkpt=1
     614                 :             :    end if
     615                 :             : 
     616         [ +  + ]:       25328 :    do idtset=1,ndtset_alloc       ! specific size for each dataset
     617                 :       20852 :      narrm(idtset)=3*dtsets(idtset)%nkpt
     618         [ +  - ]:       20852 :      if (narrm(idtset)>0) then
     619         [ +  + ]:       41704 :        dprarr(1:narrm(idtset),idtset)=reshape(dtsets(idtset)%kpt(1:3,1:dtsets(idtset)%nkpt), [narrm(idtset)] )
     620                 :             :      end if
     621                 :             : 
     622   [ +  +  +  + ]:       25328 :      if(prtvol_glob==0 .and. narrm(idtset)>3*nkpt_max)then
     623                 :        1388 :        narrm(idtset)=3*nkpt_max
     624                 :        1388 :        tnkpt=1
     625                 :             :      end if
     626                 :             : 
     627                 :             :    end do
     628                 :        4476 :    call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr, narrm,ncid,ndtset_alloc,'kpt','DPR',multivals%nkpt)
     629         [ +  + ]:        4476 :    if(tnkpt==1) write(iout,'(23x,a,i3,a)' ) 'outvar_i_n : Printing only first ',nkpt_max,' k-points.'
     630                 :             :  end if
     631                 :             : 
     632                 :             :  !intarr(1,:)=dtsets(:)%kptbounds
     633                 :             :  !call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'kptbounds','INT',0)
     634                 :             : 
     635                 :             : !kptgw
     636                 :        4564 :  narr=3*dtsets(1)%nkptgw ! default size for all datasets
     637         [ +  + ]:     4414852 :  dprarr(:,0)=zero
     638         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     639         [ +  + ]:       30238 :    if(idtset/=0)then
     640                 :       21110 :      narrm(idtset)=3*dtsets(idtset)%nkptgw
     641         [ +  + ]:       21110 :      if (narrm(idtset)>0)&
     642         [ +  + ]:        2032 : &     dprarr(1:narrm(idtset),idtset) = reshape(dtsets(idtset)%kptgw(1:3,1:dtsets(idtset)%nkptgw), [narrm(idtset)])
     643                 :             :    else
     644                 :        4564 :      narrm(idtset)=mxvals%nkptgw
     645         [ +  + ]:        4564 :      if (narrm(idtset)>0)&
     646         [ +  + ]:         648 : &     dprarr(1:narrm(idtset),idtset) = reshape(dtsets(idtset)%kptgw(1:3,1:mxvals%nkptgw), [narrm(idtset)] )
     647                 :             :    end if
     648                 :             :  end do
     649                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'kptgw','DPR',multivals%nkptgw)
     650                 :             : 
     651                 :             : 
     652                 :             :  ! kptns_hf
     653   [ +  +  +  +  :       25674 :  if (sum(dtsets(1:ndtset_alloc)%usefock) /=0 .and. allocated(dtsets(0)%kptns_hf)) then
                   +  - ]
     654                 :       74828 :    tnkpt=0
     655         [ +  + ]:       74828 :    dprarr(:,0)=0
     656         [ +  + ]:         892 :    do idtset=1,ndtset_alloc       ! specific size for each dataset
     657         [ +  + ]:         752 :      if(dtsets(idtset)%usefock/=0)then
     658                 :         520 :        narrm(idtset)=3*dtsets(idtset)%nkpthf
     659                 :         520 :        narr=narrm(idtset)
     660         [ +  - ]:         520 :        if (narrm(idtset)>0) then
     661         [ +  + ]:        1040 :          dprarr(1:narrm(idtset),idtset)=reshape(dtsets(idtset)%kptns_hf(1:3,1:dtsets(idtset)%nkpthf), [narrm(idtset)] )
     662                 :             :        end if
     663                 :             :      else
     664                 :         232 :        narrm(idtset)=0
     665                 :             :      end if
     666   [ +  +  +  + ]:         892 :      if(prtvol_glob==0 .and. narrm(idtset)>3*nkpt_max)then
     667                 :          48 :        narrm(idtset)=3*nkpt_max
     668                 :          48 :        narr=narrm(idtset)
     669                 :          48 :        tnkpt=1
     670                 :             :      end if
     671                 :             :    end do
     672                 :         140 :    call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'kptns_hf','DPR',multivals%nkpthf)
     673         [ +  + ]:         140 :    if(tnkpt==1) write(iout,'(23x,a,i3,a)' ) 'outvar_i_n : Printing only first ',nkpt_max,' k-points.'
     674                 :             :  end if
     675                 :             : 
     676         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%kptnrm
     677                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'kptnrm','DPR',0)
     678                 :             : 
     679         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%kptopt
     680                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'kptopt','INT',0)
     681                 :             : 
     682                 :             : !kptrlatt
     683   [ +  +  +  + ]:       25674 :  if(sum((dtsets(1:ndtset_alloc)%kptopt)**2)/=0)then
     684                 :        3190 :    ndtset_kptopt=0
     685                 :        3190 :    intarr(1:9,0)=reshape( dtsets(0)%kptrlatt, [9] )
     686   [ -  +  +  -  :        6380 :    ABI_MALLOC(jdtset_kptopt,(0:ndtset_alloc))
             -  +  +  - ]
     687                 :             : !  Define the set of datasets for which kptopt>0
     688         [ +  + ]:       15722 :    do idtset=1,ndtset_alloc
     689                 :       12532 :      kptopt=dtsets(idtset)%kptopt
     690         [ +  + ]:       15722 :      if(kptopt>0)then
     691                 :       11640 :        ndtset_kptopt=ndtset_kptopt+1
     692                 :       11640 :        jdtset_kptopt(ndtset_kptopt)=jdtset_(idtset)
     693                 :       11640 :        intarr(1:9,ndtset_kptopt)=reshape( dtsets(idtset)%kptrlatt , [9] )
     694                 :             :      end if
     695                 :             :    end do
     696         [ +  + ]:        3190 :    if(ndtset_kptopt>0)then
     697                 :        3186 :      call prttagm(dprarr,intarr,iout,jdtset_kptopt,6,marr,9,narrm,ncid,ndtset_kptopt,'kptrlatt','INT',0)
     698                 :             :    end if
     699         [ -  + ]:        3190 :    ABI_FREE(jdtset_kptopt)
     700                 :             :  end if
     701                 :             : 
     702         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%kptrlen
     703                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'kptrlen','DPR',0)
     704                 :             : 
     705         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%kssform
     706                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'kssform','INT',0)
     707                 :             : 
     708                 :             : !write(ab_out,*)' outvar_i_n : L '
     709                 :             : !call flush(ab_out)
     710                 :             : !###########################################################
     711                 :             : !### 03. Print all the input variables (L)
     712                 :             : !##
     713                 :             : 
     714                 :             : !lambsig
     715         [ +  + ]:       30238 :  do idtset=0, ndtset_alloc
     716         [ +  + ]:       62744 :    do ii = 1, ntypat
     717                 :       58180 :      dprarr(ii,idtset) = dtsets(idtset)%lambsig(ii)
     718                 :             :    end do ! end loop over ntypat
     719                 :             :  end do ! end loop over datasets
     720                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,ntypat,narrm,ncid,ndtset_alloc,'lambsig','DPR',0)
     721                 :             : 
     722                 :             : !lexexch
     723                 :        4564 :  narr=mxvals%ntypat             ! default size for all datasets
     724         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     725                 :       25674 :    narrm(idtset)=dtsets(idtset)%ntypat
     726         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%ntypat
     727   [ +  -  +  + ]:       62744 :    if (narrm(idtset)>0) intarr(1:narrm(idtset),idtset)=dtsets(idtset)%lexexch(1:narrm(idtset))
     728                 :             :  end do
     729                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr, narrm,ncid,ndtset_alloc,'lexexch','INT',multivals%ntypat)
     730                 :             : 
     731                 :             : !ldaminushalf
     732                 :             :  narr=mxvals%ntypat             ! default size for all datasets
     733         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     734                 :       25674 :    narrm(idtset)=dtsets(idtset)%ntypat
     735         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%ntypat
     736   [ +  -  +  + ]:       62744 :    if (narrm(idtset)>0) intarr(1:narrm(idtset),idtset)=dtsets(idtset)%ldaminushalf(1:narrm(idtset))
     737                 :             :  end do
     738                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,narrm,ncid,ndtset_alloc,'ldaminushalf','INT',multivals%ntypat)
     739                 :             : 
     740                 :             : !localrdwf
     741         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%localrdwf
     742                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'localrdwf','INT',0)
     743                 :             : 
     744                 :             : !lpawu
     745                 :             :  narr=mxvals%ntypat                    ! default size for all datasets
     746         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     747                 :       25674 :    narrm(idtset)=dtsets(idtset)%ntypat
     748         [ +  + ]:       25674 :    if(idtset==0)narrm(idtset)=mxvals%ntypat
     749   [ +  -  +  + ]:       62744 :    if (narrm(idtset)>0) intarr(1:narrm(idtset),idtset)=dtsets(idtset)%lpawu(1:narrm(idtset))
     750                 :             :  end do
     751                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,narrm,ncid,ndtset_alloc,'lpawu','INT',multivals%ntypat)
     752                 :             : 
     753                 :             : #if defined HAVE_LOTF
     754                 :             :  if (any(dtsets(:)%ionmov==23)) then
     755                 :             :    intarr(1,:)=dtsets(:)%lotf_classic
     756                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_classic','INT',0)
     757                 :             :    intarr(1,:)=dtsets(:)%lotf_nitex
     758                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_nitex','INT',0)
     759                 :             :    intarr(1,:)=dtsets(:)%lotf_nneigx
     760                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_nneigx','INT',0)
     761                 :             :    intarr(1,:)=dtsets(:)%lotf_version
     762                 :             :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lotf_version','INT',0)
     763                 :             :  end if
     764                 :             : #endif
     765                 :             : 
     766         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%lw_flexo
     767                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lw_flexo','INT',0)
     768                 :             : 
     769         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%lw_qdrpl
     770                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lw_qdrpl','INT',0)
     771                 :             : 
     772         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%lw_natopt
     773                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'lw_natopt','INT',0)
     774                 :             : 
     775                 :             : !write(ab_out,*)' outvar_i_n : M '
     776                 :             : !call flush(ab_out)
     777                 :             : !###########################################################
     778                 :             : !### 03. Print all the input variables (M)
     779                 :             : !##
     780                 :             : 
     781         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%macro_uj
     782                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'macro_uj','INT',0)
     783                 :             : 
     784         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%magcon_lambda
     785                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'magcon_lambda','DPR',0)
     786                 :             : 
     787         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%magconon
     788                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'magconon','INT',0)
     789                 :             : 
     790         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%magpen
     791                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'magpen','ENE',0)
     792                 :             : 
     793         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%maxestep
     794                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'maxestep','ENE',0)
     795                 :             : 
     796         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%max_ncpus
     797                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'max_ncpus','INT',0)
     798                 :             : 
     799         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%maxnsym
     800                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,4,marr,1,narrm,ncid,ndtset_alloc,'maxnsym','INT',0)
     801                 :             : 
     802         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%mbpt_sciss
     803                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mbpt_sciss','ENE',0)
     804                 :             : 
     805   [ +  +  +  +  :       29830 :  if (any(mod(dtsets(:)%wfoptalg,10)==1)) then
                   +  + ]
     806         [ +  + ]:         832 :    intarr(1,:)=dtsets(:)%mdeg_filter
     807                 :         124 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mdeg_filter','INT',0)
     808                 :             :  end if
     809                 :             : 
     810         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%mdf_epsinf
     811                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mdf_epsinf','DPR',0)
     812                 :             : 
     813         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%mdtemp(1)
     814         [ +  + ]:       30238 :  dprarr(2,:)=dtsets(:)%mdtemp(2)
     815                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,2,narrm,ncid,ndtset_alloc,'mdtemp','DPR',0)
     816                 :             : 
     817         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%mdwall
     818                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mdwall','LEN',0)
     819                 :             : 
     820         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mem_test
     821                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mem_test','INT',0)
     822                 :             : 
     823         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%mep_mxstep
     824                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mep_mxstep','LEN',0)
     825                 :             : 
     826         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mep_solver
     827                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mep_solver','INT',0)
     828                 :             : 
     829         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mffmem
     830                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mffmem','INT',0)
     831                 :             : 
     832                 :             : !mixalch
     833   [ +  +  +  + ]:       57132 :  prtimg(:,:)=1
     834         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc
     835         [ +  + ]:       25674 :    if(idtset/=0)then
     836                 :       21110 :      size1=dtsets(idtset)%npspalch ; size2=dtsets(idtset)%ntypalch
     837                 :             :    else
     838                 :        4564 :      size1=npsp ; size2=mxvals%ntypat
     839                 :             :    end if
     840                 :       25674 :    narrm(idtset)=size1*size2
     841         [ +  + ]:       56664 :    do iimage=1,nimagem(idtset)
     842         [ +  + ]:       52100 :      if (narrm(idtset)>0) then
     843                 :             :        dprarr_images(1:narrm(idtset),iimage,idtset)=&
     844         [ +  + ]:        9336 : &       reshape(results_out(idtset)%mixalch(1:size1,1:size2,iimage), [narrm(idtset)] )
     845                 :             :      end if
     846                 :             :    end do
     847                 :             :  end do
     848                 :             :  call prttagm_images(dprarr_images,iout,jdtset_,1,marr,narrm,ncid,ndtset_alloc,'mixalch','DPR',&
     849                 :        4564 : & mxvals%nimage,nimagem,ndtset,prtimg,strimg)
     850                 :             : 
     851         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mixprec
     852                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'mixprec','INT',0)
     853                 :             : 
     854                 :             : !mixesimgf
     855         [ +  + ]:     4414852 :  dprarr(1:marr,0)=zero              ! default value
     856                 :        4564 :  narr=mxvals%nimage                 ! default size for all datasets
     857   [ +  +  +  +  :       25650 :  if(any(abs(dtsets(1:ndtset_alloc)%imgmov-6)==0))then
                   +  + ]
     858                 :           8 :    multival=multivals%nimage
     859         [ +  + ]:          32 :    do idtset=1,ndtset_alloc           ! specific size and array for each dataset
     860                 :          24 :      narrm(idtset)=dtsets(idtset)%nimage
     861         [ +  + ]:          80 :      dprarr(1:narrm(idtset),idtset)=dtsets(idtset)%mixesimgf(1:narrm(idtset))
     862                 :             :    end do
     863                 :             :  else
     864                 :        4556 :    multival=0
     865         [ +  + ]:       25642 :    narrm(1:ndtset_alloc)=narr
     866   [ +  +  +  + ]:    15547318 :    dprarr(1:marr,1:ndtset_alloc)=zero
     867                 :             :  endif
     868                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'mixesimgf','DPR',multival)
     869                 :             : 
     870         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mkmem
     871                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,5,marr,1,narrm,ncid,ndtset_alloc,'mkmem','INT',0)
     872                 :             : 
     873   [ +  +  +  + ]:       25674 :  if(sum(response_(:))/=0)then
     874         [ +  + ]:        6936 :    intarr(1,:)=dtsets(:)%mkqmem
     875                 :        1016 :    call prttagm(dprarr,intarr,iout,jdtset_,5,marr,1,narrm,ncid,ndtset_alloc,'mkqmem','INT',0)
     876                 :             :  end if
     877                 :             : 
     878   [ +  +  +  + ]:       25674 :  if(sum(response_(:))/=0)then
     879         [ +  + ]:        6936 :    intarr(1,:)=dtsets(:)%mk1mem
     880                 :        1016 :    call prttagm(dprarr,intarr,iout,jdtset_,5,marr,1,narrm,ncid,ndtset_alloc,'mk1mem','INT',0)
     881                 :             :  end if
     882                 :             : 
     883                 :        4564 :  test_write=0
     884         [ +  + ]:       25674 :  do idtset=1,ndtset_alloc
     885   [ +  -  +  + ]:       25674 :    if(dtsets(idtset)%mpatpol(1)/=1 .or. dtsets(idtset)%mpatpol(2)/=dtsets(idtset)%natom)test_write=1
     886                 :             :  enddo
     887         [ +  + ]:        4564 :  if(test_write==1)then
     888         [ +  + ]:          44 :    intarr(1,:)=dtsets(:)%mpatpol(1)
     889         [ +  + ]:          44 :    intarr(2,:)=dtsets(:)%mpatpol(2)
     890                 :           8 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,2,narrm,ncid,ndtset_alloc,'mpatpol','INT',0)
     891                 :             :  endif
     892                 :             : 
     893         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mpdir(1)
     894         [ +  + ]:       30238 :  intarr(2,:)=dtsets(:)%mpdir(2)
     895         [ +  + ]:       30238 :  intarr(3,:)=dtsets(:)%mpdir(3)
     896                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'mpdir','INT',0)
     897                 :             : 
     898         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mqgrid
     899                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mqgrid','INT',0)
     900                 :             : 
     901         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%mqgriddg
     902                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'mqgriddg','INT',0)
     903                 :             : 
     904                 :             : !###########################################################
     905                 :             : !### 03. Print all the input variables (N)
     906                 :             : !##
     907                 :             : 
     908         [ +  + ]:       30238 :  intarr(1,:)=natfix_(:)
     909                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfix','INT',0)
     910                 :             : 
     911         [ +  + ]:       30238 :  intarr(1,:)=natfixx_(:)
     912                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfixx','INT',0)
     913                 :             : 
     914         [ +  + ]:       30238 :  intarr(1,:)=natfixy_(:)
     915                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfixy','INT',0)
     916                 :             : 
     917         [ +  + ]:       30238 :  intarr(1,:)=natfixz_(:)
     918                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natfixz','INT',0)
     919                 :             : 
     920         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%natnd
     921                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natnd','INT',0)
     922                 :             : 
     923         [ +  + ]:       30238 :  intarr(1,:)=dtsets(0:ndtset_alloc)%natom
     924                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natom','INT',0,forceprint=2)
     925                 :             : 
     926                 :             : !natsph
     927                 :             : !Need to be printed only if there is some occurrence of prtdos==3 or
     928                 :             : !pawfatbnd>0
     929                 :        4564 :  narr=1                      ! default size for all datasets
     930         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     931                 :       25674 :    narrm(idtset)=1
     932                 :       25674 :    intarr(1,idtset)=dtsets(idtset)%natsph
     933                 :             : 
     934   [ +  +  +  + ]:       30238 :    if(dtsets(idtset)%prtdos==3.or.dtsets(idtset)%pawfatbnd>0)then
     935                 :             :      narrm(idtset)=1
     936                 :             :    else
     937                 :       25590 :      narrm(idtset)=0
     938                 :             :    end if
     939                 :             :  end do
     940   [ +  +  +  +  :       25674 :  if (ndtset_alloc==1.and.sum(narrm(1:ndtset_alloc))==1) multi_atsph=0
                   +  + ]
     941                 :             :  ! Emulating multiple size for narrm
     942                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,narr,narrm,ncid,ndtset_alloc,'natsph','INT',multi_atsph)
     943                 :             : 
     944                 :             : !natsph_extra
     945         [ +  + ]:       30238 :  intarr(1,:)=dtsets(0:ndtset_alloc)%natsph_extra
     946                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'natsph_extra','INT',0)
     947                 :             : 
     948         [ +  + ]:        4564 :  if(dtsets(1)%occopt==2)then
     949                 :         152 :    narr=dtsets(1)%nkpt*dtsets(1)%nsppol                      ! default size for all datasets
     950                 :             :  else
     951                 :             :    narr=1
     952                 :             :  end if
     953                 :             : 
     954         [ +  + ]:       30238 :  do idtset=0,ndtset_alloc       ! specific size for each dataset
     955         [ +  + ]:       25674 :    if(dtsets(idtset)%occopt==2)then
     956                 :         856 :      narrm(idtset)=dtsets(idtset)%nkpt*dtsets(idtset)%nsppol
     957                 :             :    else
     958                 :       24818 :      narrm(idtset)=1
     959                 :             :    end if
     960                 :             : 
     961         [ +  - ]:       30238 :    if (narrm(idtset)>0) then
     962         [ +  + ]:       52548 :      intarr(1:narrm(idtset),idtset)=dtsets(idtset)%nband(1:narrm(idtset))
     963                 :             :    end if
     964                 :             :  end do
     965                 :             : 
     966                 :             :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,&
     967                 :        4564 :               narrm,ncid,ndtset_alloc,'nband','INT',multivals%nkpt+multivals%nsppol+multi_occopt)
     968                 :             : 
     969         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%natvshift
     970                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'natvshift','INT',0)
     971                 :             : 
     972   [ +  +  +  + ]:       25674 :  if(sum(dtsets(1:ndtset_alloc)%usefock)/=0)then
     973         [ +  + ]:        1032 :    intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbandhf
     974                 :         140 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbandhf','INT',0)
     975                 :             :  end if
     976                 :             : 
     977         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbandkss
     978                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbandkss','INT',0)
     979                 :             : 
     980         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbdblock
     981                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbdblock','INT',0)
     982                 :             : 
     983         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nbdbuf
     984                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nbdbuf','INT',0)
     985                 :             : 
     986         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nberry
     987                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nberry','INT',0)
     988                 :             : 
     989                 :             :  !:intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nb_protected
     990                 :             :  !:call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nb_protected','INT',0)
     991                 :             : 
     992                 :             :  !intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nb_per_slice
     993                 :             :  !call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nb_per_slice','INT',0)
     994                 :             : 
     995         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nc_xccc_gspace
     996                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nc_xccc_gspace','INT',0)
     997                 :             : 
     998         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nconeq
     999                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nconeq','INT',0)
    1000                 :             : 
    1001         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nctime
    1002                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nctime','INT',0)
    1003                 :             : 
    1004                 :             : !ndtset
    1005         [ +  + ]:        4564 :  if(ndtset>0)then
    1006         [ +  + ]:       26200 :    intarr(1,:)=ndtset
    1007                 :        3218 :    intarr(1,0)=0
    1008                 :        3218 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ndtset','INT',0)
    1009                 :             :  end if
    1010                 :             : 
    1011         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ndivsm
    1012                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ndivsm','INT',0)
    1013                 :             : 
    1014                 :             :  !intarr(1,:)=dtsets(:)%nkpath
    1015                 :             :  !call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkpath','INT',0)
    1016                 :             : 
    1017         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ndynimage
    1018                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ndynimage','INT',0)
    1019                 :             : 
    1020         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%neb_algo
    1021                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'neb_algo','INT',0)
    1022                 :             : 
    1023         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%neb_cell_algo
    1024                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'neb_cell_algo','INT',0)
    1025                 :             : 
    1026         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%neb_spring(1)
    1027         [ +  + ]:       30238 :  dprarr(2,:)=dtsets(:)%neb_spring(2)
    1028                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,2,narrm,ncid,ndtset_alloc,'neb_spring','DPR',0)
    1029                 :             : 
    1030         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nfreqim
    1031                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqim','INT',0)
    1032                 :             : 
    1033         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nfreqim_conv
    1034                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqim_conv','INT',0)
    1035                 :             : 
    1036         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nfreqre
    1037                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqre','INT',0)
    1038                 :             : 
    1039         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nfreqsp
    1040                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nfreqsp','INT',0)
    1041                 :             : 
    1042         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ngfft(1)
    1043         [ +  + ]:       30238 :  intarr(2,:)=dtsets(:)%ngfft(2)
    1044         [ +  + ]:       30238 :  intarr(3,:)=dtsets(:)%ngfft(3)
    1045                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'ngfft','INT',0)
    1046                 :             : 
    1047         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ngfftdg(1)
    1048         [ +  + ]:       30238 :  intarr(2,:)=dtsets(:)%ngfftdg(2)
    1049         [ +  + ]:       30238 :  intarr(3,:)=dtsets(:)%ngfftdg(3)
    1050                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,3,narrm,ncid,ndtset_alloc,'ngfftdg','INT',0)
    1051                 :             : 
    1052         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nimage
    1053                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nimage','INT',0)
    1054                 :             : 
    1055         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nkpt
    1056                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkpt','INT',0)
    1057                 :             : 
    1058         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nkptgw
    1059                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkptgw','INT',0)
    1060                 :             : 
    1061   [ +  +  +  + ]:       25674 :  if(sum(dtsets(1:ndtset_alloc)%usefock)/=0)then
    1062         [ +  + ]:        1032 :    intarr(1,:)=dtsets(:)%nkpthf
    1063                 :         140 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nkpthf','INT',0)
    1064                 :             :  end if
    1065                 :             : 
    1066         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nline
    1067                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nline','INT',0)
    1068                 :             : 
    1069         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nslice
    1070                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nslice','INT',0)
    1071                 :             : 
    1072         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nblock_lobpcg
    1073                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nblock_lobpcg','INT',0)
    1074                 :             : 
    1075         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nloalg(1)
    1076                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nloc_alg','INT',0)
    1077                 :             : 
    1078         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nloalg(2)*(dtsets(:)%nloalg(3)+1)
    1079                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nloc_mem','INT',0)
    1080                 :             : 
    1081         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nnos
    1082                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nnos','INT',0)
    1083                 :             : 
    1084         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nnsclo
    1085                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nnsclo','INT',0)
    1086                 :             : 
    1087         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nnsclohf
    1088                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nnsclohf','INT',0)
    1089                 :             : 
    1090         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nomegasf
    1091                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nomegasf','INT',0)
    1092                 :             : 
    1093         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nomegasi
    1094                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nomegasi','INT',0)
    1095                 :             : 
    1096         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nomegasrd
    1097                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nomegasrd','INT',0)
    1098                 :             : 
    1099         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nonlinear_info
    1100                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nonlinear_info','INT',0)
    1101                 :             : 
    1102         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nonlop_ylm_count
    1103                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nonlop_ylm_count','INT',0)
    1104                 :             : 
    1105         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%noseinert
    1106                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'noseinert','DPR',0)
    1107                 :             : 
    1108         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npband
    1109                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npband','INT',0,firstchar="-")
    1110                 :             : 
    1111         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npfft
    1112                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npfft','INT',0,firstchar="-")
    1113                 :             : 
    1114         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nphf
    1115                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nphf','INT',0,firstchar="-")
    1116                 :             : 
    1117         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npimage
    1118                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npimage','INT',0,firstchar="-")
    1119                 :             : 
    1120         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%np_spkpt
    1121                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'np_spkpt','INT',0,firstchar='-')
    1122                 :             : 
    1123         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nppert
    1124                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nppert','INT',0,firstchar="-")
    1125                 :             : 
    1126   [ +  -  +  + ]:        4564 :  if(multivals%ntypat/=0 .or. (multivals%ntypat==0 .and. ntypat/=npsp) )then
    1127         [ +  + ]:         144 :    intarr(1,:)=dtsets(:)%npsp
    1128                 :          32 :    call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npsp','INT',0)
    1129                 :             :  end if
    1130                 :             : 
    1131         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npspinor
    1132                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npspinor','INT',0,firstchar="-")
    1133                 :             : 
    1134         [ +  + ]:       30238 :  intarr(1,:)=dtsets(0:ndtset_alloc)%npulayit
    1135                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npulayit','INT',0)
    1136                 :             : 
    1137         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npweps
    1138                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npweps','INT',0)
    1139                 :             : 
    1140         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npwkss
    1141                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npwkss','INT',0)
    1142                 :             : 
    1143         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npwsigx
    1144                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npwsigx','INT',0)
    1145                 :             : 
    1146         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npwwfn
    1147                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npwwfn','INT',0)
    1148                 :             : 
    1149         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%np_slk
    1150                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'np_slk','INT',0,firstchar="-")
    1151                 :             : 
    1152         [ +  + ]:       30238 :  dprarr(1,:)=dtsets(:)%nqfd
    1153                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nqfd','DPR',0)
    1154                 :             : 
    1155         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nqpt
    1156                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nqpt','INT',0)
    1157                 :             : 
    1158         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nqptdm
    1159                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'nqptdm','INT',0)
    1160                 :             : 
    1161         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%npvel
    1162                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'npvel','INT',0)
    1163                 :             : 
    1164         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nscforder
    1165                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nscforder','INT',0)
    1166                 :             : 
    1167                 :             : !nshiftk
    1168   [ +  +  +  + ]:       25674 :  if(sum((dtsets(1:ndtset_alloc)%kptopt)**2)/=0)then
    1169                 :        3190 :    ndtset_kptopt=0
    1170         [ +  + ]:        6380 :    intarr(1:1,0)=dtsets(0)%nshiftk
    1171   [ -  +  +  -  :        9570 :    ABI_MALLOC(jdtset_kptopt,(0:ndtset_alloc))
          +  -  +  -  -  
                +  +  - ]
    1172                 :             : !  Define the set of datasets for which kptopt>0
    1173         [ +  + ]:       15722 :    do idtset=1,ndtset_alloc
    1174                 :       12532 :      kptopt=dtsets(idtset)%kptopt
    1175         [ +  + ]:       15722 :      if(kptopt>0)then
    1176                 :       11640 :        ndtset_kptopt=ndtset_kptopt+1
    1177                 :       11640 :        jdtset_kptopt(ndtset_kptopt)=jdtset_(idtset)
    1178         [ +  + ]:       23280 :        intarr(1:1,ndtset_kptopt)=dtsets(idtset)%nshiftk
    1179                 :             :      end if
    1180                 :             :    end do
    1181         [ +  + ]:        3190 :    if(ndtset_kptopt>0)then
    1182                 :        3186 :      call prttagm(dprarr,intarr,iout,jdtset_kptopt,2,marr,1,narrm,ncid,ndtset_kptopt,'nshiftk','INT',0)
    1183                 :             :    end if
    1184         [ -  + ]:        3190 :    ABI_FREE(jdtset_kptopt)
    1185                 :             :  end if
    1186                 :             : 
    1187         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nspden
    1188                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nspden','INT',0)
    1189                 :             : 
    1190         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nspinor
    1191                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nspinor','INT',0)
    1192                 :             : 
    1193         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nsppol
    1194                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nsppol','INT',0)
    1195                 :             : 
    1196         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nstep
    1197                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nstep','INT',0)
    1198                 :             : 
    1199         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nstep_mixed
    1200                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nstep_mixed','INT',0)
    1201                 :             : 
    1202         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nsym
    1203                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nsym','INT',0)
    1204                 :             : 
    1205         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ntime
    1206                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntime','INT',0)
    1207                 :             : 
    1208         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ntimimage
    1209                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntimimage','INT',0)
    1210                 :             : 
    1211         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ntypalch
    1212                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntypalch','INT',0)
    1213                 :             : 
    1214         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%ntypat
    1215                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'ntypat','INT',0,forceprint=2)
    1216                 :             : 
    1217                 :             : !nucdipmom
    1218         [ +  + ]:     4414852 :  dprarr(:,0)=0.0_dp
    1219                 :        4564 :  narr=3*natom ! default size for all datasets
    1220         [ +  + ]:       25674 :  do idtset=1,ndtset_alloc       ! specific size for each dataset
    1221                 :       21110 :    narrm(idtset)=3*dtsets(idtset)%natom
    1222         [ +  - ]:       21110 :    if (narrm(idtset)>0) then
    1223         [ +  + ]:       42220 :      dprarr(1:narrm(idtset),idtset)= reshape(dtsets(idtset)%nucdipmom(1:3,1:dtsets(idtset)%natom), [narrm(idtset)])
    1224                 :             :    end if
    1225   [ +  +  +  +  :      391626 :    if(sum(abs( dtsets(idtset)%nucdipmom(1:3,1:dtsets(idtset)%natom))) < tol12 ) narrm(idtset)=0
                   +  + ]
    1226                 :             :  end do
    1227                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,narr,narrm,ncid,ndtset_alloc,'nucdipmom','DPR',multivals%natom)
    1228                 :             : 
    1229         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nucefg
    1230                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nucefg','INT',0)
    1231                 :             : 
    1232         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nucfc
    1233                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nucfc','INT',0)
    1234                 :             : 
    1235         [ +  + ]:       30238 :  intarr(1,:)=dtsets(:)%nwfshist
    1236                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,2,marr,1,narrm,ncid,ndtset_alloc,'nwfshist','INT',0)
    1237                 :             : 
    1238         [ +  + ]:       30238 :  intarr(1,0:ndtset_alloc)=dtsets(0:ndtset_alloc)%nzchempot
    1239                 :        4564 :  call prttagm(dprarr,intarr,iout,jdtset_,1,marr,1,narrm,ncid,ndtset_alloc,'nzchempot','INT',0)
    1240                 :             : 
    1241                 :             : !###########################################################
    1242                 :             : !## Deallocation for generic arrays, and for i-n variables
    1243                 :             : 
    1244         [ -  + ]:        4564 :  ABI_FREE(dprarr)
    1245         [ -  + ]:        4564 :  ABI_FREE(intarr)
    1246         [ -  + ]:        4564 :  ABI_FREE(narrm)
    1247         [ -  + ]:        4564 :  ABI_FREE(nimagem)
    1248         [ -  + ]:        4564 :  ABI_FREE(dprarr_images)
    1249         [ -  + ]:        4564 :  ABI_FREE(prtimg)
    1250                 :             : 
    1251         [ -  + ]:        4564 :  ABI_FREE(natfix_)
    1252         [ -  + ]:        4564 :  ABI_FREE(iatfixio_)
    1253         [ -  + ]:        4564 :  ABI_FREE(natfixx_)
    1254         [ -  + ]:        4564 :  ABI_FREE(iatfixx_)
    1255         [ -  + ]:        4564 :  ABI_FREE(natfixy_)
    1256         [ -  + ]:        4564 :  ABI_FREE(iatfixy_)
    1257         [ -  + ]:        4564 :  ABI_FREE(natfixz_)
    1258         [ -  + ]:        4564 :  ABI_FREE(iatfixz_)
    1259                 :             : 
    1260                 :             :  DBG_EXIT("COLL")
    1261                 :             : 
    1262                 :        4564 : end subroutine outvar_i_n
    1263                 :             : !!***
    1264                 :             : 
    1265                 :             : end module m_outvar_i_n
    1266                 :             : !!***
        

Generated by: LCOV version 2.3-1