Sudden slowdown of code VS.NET 2003 and IVF 9

Sudden slowdown of code VS.NET 2003 and IVF 9

Hello all,

Maybe someone can shed some light on this problem I have. I do hope this is the appropriate forum.

I have a simple DLL with a shell of C/C++ code, linked to a static Fortran library -- the core. The C/C++ only just passes calls down to a Fortran subroutine. Compiling, linking, argument passing etc. all works well, and functionality is as expected.

To the problem: Seemingly at random, calls to my Fortran subroutine suddenly take a lot longer to perform. From timing with good accuracy (I think) I know that the normal call takes just under 20 ms to perform on the test system. (Some heavy looping and simulating going on.) Call times suddenly pop up to around 62 ms (or 78 or 93 or 108), which effectively disturbs other code. I don't know if the multiple of 15 ms is interesting.

My problem is that I cannot find anything fishy with the code, despite a full code audit and extensive tests. All results that come out are OK, and to my knowing the calculations follow the same code paths. Debugging and trying to trap the problem gives nothing; all internal states are as expected and results are correct. And the anomaly appears irregularly and at random.

Does anyone have any leads or suggestions on this? Good ideas on how to debug further? Am I missing something very basic?

I use VS.NET 2003 and IVF 9.0.030. Tests have been performed with similar results on other machines, and with code compiled with the 9.0.028 version.

Thanks, Riku

Message Edited by riku.kotiranta@sspa.se on 04-10-200611:41 PM

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Given that the same code performs well at times and not at others, I think we can rule out the Fortran compiler as an issue. Perhaps you have some background programs such as virus scanners that are being triggered?

What I often recommend in such situations is to boot the system into Safe Mode (Press F8 during the initial Windows boot progress bar) and try the application. If the issue goes away, that means that some background process loaded during a full boot is interfering with your application.

Retired 12/31/2016

i'm having the same problem as yours. The calls to my Fortran subroutine (contained in a dll) from a C program slowdown 2 times compared to the call from Fortran.

You can use Xperf tool for profiling of your application.For call stacks performance measurement issue this command :xperf -on latency -stackwalk profile , to stop profiling use this command :xperf -d name of your file.etl

Leave a Comment

Please sign in to add a comment. Not a member? Join today