I decided to ask this question after quite a surfing and reading through google and stackoverflow and doing some experiments in Fortran on my quad core machine with Ubuntu 12.04 and finally finding myself back to square one. So this is how the whole story goes.
Having acquired some basic knowledge about parallel computing, I decided to go for open mp. I could find a tutorial for beginner however could not proceed beyond lesson number one as my computer never created more than one thread even after using commands given in the first chapter. I then searched on stackoverflow.com and found a post which gives a solution of calling omp_set_dynamic(0). However, after typing this on my terminal, gives a following error:
bash: syntax error near unexpected token `0'
so I had to leave this too!
After this, I moved to this site and thought that this was it! But after going till first exercise, I found no way to proceed as I could not even run the model Fortran program given there as it gave the following error.
/tmp/ccaqbCe0.o: In function `MAIN__':
first_open_mp.f95:(.text+0xa): undefined reference to `omp_get_thread_num_'
first_open_mp.f95:(.text+0x9c): undefined reference to `omp_get_num_threads_'
collect2: ld returned 1 exit status
Now I find myself completely helpless about all this. Is there any way, by which I can logically learn open mp at least and make use of all cores in my machine? I am pretty desperate about learning it and any help is highly appreciated.
Thanks in advance.