! Collection of code snippets by Arne Vajhøj 
! created to try various things (2003-now) 
program sects
    use omp_lib
    !$omp parallel num_threads(2)
    !$omp sections
    !$omp section
    !$omp critical
    write(*,*) omp_get_thread_num(),' of ',omp_get_num_threads()
    !$omp end critical
    !$omp section
    !$omp critical
    write(*,*) omp_get_thread_num(),' of ',omp_get_num_threads()
    !$omp end critical
    !$omp section
    !$omp critical
    write(*,*) omp_get_thread_num(),' of ',omp_get_num_threads()
    !$omp end critical
    !$omp section
    !$omp critical
    write(*,*) omp_get_thread_num(),' of ',omp_get_num_threads()
    !$omp end critical
    !$omp end sections
    !$omp end parallel
end
