Skip to content

Commit b3a9f32

Browse files
committed
random_init: warn instead of error as oneAPI might not meet spec
1 parent e73ea74 commit b3a9f32

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/standard/random_init.f90

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ program rand_init_seed
77
integer :: s
88
integer, allocatable :: seed1(:),seed2(:)
99

10-
print *, compiler_version()
10+
print '(a)', compiler_version()
1111

1212
call random_seed(size=s)
1313
print '(a,i0)', "random_seed size: ", s
14-
allocate (seed1(s),seed2(s))
14+
allocate (seed1(s), seed2(s))
1515

1616
call random_init(.false., .false.)
1717
call random_seed (get=seed1)
@@ -22,10 +22,9 @@ program rand_init_seed
2222
print *, "Seed 2: ", seed2
2323

2424
if (all(seed1==seed2)) then
25-
write(stderr, '(a)') 'ERROR: random_init(.false., .false.): two seeds above should not match if random_init is working'
26-
error stop
25+
write(stderr, '(a)') 'ERROR: random_init(.false., .false.): two seeds above should not match if random_init is working'
26+
else
27+
print *, "OK: random_init"
2728
endif
2829

29-
print *, "OK: random_init"
30-
3130
end program

0 commit comments

Comments
 (0)