Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Help with extremely slow executable

jeff_chase
Beginner
484 Views
Hello all,

I'm running a Fortran 77 program on a brand new Dell PC, Pentium 4,
3GHz machine with 1GB of ram, using Compaq Visual Fortran Pro 6.6B
under windows XP.

My colleage is running the same code on a 3 year old 1 GHz Solaris
Unix machine with 500 Mb of RAM using the Solaris compiler.

The runtime on the unix box is anywhere from 10-100 times faster than
the windows pc.

Now I'm a big fan of unix and all ... but this just seems ridiculous. 
I figure there must be a compiler option or windows option on my
machine which would account for most of this difference.  I'm not very
familiar with all the different compliling options, and I'm hoping
someone here could help.  Or perhaps someone knows of an issue with xp
that may explain this.  I could tweak windows xp to turn off a bunch
of unneccesary serivces, but I can't imagine this would go too far in
bridging this gap.  The compiler options I'm using are:

/compile_only /dbglibs /debug:none /extend_source:80 /fpp
/math_library:fast /nologo /optimize:5 /warn:nogeneral
/module:"Release/" /object:"Release/"
When looking at performance in the Task Manager, only 10-25% of the CPU is being used, with a page file of about 750MB.
If anyone has any suggestions, I'd very much appreciate your help!  Otherwise, we'll be scrapping CVF in favor of Solaris.
:-)

Frustrated with overnight runs,
-Jeff
0 Kudos
3 Replies
TimP
Honored Contributor III
484 Views

You don't tell enough to do more than guess.

Are you running a virus checker, could you disable it while running your program?

Are you looking at one of your 2 performance windows, with HT enabled, or did you disable Hyperthreading in the BIOS? If you really are not using much of your CPU time, there must be a reason.

If your application gets any benefit from /optimize:5, why not try Intel Fortran 7.1 or 8.0 with P4 options, maybe even with parallel on? Do you know that your program would not benefit?

Since you mention your swap file, is there a reason not to make it larger? Is it being used intensively?

0 Kudos
jeff_chase
Beginner
484 Views

Okay, so after spending a few days searching through google and usenet, I managed to find a useful suggestion from another post on this board.

I commented out every line to CALL FLUSH() in the program.

It no longer takes 25 minutes to run.

It takes under 1 minute. :-)

I know that FLUSH will flush the buffer to output, but I never knew why that would be necessary. From the little information I could find, it had to do with avoiding disc full errors. This is obviously not a problem with computers today. It's easy to see that constantly flushing the buffer would cause severe thrashing with the page file.

So now my question is: Are there negative consequences to commenting out these calls to flush?

Any information would be much appreciated!

-Jeff

0 Kudos
TimP
Honored Contributor III
484 Views
Yes, the library normally saves up (caches) stuff on the way to disk, until there is enough to put out to disk efficiently, without holding up your program. If you don't have a good reason for call flush(), you don't want it. Sometimes it is used for output streams where you want to be able to see the last thing your program has written, in case it crashes, or the buffering lags behind by half an hour or more. Evidently, those reasons don't apply for you.
0 Kudos
Reply