- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I have a C# application which calls a Fortran DLL.The application works fine if I use the DLL built under Debug environment but throws a "Stack Overflow Exception" when I use the the DLL built under Release environment. The speed of computation is very important and hence I want the release version of the DLL.
I have triedcompiling the DLL with /heap-arrays0 but still I get the exception.
I have a external library ".ftn" file which contains a user defined structure with arrays. I use "include" statements in my source to refer to the file and create objects of the structure and pass it to various subroutines.
I am runningIVF Compiler XE 12.0in Visual Studio 2008 on 32-bit Windows 7.
Any help will be greatly appreciated.
Thanks,
Ankit
コピーされたリンク
6 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Do you know exactly where in the Fortran code the error occurs? The /heap-arrays option is better set in the Optimization property page - set the property Heap Arrays to 0. (And make sure that it is set in the Release configuration.)
Without knowing where the error occurs, and what the code looks like there,. it's hard to offer advice.
Without knowing where the error occurs, and what the code looks like there,. it's hard to offer advice.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Steve,
I tried setting the /heap-array option to 0 in the Optimization property page but still the exception is thrown.
How would I find out where the error occurs? I tried enabling unmanaged code debugging in C# but that does not help ( I am not sure if that works for Release DLL).
Thanks
Ankit
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You could try enabling Traceback for the DLL. Or try building a Debug configuration with optimization and see if it does the same thing.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I tried the Debug configuration with optimization and replicated all the options of the Release configuration. The Debug DLL still works without any issues.
Enabling traceback does not generate any information.
Ankit
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I am not allocating any arrays dynamically. All the array sizes are fixed.
Ankit
