Wednesday, February 08, 2012     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: Is it because of memory/gc issue?
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
tzhou@micron.com
Posts: 0
Online: User is Offline
1/08/2008 2:14 PM  

I have a skill code with about 5000 lines. Inside the top level procedure, everything is very simple: call two lower level functions (let's call them A and B). There is no global variables shared between function A and B except a cell view they will work on. So, I basically can run them step by step on a cell view if I like to do so.

I can't explain the following facts:
    (1).  if I run the top level procedure, which means that A and B will be run in sequence, then, it will take forever to finish the second function (B). (>24 hours). VERY SLOW!!  The function A takes about 1 minute cputime to run, which is ok.
    (2). Run A and B step by step:   run function A, which still takes about 1 minute. then, save the cell view and quite opus. restart opus and open the saved cell view. then, run function B on it, which takes about 5 minutes to finish, VERY FAST!!
    (3). Run A and B separately. After A finished, immediately start function B, both phenomena of item 1&2 may happen. Some times, I got B takes looong time (>24 hrs) and some times, I got B takes less than 5 minutes. If I interrupt the B function in the middle using "ctrl-C", and then, restart B, the chance is high that B will finish fast (<5 minutes).

My goal is to run the top level procedure directly like in (1) in a reasonable short time.

I have used profile('memory) to look into the memory usage. function A will take ~300mB and B will take ~1GB. I added needNCells to increase the initial memory allocations in my code so that the allocated numbers are large than necessary values reported by profileSummary and gcsummary.  By the way, the computer I used has 6GB physical memory, much larger than the needed 1.5GB.

Also, I tried to insert "gc" in several locations of the code to force it collect garbage and tried to make sure all the used variables are local so that their memory can be recycled when a function is not used anymore.

But none of the above methods could help me reduce function B cputime if I run A&B together by calling the top level function.

What  have I missed? Please help!

Thanks,

Tong

dmay
Posts: 29
Online: User is Offline
1/09/2008 8:32 AM  
Have you tried profiling the performance instead of the memory? If it is gc related, then the majority of the time will be indicated with the gc. The inconsistency in run time makes me think you have a variable that is not getting reset correctly or might be global and used by both routines. Have you run skill lint checker to look at global variables?

-Derek
rairaj
Posts: 17
Online: User is Offline
1/09/2008 10:29 AM  
Does this SKILL code uses ipc and sleep calls? Is it anyway related to OSS based netlisting?
Tongju
Posts: 13
Online: User is Offline
1/09/2008 11:12 AM  
Hi, Derek and Rairaj,

Thanks for your reply!

To Derek: when I tried profiling cputime or looked into the gcsummary report, the time taken by gc only tens of seconds. The huge time chunk is allocated to the function B. In function B, there are a lot of list operation (creation) and dbGetOverlaps. I guess the dynamic memory allocation is causing those procedures slow when A & B are run in sequence. I did pay attention to the variable types of function A (all of them defined withing let()), and actually, the reported memory usage of function A is not huge (300mb~500mb). I should have run lint as you suggested. So, I will do "lint" for the whole script (including function A&B) and post the result back later.

To Rairaj: no ipc or sleep calls in the current script. This script is for processing a layout view, basically play with shapes. Therefore, no netlist involved.

Tongju
Posting to forums is available to community members only.
Login or Register

Forums > Custom IC > Shared code - SKILL > Is it because of memory/gc issue?


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.