TABLE OF CONTENTS


ABINIT/m_multibinit_main2 [ Modules ]

[ Top ] [ Modules ]

NAME

 m_multibinit_main2

FUNCTION

 multibinit_main2 is the main function of multibinit. It runs after
 the filenames from files file is read. It then does everything else.

 Datatypes:


 Subroutines:
 multibinit_main2

COPYRIGHT

 Copyright (C) 2001-2022 ABINIT group (hexu)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .
 For the initials of contributors, see ~abinit/doc/developers/contributors.txt .

SOURCE

25 #if defined HAVE_CONFIG_H
26 #include "config.h"
27 #endif
28 
29 #include "abi_common.h"
30 module m_multibinit_main2
31   use defs_basis
32   use defs_abitypes
33   use m_build_info
34   use m_xmpi
35   use m_xomp
36   use m_abicore
37   use m_errors
38   use m_multibinit_manager, only: mb_manager_t
39   
40   implicit none

m_multibinit_main/herald_multibinit [ Functions ]

[ Top ] [ m_multibinit_main ] [ Functions ]

NAME

  herald_multibinit

FUNCTION

  Prints out a message to unit iout giving info about current
  code, version of code, platform, and starting date.
  Modified from m_special_msg.F90/herald

INPUTS

  code_name= code name
  code_version= code version
  iout=unit number for output

OUTPUT

  (only writing)

SOURCE

 88 subroutine herald_multibinit(code_name,code_version,iout, lattmode)
 89 
 90 !Arguments ------------------------------------
 91  integer,intent(in) :: iout
 92  character(len=*),intent(in) :: code_name
 93  character(len=*),intent(in) :: code_version
 94  logical, intent(in) :: lattmode ! 1 lattice, 0 other
 95 
 96 !Local variables-------------------------------
 97  integer :: day,dd,ja,jy,jm,jdn,mm,mm_rel,year,year_rel
 98  integer :: values(8)
 99  character(len=5) :: strzone
