STANAANDREY

omp 4tran

Aug 14th, 2025
6,212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program main
  2.     use omp_lib
  3.     implicit none
  4.     integer :: thread_id, num_threads
  5.  
  6.     !$omp parallel private(thread_id)
  7.     thread_id = omp_get_thread_num()
  8.     num_threads = omp_get_num_threads()
  9.  
  10.     print *, 'Hello from thread', thread_id, 'out of', num_threads
  11.     !$omp end parallel
  12.  
  13. end program main
Advertisement
Add Comment
Please, Sign In to add comment