cc_staff
782
edits
(Getting started with NVVP) |
(More precision on the test environment) |
||
Line 26: | Line 26: | ||
== Build the Sample Code == <!--T:10--> | == Build the Sample Code == <!--T:10--> | ||
For this example we will use code from this [https://github.com/calculquebec/cq-formation-openacc Git repository]. | For this example we will use code from this [https://github.com/calculquebec/cq-formation-openacc Git repository]. | ||
Download the package and go to the | Download the package and go to the <code>cpp</code> or the <code>f90</code> directory. | ||
The object of this exercise is to compile and link the code, obtain an executable, and then profile it. | The object of this exercise is to compile and link the code, obtain an executable, and then profile it. | ||
</translate> | </translate> | ||
Line 69: | Line 69: | ||
<translate> | <translate> | ||
<!--T:11--> | <!--T:11--> | ||
After the executable is created, we are going to profile that code. | After the executable is created, we are going to profile that code. '''Important:''' this executable uses about 3GB of memory and one CPU core at near 100%. Therefore, '''a proper test environment should have at least 4GB of available memory and at least two (2) CPU cores'''. | ||
</translate> | </translate> | ||
Line 92: | Line 92: | ||
It's a cross-platform analyzing tool for code written with OpenACC and CUDA C/C++ instructions. | It's a cross-platform analyzing tool for code written with OpenACC and CUDA C/C++ instructions. | ||
When [[Visualization/en#Remote_windows_with_X11-forwarding|X11 is forwarded to an X-Server]], or when using a [[VNC|Linux desktop environment]] (also via [[JupyterHub#Desktop|JupyterHub]]), | When [[Visualization/en#Remote_windows_with_X11-forwarding|X11 is forwarded to an X-Server]], or when using a [[VNC|Linux desktop environment]] (also via [[JupyterHub#Desktop|JupyterHub]] with two (2) CPU cores, 5000M of memory and one (1) GPU), | ||
it is possible to launch the NVVP from a terminal: | it is possible to launch the NVVP from a terminal: | ||
</translate> | </translate> | ||
Line 105: | Line 105: | ||
[[File:Nvvp-pic1.png|thumbnail|300px|Browse for the executable you want to profile|right]] | [[File:Nvvp-pic1.png|thumbnail|300px|Browse for the executable you want to profile|right]] | ||
# After the NVVP startup window, you get prompted for a ''Workspace'' directory, which will be used for temporary files. Replace <code>home</code> with <code>scratch</code> in the suggested path. Then click ''OK'' | # After the NVVP startup window, you get prompted for a ''Workspace'' directory, which will be used for temporary files. Replace <code>home</code> with <code>scratch</code> in the suggested path. Then click ''OK''. | ||
# Select ''File > New Session'', or click on the corresponding button in the toolbar | # Select ''File > New Session'', or click on the corresponding button in the toolbar. | ||
# Click on the ''Browse'' button at the right of the ''File | # Click on the ''Browse'' button at the right of the ''File'' path editor. | ||
## Browse to the <code>cq-formation-openacc/cpp</code> directory | ## Browse to the <code>cq-formation-openacc/cpp</code> directory. | ||
## Select the executable <code>cg.x</code> that was compiled in a previous section. Then click ''OK'' | ## Select the executable <code>cg.x</code> that was compiled in a previous section. Then click ''OK''. | ||
# Below the ''Arguments'' editor, select the profiling option ''Profile current process only''. | |||
# Click ''Next >'' to review additional profiling options. | |||
# Click ''Finish'' to start profiling the executable. | # Click ''Finish'' to start profiling the executable. | ||