From bernauer at informatik.uni-tuebingen.de Mon Mar 10 01:05:37 2008 From: bernauer at informatik.uni-tuebingen.de (Andreas Bernauer) Date: Mon, 10 Mar 2008 10:05:37 +0100 Subject: [Hotspot] Reduce simulation time Message-ID: <1205139937.10930.63.camel@lava.informatik.uni-tuebingen.de> Hi, first, thank you for your great software. It helps us a lot in our research. We integrated Hotspot 4.0 in our simulator (of a System-on-Chip, SoC). Although I've enabled Hotspot's math acceleration for my CPU, the simulator still spends 90% of its time within Hotspot estimating temperatures. I hope you can help me to improve simulation speed. Turning on verbosity tells me that rk4 is called ~5200 times during compute_temp. Is this typical for a simulation time of 1s? I tried to reduce computation time by increasing MIN_STEP in temperature.h and decreasing RK4_PRECISION in RCutil.c, to no avail. I printed out the intermediate temperatures in the for-loop in compute_temp_block in temperature_block.c and found that the temperatures are oscillating (see attached plot). Maybe this is the reason for the long computation time? Do you know a way of reducing computation time, even at the price of reduced precision? Thank you very much in advance for your answer. Best regards, Andreas. -- WSI/TI, Sand 13, 72076 T?bingen, +49 70 71 29 75 940 http://www.ti.uni-tuebingen.de/Andreas_Bernauer.227.0.html -------------- next part -------------- A non-text attachment was scrubbed... Name: temp.png Type: application/octet-stream Size: 6328 bytes Desc: not available Url : http://www.cs.virginia.edu/pipermail/hotspot/attachments/20080310/cbe5d8ee/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://www.cs.virginia.edu/pipermail/hotspot/attachments/20080310/cbe5d8ee/attachment.bin From wh6p at cms.mail.virginia.edu Mon Mar 10 06:52:06 2008 From: wh6p at cms.mail.virginia.edu (Wei Huang) Date: Mon, 10 Mar 2008 10:52:06 -0400 Subject: [Hotspot] Reduce simulation time In-Reply-To: <1205139937.10930.63.camel@lava.informatik.uni-tuebingen.de> References: <1205139937.10930.63.camel@lava.informatik.uni-t uebingen.de> Message-ID: <8E738840525FE7D8D160D47E@mstu2> Hi Andreas, Are you running HotSpot on a per-clock-cycle basis or using the default sampling interval in hotspot.config? You may want to sample temperatures less frequently and see if that affects the accuracy a lot. Other factors that could have impact on simulation speed are the number of blocks you have in the floorplan and number of blocks with high aspect ratios. Thanks, -Wei --On Monday, March 10, 2008 10:05 AM +0100 Andreas Bernauer wrote: > Hi, > > first, thank you for your great software. It helps us a > lot in our research. > > We integrated Hotspot 4.0 in our simulator (of a > System-on-Chip, SoC). Although I've enabled Hotspot's > math acceleration for my CPU, the simulator still spends > 90% of its time within Hotspot estimating temperatures. > I hope you can help me to improve simulation speed. > > Turning on verbosity tells me that rk4 is called ~5200 > times during compute_temp. Is this typical for a > simulation time of 1s? > > I tried to reduce computation time by increasing MIN_STEP > in temperature.h and decreasing RK4_PRECISION in > RCutil.c, to no avail. I printed out the intermediate > temperatures in the for-loop in compute_temp_block in > temperature_block.c and found that the temperatures are > oscillating (see attached plot). Maybe this is the > reason for the long computation time? > > Do you know a way of reducing computation time, even at > the price of reduced precision? > > Thank you very much in advance for your answer. > > Best regards, > > Andreas. > > -- > WSI/TI, Sand 13, 72076 T?bingen, +49 70 71 29 75 940 > http://www.ti.uni-tuebingen.de/Andreas_Bernauer.227.0.html > From ks4kk at cs.virginia.edu Mon Mar 10 09:45:30 2008 From: ks4kk at cs.virginia.edu (Karthik Sankaranarayanan) Date: Mon, 10 Mar 2008 13:45:30 -0400 (EDT) Subject: [Hotspot] Reduce simulation time In-Reply-To: <1205139937.10930.63.camel@lava.informatik.uni-tuebingen.de> References: <1205139937.10930.63.camel@lava.informatik.uni-tuebingen.de> Message-ID: Hello Andreas, > Turning on verbosity tells me that rk4 is called ~5200 times during > compute_temp. Is this typical for a simulation time of 1s? Yes - it looks OK to me. With adaptive RK4, this averages to about 0.2 ms per RK4 step, which is about right for a 1s interval. If you want RK4 to adapt faster (since your calling interval is large - 1s), you might want to relax the RK4_MAXUP (in RCutil.c) a litte bit. This increases the upper limit on how much the step size can increase in each step. So, the adaptation can happen quicker. > I tried to reduce computation time by increasing MIN_STEP in > temperature.h and decreasing RK4_PRECISION in RCutil.c, to no avail. I > printed out the intermediate temperatures in the for-loop in > compute_temp_block in temperature_block.c and found that the > temperatures are oscillating (see attached plot). Maybe this is the > reason for the long computation time? I am not sure if I understand the plot fully but here is my take. It seems that temperatures of three different units have been plotted. The small oscillatory features (jagged lines) seem normal to me because they are well below the desired RK4_PRECISION, which is 0.01 degrees. Zooming out the plot to that level (> 5 times) would mean pretty smooth curves. > Do you know a way of reducing computation time, even at the price of > reduced precision? Apart from the RK4_MAXUP suggestion, a couple more come to mind: a) How many blocks are there in the floorplan? Depending on this number, you might speed-up the simulation by switching to the grid model with a coarser grid. b) While using the grid model, you could also simplify the modeling of the package by removing the TIM layer through the layer configuration file specification. Hope this helps. -karthik From bernauer at informatik.uni-tuebingen.de Tue Mar 11 08:30:06 2008 From: bernauer at informatik.uni-tuebingen.de (bernauer at informatik.uni-tuebingen.de) Date: Tue, 11 Mar 2008 17:30:06 +0100 (MET) Subject: [Hotspot] Reduce simulation time In-Reply-To: References: <1205139937.10930.63.camel@lava.informatik.uni-tuebingen.de> Message-ID: <42349.134.2.12.41.1205253006.squirrel@imap> Hello Karthik, Hello Wei, thank you very much for your responses. Sorry that I missed some explanations. The plots are temperature curves of three different units. I have 6 blocks, one of which has a rather high aspect ratio, so I could split this one into two blocks. I am running the simulation at the same time I am gaining the power estimates, collecting the power over 1s, then running Hotspot. Currently, I don't have a way to change the sampling frequency of 1s. Thank you Karthik for telling me that my plots are "normal" :-) I'll try to relax RK4_MAXUP and to use the grid model without TIM layer. BTW: If the thermal resistance between all units is the same, could the calculation be simplified (ie. replace rk4 by something simpler/faster)? Or did I get the model wrong? Best regards, Andreas. From gokulv at mail.utexas.edu Thu Mar 13 11:26:59 2008 From: gokulv at mail.utexas.edu (gokulv at mail.utexas.edu) Date: Thu, 13 Mar 2008 14:26:59 -0500 Subject: [Hotspot] query Message-ID: <1205436419.47d98003f3615@webmailapp6.cc.utexas.edu> Hi, I am a user of Hotspot. I was doing some preliminary simulations. I changed the -sampling_intvl to some other value and reran the simulation with the -d option. The value specified in the config file and output of -d option file do not match. I am using the version 4 of the tool. Am I missing something. options given: # hotspot calling interval -sampling_intvl 0.0105e-04 Thanks for your help in advance. Regards Gokul From wh6p at cms.mail.virginia.edu Fri Mar 14 04:51:48 2008 From: wh6p at cms.mail.virginia.edu (Wei Huang) Date: Fri, 14 Mar 2008 08:51:48 -0400 Subject: [Hotspot] query In-Reply-To: <1205436419.47d98003f3615@webmailapp6.cc.utexas.edu> References: <1205436419.47d98003f3615@webmailapp6.cc.utexas. edu> Message-ID: Hi Gokul, Did you also use the -c option in the command line? -Wei --On Thursday, March 13, 2008 2:26 PM -0500 gokulv at mail.utexas.edu wrote: > Hi, > > I am a user of Hotspot. I was doing some preliminary > simulations. I changed the -sampling_intvl to some other > value and reran the simulation with the -d option. The > value specified in the config file and output of -d option > file do not match. > > I am using the version 4 of the tool. Am I missing > something. > > options given: ># hotspot calling interval > -sampling_intvl 0.0105e-04 > > > Thanks for your help in advance. > > Regards > Gokul > > _______________________________________________ > HotSpot mailing list > HotSpot at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/hotspot From michaelkadin at gmail.com Fri Mar 14 05:19:30 2008 From: michaelkadin at gmail.com (Mike Kadin) Date: Fri, 14 Mar 2008 09:19:30 -0400 Subject: [Hotspot] Difference between Steady State and Transient Message-ID: <34954c9d0803140619u5476bb44gf6701e8ed6605ede@mail.gmail.com> Hey All, I've been having some trouble with hotspot that I haven't previously encountered and was hoping for a little guidance, advice. I'm using a pretty standard floorplan, and power traces I've pulled from PTScalar. I'm using the suggested method of running HotSpot 2 times, once for steady state values, and once for transient values. The steady state block temperatures seem to be in a reasonable range (75-150 degrees C). When plotting the transient data for each block, I can see it does level off over time, but for a few blocks (not all of them) the graph levels off at values closer to 350 degrees C. Any ideas on why the steady-state and transient data could differ so much? Any help would be greatly appreciated. Thanks, Mike Kadin Undergraduate Researcher Brown University Division of Engineering kadin at brown.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/hotspot/attachments/20080314/e9b489f0/attachment.html From wh6p at cms.mail.virginia.edu Fri Mar 14 06:42:17 2008 From: wh6p at cms.mail.virginia.edu (Wei Huang) Date: Fri, 14 Mar 2008 10:42:17 -0400 Subject: [Hotspot] Difference between Steady State and Transient In-Reply-To: <34954c9d0803140619u5476bb44gf6701e8ed6605ede@mail.gmail.com> References: <34954c9d0803140619u5476bb44gf6701e8ed6605ede@ma il.gmail.com> Message-ID: Hi Mike, Do you have any overlapping units in the floorplan or any uncommon blocks such as ones with very high aspect ratio or very high power density etc? Another HotSpot user experienced similar problems last year, and it turned out that the floorplan had overlapping units. Please also tell us which version of HotSpot are you using? thanks. -Wei --On Friday, March 14, 2008 9:19 AM -0400 Mike Kadin wrote: > Hey All, > > I've been having some trouble with hotspot that I haven't > previously encountered and was hoping for a little > guidance, advice. > > > I'm using a pretty standard floorplan, and power traces > I've pulled from PTScalar. I'm using the suggested > method of running HotSpot 2 times, once for steady state > values, and once for transient values. The steady state > block temperatures seem to be in a reasonable range > (75-150 degrees C). When plotting the transient data for > each block, I can see it does level off over time, but > for a few blocks (not all of them) the graph levels off > at values closer to 350 degrees C. > > Any ideas on why the steady-state and transient data > could differ so much? > > Any help would be greatly appreciated. > > Thanks, > > Mike Kadin > > Undergraduate Researcher > Brown University Division of Engineering > kadin at brown.edu > > From gokulv at mail.utexas.edu Fri Mar 14 14:10:03 2008 From: gokulv at mail.utexas.edu (gokulv at mail.utexas.edu) Date: Fri, 14 Mar 2008 17:10:03 -0500 Subject: [Hotspot] query In-Reply-To: References: <1205436419.47d98003f3615@webmailapp6.cc.utexas. edu> Message-ID: <1205532603.47daf7bb113a1@webmailapp6.cc.utexas.edu> Hi Wei, Thanks for replying. I was able the fix the issue with the help of Karthik. Thanks and Regards, Gokul Quoting Wei Huang : > Hi Gokul, > > Did you also use the -c option in the command line? > > -Wei > > --On Thursday, March 13, 2008 2:26 PM -0500 > gokulv at mail.utexas.edu wrote: > > > Hi, > > > > I am a user of Hotspot. I was doing some preliminary > > simulations. I changed the -sampling_intvl to some other > > value and reran the simulation with the -d option. The > > value specified in the config file and output of -d option > > file do not match. > > > > I am using the version 4 of the tool. Am I missing > > something. > > > > options given: > ># hotspot calling interval > > -sampling_intvl 0.0105e-04 > > > > > > Thanks for your help in advance. > > > > Regards > > Gokul > > > > _______________________________________________ > > HotSpot mailing list > > HotSpot at mail.cs.virginia.edu > > http://www.cs.virginia.edu/mailman/listinfo/hotspot > > > > > From wh6p at cms.mail.virginia.edu Thu Mar 27 12:26:19 2008 From: wh6p at cms.mail.virginia.edu (Wei Huang) Date: Thu, 27 Mar 2008 16:26:19 -0400 Subject: [Hotspot] A problem related to HotSpot 4.0 (fwd) Message-ID: <3A6323CDC40896FECF61F3A8@mstu2> Wei Huang wrote: > Just to clarify, HotSpot grid model is able to model > multiple layers with power dissipations like 3D chips. > In order to do this, you need to use the grid model by > setting "-model_type grid", and modify the "lcf" layer > configuration file--just follow the instructions in the > sample lcf file. Let us know if it works. Thanks. > > -Wei > >> On Thu, 27 Mar 2008 20:04:06 +0530 >> "Sudarshan Reddy M" wrote: >>> Hi, >>> I am using HotSpot 4.0 for thermal estimation of 3D >>> Chips. It seems there is a problem in reading power >>> trace file and populating it into the HotSpot internal >>> vectors. I have used 2 layer stack with an insulation >>> layer in between which doesn't dissipate power. What I >>> have noticed is that the power in the second active >>> layer is not populated in the "overall_power", thus >>> resulting in incorrect temperatures. Please let me know >>> if I am missing anything or it is indeed a problem. >>> Regards >>> Sudarshan Reddy M >>> IIT Bombay From ks4kk at cs.virginia.edu Fri Mar 28 22:37:00 2008 From: ks4kk at cs.virginia.edu (Karthik Sankaranarayanan) Date: Sat, 29 Mar 2008 02:37:00 -0400 (EDT) Subject: [Hotspot] A problem related to HotSpot 4.0 In-Reply-To: References: <873B508C66CF31960460DCCA@192.168.1.102> Message-ID: Whoops - this is indeed a bug in HotSpot! Thank you very much for letting us know Sudarshan. Here is a patch file that fixes this issue related to 3D chip modeling. Please apply it to the hotspot.c file of the 4.0 distribution (save the patchfile in the HotSpot-4.0 directory; cd HotSpot-4.0; patch hotspot.c patchfile). The next release of HotSpot will include this fix. Hope this answers your question. Thank you again. Sincerely, -karthik On Fri, 28 Mar 2008, Sudarshan Reddy M wrote: > Hi, > I have specified the lcf file in .config and HotSpot is indeed dumping > all the layer temperatures. > I debugged the problem and found that when "overall_power" (can be > found in hotspot.c) populated it is not done correctly. What I have > observed is that vector called "power" is being populated from the > power trace file and then "overall_power" is calculated as the > average power. Here "power" will have non-zero power 0 - n1 where n1 > is the total number of units in the first layer and (n1+1)-(n2) will > be all zeros (because I have specified second layer as a > non-dissipative one) and (n2+1)-n3 will represent the third power > where n3 is the total number of units in the third layer. However > while populating "overall_power" it is done only from 0 to n4 where n4 > is the number of units in all the power dissipating layers, which > seems to be wrong(might be a bug in the software). What I am not sure > is whether that is indeed a problem or not? > It will be more than helpful if you can comment on this. > Thank you very much for the quick responses and the time you have > spent in answering my queries. > > Regards > Sudarshan. -------------- next part -------------- --- ../HotSpot-4.0/hotspot.c 2007-09-02 01:23:02.000000000 -0400 +++ hotspot.c 2008-03-29 01:31:41.695717000 -0400 @@ -449,8 +449,17 @@ } /* for computing average */ - for(i=0; i < n; i++) - overall_power[i] += power[i]; + if (model->type == BLOCK_MODEL) + for(i=0; i < n; i++) + overall_power[i] += power[i]; + else + for(i=0, base=0; i < model->grid->n_layers; i++) { + if(model->grid->layers[i].has_power) + for(j=0; j < model->grid->layers[i].flp->n_units; j++) + overall_power[base+j] += power[base+j]; + base += model->grid->layers[i].flp->n_units; + } + lines++; } @@ -458,8 +467,16 @@ fatal("no power numbers in trace file\n"); /* for computing average */ - for(i=0; i < n; i++) - overall_power[i] /= lines; + if (model->type == BLOCK_MODEL) + for(i=0; i < n; i++) + overall_power[i] /= lines; + else + for(i=0, base=0; i < model->grid->n_layers; i++) { + if(model->grid->layers[i].has_power) + for(j=0; j < model->grid->layers[i].flp->n_units; j++) + overall_power[base+j] /= lines; + base += model->grid->layers[i].flp->n_units; + } /* steady state temperature */ steady_state_temp(model, overall_power, steady_temp); From sudarshanml at gmail.com Fri Mar 28 23:32:16 2008 From: sudarshanml at gmail.com (Sudarshan Reddy M) Date: Sat, 29 Mar 2008 13:02:16 +0530 Subject: [Hotspot] A problem related to HotSpot 4.0 In-Reply-To: References: <873B508C66CF31960460DCCA@192.168.1.102> Message-ID: Hi Karthik, Thank you very much for the clarification and the fix. My sincere thanks to all the people in your group not only for these quick responses but also for the beautiful tool you people have provided to the user community. Thanks Sudarshan. On Sat, Mar 29, 2008 at 12:07 PM, Karthik Sankaranarayanan wrote: > > Whoops - this is indeed a bug in HotSpot! Thank you very much for letting > us know Sudarshan. Here is a patch file that fixes this issue related to > 3D chip modeling. Please apply it to the hotspot.c file of the 4.0 > distribution (save the patchfile in the HotSpot-4.0 directory; cd > HotSpot-4.0; patch hotspot.c patchfile). The next release of HotSpot will > include this fix. > > Hope this answers your question. Thank you again. > > Sincerely, > -karthik > > > > > On Fri, 28 Mar 2008, Sudarshan Reddy M wrote: > > > Hi, > > I have specified the lcf file in .config and HotSpot is indeed dumping > > all the layer temperatures. > > I debugged the problem and found that when "overall_power" (can be > > found in hotspot.c) populated it is not done correctly. What I have > > observed is that vector called "power" is being populated from the > > power trace file and then "overall_power" is calculated as the > > average power. Here "power" will have non-zero power 0 - n1 where n1 > > is the total number of units in the first layer and (n1+1)-(n2) will > > be all zeros (because I have specified second layer as a > > non-dissipative one) and (n2+1)-n3 will represent the third power > > where n3 is the total number of units in the third layer. However > > while populating "overall_power" it is done only from 0 to n4 where n4 > > is the number of units in all the power dissipating layers, which > > seems to be wrong(might be a bug in the software). What I am not sure > > is whether that is indeed a problem or not? > > It will be more than helpful if you can comment on this. > > Thank you very much for the quick responses and the time you have > > spent in answering my queries. > > > > Regards > > Sudarshan. -- Sudarshan Reddy M M. Tech Control and Computing IIT Bombay