My program is like this:
int *array;
#pragma omp threadprivate(array1)
int main()
{
array = new int[N];//N is already known.
func_A();
...
}
void func_B()
{
func_C();
......
}
void func_C()
{
do something to array(write to array);
}
void func_A()
{
#pragma omp parallel copyin(array)
#pragma omp parallel for
for(i = 0 ; i < n ; i ++)
func_B();
}
when I debug(VS 2012) the program and watch(is it clear?) it,compiler always says there is no such variable.Who can tell me where the wrong is and how to solve it ?
I have a big graph demonstrated by an Adjacent Matrix.I want to find out how many sub-graphs with specific shape in the graph.Because it takes a long time , so I want to use OpenMP ,and I want to give each thread a copy of this graph. I did this as my codes show,but a lot of memory problems were made.This is what I want to do.