26 integer,
intent(in) :: myPE
28 character(LEN=255) :: filename
30 write(filename,
'("debug",f6.3)') dble(mype)/dble(1000)
31 print*,
'filename ', filename
33 open(
unit_log, file=filename, access=
'sequential',form=
'formatted',convert=
'big_endian')
40 subroutine assert_i( lcond, msg, value )
41 logical,
intent(in) :: lcond
42 character(len=*),
intent(in) :: msg
43 integer,
intent(in) :: value
46 print*,
'Assertion error: ', msg,
value 54 subroutine assert_i2( lcond, msg, value, value2 )
55 logical,
intent(in) :: lcond
56 character(len=*),
intent(in) :: msg
57 integer,
intent(in) ::
value, value2
60 print*,
'Assertion error: ', msg,
value, value2
70 subroutine assert_d( lcond, msg, value )
71 logical,
intent(in) :: lcond
72 character(len=*),
intent(in) :: msg
73 double precision,
intent(in) :: value
76 print*,
'Assertion error: ', msg,
value 83 subroutine assert_d2( lcond, msg, value, value2 )
84 logical,
intent(in) :: lcond
85 character(len=*),
intent(in) :: msg
86 double precision,
intent(in) ::
value, value2
89 print*,
'Assertion error: ', msg,
value, value2
98 character(len=*),
intent(in) :: name, msg
100 character(len=80) :: line(1)
109 character(len=*),
intent(in) :: name, msg
110 integer,
intent(in),
dimension(:) :: x
115 character(len=80) :: line(1+size(x))
122 do i=lbound(x,1),ubound(x,1)
124 write(line(ip), 9001) i, x(i)
125 9001
format(
'i = ', i7,
' value = ', i9 )
136 character(len=*),
intent(in) :: name, msg
137 double precision,
intent(in),
dimension(:) :: x
142 character(len=80) :: line(1+size(x))
149 do i=lbound(x,1),ubound(x,1)
151 write(line(ip), 9001) i, x(i)
152 9001
format(
'i = ', i7,
' value = ', 1pd30.10 )
164 character(len=*),
intent(in) :: name, msg
165 integer,
intent(in) :: x1
166 integer,
intent(in),
optional :: x2,x3,x4
168 character(len=80) :: line(1)
172 if (
present(x2))
then 175 if (
present(x3))
then 178 if (
present(x4))
then 184 write(line(1),*) msg, x1
186 write(line(1),*) msg, x1, x2
188 write(line(1),*) msg, x1, x2, x3
190 write(line(1),*) msg, x1, x2, x3, x4
203 character(len=*),
intent(in) :: name, msg
204 double precision,
intent(in) :: x1
205 double precision,
intent(in),
optional :: x2,x3,x4
207 character(len=80) :: line(1)
211 if (
present(x2))
then 214 if (
present(x3))
then 217 if (
present(x4))
then 223 write(line(1),*) msg, x1
225 write(line(1),*) msg, x1, x2
227 write(line(1),*) msg, x1, x2, x3
229 write(line(1),*) msg, x1, x2, x3, x4
240 character(len=*),
intent(in) :: name, msg
241 logical,
intent(in) :: x1
242 logical,
intent(in),
optional :: x2,x3,x4
244 character(len=80) :: line(1)
248 if (
present(x2))
then 251 if (
present(x3))
then 254 if (
present(x4))
then 260 write(line(1),*) msg, x1
262 write(line(1),*) msg, x1, x2
264 write(line(1),*) msg, x1, x2, x3
266 write(line(1),*) msg, x1, x2, x3, x4
281 integer,
intent(in) :: lmax
282 character(len=*) name,line(*)
295 1000
FORMAT(1x,70(
'*'),/,/,1x,
'From : ',a)
297 1020
FORMAT(/,/,1x,70(
'*'))
subroutine write_debug_0l(name, msg, x1, x2, x3, x4)
subroutine assert_i2(lcond, msg, value, value2)
subroutine write_debug_0i(name, msg, x1, x2, x3, x4)
subroutine write_debug_0(name, msg)
subroutine assert_i(lcond, msg, value)
subroutine assert_d2(lcond, msg, value, value2)
subroutine assert_d(lcond, msg, value)
integer, parameter unit_log
subroutine write_debug_1d(name, msg, x)
subroutine debug_init(myPE)
subroutine write_debug_0d(name, msg, x1, x2, x3, x4)
subroutine write_debug_1i(name, msg, x)
subroutine write_error(name, line, lmax)