100  character(len=8) :: strdat
101  character(len=10) :: strtime
102  character(len=500) :: msg
103  character(len=3),parameter :: day_names(7)=(/'Mon','Tue','Wed','Thu','Fri','Sat','Sun'/)
104  character(len=3),parameter :: month_names(12)=(/'Jan','Feb','Mar','Apr','May','Jun',&
105                                                  'Jul','Aug','Sep','Oct','Nov','Dec'/)
106 
107 ! *************************************************************************
108 
109 !RELEASE TIME FROM ABIRULES
110  year_rel=2022
111  mm_rel=07
112 !END OF RELEASE TIME
113 
114  write(iout, '(a,/,a,/,a,/,a)' ) &
115 '******************************************************************************************', &
116 '                                Welcome to MULTIBINIT,                         ', &
117 ' a software platform designed for the construction and use of second-principles models', &
118 '                   for lattice, spin and electron degrees of freedom.'
119 
120 
121 !The technique used hereafter is the only one that we have found to obtain
122 !perfect transferability across platforms and OS.
123  write(iout, '(/,a,a,a,a,a)' ) '.Version ',trim(code_version),' of ',trim(code_name),' '
124 #if defined HAVE_MPI
125  write(iout, '(a,a,a,/)' ) '.(MPI version, prepared for a ',build_target,' computer) '
126 #else
127  write(iout, '(a,a,a,/)' ) '.(sequential version, prepared for a ',build_target,' computer) '
128 #endif
129 
130 
131 
132 !GNU GPL license
133  write(iout, '(a,/,a,a,a,/,a,/,a,/,a,/)' ) &
134  '.Copyright (C) 1998-2022 ABINIT group . ',&
135  ' ',trim(code_name),' comes with ABSOLUTELY NO WARRANTY.',&
136  ' It is free software, and you are welcome to redistribute it',&
137  ' under certain conditions (GNU General Public License,',&
138  ' see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt).'
139 
140 
141 if(.not. lattmode) then
142  write(iout, '(a,/,a,/,a,/,a,/,a,/)' ) &
143  ' ABINIT is a project of the Universite Catholique de Louvain,',&
144  ' Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt .',&
145  ' Please read https://docs.abinit.org/theory/acknowledgments for suggested',&
146  ' acknowledgments of the ABINIT effort.',&
147  ' For more information, see https://www.abinit.org .'
148 endif
149 
150  write(iout, '(a,/,a,/)' ) &
151 ' MULTIBINIT is a software project of the University of Liege', &
152 ' (PHYTHEMA & NANOMAT groups), in collaboration with other partners.'
153 
154  if (lattmode) then
155    write(iout, '(a,/,/,a,/,/,a,/, a,/,/, a,/, a,/, a,/,/, a,/,/, a/,/)' ) &
156 '-----------------------------------------------------------------------------------------', &
157 '                          MULTIBINIT - LATTICE MODELS                   ', &
158 ' Project initiated and coordinated by Philippe GHOSEZ and his group at ULiege', &
159 '   (Philippe.Ghosez@uliege.be).',  &
160 ' Main contributors: Alexandre MARTIN, Jordan BIEDER, Michael Marcus SCHMITT,', &
161 '   Louis BASTOGNE, Xu HE, Alireza SASANI, Huazhang ZHANG, Subhadeep BANDYOPADHYAY,', &
162 '   Philippe GHOSEZ.', &
163 ' Technical support: Xu HE (X.He@uliege.be)', &
164 '*****************************************************************************************'
165  else
166    write(iout, '(a,/)' ) &
167    '*****************************************************************************************'
168  end if
169 
170 
171 
172 !Get year, month and day
173  call date_and_time(strdat,strtime,strzone,values)
174  year=values(1)
175  mm=values(2)
176  dd=values(3)
177 
178 !Get day of the week
179  if (mm.gt.2) then
180    jy=year
181    jm=mm+1
182  else
183    jy=year-1
184    jm=mm+13
185  end if
186  jdn=int(365.25d0*jy)+int(30.6001d0*jm)+dd+1720995
187  ja=int(0.01d0*jy)
188  jdn=jdn+2-ja+int(quarter*ja)
189  day=mod(jdn,7)+1
190 
191 !Print date in nice format (* new format *)
192  write(iout, '(/,a,a,1x,i2,1x,a,1x,i4,a,/,a,i2.2,a,i2.2,a)' ) &
193  '.Starting date : ',day_names(day),dd,month_names(mm),year,'.','- ( at ',values(5),'h',values(6),' )'
194  write(iout,*)' '
195 
196 !Impose a maximal life cycle of 3 years
197  if(year>year_rel+3 .or. (year==year_rel+3 .and. mm>mm_rel) ) then
198    write(msg, '(5a,i4,5a)' )&
199    '- The starting date is more than 3 years after the initial release',ch10,&
200    '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,&
201    '- This version of ABINIT is not supported anymore.',ch10,&
202    '- Action: please, switch to a more recent version of ABINIT.'
203    call wrtout(iout,msg,'COLL')
204 
205 !  Gives a warning beyond 2 years
206  else if(year>year_rel+2 .or. (year==year_rel+2 .and. mm>mm_rel) ) then
207    write(msg, '(5a,i4,6a)' )&
208    '- The starting date is more than 2 years after the initial release',ch10,&
209    '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,&
210    '- Note that the use beyond 3 years after the release will not be supported.',ch10,&
211    '- Action: please, switch to a more recent version of ABINIT.',ch10
212    call wrtout(iout,msg,'COLL')
213  end if
214 
215 end subroutine herald_multibinit

m_multibinit_main2/multibinit_main2 [ Functions ]

[ Top ] [ m_multibinit_main2 ] [ Functions ]

NAME

 multibinit_main2

FUNCTION

 The main function

INPUTS

 filnam: file names from files file

OUTPUT

SOURCE

59   subroutine multibinit_main2(input_path, filnam, dry_run)
60     character(len=fnlen), intent(inout) :: input_path
61     character(len=fnlen), intent(inout) :: filnam(18)
62     integer, intent(in) :: dry_run
63     type(mb_manager_t) :: manager
64     call manager%run_all(input_path, filnam, dry_run)
65   end subroutine multibinit_main2