Linuxでemacsコマンドの使い方

emacs omp.c</p> <p>#include <stdio.h>
int main()
{
int rank, size;
#pragma omp parallel num_thread(3) private(rank) //num_threadsでスレッド数をコントロール
//omp_set_num_threads(3)を使う;</p> <p> {
rank = omp_get_thread_num();
size = omp_get_num_threads();
printf(“using %d of %d now.\n", rank, size);
}
return 0;
}</p> <p>ctrl+x s
alt+x compile
gcc -fopenmp -o omp omp.c
alt+shift+1 ./omp

Source

Posted by arkgame