Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Tags more
Archives
Today
Total
관리 메뉴

Pure Software Engineer :)

OpenMP 본문

Software Engineering/Linux

OpenMP

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
 

'Software Engineering > Linux' 카테고리의 다른 글

IPMI 사용법  (0) 2012.07.24
[XEN] guest vm 생성하기위한 loop device 설정  (0) 2012.05.31
리눅스(ubuntu) 관련(tip)  (0) 2011.10.22
파이썬 관련(tip)  (0) 2011.10.22
리눅스에서 performance 측정하기  (0) 2011.10.14