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