Skip to content

Commit

Permalink
Update openmp.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WonyoungCho committed Nov 12, 2018
1 parent f12b79b commit fa7daa4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/openmp.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,26 @@ program hello
!$omp parallel
print*,'hello',omp_get_thread_num()
!$omp end parallel
print*,''
end program hello
```

```
$ ./a.out
hello 0
hello 7
hello 3
hello 4
hello 1
hello 2
hello 6
hello 5
```

``` bash
program hello
implicit none
integer::omp_get_thread_num

call omp_set_num_threads(4)
!$omp parallel
print*,'hello',omp_get_thread_num()
Expand Down Expand Up @@ -39,3 +58,4 @@ get : function, set : subroutine
hello 0
hello 1
```

0 comments on commit fa7daa4

Please sign in to comment.