First i would like to know will OMP code only work on a Dual Core machine??
Is there a simulator which can help it run on a single core machine??
I have a Intel 82915G express chipset which i belive is a dual core system with Hyperthreading but my code runs as if it is a sequential code...
- Code: Select all
// test.cpp : main project file.
using namespace System;
//using namespace st;
int main(array<System::String ^> ^args)
double a(0.0), b(0.0);
#pragma omp parallel for default(shared) schedule(static) reduction(+:a) reduction(+:b)
for (int i = 100; i >= 0; --i)
a += (double) i;
b += 1.0/i;
it prints "hello world 101 times
however if i change the condition to " if(omp_get_thread_num()==1)" Hello World is not printed...