- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey
I'm trying to compile a program with the latest intel fortran compiler.
I have an error during compilation. The part of the code which is relevant is;
SUBROUTINE TNBC (N, IPIVOT)
INTEGER N, IPIVOT(N)
...
CALL MODLNP (IPIVOT)
...
END
SUBROUTINE MODLNP(IPIVOT)
INTEGER IPIVOT(1)
...
END
Error:
"If the actual argument is scalar, the corresponding dummy argument shall be scalar, unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element (IPIVOT)"
The error during the call of MODLNP()
I am not an expert, Im just trying to compile a fortran code. So I'm more looking for a solution rather than an explanation of the error.
thank you
Vincent Torri
I'm trying to compile a program with the latest intel fortran compiler.
I have an error during compilation. The part of the code which is relevant is;
SUBROUTINE TNBC (N, IPIVOT)
INTEGER N, IPIVOT(N)
...
CALL MODLNP (IPIVOT)
...
END
SUBROUTINE MODLNP(IPIVOT)
INTEGER IPIVOT(1)
...
END
Error:
"If the actual argument is scalar, the corresponding dummy argument shall be scalar, unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element (IPIVOT)"
The error during the call of MODLNP()
I am not an expert, Im just trying to compile a fortran code. So I'm more looking for a solution rather than an explanation of the error.
thank you
Vincent Torri
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SUBROUTINE TNBC (N, IPIVOT)
INTEGER N, IPIVOT(N)
...
CALL MODLNP(IPIVOT)
...
END
SUBROUTINE MODLNP(N, IPIVOT)
INTEGER N, IPIVOT(1)
...
CALL ZTIME(N, R, IPIVOT)
...
END
SUBROUTINE ZTIME (N, X, IPIVOT)
INTEGER IPIVOT(N)
...
END
IPIVOT is only used with ZTIME
Vincent Torri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't reproduce the exact error message you show - I suspect the actual code is different than what you posted here. But I think that instead of:
CALL MODLNP(IPIVOT)
you want
CALL MODLNP(N,IPIVOT)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
I can't reproduce the exact error message you show - I suspect the actual code is different than what you posted here. But I think that instead of:
CALL MODLNP(IPIVOT)
you want
CALL MODLNP(N,IPIVOT)
Indeed, see the second code. Actually, i managed to get the code compiling. Strange thing:
* if I compile in debug mode, I have the error
* if I compile in release mode, i don't have the error anymore.
is there an explanation to such behavior ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your second code has the error I noted. The difference between debug and release is that in a Debug configuration, the "Generated interface checking" diagnostic feature is enabled by default, where it is off by default in a Release configuration. With this on, the compiler checks for consistency of calls to "external" procedures that don't have explicit interfaces.
That you don't get an error message in Release mode doesn't mean your code is correct, only that the compiler is no longer checking for this kind of error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - vtorri
Hey
I'm trying to compile a program with the latest intel fortran compiler.
I have an error during compilation. The part of the code which is relevant is;
SUBROUTINE TNBC (N, IPIVOT)
INTEGER N, IPIVOT(N)
...
CALL MODLNP (IPIVOT)
...
END
SUBROUTINE MODLNP(IPIVOT)
INTEGER IPIVOT(1)
...
END
Error:
"If the actual argument is scalar, the corresponding dummy argument shall be scalar, unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element (IPIVOT)"
The error during the call of MODLNP()
I am not an expert, Im just trying to compile a fortran code. So I'm more looking for a solution rather than an explanation of the error.
thank you
Vincent Torri
I'm trying to compile a program with the latest intel fortran compiler.
I have an error during compilation. The part of the code which is relevant is;
SUBROUTINE TNBC (N, IPIVOT)
INTEGER N, IPIVOT(N)
...
CALL MODLNP (IPIVOT)
...
END
SUBROUTINE MODLNP(IPIVOT)
INTEGER IPIVOT(1)
...
END
Error:
"If the actual argument is scalar, the corresponding dummy argument shall be scalar, unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element (IPIVOT)"
The error during the call of MODLNP()
I am not an expert, Im just trying to compile a fortran code. So I'm more looking for a solution rather than an explanation of the error.
thank you
Vincent Torri
in TNBC, you are declaring IPIVOT with dimension (N)
in MODLNP, IPIOVT is declared as dimension (1), this should probably be (*). Declaring variable size arrays as dimension (1) is obsolete and (*) should be used, or the actual size.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's true, but it would not result in that error message and the Intel compiler treats (1) as (*).

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