This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: OpenMP do loop with MAXINT


Here's a shorter version of the bug, which is also more precise: it
appears that only the last thread of the OpenMP thread team has the
problem; which is that it executes only once. (Setting $OMP_NUM_THREADS
to 1 is simplest.) I will fill a bug report later this morning.


program main

  use omp_lib
  integer(kind=4) :: i, lower, upper

  upper = huge(maxint)
  lower = upper - 9    ! The 9 can of course be changed

!$omp parallel do
  do i = lower, upper
    if (omp_get_thread_num() == (omp_get_num_threads() - 1)) then
      print *, "I get printed once or less."
    end if
  end do
!$end omp parallel do

end program


gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)
x86_64-linux-gnu
Ubuntu 8.10
gfortran -fopenmp gfortranbug.f95


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]