[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tic toc
From: |
John Reed |
Subject: |
Re: tic toc |
Date: |
Tue, 05 Jan 2010 09:25:31 -0800 |
Hi John,
Thank you for the explanation. Since Octave is making system calls to get the
timing info it sounds like any bugs would be elsewhere in my system rather than
within Octave.
Some system information:
running on XP service pack 2
it has intel core 2 duo processors (2.2 GHz)
and it uses visual C++ 2005.
Should I still report this issue to address@hidden even though the bug appears
to be in Windows? If it would be useful I will go ahead and report it.
Thanks,
John
>>> "John W. Eaton" <address@hidden> 1/4/2010 11:23 PM >>>
On 4-Jan-2010, John Reed wrote:
| Hello,
|
| I've been getting some strange results using tic toc and cputime to get wall
time and cputime for an operation using the find() function.
|
| for example:
|
| tic;
| c=cputime();
|
| ind = find( T(:,1) >= -121.9 & ...
| T(:,1) < -121.8 & ...
| T(:,2) >= 37 & ...
| T_coord_search(:,2) < 37.1 );
|
|
| t=toc;
|
| c=cputime() - c;
|
| fprintf("wall time was %e seconds \n",t);
|
| fprintf("cputime was %e seconds \n",c);
|
| Where T is a 409981 x 2 array of doubles.
|
| sometimes the script returns about 0.016 seconds for both times which seems
reasonable for this operation
|
| on other occasions for the exact same array and conditions the script
returns a wall time of ~ 1e-8 seconds and cputime of 0 seconds which seems
unreasonable (sometimes the wall time is even given as a negative number)
|
| Am I using tic toc and cputime incorrectly?
It looks like you are.
| Or is the time for find to operate really this widely variable? Or could
something be happening peculiar to my system that is causing tic and toc and
cputime to malfunction?
I would not expect negative values for wall clock or CPU time.
It's possible that you've found a bug in Octave, but Octave
is just making system calls to get the values and then returning them
to you, so it seems more likely that those functions are
| Any thoughts or advice someone might have would be greatly appreciated.
What kind of system do you have? Does it have multiple CPUs? What
operating system and version are you using? What C library and
version? etc.
If you think you've found a bug in Octave, then please submit a
complete bug report to the address@hidden list.
Please read http://www.octave.org/bugs.html to see what kind of
information to include so that someone might be able to reproduce and
debug the problem.
jwe
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
- tic toc, John Reed, 2010/01/04
- tic toc, John W. Eaton, 2010/01/05
- Re: tic toc,
John Reed <=