Terug naar de homepage van Forcheck
Frequently asked questions

Question 1:

Forcheck produces many messages and does not recognize my Fortran 90 code.

Answer 1:

Your source may be in Fortran 90 free source form. Specify the free source form option (Options/Project options: Free source form in the Forcheck IDE,  /ff for Windows command line,  -ff for Linux command line).

Question 2:

Forcheck does not recognize Fortran 90 keywords and syntax though I have specified the Fortran 90, Fortran 95, Fortran 2003, or Fortran 2008 conformance option (/f90, /f95, f03, or /f08 for Windows command line,  -f90, -f95, -f03, or -f08 for Linux command line).

Answer 2:

The syntax which Forcheck accepts is determined by the compiler emulation in effect, which can be chosen by Options/Preferences: Compiler Emulation in the Forcheck IDE, or setting the environmental FCKCNF when using the command line. In this way you select a configuration file of a Fortran 77, Fortran 90, Fortran 95, Fortran 2003, or Fortran 2008 compiler to analyze Fortran 77, Fortran 90, Fortran 95, Fortran 2003, or Fortran 2008 code. The standard conformance options merely request Forcheck to flag all non-standard syntax used.

Question 3:

I like to use standard Fortran 90, 95, 2003, or 2008 only, without compiler extensions, to develop transportable code.

Answer 3:

You can select plain Fortran 90, 95, 2003, or 2008 syntax in Options/Preferences/Compiler Emulation in the Forcheck IDE, or setting the environmental FCKCNF when using the command line and select one of the plain Fortran configuration files.

However, the data type information and data types supported depend on the compiler used. So best is to adapt the configuration file of your choice to your processor and situation. You also could strip down the configuration file of your compiler, or specify the standard conformance option.

Question 4:

Forcheck complains that it cannot find a used module.

Answer 4:

Forcheck must analyze modules before they can be referenced. So you have to add the source file containing the module source or containing the interface descriptions to the project. Input files are analyzed in the correct order automatically

You also can analyze the source code of some modules in a separate run and place the result in a Forcheck library file. When analyzing the program units which reference these modules, you include this library file in the analysis.

Compiler specific compiled module files, like .mod files, cannot be handled by Forcheck because their format is proprietary. Instead the source file as supplied by the compiler vendor must be included in the project.

Question 5:

How can I specify a search path for include files?

Answer 5:

Using the Forcheck IDE select Options/Preferences to set absolute include paths for all projects. Select Options/Project Options and choose include directories to set relative include paths for the current project. Using the Windows command line specify /IP:dir_list. For the Linux command line specify -I dir_list. Multiple paths can be separated by a ";"

Question 6:

Does Forcheck handle conditional compilation and other preprocessing commands?

Answer 6:

Forcheck handles preprocessor commands and compiler directives. The compiler directive string can be specified in the compiler emulation file which is selected by choosing a compiler emulation. Forcheck also handles cpp preprocessing with macro substitution if the cpp option is specified.

Question 7:

Which options should I use for an optimal analysis?

Answer 7:

This depends very much on the situation.

Some options have to be set to interpret the source correctly:
  • Free source form if the source code is in Fortran 90 free source form.
  • Analyze all columns if the fixed source form lines extend beyond column 72, or the free source form lines extend beyond column 132.
  • Enable cpp preprocessing if needed.
  • Max # continuation lines if the maximum number of continuation lines exceeds the number specified in the compiler emulation file.
  • Default integer/logical size if default integers and logicals have a different size than specified in the compiler emulation file.

For existing old Fortran 77 code which mixes integers and logicals you may need to specify the relax type checking option to prevent too many false alarms. To reduce messages start with disabling informational messages. To verify portability specify the conform to Fortran standard and flag obsolescent syntax option. For optimal detection of potential problems, when restructuring or developing new code, specify the flag the implicitly typed items, undeclared external subprogram and rigorous syntax analysis options.

