[ncl-install] Problem with Building NCL-6.2.0 from Source Code

Mary Haley haley at ucar.edu
Mon Apr 21 20:16:04 MDT 2014


The PET* file indicates what the problem is. If you search for the word ERROR in this file, you will see several lines like the following:

20140418 141316.401 ERROR            PET0 ESMF_RegridWeightGen.F90:1383 ESMF_RegridWeightGenFile Library needed by ESMF not present - - ESMF_NETCDF not defined when lib was compiled

It looks like the build environment for ESMF 6.3.0r was not set up correctly to find the NetCDF libraries and include files. You must have this, because to use the regridder with NCL, you need to be able to write NetCDF files.

I believe you need to build the NetCDF-C, NetCDF-Fortran, and NetCDF C++ libraries,which are three separate packages that you can download from:

http://www.unidata.ucar.edu/downloads/netcdf/index.jsp

It makes it easier if you install all these libraries to the same parent location. For this example, let's use "/usr/local/netcdf". You may want to build with the options "--disable-netcdf-4 --disable-dap" to make the ESMF build easier.

Then, your ESMF environment needs to look something like this:

setenv ESMF_DIR /Users/haley/src/esmf-6.3.0r

setenv ESMF_NETCDF "split"
setenv ESMF_LAPACK "netlib"
setenv ESMF_COMM mpiuni
setenv ESMF_ABI 64

setenv ESMF_INSTALL_PREFIX /usr/local
setenv ESMF_NETCDF_INCLUDE /usr/local/netcdf/include
setenv ESMF_NETCDF_LIBPATH /usr/local/netcdf/lib

You can then build with:

make all install

The "ESMF_RegridWeightGen binary gets installed to "/usr/local/bin/binO/xxxxxx/", so you have to move it into /usr/local/bin. I think you already knew this.

Of course, you should set whatever other ESMF_XXXX options you need, but the key ones above are to make sure the build can find the NetCDF files.

--Mary

On Apr 18, 2014, at 10:01 PM, Shi-Pei Hsu <hsushipei1 at gmail.com> wrote:

