I'm a starter for openmp.
I wrote very very simple code like below.
when I compile that code and implement ./a.out, 'Segmentation fault (core dumped)' occurs. Why core dumped in this simple code?
#include<stdio.h>
#include<stdlib.h>
#include<omp.h>
int main(void){
#pragma omp parallel
{printf("thread num %d: first hello world!
",omp_get_thread_num());
printf("thread num %d; second hello world!
",omp_get_thread_num());
}
return 0;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…