Changes

Jump to: navigation, search

GPU621/Pragmatic

302 bytes added, 15:03, 21 November 2016
Added images to "Project Configuration" section
To select startup projects, right click on our solution (Solution 'GPU621 Walkthrough' (2 projects)) and select ''Properties'' (Shortcut Alt + Enter when solution is selected). In ''Solution 'GPU621 Walkthrough' Property Pages'' dialog, select ''Multiple startup projects'' radio button and choose ''Start'' action for both projects (Project "Part ONE" and project "Part TWO") under ''Common Properties'' section and ''Startup Project'' sub-section. Click ''Apply'' then ''OK'' to continue.
 
[[File:010.png|600px|thumb|center|alt| Configuration: Startup Projects]]
At this point, selecting ''DEBUG > Start Debugging'' (Shortcut F5) or ''Start Without Debugging'' (Shortcut Crtl + F5) will start both processes (Project "Part ONE" and project "Part TWO"), and this is exactly what we want.
To switch our solution to ''Release'' mode configuration, right click on our solution (Solution 'GPU621 Walkthrough' (2 projects)) and select ''Configuration Manager...''. In ''Configuration Manager'' dialog, select ''Release'' from ''Active solution configuration'' dropdown and click ''Close'' to continue.
 
[[File:011.png|600px|thumb|center|alt| Configuration: Active Solution Configuration]]
Now it is time to enable OpenMP support and disable optimization for both projects. Right click on project "Part ONE" in ''Solution Explorer'' and select ''Properties'' (Shortcut Alt + Enter when project "Part ONE" is selected). In ''Part ONE Property Pages'' dialog, expand ''Configuration Properties'' and select ''Language [Intel C++]'' sub-section under ''C/C++'' section (In the leftmost window), then enable OpenMP support by selecting ''Generate parallel Code (/Qopenmp)'' from ''OpenMP Support'' dropdown. Next, select Optimization sub-section under ''C/C++'' section, and disable optimization by selecting ''Disabled (/Od)'' from ''Optimization'' dropdown. Finally, enable OpenMP support and disable optimization for project "Part TWO" as we just did for project "Part ONE".
 
[[File:012.png|600px|thumb|center|alt| Configuration: OpenMP Support]]
 
[[File:013.png|600px|thumb|center|alt| Configuration: Optimization]]
'''NOTE:''' Since we will be referring to the specific lines of code by its line numbers, it is important you enable line numbers in your Visual Studio (If it's not enabled already). To enable line numbers, select ''TOOLS > Options...'', then in ''Options'' dialog expand ''Text Editor'' section and select ''All Languages'' sub-section in the leftmost window. On the right side you will see ''Line Numbers'' as one of the checkboxes. Ensure that it is checked and click ''OK''.
 
====Walkthrough====
54
edits

Navigation menu