type/rank mismatch error
- From: estevino@xxxxxxxxx
- Date: Thu, 28 Jun 2007 21:25:33 -0700
Hi,
I'm using gfortran 4.3.0 on Mac OSX 10.4.8.
I'm having a problem compiling a two modules and a main.
One module looks like
MODULE calculate
CONTAINS
SUBROUTINE some_op(a,b,c)
USE nrtype
IMPLICIT NONE
REAL, INTENT(IN) :: a
REAL, DIMENSION(:), INTENT(IN) :: b
REAL, DIMENSION(:), INTENT(OUT) :: c
....
END SUBROUTINE some_op
END MODULE calculate
Another module contains several subroutines that take 'calculate' as a
procedure argument and makes a call to the routine 'some_op' inside --
this looks like
MODULE various
USE calculate
CONTAINS
SUBROUTINE number1(x,y,some_op)
....
END SUBROUTINE number1
SUBROUTINE number2(x,y,some_op)
....
END SUBROUTINE number2
END MODULE various
When I try to compile the object, I get a type/rank mismatch error:
gfortran -c calculate.f90 various.f90
various.f90:118.47:
call number1(x,y,some_op)
1
Error: Type/rank mismatch in argument 'some_op' at
(1)various.f90:118.47:
These procedures are not defined anywhere else, so I'm at a loss to
explain why this is occurring. Any help?
.
- Follow-Ups:
- Re: type/rank mismatch error
- From: Jugoslav Dujic
- Re: type/rank mismatch error
- From: gsal
- Re: type/rank mismatch error
- Prev by Date: Re: Please help me understand my code
- Next by Date: Re: type/rank mismatch error
- Previous by thread: C++ Bounds Checking
- Next by thread: Re: type/rank mismatch error
- Index(es):
Relevant Pages
|