Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!uunet!brunix!twd From: twd@brunix (Tom Doeppner) Newsgroups: comp.sys.encore Subject: Re: CPU timing while using EPT - how? Message-ID: <18284@brunix.UUCP> Date: 18 Oct 89 17:09:32 GMT References: <37500009@m.cs.uiuc.edu> Sender: news@brunix.UUCP Reply-To: twd@karla.UUCP (Tom Doeppner) Organization: Brown University Department of Computer Science Lines: 45 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <37500009@m.cs.uiuc.edu> aslam@m.cs.uiuc.edu writes: > >Gentle readers, I have two inquiries: > >1. How can I time programs when using the EPT (Encore Parallel Threads)? >When I used to use the multi-tasking routines, task_init, task_create etc., >I used the routines "timer_init" and "timer_get" to time my code. These >are all documented in section 3P of the man pages. EPT provides a much >more comfortable programming environment than the multi-tasking package; I >would like to determine what this comfort is costing me in terms of multi-cpu >times. > An undocumented "feature" of EPT (or of at least its progenitor, which was written at Brown), is that if you set the external integer THREADtimed to 1 before calling THREADgo, at the end of your run the number of microseconds of real time used, not counting the overhead taken starting up and shutting down, will be printed out. Regardless of what you do with TREADtimed, there is another external variable, this one a pointer to an unsigned integer, called THREADtimerptr, which points to the free-running real time clock, whose least significant bit measures microseconds. (This is set up in the EPT runtime code by calling time_init[3P]. To use these two variables, you need the declarations: extern int THREADtimed; extern unsigned *THREADtimerptr; >2. Is it possible to install an exception handler for memory alloc disasters? Unfortunately, no. >Sohail Aslam >Department of Computer Science >University of Illinois >arpa aslam@cs.uiuc.edu >usenet uiucdcs!aslam >bitnet aslam@uiucdcs.BITNET Tom Doeppner Dept. of Computer Science Brown University twd@cs.brown.edu