A very basic 101 OpenMP program

A very basic 101 OpenMP program

Postby Cuchulainn » Sun Mar 04, 2007 7:54 pm

// TestOmp.cpp

//

// My first test

//



#include <omp.h>



#include <iostream>

using namespace std;



int main()

{



double d = omp_get_wtime();

cout << "Time: " << d << endl;

int j; cin >> j;



#pragma omp parallel for

for (int j = 0; j < 100000;j++)

{

cout << "Hello\n";

}



d = omp_get_wtime();

cout << "Time: " << d << endl;

cin >> j;



return 0;

}
User avatar
Cuchulainn
 
Posts: 676
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Return to MPI/OpenMP

Who is online

Users browsing this forum: No registered users and 2 guests