First analyze and correct separate program units and place the result at wish in a Forcheck library file. Then analyze the consistency of the entire program specifying the analysis of complete program option.

Question 8:

How can I view and print the results of the analysis from the Forcheck IDE?

Answer 8:

The progress window reports the progress, displays a message summary and displays those messages which have not been sent to the list file. The list file contains listings, messages, cross-references, a message summary and statistics, depending of the options specified.

Inspect the report to view all messages with its context. It depends on the options set what information will be placed in the report file and what in the list file.

To view the report file, double-click on the report filename in the project window.

To view the list file, double-click on it.

You can print any file by clicking on it and choose File/Print, or print the file from your editor.

Question 9:

How can I tune the page lay-out of the list file?

Answer 9:

The page lay-out of the list file which Forcheck generates is determined by the page width and page length options. (/PW and /PL for the Windows command line, -pwid and -plen for the Linux command line). When using the Forcheck IDE the Forcheck analyzer is started from the IDE and the page-size options are determined using the characteristics and settings of the default printer. So you have to set up the printer (e.g. to landscape) before starting the Forcheck analysis.

The IDE has a page set-up menu in which you can configure the page and printer.

Question 10:

What is the best way to handle source code that makes calls to Windows or third party libraries and modules such as MPI, IMSL or Winteracter?

Answer 10:

The appropriate way is to analyse the interface code of these libraries with Forcheck and place the result in a Forcheck library file for later reference. The source code of the interfaces of third party libraries should anyhow be present. If you don't have it available you could request it from the supplier, or eventually make it yourself from the documentation.

For some libraries we supply a ready to use Forcheck interface library. Registered Forcheck users can download these libraries.
Forcheck interface library for MPI
Forcheck interface library for Compaq Visual Fortran
Forcheck interface library for Intel Fortran.

Question 11:

For the Linux or unix implementations a local option specified in front of a wild card file specification does not operate as expected.

Answer 11:

The unix shell expands the wild cards before passing the command line to Forcheck. That is why the local option only effects the first file of the expanded list. Global options, specified in front of all the filenames, operate as expected. To avoid the problem you can run Forcheck separately for each group of files needing the same options, store the result in a Forcheck library file and perform the global program analysis on this library file.

Question 12:

How can I generate and view a call tree (reference structure)?

Answer 12:

You can generate a textual and graphical call tree.

1. To generate a textual call tree you specify the reference structure option (/SR for the Windows command line, or -shref for the Linux command line). This call tree becomes part of the listing file, so you must specify a listing file.

2. To generate a graphical call tree you specify a reference structure file in the project (/RS file for Windows command line, or -refstruc file for Linux command line). The output file is an xml file which can be browsed in the IDE by double clicking on the filename. You also can view and browse this file in your browser. Then you must place the supplied style sheet (_fck_tree.xsl) in the same path as the xml file.

Question 13:

We have many files with Fortran 77, 90 and 95 code. Some are fpp files, some not. How can we analyse this combination?

Answer 13:

You can analyse these files in several ways:

1. Because the Fortran language levels are almost entirely upwards compatible you can select a configuration file for the highest language level used. Forcheck automatically enables the cpp option for source files with specific filename extensions (.fpp for windows, .F for Linux). You also can set the cpp option for separate source files. A mixture of free and fixed source form is also no problem. Forcheck chooses automatically the correct form corresponding to the filename extension. Additionally you can choose local options for individual files to tune the analysis.

2. You also can group the files of each language level in a separate subproject and generate one or more Forcheck library files. You can choose a specific configuration file for each subproject. For the global program analysis you analyse these library files.

Question 14:

How do we avoid table overflow and reduce the time needed for the analysis of modules with many module procedures and interfaces?

Answer 14:

The modules referenced in the module body need not to be specified in the module procedures anew. In the interfaces you can use the IMPORT statement to force host-association. This saves reading the module information for each module procedure and interface anew and reduces the number of symbols in the symbol table.

previous page top page
Forcheck
Contact