- Code: Select all
using namespace std;
void main ()
cout << "Hello parallel world from threads:" << endl;
#pragma omp parallel num_threads(2)
cout << omp_get_num_threads() << endl;
cout << "Back to the sequential world." << endl;
Code result says that there is only one thread. I've checked maximum number of threads and it is 2. Any suggestion?