View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Thu May 11, 2006 3:39 am Post subject: Timing analysis |
|
|
Hi,
I have some troubles with using the option /TIMING for timing analysis of my code under Plato3. In the Explorer Window, under the properties of my project, I tick the option 'Plant timing information' under 'Debugging'.
Then I run the project and it looks like it is working. When this is finished, no report (.TMR or .TMO file) has been created!! I can't find anything, nowhere on the computer! What have I done wrong?
Stephane |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7942 Location: Salford, UK
|
Posted: Thu May 11, 2006 5:34 am Post subject: Timing analysis |
|
|
Stephane
It works OK for me.
There is additional output information and a .TMR file is planted in the project folder. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7942 Location: Salford, UK
|
Posted: Thu May 11, 2006 5:43 am Post subject: Timing analysis |
|
|
At the moment Plato does not set the TIMINGOPTS environment variable (the FTN95 plug-in for Visual Studio does do this for you). If you want a .TMO file then you must set this manually when using Plato. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Thu May 11, 2006 6:01 am Post subject: Timing analysis |
|
|
Thanks for your answers but only the .TMR file would be enough ... I have been trying again and again but I cannot get any output of any kind, neither .TMR nor anything else!!!
What could it be?
When running the program, I get the following messages
------------------
Entering-10 second timer calibration loop
Timer1: 51910952825655.000000 Timer2: 51940888789950.000000 Dif: 29935964295.000
000
Ticks per second: 2993596429.500000
<TimingAnalysis Ver 1.0.3 active.>
Press RETURN to close window . . .
------------------
Does that mean it works? So why don't I have any output?
I really need to optimise this code and I don't know how I can go round this problem.
Thanks.
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7942 Location: Salford, UK
|
Posted: Thu May 11, 2006 6:16 am Post subject: Timing analysis |
|
|
Yes this means that the timing mechanism is working.
If you cannot see the .TMR file in your project folder, try searching for *.TMR on your hard drive.
It may be in your project folder but your Explorer viewing options may hide the extension (.TMR). |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Fri Jun 02, 2006 1:51 am Post subject: Timing analysis |
|
|
I've been trying again and searching for this .TMR file on the whole disc of the PC but there's nothing.
I'm running out of ideas and I don't know where to look for help.
Maybe this could help, I'm using the Plato version 3.17. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7942 Location: Salford, UK
|
Posted: Fri Jun 02, 2006 5:51 am Post subject: Timing analysis |
|
|
Stephane
The Plato version number will not be significant.
I would do a test on a simple program outside of Plato.
Just open a Command Prompt window, create a simple program and type
FTN95 prog.f90 /timing /lgo
on the command line.
Then look for the timing output file in the same folder. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Fri Jun 02, 2006 10:22 am Post subject: Timing analysis |
|
|
I have just tried it.
The program I created simply prompts and reads a number, makes some operations and then writes the result. When I run it with the above command, it seems ok but I have to end it (CTRL+C) since it still runs after 15-20 mins. I do not understand why it is so long and if it will end at all! In doing so, a .TMR file appears.
I also tried from Plato. I created a project containing the above program. I ran it using the timing option ('plant timing information' ticked in the project properties). This lasts about 10 mins but do not generate any .TMR file!
I do not understand why the timing analysis ends when run from Plato and does not seem to ever end from DOS.
|
|
Back to top |
|
|
Anonymous Guest
|
Posted: Sat Jun 03, 2006 1:14 am Post subject: Timing analysis |
|
|
Stephane
If you have to hit Ctrl+C to end your program then chances are your program is faulty.
Try using the debugger to step through the program and find out what is going wrong.
The only difference between running the program from Plato and from a command line will be in the debugging options that are used. You are probably using debugging options in Plato but not from the command line. The different behaviour also suggests a fault in your program.
Maybe the lack of a timing file simply means that the program has not terminated correctly. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Mon Jun 05, 2006 5:28 am Post subject: Timing analysis |
|
|
When I run it from DOS, it says there are no errors. Same when I compile it and build an executable from Plato. Moreover, when I run the program, it terminates correctly. I even tried to write it in Fortran 77 but it didn't change anything (as expected).
Here is the program:
Program test
integer n,z
write(*,*)'n'
read(*,*)n
z=n*n+2*n
write(*,*)z
pause
end
It cannot be simpler. I tried to tick off all compilation options under Plato but still no .TMR file.
|
|
Back to top |
|
|
brucebowler Guest
|
Posted: Mon Jun 05, 2006 7:20 am Post subject: Timing analysis |
|
|
The first thing I'd do is change PAUSE to STOP and see if the behaviour changes. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7942 Location: Salford, UK
|
Posted: Tue Jun 06, 2006 3:01 am Post subject: Timing analysis |
|
|
Stephane
A PAUSE is sometimes used at the end of a program to read the results before they disappear off the screen when using an IDE.
However, Plato does not need this so you can omit the PAUSE at the end.
If you use a PAUSE and also use Ctrl+C (or something equivalent) when running the program then it will not terminate normally and you will probably not get the desired output file.
If you need to use a PAUSE whilst running the program then you should continue running the program normally after the pause (i.e. do not use Ctrl+C etc) but respond to the standard prompt to continue. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Tue Jun 06, 2006 5:24 am Post subject: Timing analysis |
|
|
I did try with PAUSE, STOP and even nothing but this does not change anything. When running the timing analysis from Plato, I do not need to stop it, it ends normally (no errors, no crashing, ...) but no TMR file appears. I only need to end abruptly (Ctrl+C) the program when running it from DOS since it is still running after more than 15 mins (that is not normal from my point of view for such a simple and short program). However, in that case, I do get a TMR file (incomplete of course). |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7942 Location: Salford, UK
|
Posted: Tue Jun 06, 2006 10:08 am Post subject: Timing analysis |
|
|
Stephane
Plato just runs the program for you (just like from a command line).
If you are running the same program and it runs for more than 15 minutes from a DOS box then it will do the same from Plato.
Plato runs the job in the background and allows you to do other things whilst the program is running so perhaps it has simply not finished running.
Step into the program using the debugger and find out why it is not finishing when you expect it to finish.
|
|
Back to top |
|
|
Anonymous Guest
|
Posted: Wed Jun 14, 2006 6:27 am Post subject: Timing analysis |
|
|
I used the salford Win32 debugger to debug the following program when using timing analysis:
Program test
end program
it cannot be simpler!
After entering the '10-second timer calibration loop' and running about 10 mins the program ends with the following message in the Call Stack/Status box: access violation. That's really weird! I think then there is something wrong with either the software or my computer. |
|
Back to top |
|
|
|