- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get the following warning message:
forrtl: warning (402): fort: (1): In call to SOLINT, an array temporary was created for argument #2:
call solint(tdtab(1:nsoltab),ytabval(1:3*layrs+3,1:nsoltab),
& nsoltab,td,yintval(1:3*layrs+3),3*layrs+3)
...
SUBROUTINE SOLINT(X,Y,N,XX,YY,M)
INTEGER M,N
REAL*8 X(n),Y(m,n),XX,YY(m)
I presume this is because the array ytabval is not passed as a contiguous array, whereas it is expected as such in the called subroutine. Should I pass the full array instead?
Adrian
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're passing a non-contiguous array slice, and as you say, the called routine expects a contiguous array. Passing the whole array would change the meaning of the program, wouldn't it? Yes, that would eliminate the temporary.
Another option is to declare the argument in Y as Y(:,:) and make an explicit interface available. This will avoid a temp (but will then slow down SOLINT somewhat.) You'll have to decide which is preferable.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page