gcc43 and openmp???

Alejandro Aragon alejandro.aragon at gmail.com
Sun Jun 29 10:23:53 PDT 2008


Hello everyone,

Is there a chance that the macports provided gcc43 is not compiled  
with openmp support? I've been trying to run a very simple C++ program  
with openmp to see if I can take advantage of both cores. The program  
is as follows:

#include <omp.h>
#include <iostream>

using namespace std;

int main() {

	cout<<"num processors -> "<<omp_get_num_procs<<endl;
	cout<<"num threads -> "<<omp_get_max_threads<<endl;

return 0;
}

Now, when I compile the program using

	$> g++-mp-4.3 -fopenmp openmp.cxx

and run it, I see:

$> ./a.out
num processors -> 1
num threads -> 1



More information about the macports-users mailing list