IBM Support

IV20901: OMP_SET_SCHEDULE CALL IS IGNORED

Fixes are available

July 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL Fortran for AIX, V13.1
July 2012 PTF for XL Fortran Runtime for AIX, V13.1
October 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C for AIX, V11.1
February 2013 PTF for XL C for AIX, V11.1
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL Fortran for AIX Fix Pack 23 (March 2016 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 23 (March 2016 PTF) for 13.1
XL C for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL Fortran for AIX Fix Pack 24 (September 2016 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 24 (September 2016 PTF) for 13.1
July 2012 PTF for XL C for AIX, V11.1
October 2012 PTF for XL Fortran for AIX, V13.1
October 2012 PTF for XL Fortran Runtime for AIX, V13.1
February 2013 PTF for XL Fortran for AIX, V13.1
February 2013 PTF for XL Fortran Runtime for AIX, V13.1
May 2013 PTF for XL Fortran for AIX, V13.1
May 2013 PTF for XL Fortran Runtime for AIX, V13.1
XL Fortran for AIX Fix Pack 15 (August 2013 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 15 (August 2013 PTF) for 13.1
XL C for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL Fortran for AIX Fix Pack 16 (November 2013 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 16 (November 2013 PTF) for 13.1
XL Fortran for AIX Fix Pack 17 (February 2014 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 17 (February 2014 PTF) for 13.1
XL C for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL Fortran for AIX Fix Pack 18 (May 2014 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 18 (May 2014 PTF) for 13.1
XL C for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL Fortran for AIX Fix Pack 19 (August 2014 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 19 (August 2014 PTF) for 13.1
XL C for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL Fortran for AIX Fix Pack 20 (November 2014 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 20 (November 2014 PTF) for 13.1
XL Fortran for AIX Fix Pack 21 (April 2015 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 21 (April 2015 PTF) for 13.1
XL C for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL Fortran for AIX Fix Pack 22 (September 2015 PTF) for 13.1
XL Fortran Runtime for AIX Fix Pack 22 (September 2015 PTF) for 13.1

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When the OMP_SCHEDULE env variable is set, there exists a couple
    of 2 for each thread for the following test case.
    But when the OMP_SCHEDULE is unset and omp_set_schedule() is
    used, we don't see a couple of 2 per thread.
    
    
    ===== COMPILE COMMAND:
    xlf95_r -c -q64 -qsmp=omp:noopt -o helloworld.o helloworld.f95
    
    
    ===== TESTCASE:
    $ cat helloworld.f95
    PROGRAM helloworld
      use omp_lib
    
      IMPLICIT NONE
    
      INTEGER :: i, foo, ompmodifier
      integer(kind=omp_sched_kind) :: ompsched
      CHARACTER (LEN=16) :: ENVDATA
    
    !$OMP parallel
      PRINT *,'thread ',omp_get_thread_num(),' of
    ',omp_get_num_threads()
    !$OMP end parallel
    
      foo = 0
    
    !$OMP parallel
      CALL GETENV('OMP_SCHEDULE', VALUE=ENVDATA)
      PRINT *,'thread ',omp_get_thread_num(),' has env ', envdata
      call omp_set_schedule(omp_sched_static,2)
      call omp_get_schedule(ompsched,ompmodifier)
    
      PRINT *,'thread ',omp_get_thread_num(),' has schedule ',
    ompsched,' ', ompmodifier
    !$OMP do private(i) reduction(+:foo) schedule(runtime)
      DO i=1,6
        foo = foo + i
        PRINT *,'thread ',omp_get_thread_num(),' has item ', i
      END DO
    !$OMP end do
    
    !$OMP end parallel
    
    END PROGRAM helloworld
    $
    
    
    ===== ACTUAL OUTPUT:
    $export OMP_NUM_THREADS=2
    $./helloworld
     thread  0  of  2
     thread  1  of  2
     thread  0  has env
     thread  0  has schedule  1   2
     thread  1  has env
     thread  1  has schedule  1   2
     thread  1  has item  4
     thread  1  has item  5
     thread  1  has item  6
     thread  0  has item  1
     thread  0  has item  2
     thread  0  has item  3
    $
    
    
    
    ===== EXPECTED OUTPUT:
    Should give the same output as when OMP_SCHEDULE env variable is
    set to "static,2" as shown below because
    the program internally calls
    omp_get_schedule(omp_sched_static,2)
    
    $export OMP_NUM_THREADS=2
    $export OMP_SCHEDULE=static,2
    $./helloworld
     thread  0  of  2
     thread  1  of  2
     thread  0  has env static,2
     thread  0  has schedule  1   2
     thread  1  has env static,2
     thread  1  has schedule  1   2
     thread  1  has item  3
     thread  1  has item  4
     thread  0  has item  1
     thread  0  has item  2
     thread  0  has item  5
     thread  0  has item  6
    $
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    Any OpenMP users that wish to change the runtime schedule of
    loops while the program is running is affected by this issue.
    
    PROBLEM DESCRIPTION:
    The omp_set_schedule call is effectively being ignored by the
    SMP Runtime.
    This means that users cannot dynamically change the schedule of
    runtime scheduled loops, as described in the OpenMP
    specification.
    

Problem conclusion

  • The runtime is currently recording the values for the schedule
    and the modifier,
    as specified in the omp_set_schedule call. However, when it
    sets up the chunks for the parallel loop,
    it is not using the overwritten values. Instead it is using the
    default value provided in the OMP_SCHEDULE environment
    variable.
    This has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV20901

  • Reported component name

    XL FORTRAN FOR

  • Reported component ID

    5724X1500

  • Reported release

    310

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-05-10

  • Closed date

    2012-07-05

  • Last modified date

    2012-07-05

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IV24364 LI76992 LI77060

Fix information

  • Fixed component name

    XL SMP AIX

  • Fixed component ID

    5725C7401

Applicable component levels



Document information

More support for: XL Fortran for AIX

Software version: 14.1

Reference #: IV20901

Modified date: 05 July 2012