Running ocean in another process from CIW

Discussion in 'Cadence' started by Svenn Are Bjerkem, Aug 7, 2007.

  1. Hi,

    I find it very convenient to run ocean scripts from the CIW window
    through the ocean menu provided in this group. As those ocean scripts
    get longer, the time to finish get longer. In the mean time, my entire
    icfb is locked up. I am looking for a way to spawn off an ocean
    process that still has some connection to my CIW, but does not freeze
    the user interface.

    Will an ocean process fired off by ipc* calls work?

    Any ideas?
     
    Svenn Are Bjerkem, Aug 7, 2007
    #1
  2. Hi Svenn,

    I had the same problem when trying to run a complete simulation setup.
    My solution follows:
    1. Put all ocean code into a file, e.g. "run.ocn"
    2. Create an .oceanrc in the working directory that contains the
    lines
    load("run.ocn")
    exit(1)
    3. Start your routine from the CIW with
    pid=ipcBeginProcess("ocean" "" nil nil "finished" "oceanrun.log")
    Ocean is called in your current working dir. Since it first reads
    the .oceanrc file your routines in "run.ocn" will be executed.
    4. Once the ocean script has finished (or terminated) the callback
    "finished" will be called.
    procedure(finished(childID exitState)
    if(exitState==1
    then ... successfully finished
    else... quit for any other reason
    )

    I hope this helps.

    Cheers
    Gunnar
     
    gunnar.munder, Aug 9, 2007
    #2
  3. This looks promising. I guess the ocean process is running in its own
    world and cannot give signs of life back to the mother process. I was
    thinking of being able to send back little messages like "worst 125C
    0.9 ss finished" so that I can use the results->select menu item to
    see what happened before the simulation has come to an end. Ocean has
    stdin and stdout, but are these bound or how can they be bound to the
    io-handles that the ipc set up for communication from process back to
    mother. This is probably a bit complicated and has to be tested.
    Thanks for the starting point.
     
    Svenn Are Bjerkem, Aug 9, 2007
    #3
  4. Hi Svenn,

    there is a number of Parameters that you give to ipcBeginProcess. One
    is the function for the dataHandler, another is the errorHandler.
    These work on the stdout and stderr of the child process and are
    called whenever the child writes into these pipes.

    Otherwise you can info("logfile") in your ocean script. This opens you
    an info windows that displays messages like "worst 125C 0.9 ss
    finished".

    Cheers
    Gunnar
     
    gunnar.munder, Aug 13, 2007
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.