• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. St9bad_alloc error while running Ocean

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 13512
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

St9bad_alloc error while running Ocean

kumarp
kumarp over 14 years ago

Hi,

I am running Ocean script from the unix terminal. I have several for loops inside so that I can perform multiple runs. If i have a loop that changes some variables (say from 1 to 1000), then after 300 runs, the script stops with "St9bad_alloc" error. How should I debug this?

 

Thanks,

Kumar

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Kumar,

    You probably should take note of the Forum Guidelines before posting, because otherwise I can only give a very general suggestion.

    It might be that you're running out of memory due to loading lots of simulation results - but I have no way of telling without seeing your OCEAN script and without knowing the version you're using. If you check the process to see if it's near the 32 bit limit (a bit less than 4Gbytes) in IC5141 - could be run 64 bit if in IC614 or later. It may be the problem goes away with a later hotfix or a later version - who knows? As I said, I'm having to guess.

    Perhaps if you provide this somebody else can answer (I'm away for a couple of weeks).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kumarp
    kumarp over 14 years ago
    Hi Andrew,

    Thanks for the quick reply and sorry for posting a question without full details. I will go over the items that you have listed and post more details soon.
     
    Thanks,
    Kumar
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kumarp
    kumarp over 14 years ago

    Hi Andrew & Team,

    As per your suggestion, I am attaching here more details about my cadence version and the OCEAN script that I am using. I have also listed my problem below again. Please let me know if I can provide any more details that would help debug this issue.

    VERSION INFO: IC5141ISR0624

    SubVersion: 5.10.41.500.6.143 (32-bit address)

    PROBLEM: When i run this script, it stops with the following error after around 305 runs. And depending on how many equations I compute, it stops at different runs. The more the equations, it stops earlier. 

    ERROR:

    *Error* Exception: St9bad_alloc - nil

    *Error* load: error while loading file - "kumar.ocn"

     

    OCEAN SCRIPT:

     

    envSetVal("spectre.envOpts" "controlMode" 'string "batch")

    designFile = "**/netlist"

    resultsDirect = "**/spectre/schematic"

    oceanScrptFile = "**/kumar.ocn"

    dataFile = "**/kumar.dat"

     

     

    code_length = 500

    loop_count = code_length

    step = 0

     

    simulator( 'spectre )

    design( designFile )

    resultsDir( resultsDirect )

    modelFile('("Model File Path Defined Here"))

     

    for(NOS 1 code_length

    RIN = 500 - step

     

    desVar( "R1" 255)

    desVar( "R2" 255)

    desVar( "R3" 63)

    desVar( "R4" 255)

    desVar( "RINS" RIN)

    ** I HAVE FEW MORE VARIABLES THAT ARE SET TO CONSTANT VALUE **

     

    step = step + 1

    loop_count = loop_count - 1

     

    analysis('sp ?ports list("/PORT0" "/PORT1") ?start "10M" ?stop "100M"

    ?dec "40" ?values list("50M") ?donoise "yes" ?oprobe "/PORT1"

    ?iprobe "/PORT0" )

     

    analysis('dc ?saveOppoint t )

     

    option( 'vabstol "1e-8" 'reltol "1e-5")

    temp( 27 )

    run()

    **MY EQUATIONS ** 

    Gain_10M = value(db10(gt(sp(1 1 ?result "sp") sp(1 2 ?result "sp") sp(2 1 ?result "sp") sp(2 2 ?result "sp"))) 10000000)

     

    ** I HAVE FEW MORE EQUATIONS AT DIFFERENT FREQUENCY **

     

    dfKey = outfile(dataFile "a")

    fprintf(dfKey "| %-5.3d | %-5.3d | %-5.3d | %-5.3d | %-5.3d | %-5.3f | %-5.3f | %-5.3f | %-5.3f |\n"

    RINS R1 R2 R3 R4 Gain_10M Gain_15M Gain_20M Gain_30M)

    close(dfKey)

    )

    dfKey = outfile(dataFile "a")

    close(dfKey)

    dfKey=nil

     

    Regards & Thanks

    Kumar 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information