# Recognizing Compiler Errors: Cray, PGI, and Open64

- Configuring Error Parsers
- Recognizing Cray Compiler Optimization/Loopmark Information

When you build a C/C++ or Fortran application, the output from the compiler (including any error messages) is displayed in the Console view. However, CDT/Photran can "recognize" the error and warning messages from many popular compilers, placing the problem description in the Problems view and marking the corresponding line in the source file with an icon.

CDT does not, by default, recognize error or warning messages from the Cray, PGI, or Open64 C/C++ compilers. However, this is possible when PTP is installed.

## Configuring Error Parsers

To recognize errors and warnings from the Cray, PGI, or Open64 C/C++ compilers:

1. In the Project Explorer view, right-click on a C/C++ or Fortran project.
2. In the context menu, select Properties. This will open the Project Properties dialog.
3. In the tree on the left, navigate to C/C++ Build > Settings.
4. In the right site of the dialog, select the Error Parsers tab. Note that the list includes these entries:
   - CDT Cray C/C++ Error Parser
   - CDT PGI C/C++ Error Parser
   - CDT Open64 C/C++ Error Parser
5. Select the error parsers corresponding to the all of the C/C++ and Fortran compilers you use, or might use in the future, to compile the project.
6. Click the OK button to close the Project Properties dialog.

## Recognizing Cray Compiler Optimization/Loopmark Information

The Cray C/C++ and Fortran compilers can produce informational messages about what compiler optimizations were, or were not, performed. When the Cray error parsers are enabled (see Configuring Error Parsers above), Eclipse will also recognize these informational messages, marking the corresponding source lines.

To instruct the Cray C/C++ or Fortran compiler to produce informational messages, change your Makefile as follows:

- Compile using the `-h msgs` or `-h negmsgs` option. For example:
  `cc -O3 -h nsgmsgs my_program.c`
- OR, compile using `-h list=m` and `cat` the resulting .lst file. For example:
  `cc -O3 -h list=m my_program.c && cat my_program.lst`

Back to Top | Back to Table of Contents