[ncl-install] Issues with building NCL 5.0.0 with Intel Compilers

Mary Haley haley at ucar.edu
Fri Apr 11 09:57:18 MDT 2008


On Thu, 10 Apr 2008, Craig Tierney wrote:

> I am trying to get NCL 5.0.0 built on my cluster.  Here are the
> specifics of my environment:
>
> OS: Redhat RHEL 4.4
> Kernel: 2.6.20.20
> Arch: x86_64
> Compiler: Intel 9.1 (eventually PGI 7.1-3)
>
> I have worked through most of the issues, but I am still getting
> stuck on some.

Hi Craig,

I will try to address your points below, one section at a time.

> When first configuring the build, I copied config/LINUX.64.INTEL
> to config/LINUX.  It appears that some of the options in this
> file don't match the compiler I have.
>
> Here are the changes I made to the LINUX.64.INTEL file.
>
> [root at wfe0 ncl]# diff ncl_ncarg-5.0.0-intel91/config/LINUX 
> ncl_ncarg-5.0.0/config/LINUX.64.INTEL
> 32,34c32,34
> < #define CtoFLibraries   -lm
> < #define CcOptions    -ansi
> < #define FcOptions
> ---
>> #define CtoFLibraries   -lm -lifcore
>> #define CcOptions    -ansi -size_lp64
>> #define FcOptions     -size_lp64
> 41c41
> < #define ArchRecLibSearch    -L/usr/X11R6/lib64
> ---
>> #define ArchRecLibSearch    -L/usr/X11R6/lib
>
> Questions:
>
> 1) What is ifcore?

It's an Intel system library that is needed when building Fortran
and C code together.  Below, when you tried to compile ictrans,
it gave you an undefined reference of "for_cpystr". This symbol
is defined in the ifcore library, so you need to make sure
this is included on the compile line, by making sure
it is in your $NCARG/config/LINUX file as you saw above.

> 2) Why is -size_lp64 included?  Isn't this an Itanium option?
> 3) One option not shown here is the HdfDefines.  Why does
> the x86_64 file have -DIA64?  Does that just mean 64-bit,
> or should there be a different setting for x86_64?

I think maybe this file was named incorrectly, as you're right, it
does look like it contains some Itanium options.

My suggestion is to remove the -size_lp64 options, but keep
the -lifcore library option.

As for the HdfDefines, try using -DLINUX64 instead.

> After making those changes, I ran ./Configure.  I specified the
> installation path and the packages I wanted to use.  The following
> config/Site.local file was created.
> .
> .
> .
> #define LibSearch -L/usr/X11R6/lib64 -L/opt/netcdf/3.6.1_intel_9.1/lib 
> -L/opt/udunits/1.12.4/lib -L/opt/hdf4/2r1_intel_9.1/lib 
> -L/opt/netcdf/3.6.1_intel_9.1/lib
> #define IncSearch -I/usr/X11R6/include -I/opt/netcdf/3.6.1_intel_9.1/include 
> -I/opt/udunits/1.12.4/include -I/opt/hdf4/2r1_intel_9.1/include 
> -I/opt/netcdf/3.6.1_intel_9.1/include
>
> #define BuildTRIANGLE FALSE
> #define BuildHDFEOS FALSE
> #define HDFEOSlib
> #define BuildV5D FALSE
> #define V5Dlib
> #define BuildGRIB2 FALSE
> -------------------------------------------------------
>
>
> Including the paths to my packages solved many of my problems,
> but a few exist.  The problems are listed below.  Any tips on fixing
> them would be appreciated.
>
> ------------------------------------
>
> Problem 1: Where is the function giargs?
>
> icc -ansi  -O2    -o ictrans main.o 
> ../../../.././ncarview/src/lib/libictrans/libictrans.o 
> ../../../.././ncarview/src/lib/libctrans/libctrans.o 
> -L../../../.././ncarview/src/lib/libcgm -lcgm 
> -L../../../.././ncarview/src/lib/libncarg_ras -lncarg_ras 
> -L../../../.././common/src/libncarg_c -lncarg_c 
> -L/opt/ncl/5.0.0_intel_9.1/lib -L/usr/X11R6/lib64 
> -L/opt/netcdf/3.6.1_intel_9.1/lib -L/opt/udunits/1.12.4/lib 
> -L/opt/hdf4/2r1_intel_9.1/lib -L/opt/netcdf/3.6.1_intel_9.1/lib -lXpm -lX11 
> -lXext   -lmfhdf -ldf -ljpeg -lz -lm
> ../../../.././ncarview/src/lib/libictrans/libictrans.o(.text+0x6bd7): In 
> function `giargs_':
> : undefined reference to `for_cpystr'
> make[5]: *** [ictrans] Error 1
>

