이왜 OpenMP는 컴파일러가 다음과 같은 경고를 제공합니다 내가이 코드를 컴파일 할 때 나는 섹션 안에 하나의 블록이
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main (int argc, char *argv[])
{
int nthreads, tid;
/* Fork a team of threads giving them their own copies of variables */
#pragma omp parallel private(tid)
{
#pragma omp sections
{
#pragma omp section
{
printf("First section %d \n" , tid);
}
#pragma omp section
{
#pragma omp single
{
printf("Second Section block %d \n" , tid);
}
}
}
} /* All threads join master thread and disband */
printf("Outside parallel block \n");
}
처럼 차단 경고를 않습니다
작업 공유 지역은 업무 공유, 중요, 주문 또는 마스터 지역 내에서 긴밀하게 중첩되지 않을 수도 있습니다.
왜 그럴까요?