Error #6634

Error #6634

I am attempting to use code from for the exponential function. After I added all of the source files listed as dependencies, I no longer received link error messages. I am now receiving an error message of error #6634: The shape matching rules of actual arguments nad dummy arguments have been violated. [small] (I have received more of the exact same error, except the word in the bracket is different; for example [right] or [log10]).

The line that the error message refers to contains the code "Call I1MCRA".... However, I do not have a function or subroutine for I1MCRA, and I do not see one on unfortunately. Should this be an intrinsic function? Why is the error #6634 and not a link error?

Much gratitude for any help.

13 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If it doesn't compile it wont link so I wouldn't expect a link warning. It isn't an intrinsic. Are there any inteface staemenents for this routine?

Also for the first failed line paste the code and also the declarations of the variables in the call that might shed more light.

I1MCRA is part of netlib/r1mach.f. A simple search engine query will show you this. If you compiled that file but a're missing it, it's on account of a compile error.

All this stuff is meant as part of a 25-year old system to obtain floating point format dependent values which are implemented as intrinsics in any standard compiler over the last 20 years.  You may be able to find a more up to date version using f90 intrinsics.

Of course, the exponential function intrinsics were part of the compilers for decades before this code was written,  The netlib versions are primarily of educational value, and perhaps as reference to compare with a possibly buggy implementation.

There's stuff there which depends on turning off interface checking.  The notations tell you which procedures are seen as having violations.  You might try to get it working in a more up to date version with checking disabled first, but you should also make sure that the data type declarations aren't messed up.

In addition to TimP's admonitions, note that the routine I1MCRA is called from R1MACH only if the target machine is a Cray! Therefore, if you do things correctly, I1MCRA should never be entered during execution. Therefore, you can stick in a dummy subroutine I1MCRA containing something such as STOP 'should never have come here'. With old code such as that, you are also going to need to turn off interface checking, unless you want to see the messages that arise from applying Fortran 77 or Fortran 9X standards to Fortran-66 or Fortran IV code.

Then again, why do you want to use codes from the 1980s, and are you prepared to adapt those codes to current microprocessors?

Thank you all for the advice. How do I turn off interface checking?

I am only using the old code from netlib because it is the only function I have been able to find for the exponential integral. My math library on my compiler only has MKL, not IMSL, and MKL does not have the exponential integral function to my knowledge. I did find a function that estimates the exponential integral, but only for x > 0 for Ei(x). Can anyone point me in the right direction for obtaining modern code for the exponential integral?

Many thanks

Here is the line that draws the error: CALL I1MCRA(SMALL, K, 16, 0, 0)

Here is the error message: Error    1     error #6634: The shape matching rules of actual arguments and dummy arguments have been violated.   [SMALL]    C:\Users\sab3784\Documents\Visual Studio 2010\Projects\Console1\Console1\ee1 net lib\r1mach.f    167    

Here is the declaration of small: INTEGER SMALL(2)

What is a cray machine?

You can turn interface checking off through "Properties > Fortran > Diagnostics > Check Routine Interfaces (/warn:[no]interfaces)"

In your first post you mentioned "exponential function", which is a Fortran intrinsic function, instead of "exponential integral", with the result that you seemed to be "rebuilding the wheel".

Now, for the exponential integral. Abramowitz and Stegun's Handbook of Mathematical Functions has a separate chapter on properties and approximations for this integral.

The choice of software depends on whether you want complex or real arguments. See if the Fortran-90 routines at will serve your needs. An older F77 version is at .

Thanks Annalee, turning Check Routine Interfaces resolved my problem, and I am able to get an accurate result for the exponential integral.

However, this progress has led me to another problem. While, I can get this exponential integral function to work in a standalone program, when I attempted to add the function and the dependent source files to the program in which I need the function, I did not get accurate results. After receiving an error message claiming that the array or function had not been declared (it was declared in the same way that my standalone program declared it), I made some adjustments and got the code to execute. However, for whatever reason, the output from the function does not match the output from the function in my standalone program and does not give accurate results. Would anyone have any thoughts on this? Could it possibly be because of the different Fortran versions that are being used?


It's not true that the interface standards have changed from F77 to current Fortran, just that they were seldom checked and, in relatively low level applications like this, often violated.

When you violate the interface standards, it may not be good to allow interprocedural optimizations.  I don't remember exactly the names of the VS project properfies, which should be identified by the command line disable options /Qip- .Qipo-

I don't know how you could get away with changing the function definition between your test and your application.  The easiest way (if you didn't run into interface violations) might be to make it a module function and USE the module.  This hasn't changed since CVF.

Thanks for the help folks. I was able to get the netlib version of the exponential integral function to work by removing the checking interfaces option, and changing where I declared the function in my main program.

for what it is worth the error is becuase an integer array is being passed into an integer scaler. The routine will work it just isn't a 'correct way' of doing it. The checking off just ignores the fact....

Steve B

If you are interested in special functions approximations I can share with you my work.I wrote more than 50 routines based on Stegun and Abramovitz book.All methods are written in Java and are not optimized for speed of execution.Now I need to port it to C.

Leave a Comment

Please sign in to add a comment. Not a member? Join today