Statistics
| Branch: | Revision:

root / synthbench / euroben-dm / mod2cr / .svn / text-base / sym7com.f.svn-base @ 0:839f52ef7657

History | View | Annotate | Download (1.3 kB)

1
      Subroutine sym7com( m, n1, n2, ntot, a, al )
2
! ----------------------------------------------------------------------
3
! --- sym7com copies the 3 upper diagonals of matrix A ( a(*,1:3) )
4
!     into the array al(*,1:3) with the appropriate shifts.
5
! ----------------------------------------------------------------------
6
      Use         numerics
7
      Use         mpi_module
8
      Implicit    None
9

    
10
      Integer  :: m, n1, n2, ntot
11
      Real(l_) :: a(m,0:3), al(m,1:3)
12

    
13
      Real(l_) :: b(ntot)
14
      Integer  :: i, n12
15
! ----------------------------------------------------------------------
16
      n12   = n1*n2
17
      b     = 0.0_l_
18
      al    = 0.0_l_
19
      Call MPI_Allgatherv( a(1,1), m, rtyp, b, sizes, offset, rtyp,
20
     &                     comm, ierr )
21
      Do i = lb1, ub1
22
         al(i,1) = b(i+glb-1)
23
      End Do
24
      b = 0.0_l_
25
      Call MPI_Allgatherv( a(1,2), m, rtyp, b, sizes, offset, rtyp,
26
     &                     comm, ierr )
27
      Do i = lb2, ub2
28
         al(i,2) = b(i+glb-n1)
29
      End Do
30
      b = 0.0_l_
31
      Call MPI_Allgatherv( a(1,3), m, rtyp, b, sizes, offset, rtyp,
32
     &                     comm, ierr )
33
      Do i = lb3, ub3
34
         al(i,3) = b(i+glb-n12)
35
      End Do
36
! ----------------------------------------------------------------------
37
      End Subroutine sym7com