Skip to content

Commit 575fba8

Browse files
authored
Merge pull request #2542 from fongjiantan/update-oneccl-getting-started
Update oneCCL Getting Started Jupyter Notebook
2 parents fa27e44 + 39f42cd commit 575fba8

File tree

1 file changed

+22
-31
lines changed

1 file changed

+22
-31
lines changed

Libraries/oneCCL/tutorials/oneCCL_Getting_Started.ipynb

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"## Learning Objectives\n",
1010
"In this module, the developer will:\n",
1111
"* Learn different oneCCL configurations inside the Intel® oneAPI toolkit\n",
12-
"* Learn how to compile a oneCCL sample with different configurations via batch jobs on the Intel® DevCloud for oneAPI or in local environments\n",
12+
"* Learn how to compile a oneCCL sample with different configurations in local environment\n",
1313
"* Learn how to program oneCCL with a simple sample\n",
1414
"* Learn how to port a oneCCL sample from CPU-only version to CPU&GPU version by using DPC++\n",
1515
"* Learn how to collect VTune™ Amplifier data for CPU and GPU runs\n",
@@ -78,7 +78,7 @@
7878
"metadata": {},
7979
"outputs": [],
8080
"source": [
81-
"!rm -rf lab;mkdir -p lab"
81+
"!rm -rf lab; mkdir -p lab"
8282
]
8383
},
8484
{
@@ -100,7 +100,7 @@
100100
"metadata": {},
101101
"outputs": [],
102102
"source": [
103-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/cpu/cpu_allreduce_test.cpp lab/"
103+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/cpu/cpu_allreduce_test.cpp lab/"
104104
]
105105
},
106106
{
@@ -116,8 +116,8 @@
116116
"metadata": {},
117117
"outputs": [],
118118
"source": [
119-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/cpu/CMakeLists.txt lab/\n",
120-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/include/base.hpp lab/"
119+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/cpu/CMakeLists.txt lab/\n",
120+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/include/base.hpp lab/"
121121
]
122122
},
123123
{
@@ -164,10 +164,10 @@
164164
"cell_type": "markdown",
165165
"metadata": {},
166166
"source": [
167-
"Once you achieve an all-clear from your compilation, you execute your program on the Intel DevCloud or in local environments.\n",
167+
"Once you achieve an all-clear from your compilation, you execute your program in your local environment.\n",
168168
"\n",
169169
"#### Script - run.sh\n",
170-
"the script **run.sh** encapsulates the program for submission to the job queue for execution.\n",
170+
"The script **run.sh** encapsulates the program for execution.\n",
171171
"The user must switch to the g++ oneCCL configuration by inputting a custom configuration \"--ccl-configuration=cpu\" when running \"source setvars.sh\".\n"
172172
]
173173
},
@@ -190,12 +190,7 @@
190190
"cell_type": "markdown",
191191
"metadata": {},
192192
"source": [
193-
"\n",
194-
"#### Submitting **build.sh** and **run.sh** to the job queue\n",
195-
"Now we can submit the **build.sh** and **run.sh** to the job queue.\n",
196-
"\n",
197-
"##### NOTE - it is possible to execute any of the build and run commands in local environments.\n",
198-
"To enable users to run their scripts both on the DevCloud or in local environments, this and subsequent training checks for the existence of the job submission command **qsub**. If the check fails, it is assumed that build/run will be local."
193+
"#### Run build.sh and run.sh"
199194
]
200195
},
201196
{
@@ -204,7 +199,7 @@
204199
"metadata": {},
205200
"outputs": [],
206201
"source": [
207-
"!rm -rf cpu_gomp; chmod 755 q; chmod 755 build.sh; chmod 755 run.sh;if [ -x \"$(command -v qsub)\" ]; then ./q build.sh; ./q run.sh; else ./build.sh; ./run.sh; fi"
202+
"!rm -rf cpu_gomp; chmod 755 build.sh; chmod 755 run.sh; ./build.sh; ./run.sh;"
208203
]
209204
},
210205
{
@@ -258,7 +253,7 @@
258253
"metadata": {},
259254
"outputs": [],
260255
"source": [
261-
"! chmod 755 vtune_collect.sh; if [ -x \"$(command -v qsub)\" ]; then ./q vtune_collect.sh; else ./vtune_collect.sh; fi"
256+
"! chmod 755 vtune_collect.sh; ./vtune_collect.sh;"
262257
]
263258
},
264259
{
@@ -329,7 +324,7 @@
329324
"metadata": {},
330325
"outputs": [],
331326
"source": [
332-
"! chmod 755 vtune_collect.sh; if [ -x \"$(command -v qsub)\" ]; then ./q vtune_collect.sh; else ./vtune_collect.sh; fi"
327+
"! chmod 755 vtune_collect.sh; ./vtune_collect.sh;"
333328
]
334329
},
335330
{
@@ -408,9 +403,9 @@
408403
"metadata": {},
409404
"outputs": [],
410405
"source": [
411-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/sycl/CMakeLists.txt lab/\n",
412-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/include/sycl_base.hpp lab/\n",
413-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/include/base_utils.hpp lab/"
406+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/sycl/CMakeLists.txt lab/\n",
407+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/include/sycl_base.hpp lab/\n",
408+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/include/base_utils.hpp lab/"
414409
]
415410
},
416411
{
@@ -426,7 +421,7 @@
426421
"metadata": {},
427422
"outputs": [],
428423
"source": [
429-
"!cp $ONEAPI_INSTALL/ccl/latest/examples/sycl/sycl_allreduce_test.cpp lab/"
424+
"!cp $ONEAPI_INSTALL/ccl/latest/share/doc/ccl/examples/sycl/sycl_allreduce_test.cpp lab/"
430425
]
431426
},
432427
{
@@ -589,10 +584,10 @@
589584
"cell_type": "markdown",
590585
"metadata": {},
591586
"source": [
592-
"Once you achieve an all-clear from your compilation, execute your program on the DevCloud or in local environments.\n",
587+
"Once you achieve an all-clear from your compilation, execute your program in your local environment.\n",
593588
"\n",
594589
"#### Script - run.sh\n",
595-
"The script **run.sh** encapsulates the program for submission to the job queue for execution.\n"
590+
"The script **run.sh** encapsulates the program for execution.\n"
596591
]
597592
},
598593
{
@@ -614,11 +609,7 @@
614609
"cell_type": "markdown",
615610
"metadata": {},
616611
"source": [
617-
"#### Submitting **build.sh** and **run.sh** to the job queue\n",
618-
"Now we can submit the **build.sh** and **run.sh** to the job queue.\n",
619-
"\n",
620-
"##### NOTE - it is possible to execute any of the build and run commands in local environments.\n",
621-
"To enable users to run their scripts both on the Intel DevCloud or in local environments, this and subsequent training checks for the existence of the job submission command **qsub**. If the check fails it is assumed that build/run will be local."
612+
"#### Run build.sh and run.sh"
622613
]
623614
},
624615
{
@@ -627,7 +618,7 @@
627618
"metadata": {},
628619
"outputs": [],
629620
"source": [
630-
"!rm -rf dpcpp; chmod 755 q; chmod 755 build.sh; chmod 755 run.sh;if [ -x \"$(command -v qsub)\" ]; then ./q build.sh; ./q run.sh; else ./build.sh; ./run.sh; fi"
621+
"!rm -rf dpcpp; chmod 755 build.sh; chmod 755 run.sh; ./build.sh; ./run.sh;"
631622
]
632623
},
633624
{
@@ -681,7 +672,7 @@
681672
"metadata": {},
682673
"outputs": [],
683674
"source": [
684-
"! chmod 755 vtune_collect.sh; if [ -x \"$(command -v qsub)\" ]; then ./q vtune_collect.sh; else ./vtune_collect.sh; fi"
675+
"! chmod 755 vtune_collect.sh; ./vtune_collect.sh;"
685676
]
686677
},
687678
{
@@ -746,7 +737,7 @@
746737
"metadata": {},
747738
"outputs": [],
748739
"source": [
749-
"! chmod 755 vtune_collect.sh; if [ -x \"$(command -v qsub)\" ]; then ./q vtune_collect.sh; else ./vtune_collect.sh; fi"
740+
"! chmod 755 vtune_collect.sh; ./vtune_collect.sh;"
750741
]
751742
},
752743
{
@@ -803,7 +794,7 @@
803794
"# Summary\n",
804795
"In this lab the developer will have learned the following:\n",
805796
"* Know different oneCCL configurations inside oneAPI toolkit\n",
806-
"* Know how to compile a oneCCL sample with different configurations via batch jobs on the Intel oneAPI DevCloud or in local environments\n",
797+
"* Know how to compile a oneCCL sample with different configurations in local environment\n",
807798
"* Know how to program oneCCL with a simple sample\n",
808799
"* Know how to port a oneCCL sample from CPU-only version to CPU&GPU version by using DPC++\n",
809800
"* Know how to collect VTune Amplifier data for CPU and GPU runs"

0 commit comments

Comments
 (0)