During compilation, most modern compilers discover and generate a wealth of information about what the compiler did in optimizing the code, what optimizations could not be implemented (and why), how data is accessed, relationships between procedures, and much more. PGI compilers include the ability to save this information into the compiled object and/or executable file for later extraction and review. The Common Compiler Feedback Format (CCFF) is a draft standard published by PGI that defines what compiler information is stored and how the information is formatted. Using CCFF, HPC tools providers can enhance their products to offer more and better information about optimizing performance.

CCFF message generation is enabled in the PGI compilers by adding the –Minfo=ccff option to your compile and link line. The messages are stored in the binary file to be read by profiling tools such as the PGI Profiler. The pgextract tool can also be used to read the CCFF messages directly from the binary image. The first product to exploit CCFF is release 8.0 of the PGI Profiler (a/k/a PGPROF®).


  1. Why is PGI making this technology freely available to the community?

    The benefits of standards are well-known. If more compiler and tool providers adopt this technology, PGI's customers and PGI will benefit through improved performance and interoperability.

  2. How is CCFF licensed?

    The CCFF license is included in the header of the CCFF XML schema. Or you can read the license text.

  3. How can our organization contribute to CCFF?

    Please post your ideas to the PGI User Forum.

  4. What are PGI's future plans with CCFF??

    For now PGI will maintain the CCFF specification and host a discussion forum. If enough interest develops within the community, we will explore moving maintenance and definition of CCFF technology into the community.

  5. How can our organization include CCFF in our product?

    Download the CCFF Schemas and specifications (see below) The PGI compilers can be considered a reference implementation for CCFF generation, so try experimenting with those to generate different CCFF messages. Utilities for extracting CCFF information from object and executable files (pgzip/pgunzip/pgextract) are included in the PGI release packages. If you have questions, post them to the Debugging and Profiling User Forum.

XML Schemas

How It Works

CCFF processing is depicted in the figure below.

CCFF flow diagram

  1. The PGI compiler produces an object file from a source file. The object file contains a .CCFF section.
  2. The linker combines object files into an executable file, appending the .CCFF sections of the objects.
  3. The executable file is run with the PGI Profiler to produce performance data.
  4. The CCFF, performance, symbol, and source data are all synthesized in the PGI Profiler into a view of where the time is spent in the program, why, and what might be done about it.


  1. There is another component, the CCFF repository, involved in the CCFF process. For simplicity's sake we don't include it in this overview. It is discussed in some detail in the example.
  2. On Mac OS X, the CCFF section in the object and executable is named __CCFF.

Following is a simple example program to demonstrate CCFF generation and extraction. This example is intended to illustrate how CCFF works and can be used; clearly there are many more complicated cases and more details are required for an actual CCFF implementation.

Suppose we have this simple program:

! (c) Copyright 2014 NVIDIA Corporation.  All rights reserved.
! Licensed under terms described at https://www.pgroup.com/lit/samples/ccff.htm

      subroutine daxpy(n,a,x,y)
      real*8 a(n),x,y(n)
      do i = 1, n
        y(i) = a(i) * x + y(i)
      end do

      program daxpytest

      implicit none
      integer n, i
      real*8 a(n), y(n), x

      ! init
      x = 42.86
      do i=1, n
          a(i) = dble(i)
          y(i) = dble(i)

      call daxpy(n, a, x, y)

      print *, 'result...'
      do i=1, n, 2
          print *, y(i), y(i+1)


Compile this program with PGI compilers using the following command:

    pgf90 -Minfo=ccff -fast  main.f -o main

Then extract the CCFF information into an XML file with the following command:

    pgextract main .CCFF main.ccff -xmltag ccffbin -cz

The pgextract command is included with all PGI software releases. The arguments to the pgextract command have the following meanings:

name of the program to extract the CCFF from
name of the object file section containing CCFF info
output file name
specify a top-level XML element to wrap the elements
uncompress the CCFF data

Then examine main.ccff. You will see <message> elements like the following, noting that the loop at line 6 was vectorized. If you look at line 6 in the example source code, you'll see that it is the first line of the compute-intensive loop in the daxpy routine. So it is good news that it is being vectorized!

   <messagetext>Generated vector sse code for inner loop</messagetext>

Elements like this one are contained within a element specifying the subprogram and a element specifying the object file. The element can be used to look up more detailed information in the message repository - in this example we would look for a element associated with message ID VEC039.

Click me
Cookie Consent
