Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Assumed-size problem

cfduarte
Beginner
503 Views
Hi,

I need to use a f77 subroutine for calculations inside my main program.

That subroutine (DDASPK 2.0) uses assumed-size arrays and my main program does not (the size of the arrays are defined from start):

DDASPK header:

(...)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
LOGICAL DONE, LAVL, LCFN, LCFL, LWARN
DIMENSION Y(*),YPRIME(*)
DIMENSION INFO(20)
DIMENSION RWORK(LRW),IWORK(LIW)
DIMENSION RTOL(*),ATOL(*)
DIMENSION RPAR(*),IPAR(*)
CHARACTER MSG*80
EXTERNAL RES, JAC, PSOL, DDASID, DDASIK, DNEDD, DNEDK

(...)

Main program header:

(...)

implicit none
integer::NEQ,IDID,LRW,LIW,IPAR
integer,dimension(20)::INFO
double precision::T,TOUT,RTOL,ATOL
double precision,dimension(3)::RPAR
double precision,dimension(4)::Y,YPRIME
integer,dimension(:),allocatable::IWORK
double precision,dimension(:),allocatable::RWORK
external RES,JAC,PSOL

(...)

When I compiled this under CVF 6.1A, all the arrays (Y,YPRIME, etc) were passed on correctly to DDASPK but now that I'm using CVF 6.6B, ALL arrays are truncated to the first element (i.e. they become 1-element arrays).

I've tried builing interfaces but that does not work!

Any ideas?

Thanks!

Carlos
0 Kudos
2 Replies
Steven_L_Intel1
Employee
503 Views
You'd have to show a complete program, including the call, to comment. Send this to vf-support@compaq.com

Steve
0 Kudos
Steven_L_Intel1
Employee
503 Views
This ended up being a reference to an uninitialized array element.

Steve
0 Kudos
Reply