Branch data Line data Source code
1 : : !!****m* ABINIT/m_multibinit_main2
2 : : !! NAME
3 : : !! m_multibinit_main2
4 : : !!
5 : : !! FUNCTION
6 : : !! multibinit_main2 is the main function of multibinit. It runs after
7 : : !! the filenames from files file is read. It then does everything else.
8 : : !!
9 : : !! Datatypes:
10 : : !!
11 : : !!
12 : : !! Subroutines:
13 : : !! multibinit_main2
14 : : !!
15 : : !!
16 : : !! COPYRIGHT
17 : : !! Copyright (C) 2001-2026 ABINIT group (hexu)
18 : : !! This file is distributed under the terms of the
19 : : !! GNU General Public License, see ~abinit/COPYING
20 : : !! or http://www.gnu.org/copyleft/gpl.txt .
21 : : !! For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
22 : : !!
23 : : !! SOURCE
24 : :
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_xmpi
34 : : use m_xomp
35 : : use m_abicore
36 : : use m_errors
37 : : use m_build_info, only: abinit_version, build_target
38 : : use m_multibinit_manager, only: mb_manager_t
39 : :
40 : : implicit none
41 : :
42 : : !!***
43 : : contains
44 : :
45 : : !!****f* m_multibinit_main2/multibinit_main2
46 : : !!
47 : : !! NAME
48 : : !! multibinit_main2
49 : : !!
50 : : !! FUNCTION
51 : : !! The main function
52 : : !!
53 : : !! INPUTS
54 : : !! filnam: file names from files file
55 : : !!
56 : : !! OUTPUT
57 : : !!
58 : : !! SOURCE
59 : 6 : 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 [ + + ]: 18 : type(mb_manager_t) :: manager
64 : 6 : call manager%run_all(input_path, filnam, dry_run)
65 [ - + - + : 6 : end subroutine multibinit_main2
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - +
- + - + -
+ - + - -
- - ]
66 : : !!***
67 : :
68 : :
69 : : !!****f* m_multibinit_main/herald_multibinit
70 : : !! NAME
71 : : !! herald_multibinit
72 : : !!
73 : : !! FUNCTION
74 : : !! Prints out a message to unit iout giving info about current
75 : : !! code, version of code, platform, and starting date.
76 : : !! Modified from m_special_msg.F90/herald
77 : : !!
78 : : !! INPUTS
79 : : !! code_name= code name
80 : : !! code_version= code version
81 : : !! iout=unit number for output
82 : : !!
83 : : !! OUTPUT
84 : : !! (only writing)
85 : : !!
86 : : !! SOURCE
87 : :
88 : 98 : 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 : 98 : year_rel=2022
111 : 98 : mm_rel=07
112 : : !END OF RELEASE TIME
113 : :
114 : : write(iout, '(a,/,a,/,a,/,a)' ) &
115 : 98 : '******************************************************************************************', &
116 : 98 : ' Welcome to MULTIBINIT, ', &
117 : 98 : ' a software platform designed for the construction and use of second-principles models', &
118 : 196 : ' 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 : 98 : write(iout, '(/,a,a,a,a,a)' ) '.Version ',trim(code_version),' of ',trim(code_name),' '
124 : : #if defined HAVE_MPI
125 : 98 : 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 : 98 : '.Copyright (C) 1998-2026 ABINIT group . ',&
135 : 98 : ' ',trim(code_name),' comes with ABSOLUTELY NO WARRANTY.',&
136 : 98 : ' It is free software, and you are welcome to redistribute it',&
137 : 98 : ' under certain conditions (GNU General Public License,',&
138 : 196 : ' see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt).'
139 : :
140 : :
141 [ + + ]: 98 : if(.not. lattmode) then
142 : : write(iout, '(a,/,a,/,a,/,a,/,a,/)' ) &
143 : 12 : ' ABINIT is a project of the Universite Catholique de Louvain,',&
144 : 12 : ' Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt .',&
145 : 12 : ' Please read https://docs.abinit.org/theory/acknowledgments for suggested',&
146 : 12 : ' acknowledgments of the ABINIT effort.',&
147 : 24 : ' For more information, see https://www.abinit.org .'
148 : : endif
149 : :
150 : : write(iout, '(a,/,a,/)' ) &
151 : 98 : ' MULTIBINIT is a software project of the University of Liege', &
152 : 196 : ' (PHYTHEMA & NANOMAT groups), in collaboration with other partners.'
153 : :
154 [ + + ]: 98 : if (lattmode) then
155 : : write(iout, '(a,/,/,a,/,/,a,/, a,/,/, a,/, a,/, a,/,/, a,/,/, a/,/)' ) &
156 : 86 : '-----------------------------------------------------------------------------------------', &
157 : 86 : ' MULTIBINIT - LATTICE MODELS ', &
158 : 86 : ' Project initiated and coordinated by Philippe GHOSEZ and his group at ULiege', &
159 : 86 : ' (Philippe.Ghosez@uliege.be).', &
160 : 86 : ' Main contributors: Alexandre MARTIN, Jordan BIEDER, Michael Marcus SCHMITT,', &
161 : 86 : ' Louis BASTOGNE, Xu HE, Alireza SASANI, Huazhang ZHANG, Subhadeep BANDYOPADHYAY,', &
162 : 86 : ' Philippe GHOSEZ.', &
163 : 86 : ' Technical support: Xu HE (X.He@uliege.be)', &
164 : 172 : '*****************************************************************************************'
165 : : else
166 : : write(iout, '(a,/)' ) &
167 : 12 : '*****************************************************************************************'
168 : : end if
169 : :
170 : :
171 : :
172 : : !Get year, month and day
173 : 98 : call date_and_time(strdat,strtime,strzone,values)
174 : 98 : year=values(1)
175 : 98 : mm=values(2)
176 : 98 : dd=values(3)
177 : :
178 : : !Get day of the week
179 [ + - ]: 98 : if (mm.gt.2) then
180 : 98 : jy=year
181 : 98 : jm=mm+1
182 : : else
183 : 0 : jy=year-1
184 : 0 : jm=mm+13
185 : : end if
186 : 98 : jdn=int(365.25d0*jy)+int(30.6001d0*jm)+dd+1720995
187 : 98 : ja=int(0.01d0*jy)
188 : 98 : jdn=jdn+2-ja+int(quarter*ja)
189 : 98 : 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 : 98 : '.Starting date : ',day_names(day),dd,month_names(mm),year,'.','- ( at ',values(5),'h',values(6),' )'
194 : 98 : write(iout,*)' '
195 : :
196 : : !Impose a maximal life cycle of 3 years
197 [ - + - - : 98 : if(year>year_rel+3 .or. (year==year_rel+3 .and. mm>mm_rel) ) then
- - ]
198 : : write(msg, '(5a,i4,5a)' )&
199 : 98 : '- The starting date is more than 3 years after the initial release',ch10,&
200 : 98 : '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,&
201 : 98 : '- This version of ABINIT is not supported anymore.',ch10,&
202 : 196 : '- Action: please, switch to a more recent version of ABINIT.'
203 : 98 : call wrtout(iout,msg,'COLL')
204 : :
205 : : ! Gives a warning beyond 2 years
206 [ # # # # : 0 : else if(year>year_rel+2 .or. (year==year_rel+2 .and. mm>mm_rel) ) then
# # ]
207 : : write(msg, '(5a,i4,6a)' )&
208 : 0 : '- The starting date is more than 2 years after the initial release',ch10,&
209 : 0 : '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,&
210 : 0 : '- Note that the use beyond 3 years after the release will not be supported.',ch10,&
211 : 0 : '- Action: please, switch to a more recent version of ABINIT.',ch10
212 : 0 : call wrtout(iout,msg,'COLL')
213 : : end if
214 : :
215 : 98 : end subroutine herald_multibinit
216 : : !!***
217 : :
218 : :
219 : :
220 : : end module m_multibinit_main2
|