I am using openMP for my lab assignments and everything worked fine few weeks ago, but now it runs only on one thread, I've read and I guess that this is due to conflict between packages. This is the code below:
#include "omp.h"
#include <stdio.h>
int main()
{
omp_set_num_threads(4);
#pragma omp parallal
{
int id = omp_get_thread_num();
printf("Hello (%d)", id );
printf("World (%d)\n", id);
return 0;
}
}
I get the output:
$ gcc -fopenmp hello.c
$ ./a.out
Hello (0)World (0)
I have tried reinstalling gcc, but to no help.