| 1 |
! minimal Scalapack demo |
| 2 |
implicit none |
| 3 |
|
| 4 |
integer :: ictxt, myid, nprocs, mycol, myrow, npcol, nprow |
| 5 |
real :: eps |
| 6 |
real, external :: pslamch |
| 7 |
|
| 8 |
! arbitrary test parameters |
| 9 |
npcol = 2 |
| 10 |
nprow = 2 |
| 11 |
|
| 12 |
call blacs_pinfo(myid, nprocs) |
| 13 |
call blacs_get(-1, 0, ictxt) |
| 14 |
call blacs_gridinit(ictxt, "C", nprocs, 1) |
| 15 |
|
| 16 |
call blacs_gridinfo(ictxt, nprow, npcol, myrow, mycol) |
| 17 |
|
| 18 |
eps = pslamch(ictxt, 'E') |
| 19 |
|
| 20 |
if(myrow == mycol) print '(A, F10.6)', "OK: Scalapack Fortran eps=", eps |
| 21 |
|
| 22 |
call blacs_gridexit(ictxt) |
| 23 |
call blacs_exit(0) |
| 24 |
|
| 25 |
end program |