Re: Troubles with some IMSL routines (eg EVLRG, and some other)



On Fri, 27 May 2005 00:35:49 +0100, Gojko Magazinovic wrote:
> On Thu, 26 May 2005 21:48:52 +0000 (UTC), Dave Seaman
><dseaman@xxxxxxxxxxxx> wrote:


>>The easy way would be to drop the USE IMSL and put back the EXTERNAL
>>declarations, which would cause the compiler to be less stringent in its
>>argument checking.
>>
>>But if you prefer to get the Fortran 90 interface right, you should be
>>able to use the USE IMSL specification with a call that looks something
>>like the following:
>>
>> CALL WRCRN( 'EVAL', EVAL(1:N) )
>>
>>or if EVAL is correctly dimensioned, you can even shorten that to
>>
>> CALL WRCRN( 'EVAL', EVAL )
>>
>>This makes use of optional arguments that are available when you use the
>>Fortran 90 interface:
>>
>> NRA number of rows (default = size(EVAL,1))
>> NCA number of columns (default = size(EVAL,2))
>> LDA leading dimension of EVAL (default = size(EVAL,1))
>> ITRING triangle option (default = 0)
>>
>>If you want to specify a nondefault value for one of these arguments, you
>>can do so using keyword form:
>>
>> CALL WRCRN( 'EVAL', EVAL, NCA=N )


> Thank you very much for a kind cooperation. Unfortunately, neither
> suggestions resolved the problem on my system:

> a) If I drop the USE IMSL, a lot of "unresolved external symbol"
> errors appear

That makes me suspect that you have not specified the proper libraries for
linking. I can't help you with that, because it's platform-dependent and I
don't use Windows.

> b) If I use CALL WRCRN( 'EVAL', EVAL ), the following appears:

> Compiling Fortran...
> E:\Work\IMSL_Test\RealSvojstvene1.F90
> E:\Work\IMSL_Test\RealSvojstvene1.F90(32) : Error: The type of the
> actual argument differs from the type of the dummy argument. [EVAL]
> CALL WRCRN ('EVAL', EVAL)
> --------------------------^

The second argument (called "A" in the documentation) is supposed to be a
complex NRAxNCA matrix. What type is EVAL?

> E:\Work\IMSL_Test\RealSvojstvene1.F90(32) : Error: A non-optional
> actual argument must be present when invoking a procedure with an
> explicit interface. [NCA]
> CALL WRCRN ('EVAL', EVAL)
> -----------^

That message looks wrong. According to the documentation, there are two
non-optional actual arguments (TITLE and A) already present in that call, and
NCA is indeed an optional argument.

By the way, the documentation says you should USE WRCRN_INT in order to be able
to call this subroutine with the F90 interface. Perhaps that is included in
your USE IMSL interface, but I have not seen that interface mentioned on other
platforms where I have used IMSL and therefore it looks like a Windows-specific
thing. The fact that you are seeing an error message that doesn't match the
documentation suggests that you might try using the interface that is described
in the IMSL documentation instead of USE IMSL. You would do the same for each
IMSL routine you call (if you call FOO, then you need to USE FOO_INT).

> E:\Work\IMSL_Test\RealSvojstvene1.F90(32) : Error: A non-optional
> actual argument must be present when invoking a procedure with an
> explicit interface. [A]
> CALL WRCRN ('EVAL', EVAL)
> -----------^

A is indeed present in that call. It's the second argument.


> What I am doing wrong?

I don't know. You have some suggestions from others that may be helpful.


--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
.



Relevant Pages