>>>>> Alexei Matveev writes:
Alexei> Hello Everybody, Which text preprocessor is the best one for F90
Alexei> programs? We need it to cope with machine-dependent optimization
Alexei> of the code. That's why preprocessor must be portable. Some
Alexei> distribution provide a kind of preprocessor but they are usually
Alexei> everything else but portable. Up to now only unix/linux systems
Alexei> are of interest
Alexei> Any comments wanted.
Alexei> Sorry if this is a FAQ.
Alexei> Alexei Matveev
Dan Nagle has mentioned `m4', which can be found on every Unix system. It can
be extremely useful, and in fact it can work orthogonally to cpp
preprocessing, but note that it is very slow on many systems. If you are
compiling several thousand files, adding an m4 step can lengthen the process
considerably. We have found that it is best to restrict the m4 pre-process
step to only those files that require it. One way might be to use a unique
suffix for those files and then set up a suffix rule in your makefile to
do the preprocessing. Let me know if you need an example.
Many fortran compilers can be directed to do a cpp pass, either through a
compiler flag or through an alternate suffix (e.g., `.F90' for cpp-required
vs. `.f90' for standard f90 files).
F2k will have a conditional compilation tool, which I think you can find right
now -- it is called `coco'. You can probably find it via The Fortran Market
... ah, here it is: http://www.fortran.com/fortran/coco.html
Hope that helps,
--
Ted Stern Porting/Tuning/Analysis, Applications & Libraries
Tera [soon to be Cray, Inc.] http://www.tera.com
411 First Avenue South, Suite 600 Direct 206/701-2182, Main 701-2000
Seattle, WA 98104-2860 Fax1 206/701-2205, Fax2 701-2500
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|