blob: 08f8cf314b58ff7a6b4060a7f20702ce13289b09 [file] [log] [blame]
<html>
<head>
<title>
Running the OpenACC Tools within the Parallel Language Development Tools
</title>
<link rel="stylesheet" type="text/css" href="help.css">
<link rel="stylesheet" type="text/css" href="help.css">
<script type="text/javascript" src="thumb.js"> </script>
</head>
<body>
<h1 id="top"> Running the OpenACC Tools within the Parallel Language Development Tools</h1>
<p>The Parallel Language Development Tools work on C, C++, and Fortran projects.
<ol>
<li>Within the project, create a source file that includes OpenACC code.
<li>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.
<p>Select the "Show OpenACC Artifacts" menu item in the PLDT icon menu in the tool bar.
<br> <img src="images/accMenu.png">
<br>(Note: if it complains that a source file is not selected the first time, select it again and retry.)
<p>The workbench with the selection and menu item is shown below:
<p><script> thumb("images/accButtons.gif",300)</script>
<li>The OpenACC Artifact View is opened, if it was not present.
It is populated with OpenACC artifacts found.
<p><script> thumb("images/accViewAnn.gif",300)</script>
<p>&nbsp;
<li>Double click on any line in the OpenACC Artifact View
to navigate the editor to that line in the source file.
<li>Rows in the OpenACC Artifact View can be sorted by any of the columns.
Select the column heading to sort.
<li>Select the "Clear OpenACC Artifacts Markers" button (red X)
in the tool bar <i>of the OpenACC Artifact View</i> to remove all
the OpenACC artifact markers.
<br><img src="images/accClearMarkers.png">
<li>You can run the analysis on another file and its markers
will be added to the view.
<li>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.
<br> <img src="images/accMenu.png">
<p>
<li><b>Hover Help</b><br>
In the editor, hover over an OpenACC api and a popup box shows details of that API.
<br>
<img src="images/accHoverHelp.png">
<p>
<li><b>Content Assist</b><br>
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.
<br><img src="images/accCodeCompletion_c.png">
<p>
<li><b>Code Templates</b><br>
Code templates provide help with common patterns of OpenACC programming.
See also <a href="mpiTemplates.html">MPI Code Templates</a>.
<p>To use code templates for OpenACC, type acc, then hit ctrl-space <i>twice</i>.
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.
<br>
<img src="images/accCodeTemplates1.png">
<p>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.
<br>
<img src="images/accCodeTemplates2.png">
<p>Click or hit Enter to select it, and it is inserted into your file at that point.
<br>
<img src="images/accCodeTemplates3.png">
<p>Similarly, for Fortran programs:
<br><img src="images/accContentAssist.gif">
<li><b>Context sensitive help</b><br>
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)
<br><img src="images/accDocsFortran.png">
<!-- li><b>Context sensitive help</b><br>
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)
<br><img src="images/helpContSensHitF1.gif">
<p>Help View appears:
<br><img src="images/helpContSens.gif">
<p>Click on the function name to see more information:
<br><img src="images/helpContSensHitF1click.gif"-->
</ol>
<p>&nbsp;<p>&nbsp;<p>&nbsp;
<p><a href="#top">Back to Top</a> | <a href="toc.html">Back to Table of Contents</a>
</body>
</html>