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

Re: NEC SX-4 64 bit IEEE Netcdf



Hi Harvey,

>Date: Wed, 3 Dec 1997 18:26:08 +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:

> I assume you have seen the emails between me & Glenn.  The problem now
> seems to be in your court: configure & fortran.

I've glanced at your emails and have been dreading the possibility that
I'd get involved  :-).

The problem appears to be a mismatch between the Fortran and C types.

> I did 'make distclean' from the top level. Then configure gave following:
> 
> 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: Econfigure:1217: cc -Xa -E -DNDEBUG conftest.c >/dev/null 
> 2>conftest.out

The above line appears to be a merging of the configure script's
standard output with the writing that the configure script does to its
"config.log" file.  This makes it harder to figure out what's going
on.  By any chance, did you redirect the configure script's standard
output to the file "config.log"?  If so, then would you please do the
following:

    1.  Go to the top-level source directory.

    2.  Remove the files "config.log" and "config.cache".

    3.  Set up your environment variables as before.

    4.  Execute the configure script.  Redirect standard output and
        standard error to the file "configure.log".  Send me that file
        and also the file "config.log" that the configure script creates.

> configure:1316: f90 -c -float0 -ew conftest.f
> conftest.f:
> configure:1415: f90 -o conftest -float0 -ew conftest.F  
> /stmp/cshld.28862/ow30705_ppdir/i.conftest.F:
> 
> f90: warn(82): i.conftest.F, lineyes
> 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
> creating libsrc/ncconfig.h
>                           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
> 
> 
> Note that configure failed to find C equivalent to either
> FORTRAN "integer(kind(1))"
> or
> FORTRAN "integer*2"
> I assume the answer in each case should be "long", but it failed to try this.

Correct.  We never thought we would have to handle the case where
Fortran's INTEGER*2 is C's "long".  Frankly, I'm not sure we *should*
handle it.

In any case, the neccessary modifications, while straightforward, are
extensive enough to necessitate verification on many systems.  I've
made the modifications and am testing them now on some of our local
systems.  They appear to be backward-compatible with the netCDF 3.3.1
distribution and will be in the next release.

Unfortunately, the next release is waiting on some fairly extensive
modifications to the I/O layer; consequently, the solution to your
problem requires some thought.

I've generated a subdistribution just for you that contains only the
modified configure script and the fortran/ subdirectory -- omitting the
modifications to the I/O layer.  Besides allowing a test on the problem
system, this might also solve your problem.  The subdistribution is at
the following URL:

    ftp://ftp.unidata.ucar.edu/pub/netcdf/harvey.tar.Z

Let me know when you get it so that I can delete it.

Unpack it in the top-level source directory.  It'll replace the
configure script, aclocal.m4, and the source contents of the fortran/
subdirectory.  Then

    1.  Go to the top-level source directory.

    2.  Execute the command "make distclean".

    3.  Setup your environment variables as before.

    4.  Execute the configure script.  Redirect standard output and
        standard error to the file "configure.log".  If an error occurs,
        then stop and send me the file and also the file "config.log".

    5.  Execute the command "make".  Redirect standard output and
        standard error to a file.  If an error occurs, then stop
        and send me the file.

    6.  Execute the command "make test".  Redirect standard output and
        standard error to a file.  If an error occurs, then stop
        and send me the file.

Let me know how it goes.

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