Sample Program Characteristics

The following table summarizes each sample. The Survey and Suitability tools running with the default data sets on a dual-core 2.0 GHz system with 2GB RAM take 10-60 seconds for different samples. For the Correctness tool, use a reduced data set (see below) to minimize sample target run times.

Sample Name

Characteristics

Where It is Described

mpi_sample (C++, Linux OS only)

Contains MPI code and assumes the mpiicpc compiler is in the PATH

Demonstrates: Adding parallelism to an MPI application

Data conflicts: A single, named global variable

Correctness tool: Completes in less than 1 minute on a multi-core desktop using an input parameter of 1000000.

README in mpi_sample.tgz

Also see the help topic About Analyzing MPI Workloads

mmult_Advisor (C/C++ version)

Performs matrix multiplication within the matrix_multiply function.

Demonstrates: Simple loop parallelism doing matrix multiplication. One parallel site.

Data conflicts: None.

Correctness tool: The variable num controls both dimensions of each allocated array. The default value of num is 1024, but specify a value of 128 using a command line argument when Correctness runs the sample's target.

mmult_Advisor.pdf in in mmult_Advisor.tgz

mmult (Fortran version)

Performs matrix multiplication within the matrix_multiply subroutine.

Demonstrates: Simple loop parallelism doing matrix multiplication. One parallel site.

Data conflicts: None.

Correctness tool: The variable size controls the dimensions of each allocatable array. The default value of size is 1024, but you should specify a reduced value of 128 using a command line argument when Correctness runs the sample's target.

mmult_Fortran.pdf in mmult_Fortran.tgz

nqueens_Advisor (C/C++ version)

Solves placing N non-conflicting queens on a chessboard.

Demonstrates: Simple loop parallelism. One parallel site.

Data conflicts: A single, named global variable and an array allocated before the task boundary.

Correctness tool: Use the reduced data set of 8 queens for a Debug build.

Intel Advisor Tutorial for C/C++

nqueens_Advisor.pdf in nqueens_Advisor.tgz

nqueens (Fortran version)

Solves placing N non-conflicting queens on a chessboard.

Demonstrates: Simple loop parallelism. One parallel site.

Data conflicts: A single, named global variable and an array allocated before the task boundary.

Correctness tool: Use a reduced data set of 8 queens as a command-line argument.

Intel Advisor Tutorial for Fortran

nqueens.pdf in nqueens.tgz

nqueens (C# version, Windows OS only)

Demonstrates: Simple loop parallelism. One parallel site.

nqueens.pdf

primes (C/C++, Windows* OS only)

Demonstrates: Simple loop parallelism. One parallel site.

primes.pdf

stats (C++)

Performs basic statistical calculations on arrays of data. It uses a library of statistical functions, with debug info but no source code.

Demonstrates: task parallelism. Also, certain loops call library code whose source is not available.

Data conflicts: none

Correctness tool: Use the default data set. To adjust the data set, use ifdef _DEBUG :

#ifdef _DEBUG
  #define SIZE 500
#else
  #define SIZE 100000
#endif

stats.pdf in stats.tgz

tachyon_Advisor (C++)

Performs 2-dimensional ray-tracing/rendering. After it computes and displays the image, it waits about five seconds before it closes.

Demonstrates: data parallelism. The goal is to parallelize the ray tracing of the picture's horizontal lines.

Data conflicts, multiple problems:

  • Incidental sharing conflicts of the m_storage structure. This is fixed by using copies local to each task.
  • A data race on global variable g_updates. This is fixed with synchronization by inserting a lock.

Correctness tool: Completes in 4-7 minutes on a dual-core system using the default data set. To reduce execution time, use a reduced (different) data set, by specify one of the .dat files in the tachyon\project\dat directory as a command argument. . The default data set for a Release build is balls.dat. To use the reduced data set for a Debug build for the Correctness tool, specify 3spheres.dat.

tachyon_Advisor.pdf in  tachyon_Advisor.tgz

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