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?
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).
In reply to Andrew Beckett:
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: 22.214.171.1240.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* Exception: St9bad_alloc - nil
*Error* load: error while loading file - "kumar.ocn"
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 )
**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)
Regards & Thanks