[ncl-install] Fwd: Problems with building NCL using the Intel compiler suite

David Mechem dmechem at ku.edu
Tue Jul 12 08:55:28 MDT 2011


Hi Mary,

This fix worked! Woo hoo!

After I implemented your suggested changes, the build was still choking 
on unresolved references to "flush" and "abort," so I added a couple 
libraries to CtoFLibraries:
#define CtoFLibraries   -lm -lifcore -lsvml -limf -lirc -lifport

I _think_ that the ifport library did the trick , but I'm not exactly sure.

Thanks a bunch!
Dave


On 6/30/11 1:49 PM, Mary Haley wrote:
> Hi David,
>
> Wei Huang, one of our developers, said that there are only a few 
> places where "compound" appears as a variable name, so if you could 
> try changing these by hand to "nclcompound" and recompiling, it might 
> work.
>
> Here's Wei's email that includes the location of the changes and which 
> files to change. Please let us know if you have any success with this.
>
> --Mary
>
>>
>> holywell:/Users/huangwei/ncl/src/trunk/ni/src/ncl 720 > svn diff 
>> NclDataDefs.h
>> Index: NclDataDefs.h
>> ===================================================================
>> --- NclDataDefs.h       (revision 12429)
>> +++ NclDataDefs.h       (working copy)
>> @@ -119,7 +119,7 @@
>>  typedef int obj;
>>  typedef int list;
>>  typedef int group;
>> -typedef int compound;
>> +typedef int nclcompound;
>>  typedef union _NclScalar {
>>         double             doubleval;
>> @@ -140,7 +140,7 @@
>>         logical            logicalval;
>>         obj                objval;
>>         group              groupval;
>> -       compound           compoundval;
>> +       nclcompound        compoundval;
>>  }NclScalar;
>>  typedef struct _NclRefList{
>> holywell:/Users/huangwei/ncl/src/trunk/ni/src/ncl 721 > svn diff 
>> DataSupport.c
>> Index: DataSupport.c
>> ===================================================================
>> --- DataSupport.c       (revision 12429)
>> +++ DataSupport.c       (working copy)
>> @@ -820,7 +820,7 @@
>>                 case NCL_group:
>>                         return(sizeof(group));
>>                 case NCL_compound:
>> -                       return(sizeof(compound));
>> +                       return(sizeof(nclcompound));
>>                 case NCL_logical:
>>                         return(sizeof(int));
>>                 case NCL_list:
>>
>>
>>>>
>>>>
>>>> Begin forwarded message:
>>>>
>>>>> *From: *David Mechem <dmechem at ku.edu <mailto:dmechem at ku.edu>>
>>>>> *Date: *June 27, 2011 9:50:32 AM MDT
>>>>> *To: *<ncl-install at ucar.edu <mailto:ncl-install at ucar.edu>>
>>>>> *Subject: **[ncl-install] Problems with building NCL using the 
>>>>> Intel compiler suite*
>>>>>
>>>>> Greetings,
>>>>>
>>>>> I'm having issues building NCL from source using the Intel compiler
>>>>> suite. I'm building a vanilla version without OPeNDAP and netCDF-4
>>>>> support. The NCARGraphics libraries and many of the utilities seem 
>>>>> to be
>>>>> building OK, but NCL does not. I'm using version 11.0 of ifort and 
>>>>> icc,
>>>>> 64-bit CENTos kernel 2.6.18-194.17.1.el5.
>>>>>
>>>>> I'm getting compilation errors on three files. The errors are all 
>>>>> of a
>>>>> similar type and appear to be related to the variable "compound" 
>>>>> being
>>>>> multiply defined.
>>>>>
>>>>> 1.
>>>>> -----------------
>>>>> make[5]: Entering directory 
>>>>> `/usr/local/ncl_ncarg-6.0.0/ni/src/lib/nfp'
>>>>> icc -ansi  -O2 -I../../ncl -I../../../.././include
>>>>> -I/usr/include/X11      -DSYS
>>>>> V -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped -DNeedFuncProto
>>>>> -DNDEBUG  -c -o
>>>>>  areavolW.o areavolW.c
>>>>> ../../ncl/NclDataDefs.h(122): error: "compound" has already been
>>>>> declared in the
>>>>>  current scope
>>>>>   typedef int compound;
>>>>>               ^
>>>>>
>>>>> areavolW.c(258): warning #188: enumerated type mixed with another type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(447): warning #188: enumerated type mixed with another type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(636): warning #188: enumerated type mixed with another type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(903): warning #188: enumerated type mixed with another type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(1141): warning #188: enumerated type mixed with another 
>>>>> type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(1379): warning #188: enumerated type mixed with another 
>>>>> type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(1643): warning #188: enumerated type mixed with another 
>>>>> type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(1927): warning #188: enumerated type mixed with another 
>>>>> type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> areavolW.c(2262): warning #188: enumerated type mixed with another 
>>>>> type
>>>>>     return(ret);
>>>>>           ^
>>>>>
>>>>> compilation aborted for areavolW.c (code 2)
>>>>> make[5]: *** [areavolW.o] Error 2
>>>>> -------------------------------
>>>>>
>>>>> 2.
>>>>> ------------------------------
>>>>> make[5]: Entering directory 
>>>>> `/usr/local/ncl_ncarg-6.0.0/ni/src/lib/nio'
>>>>> icc -ansi -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2
>>>>> -I../../../.././include -I/usr/include/X11  -DLinux -DMAJOR=2
>>>>> -DNIO_LIB_ONLY   -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
>>>>> -DNeedFuncProto  -DNDEBUG  -c -o NclTypedouble.o NclTypedouble.c
>>>>> /usr/local/intel/11.0/084/include/math.h(796): error: "compound" has
>>>>> already been declared in the current scope
>>>>>   _LIBIMF_EXT _LIBIMF_DOUBLE   _LIBIMF_PUBAPI compound( 
>>>>> _LIBIMF_DOUBLE
>>>>> __x, _LIBIMF_DOUBLE __y );
>>>>>                                               ^
>>>>>
>>>>> compilation aborted for NclTypedouble.c (code 2)
>>>>> make[5]: *** [NclTypedouble.o] Error 2
>>>>> ---------------------------------
>>>>>
>>>>> 3.
>>>>> -----------------------------
>>>>> icc -ansi -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>>>>> -I/usr/local/include -O2  -I../../.././include -I/usr/include/X11
>>>>> -DLinux -DMAJOR=2           -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE
>>>>> -DByteSwapped -DNeedFuncProto  -DNDEBUG  -c -o MathFuncs.o MathFuncs.c
>>>>> NclDataDefs.h(122): error: "compound" has already been declared in 
>>>>> the
>>>>> current scope
>>>>>   typedef int compound;
>>>>>               ^
>>>>>
>>>>> compilation aborted for MathFuncs.c (code 2)
>>>>> make[4]: *** [MathFuncs.o] Error 2
>>>>> -----------------------------
>>>>>
>>>>>
>>>>> Any advice will be appreciated!
>>>>>
>>>>> Dave
>>>>>
>>>>> -- 
>>>>> --------------------------------------
>>>>> David B. Mechem dmechem at ku.edu <mailto:dmechem at ku.edu>
>>>>> Assistant Professor
>>>>> Atmospheric Science Program
>>>>> Department of Geography
>>>>> University of Kansas
>>>>> ph: (785) 864-5707 fax: (785) 864-5378
>>>>> --------------------------------------
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-install mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>>>
>>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20110712/003f2d7b/attachment.html 


More information about the ncl-install mailing list