goto


Home

Free Source Code

Portability Project

Fact Sheet

Email us


Purple Sage Computing Solutions, Inc.

Program make_processor_model

Home --> Fact Sheet --> Free Source Code --> Portability Project --> make_processor_model

About the Program make_processor_model

Go directly to Downloads

Program make_processor_model writes the source code for the processor_dependencies module, optionally writes a preprocessor include file, and writes source code for the processor_model program. All these should be written together to keep them mutually consistent. The program is written in standard Fortran and should compile and run on any modern Fortran processor.

The make_processor_program automatically detects the integer and real kinds supported by a processor. If you're not satisfied with the results of the automatic search, you can disable the automatic search and specify the integer digits or real range and/or precision you want to use as the basis of the kinds designation.

The make_processor_model program can write a short file of symbol definitions for use with the coco, f90ppr or cpp/fpp preprocessors in support of conditional compilation. A symbol is defined in such a way that code may be compiled if the corresponding kind is supported. Simply include, or cut-and-paste, the file into your source code, and wrap any kind-specific code in your preprocessor's conditional compilation directives.

The make_processor_model program optionally reads a namelist input file to assist with items not detectable from the program, and to allow for customization. By default, make_processor_model assumes eight bit bytes, IEEE floating point format, two's compliment integer format, no preconnected standard error file, ascii characters (with kind=1), and that you don't want to define logical kinds. If any of these guesses are wrong, you'll need to use the namelist input file to get the processor_dependencies module, preprocessor include file, and processor_model program you want. You'll need to use the namelist input file anyway if you want to define the compiler version, OS version, or compiler serial number constant strings. Also, make_processor_model writes a logfile of its actions and you ought to review that file before using processor_dependencies and checking the output of processor_model. A WARNING in the log file may indicate a failed diagnosis.

Back to the Top

Downloads

Download the source code for make_processor_model here.

Read a description of the namelist input file here.

Preprocessors

A discussion of the coco preprocessor is on the page coco. This page includes some examples of using coco.

Michel Olagnon's Moware package contains the f90ppr preprocessor, available via http://www.ifremer.fr//ditigo/molagnon/fortran90/contenu.html. Moware contains some other useful Fortran source utilities as well.

A Fortran preprocessor is available from Lahey via http://www.lahey.com/coderep/fpp.zip. This one is written in Fortran 77.

A "Fortran aware" version of cpp is available from Netlib via http://www.netlib.org/fortran/fdfpp.tgz. It is supplied by Sun Microsystems, Inc.

Back to the Top

Please see our Fact Sheet, or E-mail us for more information.


Home - Fact Sheet - Free Source Code - Fortran Links - Email us

Back to the Top