It is not "giargs" that's the problem, but the missing symbolx
"for_cpystr". If you include "-lifcore" in the $NCARG/config/LINUX
file as described above, I believe this should fix this and other
similar problems.

> -------------------------------------
>
> Problem 2: I configured the build not to use the triangle software.  Why is 
> it still referenced?
>
> icc -ansi  -O2  -I../../../.././include -I/usr/X11R6/include 
> -I/opt/netcdf/3.6.1_intel_9.1/include -I/opt/udunits/1.12.4/include 
> -I/opt/hdf4/2r1_intel_9.1/include -I/opt/netcdf/3.6.1_intel_9.1/include 
> -DLinux    -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped 
> -DNeedFuncProto    -c -o CnTriMeshRenderer.o CnTriMeshRenderer.c
> CnTriMeshRenderer.c(34): catastrophic error: could not open source file 
> "ncarg/hlu/triangle.h"
>  #include <ncarg/hlu/triangle.h>

This is a bug that is noted in our trouble shooting section at:

   http://www.ncl.ucar.edu/Download/build_from_src.shtml#Troubleshooting

   There's a bug in which the file
   "$NCARG/ni/src/lib/hlu/CnTriMeshRenderer.c" will not compile
   properly if you don't build with Triangle support. The fix is
   simple. Replace the lines:

#define REAL double
#include <ncarg/hlu/triangle.h>

   with the lines:

#ifdef BuildTRIANGLE
#define REAL double
#include <ncarg/hlu/triangle.h>
#endif

> -------------------------------------
>
> Problem 3:  wrapit77 doesn't build correctly.
>
> icc -ansi  -O2    -o wrapit77 y.tab.o lex.yy.o Symbol.o wrapit.o 
> -L/opt/ncl/5.0.0_intel_9.1/lib -L/usr/X11R6/lib64 
> -L/opt/netcdf/3.6.1_intel_9.1/lib -L/opt/udunits/1.12.4/lib 
> -L/opt/hdf4/2r1_intel_9.1/lib -L/opt/netcdf/3.6.1_intel_9.1/lib  -lfl
> wrapit.o(.text+0x0): In function `yyparse':
> : multiple definition of `yyparse'
> y.tab.o(.text+0x0): first defined here
> .
> .
> .

This is also in our trouble shooting guide:

     If you are having problems with a file called "wrapit.c" and are
     seeing errors like this:

     wrapit.o(.text+0x4f70): In function `yyparse':
     : undefined reference to `DoTotal'
     wrapit.o(.text+0x4f70): In function `yyparse':
     : undefined reference to `DoDimsizes'

     then this is probably because your "wrapit.c" file got clobbered
     and generated from an incorrect source. Download a new wrapit.c
     file from:

     http://www.ncl.ucar.edu/Download/wrapit.c

     put it in $NCARG/ni/src/mkwrap, and "touch" the file (just to be
     certain it doesn't get clobbered again).

After making all these changes, I recommend re-running "make
Everything" again. I think you are almost there.

Some of the problems you ran into have already been fixed for
the next release. I will try to fix the LINUX* files to be 
more consistent.

Thanks for bringing this to our attention.

--Mary

> Thanks,
> Craig
>
> -- 
> Craig Tierney (craig.tierney at noaa.gov)
> _______________________________________________
> ncl-install mailing list
> ncl-install at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>


More information about the ncl-install mailing list