This is an example application for the publication:
Asai, Ryo, "Introduction to Intel DAAL: Polynomial Regression
with Batch Mode Computation", (2016) Colfax Research

The publication is available for download at:
http://colfaxresearch.com/intro-to-daal-2/

-----------------------------
Requirements:
-----------------------------

- Intel C++ Compiler ver 16.0 or higher
- Intel Data Analytics Acceleration Library (DAAL)
- Intel MPI Library or equivalent 
- Intel Math Kernel Library (MKL)
- Linux Operating System

-----------------------------
Compilation:
-----------------------------

To compile, type the following into the terminal session:
~>  mpiicpc -daal -mkl -qopenmp distributed_simulated_covariance.cc -o compute_cov

This will produce an executable "compute_cov".

-----------------------------
Usage:
-----------------------------
The executable "compute_cov" (see above) requires 2 inputs:

~> ./poly_reg {nVariables} {nVectors}

The inputs are:
-- nVariables  -  Number of variables in each vector

-- nVectors    -  Number of vectors to generate

To run the application on the host, type:
~> mpirun -host localhost -np 4 ./compute_cov 256 100000

This will create {nVector} random vectors and output the top 
left 10x10 portion of the covariance matrix created from 
these vectors. You should see roughly 3.0 along the diagonal and 
near 0.0 values everywhere else.

To run this on multiple hosts (say host1 and host2),
first copy the executable files to 
~> mpirun -host host1 -np 1 /path/on/host1/compute_cov 256 100000 : \ 
~  -host host2 -np 1 /path/on/host2/compute_cov

For more information on MPI, refer to 
http://www.mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf