Files renamed and makefile make compatible with ifort.
This commit is contained in:
parent
3b125d0952
commit
af74205932
25 changed files with 5439 additions and 0 deletions
43
src/modules/moduleErrors.f90
Normal file
43
src/modules/moduleErrors.f90
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
!moduleErrors: Manages the different type of errors the program can produce.
|
||||
! By errors we understand critical errors (that stop the program),
|
||||
! warnings (that only output a message with a WARNING tag),
|
||||
! o verbose outputs that can be used for debugging porpouse.
|
||||
MODULE moduleErrors
|
||||
CONTAINS
|
||||
SUBROUTINE criticalError(msg, pgr)
|
||||
IMPLICIT NONE
|
||||
|
||||
CHARACTER(*), INTENT(in):: msg, pgr
|
||||
CHARACTER(:), ALLOCATABLE:: errorMsg
|
||||
|
||||
errorMsg = "CRITICAL error in " // pgr // " with message:" // NEW_LINE('A') // msg
|
||||
|
||||
ERROR STOP errorMsg
|
||||
|
||||
END SUBROUTINE criticalError
|
||||
|
||||
SUBROUTINE warningError(msg)
|
||||
IMPLICIT NONE
|
||||
|
||||
CHARACTER(*), INTENT(in):: msg
|
||||
CHARACTER(:), ALLOCATABLE:: errorMsg
|
||||
|
||||
errorMsg = "WARNING: " // msg
|
||||
|
||||
WRITE (*, '(A)') errorMsg
|
||||
|
||||
END SUBROUTINE warningError
|
||||
|
||||
SUBROUTINE verboseError(msg)
|
||||
IMPLICIT NONE
|
||||
|
||||
CHARACTER(*), INTENT(in):: msg
|
||||
CHARACTER(:), ALLOCATABLE:: errorMsg
|
||||
|
||||
errorMsg = msg
|
||||
|
||||
WRITE (*, '(A)') errorMsg
|
||||
|
||||
END SUBROUTINE verboseError
|
||||
|
||||
END MODULE moduleErrors
|
||||
Loading…
Add table
Add a link
Reference in a new issue