TABLE OF CONTENTS


ABINIT/init10 [ Functions ]

[ Top ] [ Functions ]

NAME

 init10

FUNCTION

 Initialize the code multibinit: write heading and make the first i/os

INPUTS

OUTPUT

 character(len=fnlen) filnam(4)=character strings giving file names

NOTES

 1. Should be executed by one processor only.
 2. File names refer to following files, in order:
     (1) Formatted input file
     (2) Formatted output file
     (3) Input for reference structure and harmonic part (DDB file or XML)
     (4) Input for XML with polynomial coefficients (DDB file)
     (5) Input for HIST file
     (6-14) Input Derivative Database (XML format)

PARENTS

      multibinit

CHILDREN

      xmpi_bcast

SOURCE

 75 subroutine init10(filnam,comm)
 76 
 77  use defs_basis
 78  use m_xmpi
 79  use m_errors
 80  use m_ab7_invars
 81 
 82  use m_fstrings,     only : int2char4
 83  use m_io_tools,     only : open_file
 84 
 85 !This section has been created automatically by the script Abilint (TD).
 86 !Do not modify the following lines by hand.
 87 #undef ABI_FUNC
 88 #define ABI_FUNC 'init10'
 89 !End of the abilint section
 90 
 91  implicit none
 92 
 93 !Arguments -------------------------------
 94 !scalars
 95  integer,intent(in) :: comm
 96 !arrays
 97  character(len=*),intent(out) :: filnam(17)
 98 
 99 !Local variables--------------------------
100 !scalars
101  integer,parameter :: master=0
102  integer :: me,nproc,ierr
103  integer :: ii,io
104 !arrays
105 ! *********************************************************************
106 
107 !Determine who I am in comm
108  me = xmpi_comm_rank(comm)
109  nproc = xmpi_comm_size(comm)
110 
111  filnam(:) = ""
112 
113  if (me==master)then
114 !Read the file names
115    write(std_out,*)' Give name for      formatted input file : '
116    read(std_in, '(a)',IOSTAT=io) filnam(1)
117    write(std_out,'(a,a)' )'-   ',trim(filnam(1))
118    write(std_out,*)' Give name for     formatted output file : '
119    read(std_in, '(a)',IOSTAT=io) filnam(2)
120    write(std_out,'(a,a)' )'-   ',trim(filnam(2))
121    write(std_out,*)' Give name for input derivative database of reference structure',&
122 &                  ' (DDB or XML file): '
123    read(std_in, '(a)',IOSTAT=io) filnam(3)
124    write(std_out,'(a,a)' )'-   ',trim(filnam(3))
125    write(std_out,*)' Give name for input coefficients from fitted polynomial',&
126 &                  ' (XML file or enter no): '
127    read(std_in, '(a)',IOSTAT=io) filnam(4)
128    write(std_out,'(a,a)' )'-   ',trim(filnam(4))
129    write(std_out,*)' Give name for molecular dynamics',&
130 &                  ' (netcdf file or enter no): '
131    read(std_in, '(a)',IOSTAT=io) filnam(5)
132    write(std_out,'(a,a)' )'-   ',trim(filnam(5))
133 ! TODO hexu: shift ii, add possible file format for spin when needed
134    ii = 6
135    !TODO hexu: shift ii
136    do while (io>=0 .and. ii<18)
137      write(std_out,*)' Give name for input derivative database (DDB or XML file): '
138      read(std_in, '(a)',IOSTAT=io) filnam(ii)
139      write(std_out,'(a,a)' )'-   ',trim(filnam(ii))
140      if(trim(filnam(ii))==" ") exit
141      ii = ii + 1
142    end do
143  end if
144 
145 !Communicate filenames to all processors
146  call xmpi_bcast (filnam, master, comm, ierr)
147 
148 end subroutine init10

ABINIT/m_init10 [ Modules ]

[ Top ] [ Modules ]

NAME

  m_init10

FUNCTION

   It should be "contained" in multibinit but abilint does not accept "contains" in programs.

COPYRIGHT

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

PARENTS

CHILDREN

SOURCE

21 #if defined HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24 
25 #include "abi_common.h"
26 
27 module m_init10
28 
29  use defs_basis
30  use m_errors
31  use m_abicore
32 
33  implicit none
34 
35  private