TABLE OF CONTENTS
ABINIT/init10 [ Functions ]
NAME
init10
FUNCTION
Initialize the code multibinit: write heading and make the first i/os
COPYRIGHT
Copyright (C) 1999-2018 ABINIT group (XG) This file is distributed under the terms of the GNU General Public Licence, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt . For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
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
40 #if defined HAVE_CONFIG_H 41 #include "config.h" 42 #endif 43 44 #include "abi_common.h" 45 46 47 subroutine init10(filnam,comm) 48 49 use defs_basis 50 use m_xmpi 51 use m_errors 52 use m_ab7_invars 53 54 use m_fstrings, only : int2char4 55 use m_io_tools, only : open_file 56 57 !This section has been created automatically by the script Abilint (TD). 58 !Do not modify the following lines by hand. 59 #undef ABI_FUNC 60 #define ABI_FUNC 'init10' 61 !End of the abilint section 62 63 implicit none 64 65 !Arguments ------------------------------- 66 !scalars 67 integer,intent(in) :: comm 68 !arrays 69 character(len=*),intent(out) :: filnam(17) 70 71 !Local variables-------------------------- 72 !scalars 73 integer,parameter :: master=0 74 integer :: me,nproc,ierr 75 integer :: ii,io 76 !arrays 77 ! ********************************************************************* 78 79 !Determine who I am in comm 80 me = xmpi_comm_rank(comm) 81 nproc = xmpi_comm_size(comm) 82 83 filnam(:) = "" 84 85 if (me==master)then 86 !Read the file names 87 write(std_out,*)' Give name for formatted input file : ' 88 read(std_in, '(a)',IOSTAT=io) filnam(1) 89 write(std_out,'(a,a)' )'- ',trim(filnam(1)) 90 write(std_out,*)' Give name for formatted output file : ' 91 read(std_in, '(a)',IOSTAT=io) filnam(2) 92 write(std_out,'(a,a)' )'- ',trim(filnam(2)) 93 write(std_out,*)' Give name for input derivative database of reference structure',& 94 & ' (DDB or XML file): ' 95 read(std_in, '(a)',IOSTAT=io) filnam(3) 96 write(std_out,'(a,a)' )'- ',trim(filnam(3)) 97 write(std_out,*)' Give name for input coefficients from fitted polynomial',& 98 & ' (XML file or enter no): ' 99 read(std_in, '(a)',IOSTAT=io) filnam(4) 100 write(std_out,'(a,a)' )'- ',trim(filnam(4)) 101 write(std_out,*)' Give name for molecular dynamics',& 102 & ' (netcdf file or enter no): ' 103 read(std_in, '(a)',IOSTAT=io) filnam(5) 104 write(std_out,'(a,a)' )'- ',trim(filnam(5)) 105 106 ii = 6 107 do while (io>=0 .and. ii<18) 108 write(std_out,*)' Give name for input derivative database (DDB or XML file): ' 109 read(std_in, '(a)',IOSTAT=io) filnam(ii) 110 write(std_out,'(a,a)' )'- ',trim(filnam(ii)) 111 if(trim(filnam(ii))==" ") exit 112 ii = ii + 1 113 end do 114 end if 115 116 !Communicate filenames to all processors 117 call xmpi_bcast (filnam, master, comm, ierr) 118 119 end subroutine init10