MPI Workflow Example

In this example, analysis is performed for an application that is run in four processes.

Collect survey data for all ranks into the shared ./advi project directory.

$ mpirun -n 4 advixe-cl -project-dir ./advi -collect survey -- <PATH>/mpi-sample/1_mpi_sample_serial

If you need to copy the data to the development system, do so now.

Import the survey result from rank 3 to the development system and finalize it.

$ advixe-cl -project-dir ./new-advi –import-dir ./advi -mpi-rank 3 –search-dir src:=<PATH>/mpi_sample

Open the survey in the Intel® Advisor standalone GUI for viewing.

$ advixe-gui ./new-advi

Run a Suitability analysis for all ranks.

$ mpirun -n 4 advixe-cl -project-dir ./advi -collect suitability -- <PATH>/mpi_sample/2_mpi_sample_annotated

Run a Dependencies analysis for all ranks.

$ mpirun -n 4 advixe-cl -project-dir ./advi -collect dependencies -- <PATH>/mpi_sample/2_mpi_sample_annotated_debug

If you need to copy the data to the development system, do so now.

Import and finalize your data.

$ advixe-cl -project-dir ./new-advi –import-dir ./advi -mpi-rank 3 -search-dir src:=<PATH>/mpi_sample

Open the GUI to view your result.

$ advixe-gui ./new-advi

Note

When using a shared partition on Windows*, either the network paths must be used to specify the project and executable location, or the MPI options mapall or map can be used to specify these locations on the network drive.

For example:

$ mpiexec -gwdir \\<host1>\mpi -hosts 2 <host1> 1 <host2> 1 advixe-cl -collect survey -project-dir \\<host1>\mpi\advi -- \\<host1>\mpi\mpi_sample.exe

$ advixe-cl -project-dir \\<host1>\mpi\new-advi -import-dir \\<host1>\mpi\advi -search-dir src:=\\<host1>\mpi -mpi-rank=1

$ advixe-cl -project-dir \\<host1>\mpi\new-advi -report survey

Or:

$ mpiexec -mapall -gwdir z:\ -hosts 2 <host1> 1 <host2> 1 advixe-cl -collect survey -project-dir z:\advi -- z:\mpi_sample.exe

Or:

$ mpiexec -map z:\\<host1>\mpi -gwdir z:\ -hosts 2 <host1> 1 <host2> 1 advixe-cl -collect survey -project-dir z:\advi -- z:\mpi_sample.exe

See Also

For more complete information about compiler optimizations, see our Optimization Notice.