- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to compile arpack on the Intel Visual Fortran Compiler for Windows. This is the error that the compiler throws up:
error #7836: 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.
This occurs in the following locations (bold part):
if (msglvl .gt. 0) then
call ivout (logfil, 1, mxiter, ndigit,
& '_saupd: number of update iterations taken')
call ivout (logfil, 1, np, ndigit,
& '_saupd: number of "converged" Ritz values')
call dvout (logfil, np, workl(Ritz), ndigit,
& '_saupd: final Ritz values')
call dvout (logfil, np, workl(Bounds), ndigit,
& '_saupd: corresponding error bounds')
end if
I have pasted the first few lines of the ivout routine
C-----------------------------------------------------------------------
C Routine: IVOUT
C
C Purpose: Integer vector output routine.
C
C Usage: CALL IVOUT (LOUT, N, IX, IDIGIT, IFMT)
C
C Arguments
C N - Length of array IX. (Input)
C IX - Integer array to be printed. (Input)
C IFMT - Format to be used in printing array IX. (Input)
C IDIGIT - Print up to ABS(IDIGIT) decimal digits / number. (Input)
C If IDIGIT .LT. 0, printing is done with 72 columns.
C If IDIGIT .GT. 0, printing is done with 132 columns.
C
C-----------------------------------------------------------------------
C
SUBROUTINE IVOUT (LOUT, N, IX, IDIGIT, IFMT)
C ...
C ... SPECIFICATIONS FOR ARGUMENTS
INTEGER IX(*), N, IDIGIT, LOUT
CHARACTER IFMT*(*)
I am new to FORTRAN and have tried going through the blog by Steve Lionel on this error. But, am not able to understand all of it...
So can anyone help me, as I am looking for a quick way out..
Regards
bouken
I am trying to compile arpack on the Intel Visual Fortran Compiler for Windows. This is the error that the compiler throws up:
error #7836: 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.
This occurs in the following locations (bold part):
if (msglvl .gt. 0) then
call ivout (logfil, 1, mxiter, ndigit,
& '_saupd: number of update iterations taken')
call ivout (logfil, 1, np, ndigit,
& '_saupd: number of "converged" Ritz values')
call dvout (logfil, np, workl(Ritz), ndigit,
& '_saupd: final Ritz values')
call dvout (logfil, np, workl(Bounds), ndigit,
& '_saupd: corresponding error bounds')
end if
I have pasted the first few lines of the ivout routine
C-----------------------------------------------------------------------
C Routine: IVOUT
C
C Purpose: Integer vector output routine.
C
C Usage: CALL IVOUT (LOUT, N, IX, IDIGIT, IFMT)
C
C Arguments
C N - Length of array IX. (Input)
C IX - Integer array to be printed. (Input)
C IFMT - Format to be used in printing array IX. (Input)
C IDIGIT - Print up to ABS(IDIGIT) decimal digits / number. (Input)
C If IDIGIT .LT. 0, printing is done with 72 columns.
C If IDIGIT .GT. 0, printing is done with 132 columns.
C
C-----------------------------------------------------------------------
C
SUBROUTINE IVOUT (LOUT, N, IX, IDIGIT, IFMT)
C ...
C ... SPECIFICATIONS FOR ARGUMENTS
INTEGER IX(*), N, IDIGIT, LOUT
CHARACTER IFMT*(*)
I am new to FORTRAN and have tried going through the blog by Steve Lionel on this error. But, am not able to understand all of it...
So can anyone help me, as I am looking for a quick way out..
Regards
bouken
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bottom line: the 3rd dummy argument (IX) is an array, therefore the 3rd actual argument must be an array, or an array member. However, one or both of MXITER and NP are scalars (you didn't show declarations), which is not permitted by the Standard (although it would certainly work as long as IVOUT accesses only IX(1)).
Apparently, that was deliberate, and went through because early compilers did not cross-check the routine interfaces; IVF does that by default in Debug configuration. To suppress argument checking, set "Check routine interfaces" to "No" somewhere in Project settings/Diagnostics. Alternatively, declare MXITER and NP as arrays of length 1, which would make the code standard-conforming.
Apparently, that was deliberate, and went through because early compilers did not cross-check the routine interfaces; IVF does that by default in Debug configuration. To suppress argument checking, set "Check routine interfaces" to "No" somewhere in Project settings/Diagnostics. Alternatively, declare MXITER and NP as arrays of length 1, which would make the code standard-conforming.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bottom line: the 3rd dummy argument (IX) is an array, therefore the 3rd actual argument must be an array, or an array member. However, one or both of MXITER and NP are scalars (you didn't show declarations), which is not permitted by the Standard (although it would certainly work as long as IVOUT accesses only IX(1)).
Apparently, that was deliberate, and went through because early compilers did not cross-check the routine interfaces; IVF does that by default in Debug configuration. To suppress argument checking, set "Check routine interfaces" to "No" somewhere in Project settings/Diagnostics. Alternatively, declare MXITER and NP as arrays of length 1, which would make the code standard-conforming.
Apparently, that was deliberate, and went through because early compilers did not cross-check the routine interfaces; IVF does that by default in Debug configuration. To suppress argument checking, set "Check routine interfaces" to "No" somewhere in Project settings/Diagnostics. Alternatively, declare MXITER and NP as arrays of length 1, which would make the code standard-conforming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot.. that was indeed helpfull
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Yugoslav said, this violation of the rule about sending an array element to a dummy array should not be a problem under compilers for Intel architecture platforms. Prior to the days of Intel platforms, it did not work on a variety of platforms, even though compilers did not catch it at compile time.

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