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

Re: 20020909: netCDF on J90



>To: Nick Chepurniy <address@hidden>
>cc: address@hidden,
>cc: address@hidden,
>cc: address@hidden,
>cc: address@hidden
>From: Len Makin <address@hidden>
>Subject: Re: netCDF on J90 
>Organization: UCAR/Unidata
>Keywords: 200209090509.g8959Rj11157

Hi Len,

Thanks for forwarding the information on your Cray netCDF
installation.  I'm filing it in our support archive for later use.  We
still haven't solved the F90 problems for platforms with 8-byte floats
and doubles.

> Don't know if I've got all the answers.;-(
> Most of the problems you show relate to your choice of compiler
> c89 is STRICT ANSI (1989) C. Hence things like complex are not permitted.
> If you change to using cc things will go better.
>  ... From the "INSTALL.html" file:
> ---------------------------
> UNICOS
>  
>         Before executing make, manually copy the file
>         "libsrc/ncx_cray.c" to file "libsrc/ncx.c".  See the
>         commentary at the top of this file for more information.
>  
>     CC=/opt/ctl/bin/cc
>     CPPFLAGS=
>     CFLAGS=-O3                # -g works as well
>     FC=/opt/ctl/bin/f90
>     FFLAGS="-g -F -dp"        # "-F" enables macro substitution in code.
>                               # "-dp" enables DOUBLEPRECISION/double
>                               #     equivalence.
>     CXX=/opt/ctl/bin/CC
>     CXXFLAGS=                 # "-h char" may be necessary with older C++
>     F90=""                    # Fortran-90 interface will be fixed in 3.5.1
> ---------------------------
> There is still a problem with the Fortran-90 interface because of using -dp.
> This option creates a non-standard Fortran compile since the standard dictates
> that DOUBLE PRECISION shall be greater precision than REAL. -dp ensures they
> are the same thing, so that f90 modules which provide generic interfaces
> with type-specific procedures for REAL,DOUBLE PRECISION end up with a 
> conflict.
> I think f90 interface may compile without -dp, but then there is trouble
> with C type compatibility. Since the library is in C, and the F77 interface
> works OK, we have dropped the f90 interface for now. Unidata say they are 
> fixing
> it.
> The SX5(6?) version has similar problems. In particular, C uses 32 bit 
> integer,
> but we use f90 -ew as a default, which was a compatibility decision coming
> from a Cray background, and corresponds to the -dp which we used to use.
> -ew makes REAL and DOUBLE PRECISION into the same type, with consequences as
> mentioned. It also makes INTEGER into 64 bit, so the integer compatibility
> is also stuffed.  If you have not made the same mistake^h^h^h^h^h^h^h  
> decision
> then maybe using the NEC default f90 -dw option will get you further on SX6.
> 
> The C, F77 and C++ interfaces seem to be OK for both J90 and SX5.
> 
> You can always contact the Unidata support people. They are pretty helpful.
>       address@hidden
> 
> Regards,
>       Len Makin
> -- 
> |address@hidden          | CSIRO Mathematics & Information Sciences    |
> |          Manager, User Services, CSIRO/Bureau of Meteorology             |
> |          High Performance Computing and Communications Centre            |
> |24th floor, 150 Lonsdale St | GPO Box 1289K, Melbourne, VIC 3001 Australia|
> | Telephone: +61 3 9669 8109 |      Fax: +61 3 9669 8112                   |
> 
> On Sunday, 1 September 2002, at 20:44,
> Nick Chepurniy <address@hidden> wrote:
> > I am assuming you have installed netCDF on the Cray J90.
> Correct.
> > 
> > I then tried to do the same thing on the J90 at USP, but run into some 
> > problems.
> > 
> > (1) First there was a problem with the complex.h file:
> > 
> > 
> > Making `all' in directory /home1/nick/cray/netcdf-3.5.0/src/libsrc
> > 
> >         c89 -c -O -I.  -DNDEBUG attr.c
> >         c89 -c -O -I.  -DNDEBUG dim.c
> >         c89 -c -O -I.  -DNDEBUG error.c
> >         c89 -c -O -I.  -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c
> >         c89 -c -O -I.  -DNDEBUG nc.c
> >         c89 -c -O -I.  -DNDEBUG ncio.c
> > CC-84 c89: ERROR File = /usr/include/complex.h, Line = 28
> >   The indicated declaration has an invalid combination of type specifiers.
> > 
> >   extern double cabs __((double complex _X));
> >                                            ^
> > ... skipping ~ 20 similar messages ...
> > 
> > (2) I tried to use the complex.h file from the sv1 by placing it into:
> > 
> > ldolphin:/home1/nick/cray/INC_CMPLX 205 %s -lat
> > total 192
> > -rw-r--r--   1 nick     cursos      2277 Sep  1 13:39 complex.h
> > 
> > and in the macros.make used:
> > 
> >         # Compilation:
> > CC              = c89 -I/home1/nick/cray/INC_CMPLX
> > ...
> > 
> > where macros.make is included into the Makefile. But this did not work 
> > either:
> > 
> > 
> > Making `all' in directory /home1/nick/cray/netcdf-3.5.0/src/libsrc
> > 
> >         c89 -I/home1/nick/cray/INC_CMPLX  -c -O -I.  -DNDEBUG ncio.c
> > CC-84 c89: ERROR File = /home1/nick/cray/INC_CMPLX/complex.h, Line = 19
> >   The indicated declaration has an invalid combination of type specifiers.
> > 
> >   extern double cabs __((double complex _X));
> >                                            ^
> > 
> > CC-84 c89: ERROR File = /home1/nick/cray/INC_CMPLX/complex.h, Line = 20
> >   The indicated declaration has an invalid combination of type specifiers.
> > 
> >   extern double complex ccos __((double complex _X));
> >                 ^
> > ...
> > 
> > (3) Then tired to copy the object and libraries fomr sv1 to dolphin, and 
> > again
> > it did not work:
> > 
> >         f90 -V  -c  /home1/nick/cray/netcdf-3.5.0/src/libsrc/libnetcdf.a 
> > LAM_modg.f90
> > Cray CF90 Version 3.3.0.0 09/01/02 13:02:54
> > 
> > module LAM_module
> >        ^
> > cf90-855 f90: ERROR LAM_MODULE, File = LAM_modg.f90, Line = 1, Column = 8
> >   The compiler has detected errors in module "LAM_MODULE".  No module 
> > information file will be created for
> > this module.
> > 
> > use netcdf
> >     ^
> > cf90-1181 f90: ERROR LAM_MODULE, File = LAM_modg.f90, Line = 3, Column = 5
> >   Module file "./netcdf.o" must be recompiled. Its format is unsupported.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu