fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

Organising a large Project:   CHECK MODIFIED SOURCE



Organising a Large Project

There are many ways to organise an fpt project. The system described here is that which SimCon uses in house. We recommend it where:

The steps are:

  1. Create a base directory for the project. Within it:
  2. Run the script project_directory_setup.sh in the main fpt installation directory (which should be in your execution path). This script creates a directory named original_source and two parallel empty directory structures with the same sub-directories. They are fpt_output which will receive Fortran files output by fpt, and modified_source which will receive any files modified by hand as a result of the fpt analysis.
  3. Create a directory parallel to original_source, modified_source and fpt_output to hold the fpt command scripts. We usually name this directory fpt.

The directory structure created is, e.g.:

base_directory |-- fpt |   |-- project_commands.fsp |   |-- project_files.fsp |   |-- project_logicals.fsp | |-- fpt_output |   |-- main_project_directory |   |-- project_subdirectory_1 |   |-- project_subdirectory_2 | |-- modified_source |   |-- main_project_directory |   |-- project_subdirectory_1 |   |-- project_subdirectory_2 | |-- original_source |-- main_project_directory |-- file_1.f90 |-- file_2.f90 |-- : |-- : | |-- project_subdirectory_1 |   |-- file_3.f90 |   |-- file_4.f90 |   |-- : | |-- project_subdirectory_1 | :

The modified_source Directory Structure

The modified_source directory structure holds files which have been modified by hand in response to diagnostics and reports by fpt or to carry out experiments. The file lists submitted to fpt can be set up in such a way that any file copied to modified_source is read by fpt instead of the corresponding file under original_source. This can be done in two ways, as described below.

Handling of Primary Input Files

The command PRIMARY INPUT SEARCH PATH specifies a sequence of directories in which files are to be sought. If modified_source is placed ahead of original_source in the search path any file copied to the modified_source structure will be selected in preference.

The command CHECK MODIFIED SOURCE automatically searches the modified_source directory structure for files irrespecive of the way in which the input directory is specified. fpt searches the complete input directory name for the string original_source. If it is present fpt first seeks the input file in the corresponding directory under modified_source.

Handling of INCLUDE Files

The file names in INCLUDE statements may be written without directory specifications, with directory specifications relative to the file in which compilation takes place, with absolute directory specifications or with specifications made with Linux/Unix symbols or VMS logical names. For example:

If no directory specification is present, or if the command IGNORE DIRECTORIES IN INCLUDE STATEMENTS has been made, fpt uses the directories or search paths specified by the commands INPUT DIRECTORY, INCLUDE INPUT DIRECTORY, INPUT SEARCH PATH and INCLUDE INPUT SEARCH PATH.

In all other cases, fpt uses that specification in the INCLUDE statement. The directory name may be edited by the command EDIT FILE NAMES IN INCLUDE STATEMENTS. But if the command CHECK MODIFIED SOURCE has been made and the file specification after interpretation of symbols and logical names contains the string original_source fpt will first search the corresponding directory under modified_source. This allows the directory information in the INCLUDE statement to be retained.

Where to Use this Command

Write this command before any primary file specifications to which it is to apply. It applies to all INCLUDE files.

Operating system command line Yes
Configuration file, config.fsp Yes
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt No
Interactive command files No
Embedded in the Fortran code No


modified_source is not checked by default.

Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.