# Running the OpenACC Tools within the Parallel Language Development Tools

The Parallel Language Development Tools work on C, C++, and Fortran projects.

1. Within the project, create a source file that includes OpenACC code.
2. In the Project Explorer View, select the source file to analyze, to find the OpenACC artifacts. To do this, select the source file in the Project Explorer on the left to highlight it.

   Select the "Show OpenACC Artifacts" menu item in the PLDT icon menu in the tool bar.
   (Note: if it complains that a source file is not selected the first time, select it again and retry.)

   The workbench with the selection and menu item is shown below:

3. The OpenACC Artifact View is opened, if it was not present. It is populated with OpenACC artifacts found.

4. Double click on any line in the OpenACC Artifact View to navigate the editor to that line in the source file.
5. Rows in the OpenACC Artifact View can be sorted by any of the columns. Select the column heading to sort.
6. Select the "Clear OpenACC Artifacts Markers" button (red X) in the tool bar of the OpenACC Artifact View to remove all the OpenACC artifact markers.
7. You can run the analysis on another file and its markers will be added to the view.
8. You can run the analysis on more than one file (multiple selection) or a container (folder or project), to analyze more than one file at a time. Click on a project or a folder, then select the "Show OpenACC Artifacts" action to run it on all C source files in that folder.

9. Hover Help
   In the editor, hover over an OpenACC api and a popup box shows details of that API.

10. Content Assist
    Type an incomplete OpenACC function name e.g. "acc_get_" and hit Ctrl-Space. The information that is shown is populated with CDT completions including argument types, but in addition, the PTP-OpenACC tools also provide specific information about actual OpenACC functions where appropriate, and a yellow popup with additional textual descriptive information about the function. Pick the one you want with the arrow keys or the mouse, to add the API to your source file.

11. Code Templates
    Code templates provide help with common patterns of OpenACC programming. See also MPI Code Templates.

    To use code templates for OpenACC, type acc, then hit ctrl-space twice. The first time you will see completions for OpenACC APIs (Content Assist described above). The second time you will see a choice of useful OpenACC programming items include #pragmas. (Note: Fortran puts content assist and code templates together in the same place.) The yellow popup on the right includes an example of the code that will be added.

    Use the cursor to navigate up and down and select the one you want, or keep typing to cull the list to the ones that interest you.

    Click or hit Enter to select it, and it is inserted into your file at that point.

    Similarly, for Fortran programs:

12. Context sensitive help
    Also, if F1 is pressed when the cursor is within a function name, a help view appears which shows additional information. (In Linux press Ctrl-F1; in Mac Use Help button or use menu Help > Dynamic Help)

Back to Top | Back to Table of Contents