CPP "problems" (was Re: why has Cray dropped CPP support from cf77?)

John Prentice john at ghostwheel.unm.edu
Tue Feb 19 11:34:49 AEST 1991


In article <1300 at red8.qtp.ufl.edu> bernhold at qtp.ufl.edu (David E. Bernholdt) writes:
>I don't want to start another thread (war?) on preprocessors, but I had to
>respond to Patrick's remarks...
>
>  [text deleted...]
>
>If one is aware of the capabilities & limitations of CPP, it can be a
>very useful tool.  I don't council using _any_ tool without a pretty good
>understanding of what it is (supposed) to do and how.
>

I would second this comment.  We used to use a rather sophisticated
preprocessor for our Air Force hydro codes and we junked it when we
started developing the next generation of codes because it was TOO
sophisticated.  People got too sexy with their preprocessor constructs
and it got to where it was more a pain in the rear than a help.  We went
to CPP simply because it is virtually universially avaiable (anywhere C
is).  It is a pretty low level preprocessor, but quite sufficient to do
what we need and keep us out of trouble.

As for Cray dropping support, this shouldn't really be a big issue.  You
can always use the C version to process your Fortran.  It is perhaps a bit
more work to do, but not that much.  We do this already on both our hydro
codes and on my quantum mechanics codes.  We just use make files that first
call CPP and then the Fortran compiler.  This particular approach is useful
also because we run on a variety of systems and most don't support any
Fortran preprocessors at all.  On the other hand, they all have C.

John


--
John K. Prentice    john at unmfys.unm.edu (Internet)
Dept. of Physics and Astronomy, University of New Mexico, Albuquerque, NM, USA
Computational Physics Group, Amparo Corporation, Albuquerque, NM, USA



More information about the Comp.unix.cray mailing list