- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
링크가 복사됨
9 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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!
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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')
