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 is probably in Fortran 90 free form. Specify the free-form option (In the IDE: Options/Project options, Free form source.  /ff on the Windows command line,  -ff on the Unix 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 option (/f90, /f95, /f03, or /f08 on Windows,  -f90, -f95, -f03, or -f08 on Unix).

Answer 2:

The syntax which Forcheck accepts is primarily determined by the compiler emulation used, which can be chosen by Options/Preferences: Compiler emulation in the IDE, or setting the environmental FCKCNF when using the command line. In this way you choose 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 options f77, f90, f95, f03 and f08 merely request Forcheck to flag all non-standard syntax used for the specific language level.

Question 3:

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

Answer 3:

You can select plain Fortran 90, 95, 2003, or 2008 (Options/Preferences: Compiler emulation in the IDE, or setting the environmental FCKCNF when using the command line).

However, the data type information and data types supported still depend on the compiler used. So adapt the configuration file to your processor and situation. You also could strip down the configuration file of one of the compilers and remove all the language extensions, or specify /ST (Windows), or -standard (Unix).

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 of the module to the project. You also can analyze modules in a separate run and place the result in a Forcheck library file. When analyzing the program units which references the module, you must include the library file in the analysis. Input files are analyzed in the correct order automatically, though you still have to specify all input files containing the referenced modules. Compiler specific compiled module files, like .MOD files, cannot be handled by Forcheck because their format is proprietary. Instead the source file as should be 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 IDE select Options/Project options and choose Include directories. Using the Windows command line specify /IP:dir_list. The option on Unix is -I dir_list. Multiple paths can be specified separating them 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 (e.g. #) can be specified in the compiler emulation file which is selected by choosing a compiler emulation. Moreover Forcheck handles cpp preprocessing with macro substitution by adding Fortran extension 7 to the list of Fortran extensions in the compiler emulation file.

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 correctly to interpret the source correctly:
  • /FF (-ff) if the source code is in Fortran 90 free-form source code (as is the default for source files with the extension .f90 or .f95).
  • /AC (-allc) if the fixed form source lines extends beyond column 72, or beyond column 132 for free-form source code.
  • /CN:c (-cntl c) if the maximum number of continuation lines exceeds the number as specified in the compiler emulation file.
  • /I2 (-i2), /I4 (-i4), or /I8 (-i8) if default integers have a different size than specified in the compiler emulation file.

For legacy Fortran 77 code which mixes integers and logicals you may need to specify /RE (-relax) to prevent too many false alarms. For badly structured, existing spaghetti code you should not specify /RI (-rigor). For optimal detection of potential problems when restructuring or developing new code specify /DC/EX/RI (-decl -ext -rigor). To verify portability specify /ST (-standard) and /OB (-obs).

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 by analyzing all source programs, or the just the previously created forcheck library file(s) and specify the complete option /CO (-ancmpl).

Question 8:

The source code of our project consists of Fortran 77, Fortran 90 and Fortran 95 code intermixed. Some files are in free form, some in fixed form. How can we analyse the entire project?

Answer 8:

There are two possible stategies. The first is to choose a compiler emulation which supports all language levels, up to Fortran 95. Now Forcheck will accept all source code. The default form is freeform for .f90 and .f95 files. The correct form option can also be specified for each separate source file. Forcheck also supports compiler directives (e.g. #freeform) to change the form within a file on the fly which can be useful if include files do not have the same form.

The other strategy is to group the source files in a group for each language level. Each group forms a subproject. Generate a Forcheck library file for each subproject and analyse the integral project by analysing the library files of the subprojects.

Question 9:

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

Answer 9:

The progress of the analysis is displayed in the progress/report/search window (bottom-right). The progress window shows the progress, messages and a message summary. The report file contains messages, a message summary and statistics. The list file contains source code listings, messages, cross-references, a message summary and statistics depending of the options specified. It depends on the options you specified what information is placed in the report file and in the list file.

By double clicking on the report file in the project tree the report file is shown in the progress/report/search window. By double clicking on the listing file in the project tree the listing file is shown in a sub window.

You can search in these files and go to the next/previous message. To print these files, select the file and choose File/Print.

Question 10:

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

Answer 10:

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

In the page set-up menu of the IDE can set up the page and printer.

Question 11:

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

Answer 11:

The appropriate way is to analyse the interface code of the 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 always be present! If you don't have it available you could request it from the supplier, or eventually compose it yourself from the documentation.

Because the interfaces to the Windows libraries contain so many bodies we supply a ready to use Forcheck library. Registered Forcheck users can download these libraries. A ready-to-use Forcheck library with the MPI interface is also supplied.
Forcheck library for Compaq Visual Fortran
Forcheck library for Intel Fortran
Forcheck library for MPI.

Question 12:

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

Answer 12:

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 13:

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

Answer 13:

You can generate a textual and a graphical call tree.

1. To generate a textual call tree you specify the /SR (Windows), or -shref (Unix) option. This type of call tree is part of the listing file, so you must specify a listing file.

2. To generate a graphical call tree you specify the /RS file (Windows), or -refstruc file (Unix). The output file is an xml file which can be browsed in the IDE. To browse the xml file using your internet browser you must place the supplied style sheet (_fck_tree.xsl) in the same path as the xml file.

previous page top page
Forcheck
Contact