-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmachine_ifort.f90
34 lines (25 loc) · 1002 Bytes
/
machine_ifort.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module MACHINE
implicit none
character(LEN=2) :: END_LINE = ' ' // char(10)
character(LEN=1) :: FILSEP = '/' ! '/' for Unix, '\' for DOS or NT
integer, parameter :: HP = 0 ! Offset for first argument for GETARG
intrinsic :: Get_Command_Argument
contains
subroutine IO_ERROR ( MESSAGE, IOSTAT, FILE )
! Print MESSAGE and FILE, and then do something reasonable with IOSTAT.
character(len=*), intent(in) :: MESSAGE
integer, intent(in) :: IOSTAT
character(len=*), intent(in), optional :: FILE
integer :: L
! character(len=127) :: MSG ! From the Lahey IOSTAT_MSG intrinsic
write (*,*) message(:len_trim(message))
if ( present(file) ) then
l = len_trim(file)
write (*,*) file(:l)
end if
! call iostat_msg (iostat, msg) ! Lahey intrinsic
! write (*,*) msg(:len_trim(msg)) ! Print the error message
write (*,*) 'Error status code =', iostat
return
end subroutine IO_ERROR
end module MACHINE