Software Archive
Read-only legacy content
17060 Discussions

CPU Utilization for Excel -> Fortran DLL

lrpartin
Beginner
7,642 Views
I wrote an application with a Fortran DLL that does numerical calculations for an Excel spreadsheet. I am concerned over its execution speed. I get fast execution on the development computer but it runs much slower when I move to another computer. The CPU utilitization is <10% for the second computer whereas it reaches 100% often for the development computer. What would slow down the second computer?

What files do I need to transfer to the second computer? I copied the following files:
model.dll (my new fortran DLL)
dforrt.dll (fortran run-time library)
model.xls (spreadsheet file)

The spreadsheet runs fast on a Fortran development computer on Win98 and another Fortran development computer on Win2000. The second computer that runs slow is Win2000 without Compaq Visual Fortran.

Thanks,
Lee
0 Kudos
25 Replies
lrpartin
Beginner
1,654 Views
Steve,

I found a workaround for the problem. The CVF dll uses the IMSL routines for numerical calculations. I added calls to IMSL routines umach and erset in order to get errors printed. Here is an example:

ErrorUnit = 9
call umach (-3, ErrorUnit)
open (unit=ErrorUnit, file='errors.txt')
write (ErrorUnit, '("Error File for Initial Calcs")' )
call erset (0,1,0)
......
close (ErrorUnit, status='DELETE')
..... or later in code
close (ErrorUnit, status='KEEP')

I commented out all of the error file creation within the code. The dll now runs at fast CPU utilization on Win2k/Excel 2000 SR1.

Lee
0 Kudos
Steven_L_Intel1
Employee
1,654 Views
What made you decide to do this?

Steve
0 Kudos
lrpartin
Beginner
1,654 Views
Steve,

There is one computer setup where I can sometimes get fast CPU utilization. The computer has Win2k/Excel 2000 SR1/CVF/384 meg RAM. (The same computer setup without CVF and with either 128 meg RAM or 256 meg RAM has the problem all the time.) The ability to run fast depends upon file access issues. It runs fast for a fresh Excel start and load of the spreadsheet. It slows down if you open another spreadsheet or even attempt to load another spreadsheet but cancel the operation. Therefore, I decided to drop the file accesses within my dll. Now the software runs fast.

Does Compaq need my files to track down the problem?

Lee
0 Kudos
Steven_L_Intel1
Employee
1,654 Views
If how you access the Excel spreadsheets makes a difference, there's nothing we can do about it. Also, IMSL is provided to us as a "black box" by Visual Numerics.

If you can come up with a case that is "all Fortran", we'd be glad to look at it.

Steve
0 Kudos
lrpartin
Beginner
1,654 Views
Steve,

I do not have an 'all Fortran' example and I'm moving on to other projects. Thanks for your assistance.

Lee
0 Kudos
Reply