- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all
I am using Intel(R)64, version 11.1.067 version.I continously encountered error # 7836 while compiling a FORTRAN code. From the debug report, I see that the problem is in the following part of the code:
INTEGER, PARAMETER :: nz=2, n=10
REAL, DIMENSION(1,nz) :: z
REAL:: sig, vsig
REAL, DIMENSION(1,n) :: pri
.....
.....
pri(1:1,2:2)=norf(z(1,2),sig,vsig,nz/2)
.....
.....
CONTAINS
FUNCTION norf(x,mu,sigma,dim)
INTEGER, INTENT(IN):: dim
INTEGER :: i
REAL, DIMENSION(1,dim) :: x, mu, sigma, norf
REAL, PARAMETER :: pi=3.14
do i=1,dim
norf(1,i)=1/(sigma(1,i)*sqrt(2*pi))*exp(-(x(1,i)-mu(1,i))**2/(2*sigma(1,i)**2))
end do
END FUNCTION norf
Please Please help!
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please post complete example source code. I don't know where to look for error messages by a numeric code (#7836), nor do I have the older version (11.0) that you mentioned; therefore, please post the text of the error message.
It appears that you are passing a scalar (sig) where the function declaration calls for a 2-D array.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tip: To look up an Intel Fortran diagnostic by number, type:
fdiagnnnn
where nnnn is the number, into the search box at the upper right. Indeed, this error is http://software.intel.com/en-us/articles/fdiag7836 as mecej4 suggested. The standard generally prohibits passing a scalar to an array, except in certain circumstances. You probably got away with it before because it's an error most compilers don't diagnose by default in the absence of an explicit interface.. Intel Fortran does when generated interface checking is enabled.
An easy workaround is to surround the scalar arguments with [], turning them into array constructors. This works as long as you don't try to store to the argument.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works! Thanks Steve

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