- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
At the moment I am trying to compile an older .F file for a combustion model in GT Power.
In the next step, I want to make some changes to the older .F combustion model. But first, I want to find a solution to compile the Fortran code.
Using the procedure from the UserCode.pdf and Visual Studio, I can build a .dll file.
But if I use the same GT model for the older .dll and for the new .dll, I do not get the same results.
In both cases, however, I used the same .F code and the same GT model.
So I think the only difference is the compiler. Because now I use Visual Studio 2022, and the older .dll it was 2015. But should the compiler affect the results, or did I overlook something?
Here are the Setups:
My old setup in GT 2024:
- GT version: v2024
- Fortran code
- UserCodeReference folder used: %GTIHOME%\v2020\usercode\Fortran\UserCodeReference
- Microsoft Visual Studio: version 2015 à Intel Parallel Studio XE 2017
- Binary file: .dll generated from the above
- Results: stored after running the GT v2024 model with the .dll
My current setup:
- GT version: v2024
- Fortan code (unchanged)
- UserCodeReference folder used: %GTIHOME%\v2020\usercode\Fortran\UserCodeReference
- Microsoft Visual Studio: version 2022 à Intel® Fortran Compiler 2025.3.2 [Intel(R) 64]
- Binary file: .dll generated from the above
- Results: stored after running the GT v2024 model with the .dll
I know it is difficult to present a solution with so little information, but maybe anybody have a few ideas about what it could be caused by.
Thanks for any helpt!
Best regards,
Jaensch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This may be a floating point issue.
First try disabling optimizations.
That failing, in the project properties, try setting the
Properties | Fortran | Code Generation | Intel Processor-Specific Optimization | (pull down) ...
and select older ISA (QxSSE3, or QxAVX).
Jim Dempsey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This may be a floating point issue.
First try disabling optimizations.
That failing, in the project properties, try setting the
Properties | Fortran | Code Generation | Intel Processor-Specific Optimization | (pull down) ...
and select older ISA (QxSSE3, or QxAVX).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much!!!
Disabling optimizations works! Now it gives me the same results.
But why did that work? What exactly is the compiler doing differently now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Jaensch, from your description, it appears that the original code was compiled with optimizations off. Whoever did that was a defensive programmer. When performing optimizations, the compiler writes object code that it thinks will improve the speed of execution in comparison to the non-optimized object code. As you have encountered, there may be differences in the results that are produced by optimized and non-optimized code. With any program, particularly larger codebases, it may be prudent to initially compile with all optimizations turned off. In my experience, this seems to be a reasonable and robust approach to take.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page