- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to rearrange some Fortran code that was initially F77 and compile it as F90. So far so good. I have a MAIN program and am, little by little, moving subroutines up into a MODULE (for ease in maintenance). Several subroutines have been mofed w/ no issues for compile/link.
In one of the functions I just moved up to MODULE, I got this error message from the CVF compiler:
Error: The shapes of the array expressions do not conform. [YY]
Strangely, YY is not an array in this function - it's just a real variable
Has anyone else seen this kind of error trigger, and if so, what is it probably really complaining about?
Any thoughts are appreciated.
In one of the functions I just moved up to MODULE, I got this error message from the CVF compiler:
Error: The shapes of the array expressions do not conform. [YY]
Strangely, YY is not an array in this function - it's just a real variable
Has anyone else seen this kind of error trigger, and if so, what is it probably really complaining about?
Any thoughts are appreciated.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It's difficult to have a clear idea of what happens w/o looking at the source code.
Wich version of IVF do you use?
One Possibility could be that you have defined a variable local to the module with the same name YY?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi TommyCee
A sample code would give you more chance of an exact answer. Please see if you can give a small snippet. (I am thinking that the compiler is reporting that somewhere scalar == array is happening. )
Meanwhile below is a one program that will give the error you are getting. Perhaps that will give you a clue. {In the program k is integer scalar whereas intrinsic function maxloc will return an integer array (of size 1 in this case) and that gives a mismatch.}
In your case may be the function also returns an array and you are assigning it to a scalar.
Abhi
A sample code would give you more chance of an exact answer. Please see if you can give a small snippet. (I am thinking that the compiler is reporting that somewhere scalar == array is happening. )
Meanwhile below is a one program that will give the error you are getting. Perhaps that will give you a clue. {In the program k is integer scalar whereas intrinsic function maxloc will return an integer array (of size 1 in this case) and that gives a mismatch.}
In your case may be the function also returns an array and you are assigning it to a scalar.
Abhi
[fxfortran] Program Main Integer :: k Integer :: J(2) J(1) = 1 J(2) = 2 k = maxloc(J) End Program Main[/fxfortran]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Be careful about module-scope variables when moving routines to a module. It can get you in trouble if you're not careful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, I actualy don't have any YY variable appearing in the Module. And I should mention that the compiler actually gave the same error regarding 2 other variables that also were not arrays.
It's probably something pretty tricky. I'm doing some testing to help isolate the problem.
It's probably something pretty tricky. I'm doing some testing to help isolate the problem.

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