[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NEC SX-4 64 bit IEEE Netcdf



Harvey,

>Date: Thu, 4 Dec 1997 12:04:51 +1100 (EST) 
>From: Harvey DAVIES <address@hidden>
>Organization: CSIRO Mathematical and Information Sciences
>To: Steve Emmerson <address@hidden>
>Subject: Re: NEC SX-4 64 bit IEEE Netcdf 
>Keywords: 199711262243.PAA12321

In the above message, you wrote:

> Hi Steve,
> 
> Thanks for your prompt reply,
> 
...
> Here is configure.log:
> 
> creating cache ./config.cache
> checking for m4... m4
> checking user-defined C compiler "cc -Xa"
> checking C compiler... works
> checking how to make dependencies... false
> configure: warning: Empty CXX variable
> configure: warning: The C++ interface will not be built
> checking how to run the C preprocessor... cc -Xa -E
> checking user-defined FORTRAN compiler "f90"... works
> checking for FORTRAN .F compiler... 
> checking if FORTRAN compiler handles *.F files... yes
> checking for C-equivalent to FORTRAN routine "SUB"... sub_
> checking for FORTRAN "byte"... no
> checking for FORTRAN "integer*1"... no
> checking for FORTRAN "integer(kind(1))"... yes
> checking for FORTRAN "integer*2"... yes
> checking if FORTRAN "integer(kind(1))" is C "signed char"... no
> checking if FORTRAN "integer(kind(1))" is C "short"... no
> checking if FORTRAN "integer(kind(1))" is C "int"... no
> checking if FORTRAN "integer*2" is C "short"... no
> checking if FORTRAN "integer*2" is C "int"... no
> checking if FORTRAN "integer" is C "int"... no
> checking if FORTRAN "integer" is C "long"... yes
> checking if FORTRAN "real" is C "float"... no
> checking if FORTRAN "real" is C "double"... yes
> checking if FORTRAN "doubleprecision" is C "double"... yes
> checking for FORTRAN-equivalent to netCDF "byte"... integer
> checking for FORTRAN-equivalent to netCDF "short"... integer*2
> checking for math library
> checking for -lc... no
> checking for -lm... yes
> checking for ar... ar
> checking for ranlib... :
> checking for stdlib.h... yes
> checking for sys/types.h... yes
> checking for strerror... yes
> checking for ftruncate... yes
> checking for st_blksize in struct stat... yes
> checking whether cross-compiling... no
> checking for IEEE floating point format... yes
> checking for ANSI C header files... yes
> checking for size_t... yes
> checking for off_t... yes
> checking for ssize_t... yes
> checking for ptrdiff_t... yes
> checking for uchar... no
> checking whether char is unsigned... yes
> checking whether byte ordering is bigendian... yes
> checking size of short... 2
> checking size of int... 4
> checking size of long... 8
> checking size of float... 4
> checking size of double... 8
> checking size of off_t... 8
> checking size of size_t... 4
> checking for catman... catman
> checking for manual-page index command... catman -w -M $(MANDIR)
> checking binary distribution directory... /home/ftp/pub/binary/dummy_system
> cmp: EOF on ./config.cache
> updating cache ./config.cache
> creating ./config.status
> creating macros.make
> udcreating fortran/nfconfig.inc
> fortran/nfconfig.inc is unchanged
> creating libsrc/ncconfig.h

Thanks, but I really should have asked for the new one since this one is
now out-of-date with-respect-to your sources.

> Here is config.log:
> 
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> configure:1017: cc -Xa -c -hfloat0 -DNDEBUG conftest.c 1>&5
> configure:1217: cc -Xa -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:1316: f90 -c -float0 -ew conftest.f
> conftest.f:
> configure:1415: f90 -o conftest -float0 -ew conftest.F  
> /stmp/cshld.22412/ow26721_ppdir/i.conftest.F:
> 
> f90: warn(82): i.conftest.F, line 4: Name "r" is not used.
> f90: i.conftest.F, _MAIN: There is 1 warning.
> configure:1456: f90 -c -float0 -ew conftest.f
> conftest.f:
> configure:1491: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: error(109): conftest.f, line 2: Unrecognizable statement.
> f90: warn(83): conftest.f, line 3: Dummy argument "value" is not used.
> f90: conftest.f, sub: There are 1 error and 1 warning.
> f90 fatal : /usr/lib/f90com command error : 1
> configure:1491: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: error(430): conftest.f, line 2: Byte length specifier "1" is illegal.
> f90: warn(83): conftest.f, line 3: Dummy argument "value" is not used.
> f90: conftest.f, sub: There are 1 error and 1 warning.
> f90 fatal : /usr/lib/f90com command error : 1
> configure:1491: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: warn(83): conftest.f, line 3: Dummy argument "value" is not used.
> f90: conftest.f, sub: There is 1 warning.
> configure:1514: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: warn(84): conftest.f, line 2: Length specification for INTEGER*2 or 
>                                    LOGICAL*1 is ignored.
> f90: warn(83): conftest.f, line 3: Dummy argument "value" is not used.
> f90: conftest.f, sub: There are 2 warnings.
> configure:1548: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1550: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1552: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1554: ./conftest
> configure:1595: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1597: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1599: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1601: ./conftest
> configure:1642: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1644: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1646: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1648: ./conftest
> configure:1693: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1695: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> 
> f90: warn(84): conftestf.f, line 1: Length specification for INTEGER*2 or 
>                                     LOGICAL*1 is ignored.
> f90: conftestf.f, _MAIN: There is 1 warning.
> configure:1697: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1699: ./conftest
> configure:1740: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1742: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> 
> f90: warn(84): conftestf.f, line 1: Length specification for INTEGER*2 or 
>                                     LOGICAL*1 is ignored.
> f90: conftestf.f, _MAIN: There is 1 warning.
> configure:1744: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1746: ./conftest
> configure:1789: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1791: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1793: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1795: ./conftest
> configure:1789: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1791: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1793: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1795: ./conftest
> configure:1836: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1838: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1840: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1842: ./conftest
> configure:1836: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1838: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1840: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1842: ./conftest
> configure:1883: cc -Xa -c -DNDEBUG -hfloat0 conftest.c
> configure:1885: f90 -float0 -ew -c conftestf.f
> conftestf.f:
> configure:1887: f90 -o conftest -float0 -ew  conftestf.o conftest.o 
> configure:1889: ./conftest
> configure:1922: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: error(109): conftest.f, line 1: Unrecognizable statement.
> f90: conftest.f, _MAIN: There is 1 error.
> f90 fatal : /usr/lib/f90com command error : 1
> configure:1922: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: error(430): conftest.f, line 1: Byte length specifier "1" is illegal.
> f90: warn(82): conftest.f, line 2: Name "foo" is not used.
> f90: conftest.f, _MAIN: There are 1 error and 1 warning.
> f90 fatal : /usr/lib/f90com command error : 1
> configure:1922: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: warn(82): conftest.f, line 2: Name "foo" is not used.
> f90: conftest.f, _MAIN: There is 1 warning.
> configure:1943: f90 -c -float0 -ew conftest.f
> conftest.f:
> 
> f90: warn(84): conftest.f, line 1: Length specification for INTEGER*2 or 
>                                    LOGICAL*1 is ignored.
> f90: warn(82): conftest.f, line 2: Name "foo" is not used.
> f90: conftest.f, _MAIN: There are 2 warnings.
> configure:1983: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c -lc   1>&5
> undefined                       first referenced
>  symbol                             in file
> tanh                                conftest.o
> ld fatal: symbol referencing errors. no output written to file conftest.
> configure:2017: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c -lm   1>&5
> configure:2112: cc -Xa -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2146: cc -Xa -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2196: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2244: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2278: cc -Xa -c -hfloat0 -DNDEBUG conftest.c 1>&5
> configure:2310: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2362: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2391: cc -Xa -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2456: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> "conftest.c", line 2450: vec inf: Unvectorized loop
> configure:2674: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2712: cc -Xa -c -hfloat0 -DNDEBUG conftest.c 1>&5
> "configure", line 2707: undefined variable: bogus
> "configure", line 2707: Syntax error before or at: endian
> configure:2758: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2796: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2830: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2864: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2898: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2932: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:2970: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5
> configure:3008: cc -Xa -o conftest -hfloat0 -DNDEBUG  conftest.c  1>&5

The aboe doesn't appear to contain any showstoppers.

> It still fails test in src/fortran.  However we have made some progress -
> nf_test now links OK, although it also gives lots of errors when running.
> The output is rather large, so I will email it separately to Steve.
> 
> Thanks again,
> Harvey
> 
> Harvey Davies, CSIRO Mathematical and Information Sciences,
> Email: address@hidden
> Phone: +61 3 9669 8110 or +61 3 9239 4556
>   Fax: +61 3 9669 8112

I believe that the problems you're now having stem from the fact that a
Fortran INTEGER (which is 8 bytes) is incompatible with a C "int" (which
is 4 bytes) and the interface code assumes that they are compatible.
This means that such things as ID's, co-ordinate index vectors, counts,
(and anything else in the netCDF Fortran API that is an INTEGER) will be
misinterpreted by the C code.  Fixing this might be difficult because
I will have to modify many subtle macros that depend intimately on the
increadibly complex "cfortran.h" header-file.

An alternative would be to see if the C compiler can somehow be
configured to generate 8-byte "int"s.  This would, however, render the
netCDF C library useless to C programs that weren't compiled in the same
way.  If you're will to try this, then do the following:

    1.  Go to the top-level source directory.

    2.  Execute the command "make distclean".

    3.  Ensure that the file "config.cache" doesn't exist.

    4.  Set your environment variables as before.  You might see about
        using some options that turn-off the numerous warning messages.

    5.  Ensure that the environment variable CFLAGS contains
        whatever is necessary to generate 8-byte "int"s.

    6.  Execute the configure script.  Redirect its standard output and
        standard error to "configure.log".  Send me that file.

    7.  Execute the command "make".  Redirect its standard output and
        standard error to "default.log".  Send me that file.

    8.  Execute the command "make test".  Redirect its standard output
        and standard error to "test.log".  Send me that file.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>