mojomother
Programmer
I've converted a program from f77 to f90 syntax and am now getting errors of the type "The type of the actual argument differs from the type of the dummy argument" with Intel Visual Fortran 10.
The code from where the errors originate has the following structure:
The line marked with ">" gives the errors. I do see what the general problem is, the call passes elements of an array which are then re-interpreted as multi-dimensional arrays by the receiving routine. However, the same piece of code compiles without issues using Fortran77 compilation.
I need f90 for my project, though. Any ideas on how to solve that particular problem? The array "w" needs to be flat, so simply defining the same substructure as used by routine2 is not an option.
Thank you in advance,
Matt
The code from where the errors originate has the following structure:
Code:
SUBROUTINE routine1(w)
...
REAL*8 w(length)
...
> CALL routine2(w(pos1), w(pos2), w(pos3), w(pos4))
END SUBROUTINE routine1
SUBROUTINE routine2(w1, w2, w3, w4)
...
REAL*8 w1(l1,l2), w2(l3), w3(l4,l5,l6), w4(l7)
...
END SUBROUTINE routine2
The line marked with ">" gives the errors. I do see what the general problem is, the call passes elements of an array which are then re-interpreted as multi-dimensional arrays by the receiving routine. However, the same piece of code compiles without issues using Fortran77 compilation.
I need f90 for my project, though. Any ideas on how to solve that particular problem? The array "w" needs to be flat, so simply defining the same substructure as used by routine2 is not an option.
Thank you in advance,
Matt