Re: How to compile the example_itsol_1.f , and why always meets these errors.





Ian Bush wrote:
> hollowspook wrote:
>
> > Hi,
> >
> > I want to use the cxml to solve some problem. But when I compile the
> > example_itsol_1.f (it can be found in cxml/samples/) , there always be
> > some error. The error info is 'EXAMPLE_ITSOL_1.F(166) : Error: The
> > shape matching rules of actual arguments and dummy arguments have been
> > violated. [IA]' and the same with the [QL] . But it does not seem to
> > have such problem. Does somebody has tried this file before?? Please
> > help me and thank in advanced.
>
> Well it's because the shape matching rules of actual arguments and dummy
> arguments have been violated.
>
> What this means is that you are calling a subprogram and the shape of
> the arguments are different at the calling point and where the subprogram
> is defined. For instance you may have written the subprogram using a one
> dimensional array, but you are calling it with a 2D array. Another example
> would be
>
> Subroutine my_sub( n, a )
>
> Integer :: n
> Real, Dimension( 1:n ) :: a
> ...
> End Subroutine my_sub
>
> ...
>
> Call my_sub( n, b( 1, i ) )
>
> where you want to act on a column of b. However b( 1, i ) is
> a scalar, and so shouldn't be passed to the routine. Instead you need
>
> Call my_sub( n, b( 1:n, i ) )
>
> Ian


But in that program, it try to call the DITSOL_PCG which is a cxml
subroutine. At the calling point and where the subprogram
is defined, the argument of [IA] is totally the same that is defined to
be an array. Because DITSOL_PCG is a internal subroutine and its detail
can not be read.

It is a example from the setup CD. Why doesn't it be run?

Anyway thank you for reply!

.



Relevant Pages

  • Re: getprocname?
    ... The first thing I would do is to have every program / subroutine / function call / intrinsic set with an internal name. ... Then when calling a subroutine, pass the variable PROGRAM-ID as one of the parameters or part of the linkage section. ... subprogram and etc would add its PROGRAM-ID to ...
    (comp.sys.hp.mpe)
  • Re: How to compile the example_itsol_1.f , and why always meets these errors.
    ... Well it's because the shape matching rules of actual arguments and dummy ... the arguments are different at the calling point and where the subprogram ... Subroutine my_sub ...
    (comp.lang.fortran)
  • Calling Intel Visual Fortran from Python
    ... I have been exploring calling Fortran DLL subroutines from Python. ... thing can be done on at the level of a subroutine, ...
    (comp.lang.fortran)
  • Re: Strange SYS$ENQ problem
    ... The process waiting for the lock to be released, ... I will try calling the subroutine from a different place within the ... Powerhouse program on Tuesday. ...
    (comp.os.vms)
  • Re: [9fans] Non-stack-based calling conventions
    ... All of them push parameters on the stack. ... Here's the calling convention for your entertainment. ... locations just past the call to the subroutine. ... the first word of the routine. ...
    (comp.os.plan9)