type/rank mismatch error



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?

.



Relevant Pages

  • Re: Perl IPC woes
    ... > problem compiling and installing the IPC SysV module. ... > sub stat { ... > This subroutine is exactly the same in version 5.005_03 and works fine ... > on AIX 4.3. ...
    (comp.unix.aix)
  • Re: type/rank mismatch error
    ... 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. ... SUBROUTINE some_op ...
    (comp.lang.fortran)