fork download
  1. #include <omp.h>
  2. #include <stdio.h>
  3. int main() {
  4. #pragma omp parallel
  5. {
  6. int threadnum = omp_get_thread_num();
  7. printf("Thread id: %d\n",threadnum);
  8. }
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:4: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
  #pragma omp parallel
 
/usr/bin/ld: /home/ByoqNT/ccpKKhUg.o: in function `main':
prog.c:(.text.startup+0x5): undefined reference to `omp_get_thread_num'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty