| 411 | === Survey === |
| 412 | Survey the application to determine hotspots. Typically an optimized |
| 413 | (non-debug) version of the application is used when surveying an application. |
| 414 | |
| 415 | Run and Collect info. |
| 416 | {{{#!bash |
| 417 | $ icc -g -O3 mycode.c |
| 418 | $ advixe-cl --collect survey --project-dir ./advi ./a.out |
| 419 | }}} |
| 420 | |
| 421 | Show report |
| 422 | {{{#!bash |
| 423 | $ advixe-cl --report survey --project-dir ./advi ./a.out |
| 424 | }}} |
| 425 | |
| 426 | === Add Annotations === |
| 427 | Add annotations to the application source code, and rebuild the application. |
| 428 | Please see the Getting Started Tutorial for more information. |
| 429 | |
| 430 | For C/C++ |
| 431 | {{{#!c |
| 432 | #include "advisor-annotate.h" |
| 433 | ..... |
| 434 | ANNOTATE_SITE_BEGIN(sitename1); |
| 435 | for ( .... |
| 436 | { |
| 437 | ANNOTATE_TASK_BEGIN(taskname1); |
| 438 | ... |
| 439 | ANNOTATE_TASK_END(); |
| 440 | } |
| 441 | ANNOTATE_SITE_END(); |
| 442 | }}} |
| 443 | |
| 444 | Fortran |
| 445 | {{{#!fortran |
| 446 | use advisor_annotate |
| 447 | ..... |
| 448 | call annotate_site_begin(sitename1) |
| 449 | do ..... |
| 450 | call annotate_task_begin(taskname1) |
| 451 | .... |
| 452 | call annotate_task_end() |
| 453 | enddo |
| 454 | call annotate_site_end() |
| 455 | }}} |
| 456 | |
| 457 | === Suitability === |
| 458 | Collect suitability data. Note that annotations must be present in the source |
| 459 | code for this collection to be successful. Typically an optimized (non-debug) version |
| 460 | of the application is used when collecting suitability data. |
| 461 | {{{#!bash |
| 462 | $ icc -g -O3 mycode.c |
| 463 | $ advixe-cl --collect suitability --project-dir ./advi ./a.out |
| 464 | }}} |
| 465 | |
| 466 | {{{#!bash |
| 467 | $ advixe-cl --report suitability --project-dir ./advi ./a.out |
| 468 | }}} |
| 469 | |
| 470 | |
| 471 | === Correctness === |
| 472 | Collect correctness data. Note that annotations must be present in the source |
| 473 | code for this collection to be successful. Typically an application with debug symbols |
| 474 | is used when collecting correctness data. |
| 475 | |
| 476 | {{{#!bash |
| 477 | $ icc -g -O0 mycode.c |
| 478 | $ advixe-cl --collect correctness --project-dir ./advi ./a.out |
| 479 | }}} |
| 480 | |
| 481 | {{{#!bash |
| 482 | $ advixe-cl --report correctness --project-dir ./advi ./a.out |
| 483 | }}} |
| 484 | |
| 485 | Display a list of annotations present. |
| 486 | {{{#!bash |
| 487 | advixe-cl --report annotations --project-dir ./advi ./a.out |
| 488 | }}} |
| 489 | Update the application using the chosen parallel coding constructs. Rebuild the application and test. |