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

Re: 950406: Problems installing netCDF on Cray YMP



>Organization: Atmospheric, Oceanic and Planetary Physics, Clarendon Laboratory

Rowan,

> Thanks for your help.  On closer inspection, it turns out there is a 
> problem with compiling jackets.c.  The relevant section of the log file
> produced by "make all" is as follows:
> 
> ----------------------
> 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
 ...
> You mentioned that a previous user had come across a similar problem
> which had been solved by modifying the m4 file.  Perhaps you could put me
> in touch with him/her so that I can find out what changes to make?  I've 
> had a look through the mail lists you suggested but can't find the answer 
> there. Using versions of the m4 file that are provided for other operating
> systems doesn't seem to help.

In looking back through our support mail, it appears that several solutions
have worked at various other Cray sites:

  1.  Have the local Cray analyst reinstall the m4 utility.  Have him or her
      check whether "-" is an acceptable command-line argument for standard
      input, or whether it results in the error "m4:-:529 can't open file".
      If it still gives the error message, this solution won't work.
or

  2.  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
or

  3.  Build the necessary jackets.c for UNICOS on a different platform (just
      about any Unix workstation), 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.
or

  4.  Use GNU m4, which you would have to get and install from source.  It's
      available from ftp://ftp.prep.ai.mit.edu/pub/gnu/m4-1.4.tar.gz.

I've appended some support messages about using one of these workarounds.
I'll add something about this problem to our "Known Problems with the netCDF
Distribution" document at 

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

Thanks for reporting it.

--Russ
______________________________________________________________________________

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

============================================================================
To: Ming Cai <address@hidden>
Date: Wed, 25 Jan 95 12:18:32 -0700
From: address@hidden

>From: Ming Cai <address@hidden>
>Organization: University of Maryland
>Keywords: 199501202055.AA21596

In the above message you wrote:

>I told to a CRAY analyst for the C90 here.  Apprantly she is not quite
>familiar with both netcdf or m4(1) utility.  So I don't know if she is
>going to reinstall the system's m4 into the C90 or not.  
>
>Anyway, you mentioned that you had encountered the same problem before
>Did you solve the problem or they re-install the m4.  

The problem went away when the m4 utility was re-installed.

>I also tried to install the m4 into CRAY-YMP.  I got the same error msg..
>
>Another question is that can you somehow change the script so that
>m4 in the C90 would read the symbole for input correctly.

This was tried.  It didn't work.

--------
Steve Emmerson   <address@hidden>

============================================================================

To: David Pierce <address@hidden>
Subject: Re: netCDF on the Cray J-90 
Date: Wed, 15 Mar 1995 13:53:29 -0700
From: Russ Rew <address@hidden>

> Organization: UCSD
> Keywords: 199503151931.AA06673

Hi David,

> Thought I'd pass along my experience with netCDF on the Cray J-90 under 
> Unicos 8.0.3.0, in case you get inquiries from anyone else regarding it.
> 
> It wouldn't quite compile "out of the box", so first I tried using a 
> binary copy of a library compiled on an EL/94.  EL binaries run on the 
> J-90, but since this didn't actually work, I suspect that EL binaries 
> can't be linked with things compiled on the J90.  In any event, this 
> didn't work.
> 
> The step which didn't work was when netCDF was creating "jackets.c" in 
> the fortran subdirectory.  At the point where it was executing the 
> following line from fortc:
> 
> sed -f ./fortc1.sed  jackets.src | m4 ./common.m4 ./unicos.m4 - | sed -f 
>  ./fortc2.sed
> 
> It failed with the message:
> 
> m4:-:529 can't open file
> 
> I messed around with it a bit, but couldn't find the problem.  This works 
> on an EL, so it's certainly not out of the question that the basic problem
> is lies with the J-90.  To get around it, I just copied the EL's version
> of "jackets.c" over to the J-90, and compiled away.  It seems to work for
> my test cases, and passed the "make test".

Thanks very much for passing on this info.  We will undoubtedly get asked
about this in the future, so I'll just forward your message when that
happens.  I suspect a problem with m4, since we have seen several m4
problems with similar symptoms on new platforms.  Often just using GNU m4
instead of the vendor-supplied m4 fixes the problem.

============================================================================

To: Ming Cai <address@hidden>
Subject: Re: 950125: compiling on CRAY C90 
Date: Wed, 25 Jan 95 08:34:15 -0700
From: address@hidden

>From: Ming Cai <address@hidden>
>Organization: University of Maryland
>Subject: Re: 950124: compiling on CRAY C90 
>Keywords: 199501202055.AA21596

In the above message you wrote:

>Hi, two questions for you.  The first one is just about
>installing the netcdf.  The second one is about installing
>the m4 utility.
>
>here is the output for the first question.
>******
>sn4021% make all
>        ./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
>*******
>
>could you looked the msg. again to see if the problem is
>indeed caused by "m4 utility".  It seems that ":-:" might
>be the problem.  C90 does have m4 and the system administrator
>seems know little about it (maybe I didn't ask right peroson).

The problem is the m4 utility. As I said, I've seen this before on a
C90. At that time, the other fellow and I stepped through the fortc
script line-by-line, discovered the m4 invocation that was causing
problems, and verified by manually executing the command that the
problem did, indeed, lie with m4.

The problem is that m4 is being given a file specification of `-',
meaning standard input.  As you can see from the error message, however,
m4 is interpreting this specification as `-:529', which is incorrect
behavior.

============================================================================