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

Re: 950531: netCDF install on CRAY C916



>From: Karin Meier <address@hidden>
>Organization: German Climate Compute Center
>Keywords: 199505311643.AA02749 netCDF CRAY

Hi Karin,

> I've tried to install netCDF-2.3.2 at our CRAY C916 (UNICOS 8.0.3), but it
> fails only in the 'fortran' directory.
> The following error message appears, when I 'make all' inside the 'fortran'
> directory
> 
> 
>         ./fortc -L . -O unicos common.inc > netcdf.inc
>         ./fortc -L . -O unicos jackets.src > jackets.c
> 
> m4:-:529 can't open file
> divert(1)
>         cc -c -I../libsrc -DNDEBUG -O jackets.c
> cc-127 cc: WARNING File = jackets.c, Line = 1
>   No declarations appear within the compilation unit.
> 
> TOTAL WARNINGS DETECTED IN jackets.c: 1
>         ar rcuv ../libsrc/libnetcdf.a jackets.o
> r - jackets.o
> 
> 
> 
> 
> What causes this problem? Do I something wrong?  I've tried to step
> through the fortc script to solve the problem, but nothing works fine.

This is a problem Cray "m4" utility.  Some possible solutions are described
on the WWW page for "Known Problems with the netCDF Distribution" at the
URL: 

    http://www.unidata.ucar.edu/packages/netcdf/known_problems.html

I've appended a text version of the relevant information from the above
document, in case you don't have access to a WWW browser.

______________________________________________________________________________

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



Problem Making Fortran Jackets on CRAY Platforms

Some users have reported an error message from the m4 in building the
Fortran netCDF interface on CRAY systems:

    making `all' in directory /home/ymp8/rts/netcdf/netcdf-232pl2/fortran

            ./fortc -L . -O unicos common.inc > netcdf.inc
            ./fortc -L . -O unicos jackets.src > jackets.c

    m4:-:529 can't open file

The problem is that, at least on some CRAY systems, m4 won't accept the "-"
argument to mean read from standard input. Here are two workarounds that
CRAY sites have found successful:

   1. Manually get around the m4 problem by using a temporary file. In
     netcdf/fortran/fortc, replace the lines

             sed -f $LibDir/fortc1.sed $InFiles |
                 m4 $LibDir/common.m4 $LibDir/$OS.m4 - |
                 sed -f $LibDir/fortc2.sed

     with 

             sed -f $LibDir/fortc1.sed $InFiles > /tmp/fortcin.m4
                 m4 $LibDir/common.m4 $LibDir/$OS.m4 /tmp/fortcin.m4 |
                 sed -f $LibDir/fortc2.sed

     delete the old netcdf/fortran/jackets.c file, and rerun the "make
     all". Or

   2. Build the necessary netcdf/fortran/jackets.c file for UNICOS on a
     different platform, using the command 

         ./fortc -L . -O unicos jackets.src > jackets.c

     then copy the resulting jackets.c back to the CRAY and run make
     again. Since the modification time on this jackets.c should be later
     than on jackets.src, the fortc that invokes the Cray m4 won't be used.