HelloJaewon 2011. 10. 26. 12:59
리눅스 gnu gcc 로 openmp c 프로그램 컴파일 하는 방법

$ gcc -o hello hello.c -fopenmp
(-lgomp 옵션으로도 컴파일은 되나 스레드 생성이 안됐음(?))


$ export OMP_NUM_THREADS=2 // 생성할 스레드 숫자를 환경변수로 설정 할 수 있다.
  (c code 안에서 #pragma omp parallel num_threads(8) 이런식으로도 가능)

- reference  
http://www.dartmouth.edu/~rc/classes/intro_openmp/compile_run.html