Re: Issue from IVF 9.0 to IVF 10.1
- From: mecej4 <mecej4_spam_nyet@xxxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 12:44:38 -0500
Marco Ppower wrote:
I have just updated my Fortran compiler from IVF 9.0 to 10.1 and I have my suite of DLLs, that I can't link successfully because of some LNK2019 unresolved external symbols in my source code. These Fortran files are correctly compiled, but it is the linker to complain for, while the IVF v9.0 linker linked the same sources without any issue.As has been pointed out already, you pass 13 arguments to a subroutine which has been declared with 12. Real*8 arrays are passed where Integer*4 variables (possibly, this is scratch pad memory) are expected. While a compiler following the Cdecl convention may produce an executable without any complaints, it does not follow that the program will work correctly and do what is expected.
I admit that the calling and called functions are badly formatted, because of the implicit variables definition and the not-so-precise type matching, but that's the source code I got from my colleagues and I have to run soon.
This is the function being called:
SUBROUTINE ASSEMBLABLK(NA,NCOL,A,NRIFA,NEQ,NBLOCK,LBLOK,NUMEL,KERR,NEQUAZ,KGEON,KEXIT)
IMPLICIT REAL*8(A-H,O-Z)
DIMENSION NA(NEQ),A(LBLOK),NCOL(NBLOCK)
DIMENSION NRIFA(2*LBLOK)
...
The part of the subroutine calling this is here:
IMPLICIT REAL*8 (A-H,O-Z)
ALLOCATABLE A(:)
....
ALLOCATE (A(MTOT))
CALL ASSEMBLABLK(A(N1),A(N2),A(N3),A(N3),NEQ,NBLOCK,LBLOK,MAXC,NUMEL,KERR,NEQUAZ,KGEON,KEXIT)
The errors are here:
Error 1 error LNK2019: unresolved external symbol _ASSEMBLABLK@52 referenced in function _PUSHOVER Pushover.obj
Error 2 fatal error LNK1120: 1 unresolved externals
What's wrong? Is there a way to activate full parameter passing type checking between functions with the Intel Visual Fortran compiler?
I posted here, because I'm not able to post on the Intel Visual Fortran forum, but as soon as I can do it, you may find this issue posted even there.
The variable KEXIT is undefined, since the subroutine does not know that it is the 13th argument. The same section of array A is used for the 3rd and 4th arguments. Is that proper?
It is possible, but unlikely, that despite all these dubious practices the program gave you the correct results. What you have seen are examples of bugs that can go undetected for years. When, for some reason, the compiler or compiler options change or the runtime library changes you may be surprised by failure to work correctly and start suspecting that the compiler or the runtime have bugs.
-- mecej4
.
- Follow-Ups:
- Re: Issue from IVF 9.0 to IVF 10.1
- From: Marco Ppower
- Re: Issue from IVF 9.0 to IVF 10.1
- References:
- Issue from IVF 9.0 to IVF 10.1
- From: Marco Ppower
- Issue from IVF 9.0 to IVF 10.1
- Prev by Date: Re: Writing $00-$FF via Fortran
- Next by Date: Re: Writing $00-$FF via Fortran
- Previous by thread: Re: Issue from IVF 9.0 to IVF 10.1
- Next by thread: Re: Issue from IVF 9.0 to IVF 10.1
- Index(es):
Relevant Pages
|