root / synthbench / euroben-dm / mod2i / dcheck.f @ 0:839f52ef7657
History | View | Annotate | Download (1.2 kB)
1 |
Subroutine dcheck( data, num, ok ) |
---|---|
2 |
! --------------------------------------------------------------------- |
3 |
! --- 'dcheck' checks sort runs on 8-byte Real arrays. |
4 |
! --------------------------------------------------------------------- |
5 |
Use numerics |
6 |
Use dist_module |
7 |
Implicit None |
8 |
Include 'mpif.h' |
9 |
|
10 |
Integer :: num |
11 |
Real(l_) :: data(num) |
12 |
Logical :: ok |
13 |
|
14 |
Integer :: i, ier, status(MPI_Status_Size) |
15 |
Integer :: itag |
16 |
Real(l_) :: exval |
17 |
! --------------------------------------------------------------------- |
18 |
Do i = 2, num |
19 |
ok = ok .AND. ( data(i) - data(i-1) >= 0.0_l_ ) |
20 |
End Do |
21 |
itag = 22222 |
22 |
If ( nodes == 1 ) Return |
23 |
If ( me > 0 ) Call MPI_Send( data(1), 1, MPI_Real8, |
24 |
& me - 1, itag, MPI_Comm_World, ier ) |
25 |
If ( me < nodes - 1 ) Call MPI_Recv( exval, 1, MPI_Real8, |
26 |
& me + 1, itag, MPI_Comm_World, |
27 |
& status, ier ) |
28 |
If ( me < nodes - 1 ) ok = ok .AND. |
29 |
& ( exval - data(num) >= 0.0_l_ ) |
30 |
! --------------------------------------------------------------------- |
31 |
End Subroutine dcheck |