Re: Problem running defined fortran libs

From: Mary Haley (haley AT XXXXXX)
Date: Wed Jun 25 2003 - 16:22:43 MDT

  • Next message: Jeff Whitaker: "no downloads"

    >
    > Hi:
    >
    > I am trying to get some fortran libraries (to read GRIB files which are
    > not correctly being read by the NCL GRIB reader) to link into NCL.
    >
    > There is only one subroutine being called, readgrb_ncl. After compiling
    > all the fortran and c code from the GRIB reader into shared libraries on
    > a RH7 machine, I get the following message:
    >
    > =================================================================================================
    > See http://ngwww.ucar.edu/ncl/ for more details.
    > warning:Unable to load System Resource File
    > /usr/local/ncarg/lib/ncarg/sysresfile
    > warning:WorkstationClassInitialize:Unable to access rgb color database -
    > named colors unsupported:[errno=2]:No such file or directory
    > warning:["Palette.c":1533]:NhlLoadColormapFiles: Invalid colormap
    > directory: /usr/local/ncarg/lib/ncarg/colormaps

    Hi Lou,

    First of all, it looks like your NCARG_ROOT environment variable isn't
    set, or else it isn't set correctly. The above error message
    indicates that it is either being set to /usr/local/ncarg (which is
    not where NCL seems to reside on your system), or it is trying to
    default to this path. Please double-check this and set NCARG_ROOT
    correctly.

    Secondly, I noticed your Fortran routine name has an underscore in it.
    There's an oddity on the Linux system GNU compiler (and possibly the
    Portland compiler) that may be causing the name of your Fortran
    routine name to be mangled. Try removing the underscore from the
    routine name (and make sure you do this from the NCL script as well).

    Lastly, what version of NCL are you running? It's possible that if you
    have an old version, it doesn't have shared object capability built
    in.

    > warning:Could not find Init() in external file ./readgrb_ncl.so, file
    > not loaded
    > .
    > .
    > .

    > Now, I checked the definition of the interface block and its okay (its
    > pretty simple) based on some discussion I read on NCL-TALK. Any other
    > ideas? This is being compiled with portland group compiler, using some
    > scripts from the WRF model, nhlcc, and following the NCL instructions
    > for building in fortran.
    >
    > thanks!
    >
    > Lou

    If none of the above help, then I will need to see your compile lines
    in order to know what the problem might be. Did you by any chance try
    WRAPIT? This is a shell script written by Mark Stevens that detects
    what kind of system you are on, and then it builds the shared object
    for you. All you need to do is give it the Fortran file with the "C
    NCLFORTSTART" "C NCLEND" statements in it.

    For documentation on WRAPIT, you can look at the comments in the
    file. It should reside in $NCARG_ROOT/bin if you have a reasonably
    recent version of NCL.

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



    This archive was generated by hypermail 2b29 : Wed Jun 25 2003 - 16:24:45 MDT