too many lines?

From: Joel Norris (jnorris AT XXXXXX)
Date: Fri Nov 01 2002 - 19:53:03 MST

  • Next message: Qiaozhen Mu: "add line polymarkers"

    Sorry if this is a repeat... I don't know if it got through the first
    time...

    I've experienced similar problems with some of my longer scripts (~1000
    lines) -- core dump or disappearing variables.

    It seems to me that there may be some sort of memory limitation in NCL
    that exists below the memory of my workstation (1 Gb). Or perhaps more
    memory is occupied by NCL than the mere size of the arrays.

    Heavy deleting of unneeded variables seems to help.

    Joel

    > We have been investigating some potential memory issues with NCL, that
    > seem to cause the very kind of problem you are having. Sometimes
    > these problems cause NCL to core dump, or to say a variable isn't
    > defined when it very clearly is.
    >
    > One possible culprit we've found is the deletion of NCL variables or
    > attributes that don't exist. If you are getting any warning messages
    > when you run your NCL script about attempting to delete a non-existent
    > variable, then try fixing this problem and see if it improves things.
    >
    > One other thing to try is to improve the efficiency of your
    > code. We've found that big "do" loops (or several nested "do" loops)
    > can be memory killers in NCL.
    >
    > Another memory killer is reordering dimensions that don't need to be
    > reordered. For example, some people will do something like:
    >
    > temp_new = temp(time|:0,lev|:,lat|:,lon|:)
    >
    > even if temp is already ordered time x lev x lat x lon. Folks do this
    > to make it clear in the code what order the dimensions are in. This is
    > a time consuming step, and if dimensions are really not being
    > reordered, then you are better off doing something like this:
    >
    > temp_new = temp(0,:,:,:) ; temp is ordered time x lev x lat x lon
    >
    >
    > Meanwhile, I'm impressed that you have 19,000 lines of code! This is
    > some kind of user record. :-) I could attempt to look at pieces
    > of your code to see if there are ways to improve the efficiency. The
    > first thing I look at is do loops, and how they can be removed.
    > If you want to send me some, I'll be happy to look at them.
    >
    > --Mary
    >
    >
    > _______________________________________________
    > ncl-talk mailing list
    > ncl-talk AT ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    >

    --
    NOTE NEW EMAIL ADDRESS:  jnorris AT ucsd.edu (no "r")
    

    Joel Norris Assistant Professor of Climate and Atmospheric Sciences

    Scripps Institution of Oceanography email: jnorris AT ucsd.edu University of California, San Diego phone: (858) 822-4420 9500 Gilman Drive DEPT 0224 fax: (858) 534-8561 La Jolla, CA 92093-0224 http://meteora.ucsd.edu/~jnorris/

    Delivery Address: Scripps Institution of Oceanography 8810 Shellback Way Room 440, Nierenberg Hall La Jolla, CA 92037

    _______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Mon Nov 04 2002 - 15:26:21 MST