Pure Software Engineer :)
OpenMP 본문
리눅스 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
$ 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 |