Training with typical data sets

Run the resulting application with typical data sets. This step is called the PDF training step.

You can train the resulting application multiple times with different typical data sets. The profiling information is accumulated into PDF files to provide a count of how often branches are taken and blocks of code are run, based on the input data used.

You can get PDF files in the following ways:

Usage

You should use typical data sets for the PDF training step. Otherwise, the analysis of infrequently executed code paths might be distorted.

The PDF file is placed in the current working directory or the directory specified by the PDFDIR environment variable. To override the default file path or name, use the -qpdf1=pdfname or -qpdf1=defname option. If the PDFDIR environment variable is set but the specified directory does not exist, the compiler issues a warning message. To avoid wasting compile and run time, make sure that the PDFDIR environment variable is set to an absolute path. Otherwise, you might run the application from a wrong directory and the compiler cannot locate the profiling information files. When it happens, the program might not be optimized correctly or might be stopped by a segmentation fault. A segmentation fault might also happen if you change the value of the PDFDIR environment variable and run the application before the PDF process finishes.

If you have several PDF files, use the mergepdf command to combine these PDF files into one PDF file.

If you recompile your program with -qpdf1, the compiler removes the existing PDF file or files whose names and locations are the same as the file or files that are to be created in the training step before the compiler generates a new application.

Notes:
  • You cannot mix PDF and PDF map files that are generated for different programs. Further, you cannot mix PDF and PDF map files that are generated from multiple compilation processes with different -qpdf1 settings for the same program.
  • You must use the same version and PTF level of the compiler to generate the PDF file and the PDF map file.
  • You cannot edit PDF files that are generated by the resulting application. Otherwise, the performance or function of the generated executable application might be affected.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us