The following lists some of the most basic problems you can encounter during application development and gives suggestions for troubleshooting:
Source
code does not compile correctly.
The Intel Fortran Compiler conforms to the Fortran 95, Fortran 90,
and Fortran 77 standards. If your source code fails to compile, check
for unsupported language extensions. Typically, these produce a syntax
error. The best way to resolve problems of this nature is to rewrite the
source code so it conforms to the Fortran standards and does not contain
unsupported extensions.
Program
does not run produce expected results.
Use test scenarios that ensure the output matches your expectations.
If a test fails, try compiling the files using the -O0 option, which turns
off the optimizer. If the test still fails, it is likely that the source
code contains a problem. If your program runs successfully with -O0, but
fails with -O2 (the default), you need to determine which file or files
are causing the problem. To help pinpoint where the problem lies, divide
the source files into two groups (perhaps alphabetically) and compile
one group of the source files with -O2 and the other group with -O0. If
the program passes the tests, you know that the problem lies in the second
group of files.
Program runs
slowly.
Use a tool like the VTune™
Performance Analyzer to determine where your program spends most of its
time. Such an analysis will show you which lines of your program are using
the most execution time. See the Optimizing
Applications book for additional guidelines that will help you optimize
performance and gain speed.
You can use compiler options to control the diagnostic messages issued by the compiler. For example, the -WB compiler option turns compile time bounds errors into warnings. The -warn keyword option controls warnings issued by the compiler. It supports a wide range of values. Some of these are as follows:
[no]alignments -- Determines whether warnings occur for data that is not naturally aligned.
[no]declarations -- Determines whether warnings occur for any undeclared symbols.
[no]errors -- Determines whether warnings are changed to errors.
[no]general -- Determines whether warning messages and informational messages are issued by the compiler.
[no]interfaces -- Determines whether warnings about the interfaces for all called SUBROUTINEs and invoked FUNCTIONs are issued by the compiler.
[no]stderrors -- Determines whether warnings about Fortran standard violations are changed to errors.
[no]truncated_source -- Determines whether warnings occur when source exceeds the maximum column width in fixed-format files.
For more information, see the -warn keyword compiler option.
You can perform compile-time procedure interface checking between routines with no explicit interfaces present. To do this, generate a module containing the interface for each compiled routine (using the -gen-interfaces option) and check implicit interfaces (using the -warn interfaces option.)