Message <Context> the reference to the variable "<var>" lexically precedes its use in a #pragma omp threadprivate directive. This is not allowed. Description An OpenMP threadprivate directive must lexically precede all references to any varible in its variable list. The compiler had detected a reference to a variable which appears in a subsequent threadprivate directive. User Action Move the threadprivate directive before the reference.