Meanwhile i processed some tests with OpenMP.
Note: Never used it before, so maybe i misunderstood things.
But there are some strange results, i didn't expected:
First: It seems not possible to debug an openmp program directly
(only with disabledopenmp option).
Then, there is some odd behaviour:
Take example (using Win7 64-bit). So,
- It shall not necessary to use omp.h, but it crashes without it.
- Otherwise without using omp.h, it crashes not, if i use /Ze.
M$ extensions shall also not necessary using the code.
#define _USE_MATH_DEFINES
#include <stdio.h>
//#include <omp.h>
#include <math.h>
int main(int argc, char *argv[])
{
const int size = 256;
double sinTable[size];
#pragma omp parallel for
for(int n=0; n<size; ++n)
sinTable[n] = sin(2 * M_PI * n / size);
return 0;
}
Whats Your experience?
Thx
Lingo