summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/30 scalapack/main.f90
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/frameworks/30 scalapack/main.f90')
-rw-r--r--test cases/frameworks/30 scalapack/main.f9025
1 files changed, 25 insertions, 0 deletions
diff --git a/test cases/frameworks/30 scalapack/main.f90 b/test cases/frameworks/30 scalapack/main.f90
new file mode 100644
index 0000000..53b5fb9
--- /dev/null
+++ b/test cases/frameworks/30 scalapack/main.f90
@@ -0,0 +1,25 @@
+! minimal Scalapack demo
+implicit none
+
+integer :: ictxt, myid, nprocs, mycol, myrow, npcol, nprow
+real :: eps
+real, external :: pslamch
+
+! arbitrary test parameters
+npcol = 2
+nprow = 2
+
+call blacs_pinfo(myid, nprocs)
+call blacs_get(-1, 0, ictxt)
+call blacs_gridinit(ictxt, "C", nprocs, 1)
+
+call blacs_gridinfo(ictxt, nprow, npcol, myrow, mycol)
+
+eps = pslamch(ictxt, 'E')
+
+if(myrow == mycol) print '(A, F10.6)', "OK: Scalapack Fortran eps=", eps
+
+call blacs_gridexit(ictxt)
+call blacs_exit(0)
+
+end program