Csound Csound-dev Csound-tekno Search About

[Cs-dev] XCode and OpenMP

Date2010-08-20 13:37
FromMichael Gogins
Subject[Cs-dev] XCode and OpenMP
Question for those of you using XCode to build Csound on OS X:

Can you find OpenMP (-fopenmp option) working in your XCode
environment? It's not enough to find the option, you have to build a
test program successfully. That program may be found below. According
to a cursory google it is supported from gcc 4.2 onwards. I understand
there is an option in XCode for selecting gcc version. Can you report
the highest version supported in your system?

Thanks,
Mike

#include 
 #include 

 int main (int argc, char *argv[]) {
   int th_id, nthreads;
   #pragma omp parallel private(th_id)
   {
     th_id = omp_get_thread_num();
     printf("Hello World from thread %d\n", th_id);
     #pragma omp barrier
     if ( th_id == 0 ) {
       nthreads = omp_get_num_threads();
       printf("There are %d threads\n",nthreads);
     }
   }
   return 0;
 }
-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net