|
@@ -150,14 +150,20 @@
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
"#Compile the code for multicore\n",
|
|
|
- "!cd ../../source_code/openacc && nvc++ -acc -O3 -w -ta=multicore -Minfo=accel -o rdf rdf.cpp -I/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/include"
|
|
|
+ "!cd ../../source_code/openacc && nvc++ -acc -ta=multicore -Minfo=accel -o rdf rdf.cpp -I/opt/nvidia/hpc_sdk/Linux_x86_64/20.11/cuda/11.0/include"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "markdown",
|
|
|
"metadata": {},
|
|
|
"source": [
|
|
|
- "Let's run the executable and validate the output first. "
|
|
|
+ "Let's inspect part of the compiler feedback and see what it's telling us (your compiler feedback will be similar to the below screenshot).\n",
|
|
|
+ "\n",
|
|
|
+ "<img src=\"../images/openacc_multicore_feedback.png\">\n",
|
|
|
+ "\n",
|
|
|
+ "You can see from *Line 177*, it is generating a multicore code `177, Generating Multicore code`. It is very important to inspect the feedback to make sure the compiler is doing what you have asked of it. \n",
|
|
|
+ "\n",
|
|
|
+ "Let's run the executable and validate the output first. Then, profile the code."
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -229,7 +235,7 @@
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
"#compile for Tesla GPU\n",
|
|
|
- "!cd ../../source_code/openacc && nvc++ -acc -O3 -w -ldl -ta=tesla:managed,lineinfo -Minfo=accel -o rdf rdf.cpp -I/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/include "
|
|
|
+ "!cd ../../source_code/openacc && nvc++ -acc -ta=tesla:managed,lineinfo -Minfo=accel -o rdf rdf.cpp"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -357,7 +363,7 @@
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
"#compile for Tesla GPU\n",
|
|
|
- "!cd ../../source_code/openacc && nvc++ -acc -O3 -w -ldl -ta=tesla:managed,lineinfo -Minfo=accel -o rdf rdf.cpp -I/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/include "
|
|
|
+ "!cd ../../source_code/openacc && nvc++ -acc -ta=tesla:managed,lineinfo -Minfo=accel -o rdf rdf.cpp"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -419,7 +425,7 @@
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
"#compile for Tesla GPU\n",
|
|
|
- "!cd ../../source_code/openacc && nvc++ -acc -O3 -w -ldl -ta=tesla:managed,lineinfo -Minfo=accel -o rdf rdf.cpp -I/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/include "
|
|
|
+ "!cd ../../source_code/openacc && nvc++ -acc -ta=tesla:managed,lineinfo -Minfo=accel -o rdf rdf.cpp"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -544,7 +550,7 @@
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
"#compile for Tesla GPU without managed memory\n",
|
|
|
- "!cd ../../source_code/openacc && make clean && make"
|
|
|
+ "!cd ../../source_code/openacc && nvc++ -acc -ta=tesla,lineinfo -Minfo=accel -o rdf rdf.cpp"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -632,15 +638,21 @@
|
|
|
"metadata": {},
|
|
|
"source": [
|
|
|
"**After** executing the above zip command, you should be able to download the zip file [here](../nways_files.zip). Let us now go back to parallelizing our code using other approaches.\n",
|
|
|
- "\n",
|
|
|
+ "<!--\n",
|
|
|
"**IMPORTANT**: If you would like to continue and optimize this application further with OpenACC, please click on the **NEXT** button, otherwise click on **HOME** to go back to the main notebook for *N ways of GPU programming for MD* code.\n",
|
|
|
+ "-->\n",
|
|
|
+ "\n",
|
|
|
+ "**IMPORTANT**: Please click on the **NEXT** button to go back to the main notebook for *N ways of GPU programming for MD* code.\n",
|
|
|
"\n",
|
|
|
"-----\n",
|
|
|
"\n",
|
|
|
- "# <p style=\"text-align:center;border:3px; border-style:solid; border-color:#FF0000 ; padding: 1em\"> <a href=../../../nways_MD_start.ipynb>HOME</a> <span style=\"float:center\"> <a href=nways_openacc_opt.ipynb>NEXT</a></span> </p>\n",
|
|
|
+ "# <p style=\"text-align:center;border:3px; border-style:solid; border-color:#FF0000 ; padding: 1em\"> <a href=../../../nways_MD_start.ipynb>HOME</a></p>\n",
|
|
|
"\n",
|
|
|
"-----\n",
|
|
|
"\n",
|
|
|
+ "<!-- <p style=\"text-align:center;border:3px; border-style:solid; border-color:#FF0000 ; padding: 1em\"> <a href=../../../nways_MD_start.ipynb>HOME</a> <span style=\"float:center\"> <a href=nways_openacc_opt.ipynb>NEXT</a></span> </p>\n",
|
|
|
+ "-->\n",
|
|
|
+ "\n",
|
|
|
"\n",
|
|
|
"# Links and Resources\n",
|
|
|
"[OpenACC API guide](https://www.openacc.org/sites/default/files/inline-files/OpenACC%20API%202.6%20Reference%20Guide.pdf)\n",
|