TABLE OF CONTENTS


ABINIT/herald [ Functions ]

[ Top ] [ Functions ]

NAME

  herald

FUNCTION

  Prints out a message to unit iout giving info about current
  code, version of code, platform, and starting date.

COPYRIGHT

  Copyright (C) 1998-2018 ABINIT group (DCA, XG, GMR, LSI, MM, MT)
  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.

INPUTS

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

OUTPUT

  (only writing)

PARENTS

      abinit,aim,anaddb,bsepostproc,cut3d,fftprof,ioprof,lapackprof,mrgddb
      mrgdv,mrggkk,mrgscr,multibinit,optic,ujdet,vdw_kernelgen

CHILDREN

      date_and_time,wrtout

SOURCE

 35 #if defined HAVE_CONFIG_H
 36 #include "config.h"
 37 #endif
 38 
 39 #include "abi_common.h"
 40 
 41 
 42 subroutine herald(code_name,code_version,iout)
 43 
 44  use defs_basis
 45  use m_build_info
 46 
 47 !This section has been created automatically by the script Abilint (TD).
 48 !Do not modify the following lines by hand.
 49 #undef ABI_FUNC
 50 #define ABI_FUNC 'herald'
 51  use interfaces_14_hidewrite, except_this_one => herald
 52 !End of the abilint section
 53 
 54  implicit none
 55 
 56 !Arguments ------------------------------------
 57  integer,intent(in) :: iout
 58  character(len=*),intent(in) :: code_name
 59  character(len=*),intent(in) :: code_version
 60 
 61 !Local variables-------------------------------
 62  integer :: day,dd,ja,jy,jm,jdn,mm,mm_rel,year,year_rel
 63  integer :: values(8)
 64  character(len=5) :: strzone
 65  character(len=8) :: strdat
 66  character(len=10) :: strtime
 67  character(len=500) :: message
 68  character(len=3),parameter :: day_names(7)=(/'Mon','Tue','Wed','Thu','Fri','Sat','Sun'/)
 69  character(len=3),parameter :: month_names(12)=(/'Jan','Feb','Mar','Apr','May','Jun',&
 70 &                                                'Jul','Aug','Sep','Oct','Nov','Dec'/)
 71 
 72 ! *************************************************************************
 73 
 74 !RELEASE TIME FROM ABIRULES
 75  year_rel=2018
 76  mm_rel=7
 77 !END OF RELEASE TIME
 78 
 79 !The technique used hereafter is the only one that we have found to obtain
 80 !perfect transferability across platforms and OS.
 81  write(iout, '(/,a,a,a,a,a)' ) '.Version ',trim(code_version),' of ',trim(code_name),' '
 82 #if defined HAVE_MPI
 83  write(iout, '(a,a,a,/)' ) '.(MPI version, prepared for a ',build_target,' computer) '
 84 #else
 85  write(iout, '(a,a,a,/)' ) '.(sequential version, prepared for a ',build_target,' computer) '
 86 #endif
 87 
 88 !GNU GPL license
 89  write(iout, '(a,/,a,a,a,/,a,/,a,/,a,/)' ) &
 90 & '.Copyright (C) 1998-2018 ABINIT group . ',&
 91 & ' ',trim(code_name),' comes with ABSOLUTELY NO WARRANTY.',&
 92 & ' It is free software, and you are welcome to redistribute it',&
 93 & ' under certain conditions (GNU General Public License,',&
 94 & ' see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt).'
 95 
 96  if(trim(code_name)=='OPTIC')then
 97    write(iout, '(a,a,a,/,a,/,a,/,a,/,a,/)' ) &
 98 &   ' ',trim(code_name),' has originally been developed by',&
 99 &   ' Sangeeta Sharma and incorporated in ABINIT with the help of M. Verstraete.',&
100 &   ' Please refer to : ',&
101 &   ' S. Sharma, J. K. Dewhurst and C. Ambrosch-Draxl, Phys. Rev. B 67, 165332 (2003), and',&
102 &   ' S. Sharma and C. Ambrosch-Draxl, Physica Scripta T 109 (2004).'
103  end if
104 
105  write(iout, '(a,/,a,/,a,/,a,/,a)' ) &
106 & ' ABINIT is a project of the Universite Catholique de Louvain,',&
107 & ' Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt .',&
108 & ' Please read ~abinit/doc/users/acknowledgments.html for suggested',&
109 & ' acknowledgments of the ABINIT effort.',&
110 & ' For more information, see https://www.abinit.org .'
111 
112 !Get year, month and day
113  call date_and_time(strdat,strtime,strzone,values)
114  year=values(1)
115  mm=values(2)
116  dd=values(3)
117 
118 !Get day of the week
119  if (mm.gt.2) then
120    jy=year
121    jm=mm+1
122  else
123    jy=year-1
124    jm=mm+13
125  end if
126  jdn=int(365.25d0*jy)+int(30.6001d0*jm)+dd+1720995
127  ja=int(0.01d0*jy)
128  jdn=jdn+2-ja+int(quarter*ja)
129  day=mod(jdn,7)+1
130 
131 !Print date in nice format (* new format *)
132  write(iout, '(/,a,a,1x,i2,1x,a,1x,i4,a,/,a,i2.2,a,i2.2,a)' ) &
133 & '.Starting date : ',day_names(day),dd,month_names(mm),year,'.','- ( at ',values(5),'h',values(6),' )'
134  write(iout,*)' '
135 
136 !Impose a maximal life cycle of 3 years
137  if(year>year_rel+3 .or. (year==year_rel+3 .and. mm>mm_rel) ) then
138    write(message, '(5a,i4,5a)' )&
139 &   '- The starting date is more than 3 years after the initial release',ch10,&
140 &   '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,&
141 &   '- This version of ABINIT is not supported anymore.',ch10,&
142 &   '- Action: please, switch to a more recent version of ABINIT.'
143    call wrtout(iout,message,'COLL')
144 
145 !  Gives a warning beyond 2 years
146  else if(year>year_rel+2 .or. (year==year_rel+2 .and. mm>mm_rel) ) then
147    write(message, '(5a,i4,6a)' )&
148 &   '- The starting date is more than 2 years after the initial release',ch10,&
149 &   '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,&
150 &   '- Note that the use beyond 3 years after the release will not be supported.',ch10,&
151 &   '- Action: please, switch to a more recent version of ABINIT.',ch10
152    call wrtout(iout,message,'COLL')
153  end if
154 
155 end subroutine herald