OpenACC Tutorial - Adding directives: Difference between revisions

no edit summary
(Reviewed Building with OpenACC)
No edit summary
Line 206: Line 206:


<!--T:50-->
<!--T:50-->
The NVidia compilers use the <code>-ta</code> (target accelerator) option to enable compilation for an accelerator.
The NVidia compilers use the <code>-acc</code> (target accelerator) option to enable compilation for an accelerator.
We use the sub-option <code>tesla:managed</code> to tell the compiler that we want it compiled for Tesla GPUs,
We use the sub-option <code>-gpu=managed</code> to tell the compiler that we want to use [https://developer.nvidia.com/blog/unified-memory-cuda-beginners/ managed memory].
and we want to use [https://developer.nvidia.com/blog/unified-memory-cuda-beginners/ managed memory].
This ''managed memory'' simplifies the process of transferring data to and from the device.
This ''managed memory'' simplifies the process of transferring data to and from the device.
We will remove this option in a later example.
We will remove this option in a later example.
Line 215: Line 214:


{{Command
{{Command
|nvc++ -fast -Minfo{{=}}accel -ta{{=}}tesla:managed main.cpp -o challenge
|nvc++ -fast -Minfo{{=}}accel -acc -gpu=managed main.cpp -o challenge
|result=
|result=
...
...
Bureaucrats, cc_docs_admin, cc_staff, rsnt_translations
2,837

edits