- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I recently changed to intel compiler but my project doesn't work very good.
It compiles but wen i run it stops on a function from netcdf and returns the error :
Unhandled exception at 0x0095d540 in ConvertToHdf5.exe: 0xC0000005: Access violation reading location 0x00000030.
Can anyone help with this issue?
Tanks in advanced.
Helder Marques
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you read Steve's advice on conversion ? Among possible issues discussed there is the default SAVE setting of CVF (and certain other past compilers). The run-time /check options, and possibly the compile-time /Qdiag-enable:sc might help in finding errors which may not have surfaced before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, i did.
The build gives no errors, but when it comes to running a function of netcdf and there gives me the error Unhandled exception at 0x0095d540 in ConvertToHdf5.exe: 0xC0000005: Access violation reading location 0x00000000.
And i dont undestand why
Helder Marques
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Different compilers use different default calling conventions. Most compilers also allow changing the calling conventions by choosing optional compiler switches or directives in the source code. The trick is to (i) find out what the expected calling conventions are for NETCDF, and (ii) to get the Intel compiler to emit code following those conventions. If you are willing to compile NETCDF from source, you have additional flexibility.
That you got a C0000005 error with pointer values of 0x00000000 (a.k.a. NULL pointer) and 0x00000030 -- an uncommonly low value for an address -- suggests one possibility: are any of the arguments in a call to a NETCDF routine CHARACTER type arguments?
If so, you have to deal with the fact that CVF and IVF use slightly different default conventions for passing the hidden string length arguments of the character variables. This, too, may be corrected with a properly selected compiler switch.
That you got a C0000005 error with pointer values of 0x00000000 (a.k.a. NULL pointer) and 0x00000030 -- an uncommonly low value for an address -- suggests one possibility: are any of the arguments in a call to a NETCDF routine CHARACTER type arguments?
If so, you have to deal with the fact that CVF and IVF use slightly different default conventions for passing the hidden string length arguments of the character variables. This, too, may be corrected with a properly selected compiler switch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Tanks for the reply.
Sorry, but could you be more specific about the way to how can i resolve my issue.
Tanks in advanced.
Helder Marques
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
After reading your answer more carefully, i realized that your assumption is correct, the error is given by the call of a function passing as arguments a set of characters(string).Im going to better analyze the settings of the project, however if you could give some more information abouthow to properly selected compiler switch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Fortran User's Guide has a chapter on mixed-language programming. To give you a specific answer I'd have to look at the NetCDF sources -- something that I am not interested in doing at this time.
For subroutine/function calls with CHARACTER type arguments, the length of each character variable (measured in characters) is passed as an extra argument. Different compilers have different conventions as to whether each length follows immediately after the address of the argument (style A) or, as most compilers do, append all the lengths to the end of the argument list (style B).
On the C side, with style B, if there is no need to know the length of the character argument (note that there is no terminal zero byte as in C strings), the length parameters can be ignored. If style A is used, the C code will have to have provisions for processing these extra length-arguments.
Having said that, let me bring to your attention this IFort option:
-[no]mixed-str-len-arg
indicate whether hidden lengths are passed after their
character argument or after all arguments.
If your project worked correctly with CVF, that may be the magic fix that you are looking for. No guarantees, however!
For subroutine/function calls with CHARACTER type arguments, the length of each character variable (measured in characters) is passed as an extra argument. Different compilers have different conventions as to whether each length follows immediately after the address of the argument (style A) or, as most compilers do, append all the lengths to the end of the argument list (style B).
On the C side, with style B, if there is no need to know the length of the character argument (note that there is no terminal zero byte as in C strings), the length parameters can be ignored. If style A is used, the C code will have to have provisions for processing these extra length-arguments.
Having said that, let me bring to your attention this IFort option:
-[no]mixed-str-len-arg
indicate whether hidden lengths are passed after their
character argument or after all arguments.
If your project worked correctly with CVF, that may be the magic fix that you are looking for. No guarantees, however!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks again for your reply.
Unfortunately the proposed solution did not solve the issue ...
I do not know what else can I do ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you look here http://www.mohid.com/wiki/index.php?title=Netcdf#in_windows
you will find help on the problems you may find when compiling using IFORT rather than the recommended CVF.
(found using a Google search for 'converttohdf5')
you will find help on the problems you may find when compiling using IFORT rather than the recommended CVF.
(found using a Google search for 'converttohdf5')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the suggestion.
If you read the previous post's, you will see that the error I describe is not mentioned in MohidWiki.

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