Programming/openMP
우분투에서 openMP 예제
구차니
2012. 6. 9. 19:26
예제를 따라하고 출력을 해보니 먼가 이상한거 발견
hello가 아니라 hell world래.. 지옥에 오신걸 환영합니다 인가 -_-
atom330(2core / 4thread) 이라서 일단 4개 쓰레드로 기본 실행 된 듯.
hello가 아니라 hell world래.. 지옥에 오신걸 환영합니다 인가 -_-
atom330(2core / 4thread) 이라서 일단 4개 쓰레드로 기본 실행 된 듯.
$ vi test.c
#include <stdio.h>
#include <omp.h>
int main(int argc, const char *argv[])
{
#pragma omp parallel
printf("hell world\n");
return 0;
}
$ gcc -fopenmp test.c $ ./a.out hell world
hell world
hell world
hell world
|