> Hello Mary,
> 
> $ which ncl
> /data1/hsushipei/software/ncl-6.2.0-testing/bin/ncl
> 
> $ which ESMF_RegridWeightGen
> /data1/hsushipei/software/ncl-6.2.0-testing/bin/ESMF_RegridWeightGen
> # I copy the "ESMF_RegridWeightGen" from the original ESMF build directory to $NCARG_ROOT/bin
> 
> $ ESMF_RegridWeightGen --version
> ESMF_VERSION_STRING:       6.3.0r
>    ESMF_VERSION_MAJOR:                   6
>    ESMF_VERSION_MINOR:                   3
>    ESMF_VERSION_REVISION:                0
>    ESMF_VERSION_PATCHLEVEL:              0
>    ESMF_VERSION_PUBLIC:        T
>    ESMF_VERSION_BETASNAPSHOT:  F
> 
> The PET* file is attached
> 
> Thank you!
> 
> Sincerely Yours,
> Jack Hsu
> 
> 
> 
> 
> 
> On Fri, Apr 18, 2014 at 11:08 PM, Mary Haley <haley at ucar.edu> wrote:
> Hi Jack,
> 
> It looks like it either can't find your ESMF_RegridWeightGen binary, or it is not working.
> 
> What does the following report:
> 
> which ncl
> which ESMF_RegridWeightGen
> ESMF_RegridWeightGen --version
> 
> Also, did a PET* file get created? If so, can you email it to me?
> 
> Thanks,
> 
> --Mary
> 
> On Apr 18, 2014, at 7:45 AM, Shi-Pei Hsu <hsushipei1 at gmail.com> wrote:
> 
> >
> > Excuse me, I forgot to send this email to ncl-install, so i re-send this again
> >
> > Hi Mary,
> >
> > I've built ESMF-6.3.0r myself and copy the installed "ESMF_RegridWeightGen" binary from the original ESMF build directory to $NCARG_ROOT/bin, and then i ran again the "ESMF_regrid_1.ncl" script. The output was:
> >
> >  Copyright (C) 1995-2014 - All Rights Reserved
> >  University Corporation for Atmospheric Research
> >  NCAR Command Language Version 6.2.0
> >  The use of this software is governed by a License Agreement.
> >  See http://www.ncl.ucar.edu/ for more details.
> >
> > Variable: temp
> > Type: float
> > Total Size: 46336 bytes
> >             11584 values
> > Number of Dimensions: 4
> > Dimensions and sizes: [TIME | 1] x [DEPTH | 1] x [LAT | 64] x [LON | 181]
> > Coordinates:
> >             TIME: [30.44000053405762..30.44000053405762]
> >             DEPTH: [ 7.5.. 7.5]
> >             LAT: [-59.9900016784668..58.9700202941895]
> >             LON: [-0.5..359.5]
> > Number Of Attributes: 5
> >   missing_value :     -9.99e+33
> >   _FillValue :        -9.99e+33
> >   long_name : TEMPERATURE
> >   history :   From ncep_sd_corrected_monthly_means
> >   units :     deg. C
> > (0)   ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.
> >
> > Does the " 'ESMF_RegridWeightGen' was not successful" mean the failure of building EFMS?
> >
> > P.S. During the ESMF building process, the software ask me to run"gmake check" to test the build, but it says "no failure"
> >  and there wasnt any "Error"
> >
> > Thank you very much!!
> >
> > Best regards,
> > Jack Hsu
> >
> >
> > On Fri, Apr 18, 2014 at 2:33 PM, Shi-Pei Hsu <hsushipei1 at gmail.com> wrote:
> > Hi Mary,
> >
> > I've built ESMF-6.3.0r myself and copy the installed "ESMF_RegridWeightGen" binary from the original ESMF build directory to $NCARG_ROOT/bin, and then i ran again the "ESMF_regrid_1.ncl" script. The output was:
> >
> >  Copyright (C) 1995-2014 - All Rights Reserved
> >  University Corporation for Atmospheric Research
> >  NCAR Command Language Version 6.2.0
> >  The use of this software is governed by a License Agreement.
> >  See http://www.ncl.ucar.edu/ for more details.
> >
> > Variable: temp
> > Type: float
> > Total Size: 46336 bytes
> >             11584 values
> > Number of Dimensions: 4
> > Dimensions and sizes: [TIME | 1] x [DEPTH | 1] x [LAT | 64] x [LON | 181]
> > Coordinates:
> >             TIME: [30.44000053405762..30.44000053405762]
> >             DEPTH: [ 7.5.. 7.5]
> >             LAT: [-59.9900016784668..58.9700202941895]
> >             LON: [-0.5..359.5]
> > Number Of Attributes: 5
> >   missing_value :     -9.99e+33
> >   _FillValue :        -9.99e+33
> >   long_name : TEMPERATURE
> >   history :   From ncep_sd_corrected_monthly_means
> >   units :     deg. C
> > (0)   ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.
> >
> > Does the " 'ESMF_RegridWeightGen' was not successful" mean the failure of building EFMS?
> >
> > P.S. During the ESMF building process, the software ask me to run"gmake check" to test the build, but it says "no failure"
> >  and there wasnt any "Error"
> >
> > Thank you very much!!
> >
> > Best regards,
> > Jack Hsu
> >
> >
> > On Thu, Apr 17, 2014 at 10:01 PM, Shi-Pei Hsu <hsushipei1 at gmail.com> wrote:
> > Hi Mary,
> >
> > Thanks very much for your help!
> >
> > The "ncl" binary can be found under $NCARG_ROOT/bin which means the main NCL build is done.
> >
> > However, it seems the ESMF build was not successful.
> >
> > I failed to run script "ESMF_regrid_1.ncl" provided by NCL official website
> >
> > ,and the error message was:
> >
> > sh: ESMF_RegridWeightGen: command not found
> > fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function
> > fatal:["Execute.c":8567]:Execute: Error occurred at or near line 2434 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
> >
> > fatal:["Execute.c":8567]:Execute: Error occurred at or near line 3471 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
> >
> > fatal:["Execute.c":8567]:Execute: Error occurred at or near line 66 in file ESMF_regrid_1.ncl
> >
> > I couldn't find "ESMF_RegridWeightGen" binary in $NCARG_ROOT/bin
> >
> > i checked the make-output(attached in this email) file for any "Error", but there wasn't
> >
> > So don't know what's wrong with ESMF
> >
> > Thank you!
> >
> > Sincerely Yours,
> > Jack Hsu
> >
> >
> >
> >
> > On Mon, Apr 14, 2014 at 10:53 PM, Mary Haley <haley at ucar.edu> wrote:
> > Dear Jack-Hsu,
> >
> > The "-ll" is for linking in the lex library, which should be called "libl.a" on your system.
> >
> > On some systems, this library might be a link to libfl.a, which is the flex library. For example:
> >
> > lrwxrwxrwx. 1 root root 7 Jun 19  2013 /usr/lib64/libl.a -> libfl.a
> >
> >
> > My guess is that you need to install lex/flex and/or create a link between libfl.a and libl.a
> >
> > --Mary
> >
> > On Apr 7, 2014, at 7:36 PM, Shi-Pei Hsu <hsushipei1 at gmail.com> wrote:
> >
> > > Dear all,
> > >
> > > I'd like to build NCL-6.2.0 with ESMF support.
> > >
> > > However, the native gcc(4.1.2) in my system(SUSE Linux 10 SP2) is too old for ESMF.
> > >
> > > So I built a newer gcc(4.4.7) and built NCL-6.2.0 with it.
> > >
> > > Unfortunately, it failed, and I checked the "make-output file". I got the following "Error" message
> > >
> > > gcc -ansi -fPIC -fopenmp  -O    -o wrapit77 y.tab.o lex.yy.o Symbol.o wrapit_main.o  -L/data1/hsushipei/software/ncl-6.2.0-testing/lib -L/data1/hsushipei/software/ncl-6.2.0-testing/lib -L/usr/X11R6/lib64  -ll
> > > /usr/bin/ld: cannot find -ll
> > > collect2: ld return 1
> > > make[4]: *** [wrapit77] Error 1
> > > make[4]: Leaving directory `/data1/hsushipei/software/ncl-6.2.0-testing/src/ncl_ncarg-6.2.0/ni/src/mkwrap'
> > >
> > > Thanks for your help!
> > >
> > > Sincerely Yours,
> > > Jack-Hsu
> > >
> > > National Taiwan University
> > >
> > > <make-output.tar.bz2>_______________________________________________
> > > ncl-install mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-install
> >
> >
> >
> >
> 
> 
> <PET0.RegridWeightGen.Log>



More information about the ncl-install mailing list