root / synthbench / euroben-dm / mod2h / .svn / text-base / mylength.f.svn-base @ 0:839f52ef7657
History | View | Annotate | Download (671 Bytes)
1 |
Function mylength( nsize ) Result( length ) |
---|---|
2 |
! ---------------------------------------------------------------------- |
3 |
! --- Computes lengths of evenly distributes sub-arrays on 'nodes' |
4 |
! processors. |
5 |
! ---------------------------------------------------------------------- |
6 |
Use dist_module |
7 |
Implicit None |
8 |
|
9 |
Integer :: nsize, length, rest |
10 |
! ---------------------------------------------------------------------- |
11 |
length = nsize/nodes |
12 |
rest = Mod( nsize, nodes ) |
13 |
If( me < rest - 1 ) length = length + 1 |
14 |
! ---------------------------------------------------------------------- |
15 |
End Function mylength |