SPEED
CHECK_MPI.f90
Go to the documentation of this file.
1
! Copyright (C) 2012 The SPEED FOUNDATION
2
! Author: Ilario Mazzieri
3
!
4
! This file is part of SPEED.
5
!
6
! SPEED is free software; you can redistribute it and/or modify it
7
! under the terms of the GNU Affero General Public License as
8
! published by the Free Software Foundation, either version 3 of the
9
! License, or (at your option) any later version.
10
!
11
! SPEED is distributed in the hope that it will be useful, but
12
! WITHOUT ANY WARRANTY; without even the implied warranty of
13
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
! Affero General Public License for more details.
15
!
16
! You should have received a copy of the GNU Affero General Public License
17
! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
28
29
subroutine
check_mpi
(n,v,ind,tt,pos)
30
31
implicit none
32
33
integer*4
:: i, ne
34
integer*4
,
intent(in)
::n,ind
35
integer*4
,
dimension(0:n)
,
intent(in)
:: v
36
integer*4
,
intent(out)
:: tt, pos
37
38
39
tt = 0
40
pos = - 1
41
i = 1
42
ne = v(0) - 1
43
44
45
do
while
(i.le.ne)
46
if
(v(v(i-1)) .eq. ind)
then
47
tt = 1
48
pos = i
49
return
50
endif
51
i=i+1
52
53
enddo
54
55
end subroutine
check_mpi
check_mpi
subroutine check_mpi(n, v, ind, tt, pos)
Checks if a an element is present on a vector and give its position.
Definition
CHECK_MPI.f90:30
speed
CHECK_MPI.f90
Generated by
1.9.8