Error: The shapes of the array expressions do not conform. [YY]

Error: The shapes of the array expressions do not conform. [YY]

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.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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?

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

[fxfortran]      Program Main
         Integer :: k
         Integer :: J(2)
         J(1) = 1
         J(2) = 2
         k = maxloc(J)
      End Program Main[/fxfortran]

Be careful about module-scope variables when moving routines to a module. It can get you in trouble if you're not careful.

Steve - Intel Developer Support

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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today