Hello,
I've been following the discussion about Fortran portability,
Pierre's Problem et al. Here's my take towards a solution.
Since a Fortran program can't diagnose everything about a
processor, what's needed is a program to diagnose where
it can, and read an input file to get the rest. This program
may then write a module which may be used by other programs.
I've written such a program which I call make_processor_model.
This program writes two source files, one containing a module
called standard_types and the other a program called processor_model.
The module standard_types contains a number of constants and functions
which are intended to ease porting. The program proessor_model prints
the contents of standard_types to stdout for review.
You may download the source code for all this by going to my webpage
http://www.erols.com/dnagle
following the link to "The Portability Project" and reading more.
I've put the source code for make_processor_model, a sample
standard_types and processor_model for Lahey LF95, and
sample input files for LF95 and DVF on the site.
Earlier versions of this worked with Cray, IBM and SGI.
I believe make_processor_model is completely standard Fortran 95,
so the only thing which needs be changed to put standard_types
on a new processor is to change a few lines in the namelist input
file, and running the program on the new processor.
Anyway, your comments are welcome.
--
Cheers!
Dan Nagle [log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|