writeOutHeader.F90 1.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
!--------------------------------------------------------------------------------
! Copyright (c) 2017 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------

MODULE m_writeOutHeader

CONTAINS

  SUBROUTINE writeOutHeader()
    USE m_juDFT
    USE m_utility
    USE m_constants
    USE m_compile_descr
    IMPLICIT NONE
    CHARACTER(len=9) :: cppflag(11)
18
    CHARACTER(:), ALLOCATABLE:: infostring
19 20 21 22 23 24 25 26 27 28 29 30 31 32
    INTEGER          :: i,j

    WRITE (6,*) 'This output is generated by ',version_const
    WRITE (6,*) '                                      * * '
#if ( defined(CPP_AIX) )
    WRITE (6,*)  '                                    * \\:/ *'
#else
    WRITE (6,*)  '                                    * \:/ *'
#endif
    WRITE (6,*)  '                                    *  |  *'
    WRITE (6,*)  '                                      * *  '
    WRITE (6,*) 

    CALL get_compile_desc_string(infostring)
33
    write(6,'(a)') infostring
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
    CALL getComputerArchitectures(cppflag,i) ! First determine the architecture
    IF (i.GT.1) THEN 
       WRITE (6,*) 'You set compiler flags for more than one'
       WRITE (6,*) 'architecture: ', (cppflag(j),j=1,i)
       WRITE (6,*) 'Define only one system architecture! '
       CALL juDFT_error("Define only one system architecture! "&
            &         ,calledby ="dimens")
    ENDIF
    IF (i == 0) THEN
       WRITE (6,*) 'No system architecture specified in Makefile'
       cppflag(1) = 'GEN'
    ENDIF
    !
    !       check for double precision etc.
    !

    CALL getAdditionalCompilationFlags(cppflag,i)
    IF (i.GT.0) THEN
       WRITE (6,*) 'Additional flags are: ', (cppflag(j),j=1,i)
    ENDIF

  END SUBROUTINE writeOutHeader

END MODULE m_writeOutHeader