Re: [algogeeks] openmp

2012-02-05 Thread Arun Vishwanathan
hey , I just figured out the problem. the -fopenmp was to be included in a couple of places in my makefile due to which the openmp library was not getting recognised though code was compiling. Anyways if it is just one line of code and u dont need the braces after omp parallel( it is just like a o

Re: [algogeeks] openmp

2012-02-05 Thread Rahul
See a hello world tutorial as far as I can see is that you haven't put {} in the section of code you want to run parallel how many processors do you have try running without asking number of threads .you must see as many outputs as number of processors On 2/6/12, Arun Vishwanathan wrote: > I use

Re: [algogeeks] openmp

2012-02-05 Thread Arun Vishwanathan
I use g++ On Sun, Feb 5, 2012 at 12:39 PM, Rahul wrote: > which compiler > or which environment > I use Microsoft Visual Studio > with Microsoft HPC Pack > A syntax error is visible > use { > > > On 2/6/12, Arun Vishwanathan wrote: > > hi , i am trying to run this small code with open mp but I

Re: [algogeeks] openmp

2012-02-05 Thread Rahul
which compiler or which environment I use Microsoft Visual Studio with Microsoft HPC Pack A syntax error is visible use { On 2/6/12, Arun Vishwanathan wrote: > hi , i am trying to run this small code with open mp but I dont see any > threads created . The code compiles with -fopenmp but does not

[algogeeks] openmp

2012-02-05 Thread Arun Vishwanathan
hi , i am trying to run this small code with open mp but I dont see any threads created . The code compiles with -fopenmp but does not create threads to run parallel.For example, main() { omp_set_num_threads(4); #pragma omp parallel printf(" hello world from %d\n" ,omp_get_thread_num()); retur