Commit 563c6b3a authored by Daniel Wortmann's avatar Daniel Wortmann

Added routine to judft to check if files are readable

parent 8aa81ad0
......@@ -23,7 +23,7 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "XL")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_AIX")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message("gfortran detected")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "6.3.0")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "6.1.0")
message(FATAL_ERROR "Only modern versions of gfortran >6.3 will be able to compile FLEUR\nYou need to specify a different compiler.\nSee the docs at www.flapw.de.\n")
endif()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -fopenmp -fdefault-real-8 ")
......
......@@ -33,9 +33,18 @@
USE m_judft_time
IMPLICIT NONE
PRIVATE
PUBLIC juDFT_error,juDFT_warn,juDFT_end
PUBLIC juDFT_error,juDFT_warn,juDFT_end,judft_file_readable
CONTAINS
SUBROUTINE judfT_file_readable(filename,warning)
IMPLICIT NONE
CHARACTER(len=*),INTENT(IN):: filename
LOGICAL,INTENT(IN),OPTIONAL:: warning
LOGICAL :: l_exist
INQUIRE(file=filename,exist=l_exist)
IF (.not.l_exist) CALL judft_error("File not readable:"//filename,hint="FLEUR wants to read a file that is not present",warning=warning)
END SUBROUTINE judfT_file_readable
SUBROUTINE juDFT_error(message,calledby,hint,no,warning,file,line)
IMPLICIT NONE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment