I have a simple program, which generates (using `Boost`) some initial velocities and position, and calculates the time it takes to propagate a certain distance. Based on the transverse distances `(x, y)`, the final axial (`z`) velocity is added to a vector. Here is the simple program:

```
#include <iostream>
#include <boost/random.hpp>
#include <boost/random/normal_distribution.hpp>

using namespace std;

int main()
{

    boost::mt19937 engine(static_cast<unsigned int>(time(0)));

    boost::normal_distribution<double> nd(0.0, 1.0);
    boost::variate_generator< boost::mt19937, boost::normal_distribution<double> > normal_std_one(engine, nd);

    double coordX, coordY, coordZ, time;
    double velX, velY, velZ;

    const double factor = 0.01;
    const double distance = 15.0;

    vector<double> cont;

    int i;
    for(i=0; i<1000000000; i++)
    {
        coordX = factor*normal_std_one();
        coordY = factor*normal_std_one();
        coordZ = 0.0;

        velX = normal_std_one();
        velY = normal_std_one();
        velZ = 20.0*normal_std_one()+300;

        time = distance/velZ;

        coordX += velX*time;
        coordY += velY*time;

        if(sqrt(coordX*coordX + coordY*coordY) < 0.02)
        {
            cont.push_back(velZ);
        }
    }
    cout << cont.size() << endl;

    return 0;
}

```

I thought a nice addition would be to parallelize the `for`-loop using `OpenMP`. This I do by adding the following line just before the loop is initiated:

```
#pragma omp parallel for

```

In addition, I have added `-fopenmp` to the compiler options and `-fopenmp\* to the linker settings. My program compiles and links without errors, but when I execute the file I get the message:

```
Process terminated with status -1073741819 (0 minutes, 2 seconds)

```

It is not clear to me what I have done wrong here. I am using Windows and g++ (through Code::Blocks IDE).