|
54 | 54 | "metadata": {}, |
55 | 55 | "outputs": [], |
56 | 56 | "source": [ |
57 | | - "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} starting_point.cpp && mpirun -np 2 ./heat 256 256 16000\n", |
58 | | - "!echo \"[clang++]:\" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} starting_point.cpp && mpirun -np 2 ./heat 256 256 16000\n", |
59 | | - "!echo \"[nvc++]: \" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} starting_point.cpp && mpirun -np 2 ./heat 256 256 16000\n", |
| 57 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 256 256 16000\"\n", |
| 58 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} starting_point.cpp && {mpirun}\n", |
| 59 | + "!echo \"[clang++]:\" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} starting_point.cpp && {mpirun}\n", |
| 60 | + "!echo \"[nvc++]: \" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} starting_point.cpp && {mpirun}\n", |
60 | 61 | "visualize()" |
61 | 62 | ] |
62 | 63 | }, |
|
163 | 164 | "metadata": {}, |
164 | 165 | "outputs": [], |
165 | 166 | "source": [ |
166 | | - "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} exercise1.cpp -ltbb && mpirun -np 2 ./heat 256 256 16000\n", |
167 | | - "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} exercise1.cpp -ltbb && mpirun -np 2 ./heat 256 256 16000\n", |
168 | | - "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise1.cpp -stdpar=multicore && mpirun -np 2 ./heat 256 256 16000\n", |
169 | | - "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise1.cpp -stdpar=gpu && mpirun -np 2 ./heat 256 256 16000\n", |
170 | | - "visualize()" |
| 167 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 1024 16384 500\"\n", |
| 168 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} exercise1.cpp -ltbb && {mpirun}\n", |
| 169 | + "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} exercise1.cpp -ltbb && {mpirun}\n", |
| 170 | + "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise1.cpp -stdpar=multicore && {mpirun}\n", |
| 171 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise1.cpp -stdpar=gpu && {mpirun}" |
171 | 172 | ] |
172 | 173 | }, |
173 | 174 | { |
|
188 | 189 | "metadata": {}, |
189 | 190 | "outputs": [], |
190 | 191 | "source": [ |
191 | | - "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} solutions/exercise1.cpp -ltbb && mpirun -np 2 ./heat 256 256 16000\n", |
192 | | - "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} solutions/exercise1.cpp -ltbb && mpirun -np 2 ./heat 256 256 16000\n", |
193 | | - "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise1.cpp -stdpar=multicore && mpirun -np 2 ./heat 256 256 16000\n", |
194 | | - "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise1.cpp -stdpar=gpu && mpirun -np 2 ./heat 256 256 16000\n", |
195 | | - "visualize()" |
| 192 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 1024 16384 500\"\n", |
| 193 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} solutions/exercise1.cpp -ltbb && {mpirun}\n", |
| 194 | + "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} solutions/exercise1.cpp -ltbb && {mpirun}\n", |
| 195 | + "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise1.cpp -stdpar=multicore && {mpirun}\n", |
| 196 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise1.cpp -stdpar=gpu && {mpirun}" |
196 | 197 | ] |
197 | 198 | }, |
198 | 199 | { |
|
208 | 209 | "metadata": {}, |
209 | 210 | "outputs": [], |
210 | 211 | "source": [ |
211 | | - "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise1.cpp -stdpar=gpu && mpirun -np 2 ./heat 1024 65536 2000" |
| 212 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 2048 32768 2000\"\n", |
| 213 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise1.cpp -stdpar=gpu && {mpirun}" |
212 | 214 | ] |
213 | 215 | }, |
214 | 216 | { |
|
329 | 331 | "metadata": {}, |
330 | 332 | "outputs": [], |
331 | 333 | "source": [ |
332 | | - "!rm -f output heat\n", |
333 | | - "!OMPI_CXX=g++ mpicxx -std=c++20 -Ofast -march=native -o heat exercise2.cpp -ltbb\n", |
334 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
335 | | - "visualize()" |
336 | | - ] |
337 | | - }, |
338 | | - { |
339 | | - "cell_type": "code", |
340 | | - "execution_count": null, |
341 | | - "metadata": {}, |
342 | | - "outputs": [], |
343 | | - "source": [ |
344 | | - "!rm -f output heat\n", |
345 | | - "!OMPI_CXX=clang++ mpicxx -std=c++20 -Ofast -march=native -o heat exercise2.cpp -ltbb\n", |
346 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
347 | | - "visualize()" |
348 | | - ] |
349 | | - }, |
350 | | - { |
351 | | - "cell_type": "code", |
352 | | - "execution_count": null, |
353 | | - "metadata": {}, |
354 | | - "outputs": [], |
355 | | - "source": [ |
356 | | - "!rm -f output heat\n", |
357 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -stdpar=gpu -o heat exercise2.cpp -ltbb\n", |
358 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
359 | | - "visualize()" |
| 334 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 1024 16384 500\"\n", |
| 335 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} exercise2.cpp -ltbb && {mpirun}\n", |
| 336 | + "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} exercise2.cpp -ltbb && {mpirun}\n", |
| 337 | + "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise2.cpp -stdpar=multicore && {mpirun}\n", |
| 338 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise2.cpp -stdpar=gpu && {mpirun}" |
360 | 339 | ] |
361 | 340 | }, |
362 | 341 | { |
|
376 | 355 | "metadata": {}, |
377 | 356 | "outputs": [], |
378 | 357 | "source": [ |
379 | | - "!rm -f output heat\n", |
380 | | - "!OMPI_CXX=g++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -o heat solutions/exercise2.cpp -ltbb\n", |
381 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
382 | | - "visualize()" |
383 | | - ] |
384 | | - }, |
385 | | - { |
386 | | - "cell_type": "code", |
387 | | - "execution_count": null, |
388 | | - "metadata": {}, |
389 | | - "outputs": [], |
390 | | - "source": [ |
391 | | - "!rm -f output heat\n", |
392 | | - "!OMPI_CXX=clang++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -o heat solutions/exercise2.cpp -ltbb\n", |
393 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
394 | | - "visualize()" |
395 | | - ] |
396 | | - }, |
397 | | - { |
398 | | - "cell_type": "code", |
399 | | - "execution_count": null, |
400 | | - "metadata": {}, |
401 | | - "outputs": [], |
402 | | - "source": [ |
403 | | - "!rm -f output heat\n", |
404 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -stdpar=multicore -o heat solutions/exercise2.cpp\n", |
405 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
406 | | - "visualize()" |
407 | | - ] |
408 | | - }, |
409 | | - { |
410 | | - "cell_type": "code", |
411 | | - "execution_count": null, |
412 | | - "metadata": {}, |
413 | | - "outputs": [], |
414 | | - "source": [ |
415 | | - "!rm -f output heat\n", |
416 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -stdpar=gpu -o heat solutions/exercise2.cpp\n", |
417 | | - "!UCX_RNDV_FRAG_MEM_TYPE=cuda mpirun -np 2 ./heat 256 256 16000\n", |
418 | | - "visualize()" |
| 358 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 1024 16384 500\"\n", |
| 359 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} solutions/exercise2.cpp -ltbb && {mpirun}\n", |
| 360 | + "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} solutions/exercise2.cpp -ltbb && {mpirun}\n", |
| 361 | + "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise2.cpp -stdpar=multicore && {mpirun}\n", |
| 362 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise2.cpp -stdpar=gpu && {mpirun}" |
419 | 363 | ] |
420 | 364 | }, |
421 | 365 | { |
|
492 | 436 | "metadata": {}, |
493 | 437 | "outputs": [], |
494 | 438 | "source": [ |
495 | | - "!rm -f output heat\n", |
496 | | - "!OMPI_CXX=g++ mpicxx -std=c++20 -Ofast -march=native -o heat exercise3.cpp -ltbb\n", |
497 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
498 | | - "visualize()" |
499 | | - ] |
500 | | - }, |
501 | | - { |
502 | | - "cell_type": "code", |
503 | | - "execution_count": null, |
504 | | - "metadata": {}, |
505 | | - "outputs": [], |
506 | | - "source": [ |
507 | | - "!rm -f output heat\n", |
508 | | - "!OMPI_CXX=clang++ mpicxx -std=c++20 -Ofast -march=native -o heat exercise3.cpp -ltbb\n", |
509 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
510 | | - "visualize()" |
511 | | - ] |
512 | | - }, |
513 | | - { |
514 | | - "cell_type": "code", |
515 | | - "execution_count": null, |
516 | | - "metadata": {}, |
517 | | - "outputs": [], |
518 | | - "source": [ |
519 | | - "!rm -f output heat\n", |
520 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -stdpar=multicore -o heat exercise3.cpp\n", |
521 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
522 | | - "visualize()" |
523 | | - ] |
524 | | - }, |
525 | | - { |
526 | | - "cell_type": "code", |
527 | | - "execution_count": null, |
528 | | - "metadata": {}, |
529 | | - "outputs": [], |
530 | | - "source": [ |
531 | | - "!rm -f output heat\n", |
532 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -stdpar=gpu -o heat exercise3.cpp\n", |
533 | | - "!UCX_RNDV_FRAG_MEM_TYPE=cuda mpirun -np 2 ./heat 256 256 16000\n", |
534 | | - "visualize()" |
| 439 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 1024 16384 500\"\n", |
| 440 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} exercise3.cpp -ltbb && {mpirun}\n", |
| 441 | + "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} exercise3.cpp -ltbb && {mpirun}\n", |
| 442 | + "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise3.cpp -stdpar=multicore && {mpirun}\n", |
| 443 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} exercise3.cpp -stdpar=gpu && {mpirun}" |
535 | 444 | ] |
536 | 445 | }, |
537 | 446 | { |
|
556 | 465 | "metadata": {}, |
557 | 466 | "outputs": [], |
558 | 467 | "source": [ |
559 | | - "!rm -f output heat\n", |
560 | | - "!OMPI_CXX=g++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -o heat solutions/exercise3.cpp -ltbb\n", |
561 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
562 | | - "visualize()" |
563 | | - ] |
564 | | - }, |
565 | | - { |
566 | | - "cell_type": "code", |
567 | | - "execution_count": null, |
568 | | - "metadata": {}, |
569 | | - "outputs": [], |
570 | | - "source": [ |
571 | | - "!rm -f output heat\n", |
572 | | - "!OMPI_CXX=clang++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -o heat solutions/exercise3.cpp -ltbb\n", |
573 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
574 | | - "visualize()" |
575 | | - ] |
576 | | - }, |
577 | | - { |
578 | | - "cell_type": "code", |
579 | | - "execution_count": null, |
580 | | - "metadata": {}, |
581 | | - "outputs": [], |
582 | | - "source": [ |
583 | | - "!rm -f output heat\n", |
584 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -stdpar=multicore -o heat solutions/exercise3.cpp\n", |
585 | | - "!mpirun -np 2 ./heat 256 256 16000\n", |
586 | | - "visualize()" |
587 | | - ] |
588 | | - }, |
589 | | - { |
590 | | - "cell_type": "code", |
591 | | - "execution_count": null, |
592 | | - "metadata": {}, |
593 | | - "outputs": [], |
594 | | - "source": [ |
595 | | - "!rm -f output heat\n", |
596 | | - "!OMPI_CXX=nvc++ mpicxx -std=c++20 -Ofast -march=native -DNDEBUG -stdpar=gpu -o heat solutions/exercise3.cpp\n", |
597 | | - "!UCX_RNDV_FRAG_MEM_TYPE=cuda mpirun -np 2 ./heat 256 256 16000\n", |
598 | | - "visualize()" |
| 468 | + "mpirun=\"mpirun -np 4 ./bind_one_gpu_per_rank.bash ./heat 1024 16384 500\"\n", |
| 469 | + "!echo \"[g++]: \" && rm -f output heat && OMPI_CXX=g++ {mpicxx} solutions/exercise3.cpp -ltbb && {mpirun}\n", |
| 470 | + "!echo \"[clang++]: \" && rm -f output heat && OMPI_CXX=clang++ {mpicxx} solutions/exercise3.cpp -ltbb && {mpirun}\n", |
| 471 | + "!echo \"[nvc++ CPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise3.cpp -stdpar=multicore && {mpirun}\n", |
| 472 | + "!echo \"[nvc++ GPU]:\" && rm -f output heat && OMPI_CXX=nvc++ {mpicxx} solutions/exercise3.cpp -stdpar=gpu && {mpirun}" |
599 | 473 | ] |
600 | 474 | } |
601 | 475 | ], |
|
0 commit comments