Message
Add "%s" to the declaration of routine "%s" in order to parallelize the loop at line %d. Alternatively, adding "%s" achieves a similar effect.
Advice
Make sure that the routine specified is indeed a const function or a concurrency-safe function before following the advice to add the annotation.
If the routine is not one of these kinds of functions, then another thing you can try is to inline it with #pragma forceinline recursive. This action may or may not be beneficial.
Example
Consider the following:
#define N 10000 double A[N], B[N]; int bar(int); void foo(){ int i; for (i=0;i<N;i++){ A[i] = B[i] * bar(i); } }
In this case, the compiler does not parallelize the loop because it is not safe to do so without further information about routine bar
, which is being called.
If you determine it is safe to do so, you can add the pragma as follows:
#define N 10000 double A[N], B[N]; void foo(){ int i; #pragma forceinline recursive for (i=0;i<N;i++){ A[i] = B[i] * bar(i); } }
Parent topic: Guided Auto Parallelism Messages
Englisch