- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
error #6633: The type of the actual argument differs from the type of the dummy argument.
I know that it is a new feature in IVF 11.1 to find type mismatch between the actual and dummy arguments. If I compile the code using other compilers, I don't get such errors. I don't want to modify the code, as its a giant code and it would too tedious to correct all the affected subroutines. I just need a simple compiler flag to force the ifort to ignore all the type mismatches between the arguments.
Any idea?
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please provide more details. With the Linux-x64 version of IFort 11.1 (l_cprof_p_11.1.072), for the following buggy code (tst.f),
[fxfortran] subroutine sub(i) integer i i=2*i-1 return endI find the following
program tst real x x=2 call sub(x) write(*,*)x stop end [/fxfortran]
[bash]~/LANG> ifort -C tst.f ~/LANG> ./a.out NaN [/bash]On the other hand, if you have good code, with explicit interfaces; or two calls to the same subroutine/function from one program unit with inconsistent argument lists, the compiler would be justified in flagging the error.
Your claim, "If I compile the code using other compilers, I don't get such errors" is overly broad and, fortunately for most of us, not true. It is one thing to ask how to coax a compiler to accept code that is not standards-compliant; it is quite another to fault the compiler for doing a good thing!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash] SUBROUTINE CFFTB (N,C,WSAVE) IMPLICIT REAL*8 (A-H,O-Z) DIMENSION C(*) ,WSAVE(*) ! IF (N .EQ. 1) RETURN IW1 = N+N+1 IW2 = IW1+N+N CALL CFFTB1 (N,C,WSAVE,WSAVE(IW1),WSAVE(IW2)) RETURN END SUBROUTINE CFFTB1 (N,C,CH,WA,IFAC) IMPLICIT REAL*8 (A-H,O-Z) DIMENSION CH(*) ,C(*) ,WA(*) ,IFAC(*) NF = IFAC(2) NA = 0 L1 = 1 IW = 1 DO 116 K1=1,NF [/bash]And this is the error that I get from this part:
[bash]C:UsersMYWINDocumentsUtilityBoltzTraPSRC_BoltzTraP110c3fft.f90(250): error #6633: The type of the actual argument differs from the type of the dummy argument. [WSAVE] compilation aborted for C:UsersMYWINDocumentsUtilityBoltzTraPSRC_BoltzTraP110c3fft.f90 (code 1)[/bash]
As you see, the message refers to the type mismatch between WSAVE and IFAC arrays. The former is REAL(8) while the latter is Integer type. I use the Windows version of intel fortran compiler (11.1.65). However, when I compile the same code using the Mac OSX version of ifort (11.1.76), I don't see any error like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What your code does is VERY dangerous and is likely to give incorrect results. You should be thankful that the compiler alerted you to the coding error. Some possibilities are having the value change when you pass it, or getting zero assigned when you wanted a small integer.
If you like using chainsaws with the blade guard removed, right click on the project, select Properties > Fortran > DIagnostics and set "Check Routine Interfaces" to No.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
However, this is a good opportunity to fix the code. In fact, using the allocatable array features of Fortran 90, the OP should be able to do away with the extra workspace arguments, putting in local allocated arrays in their place.
To the OP: if you use the command-line, make sure that the options in IFORT.CFG (in the compiler's BIN directory) are not set to catch this class of error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes you need to do this. For example, in mystat package MicrOsirisinput data items can be of any mode and length, requiring mis-matches for conversion and retrieval. Some work-arounds are possible, but not all.
In other cases I have routines that need to take arguments in integer or real mode, e.g., a cross tab program thatneeds to work with integer data or real data.Without being able to pass the arguments twice in different modes, I would have to replicate a tremendous amount of code, making maintenance a nightmare. Some of it can be gotten arround by equivalencing data, but of course, that is frowned upon today and prevents dynamic allocation. Changing everything to a common real*8 formatmight get around it, but a costly price in proceesing time and I/O time for large datasets (e.g., 100,000records of6000 variables)that need multiple passes but operate with with nominal and ordinal data with some interval data, as well as inflated disk-space requirements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page