IBM Support

IV67770: BAD OUTPUT FOR SCHEDULE OPTION AND CHUNK_SIZE < 1 OR CHUNK_SIZE VERY LARGE

Fixes are available

XL C/C++ for AIX Fix Pack 2 (December 2014 PTF) for 13.1
XL C/C++ Runtime for AIX Fix Pack 1 (December 2014 PTF) for 13.1
XL C/C++ for AIX Fix Pack 3 (April 2015 PTF) for 13.1
XL C/C++ Runtime for AIX Fix Pack 2 (April 2015 PTF) for 13.1
XL C/C++ for AIX Fix Pack 4 (July 2015 PTF) for 13.1
XL C/C++ Runtime for AIX Fix Pack 3 (July 2015 PTF) for 13.1
XL Fortran for AIX Fix Pack 4 (July 2015 PTF) for 15.1
XL Fortran Runtime for AIX Fix Pack 4 (July 2015 PTF) for 15.1
XL C for AIX Fix Pack 5 (November 2015 Update) for 13.1
XL C/C++ for AIX Fix Pack 5 (November 2015 PTF) for 13.1
XL C/C++ Runtime for AIX Fix Pack 4 (November 2015 PTF) for 13.1
XL C/C++ for AIX Fix Pack 6 (February 2016 PTF) for 13.1
XL C for AIX Fix Pack 6 (February 2016 Update) for 13.1
XL C/C++ Runtime for AIX Fix Pack 5 (February 2016 PTF) for 13.1
XL Fortran for AIX Fix Pack 6 (February 2016 Update) for 15.1
XL Fortran Runtime for AIX Fix Pack 6 (February 2016 PTF) for 15.1
XL C for AIX Fix Pack 7 (May 2016 Update) for 13.1
XL C/C++ for AIX Fix Pack 7 (May 2016 PTF) for 13.1
XL Fortran for AIX Fix Pack 7 (May 2016 Update) for 15.1
XL Fortran Runtime for AIX Fix Pack 7 (May 2016 PTF) for 15.1
XL C for AIX Fix Pack 8 (August 2016 Update) for 13.1
XL C/C++ for AIX Fix Pack 8 (August 2016 PTF) for 13.1
XL Fortran for AIX Fix Pack 8 (August 2016 Update) for 15.1
XL Fortran Runtime for AIX Fix Pack 8 (August 2016 PTF) for 15.1
XL C for AIX Fix Pack 9 (June 2017 Update) for 13.1
XL C/C++ for AIX Fix Pack 9 (June 2017 PTF) for 13.1
XL Fortran for AIX Fix Pack 9 (June 2017 Update) for 15.1
XL Fortran Runtime for AIX Fix Pack 9 (June 2017 PTF) for 15.1
XL C for AIX Fix Pack 10 (February 2018 Update) for 13.1
XL C/C++ for AIX Fix Pack 10 (February 2018 PTF) for 13.1
XL Fortran for AIX Fix Pack 10 (February 2018 PTF) for 15.1
XL Fortran Runtime for AIX Fix Pack 10 (February 2018 PTF) for 15.1
XL C for AIX Fix Pack 2 (December 2014 PTF) for 13.1
XL Fortran for AIX Fix Pack 2 (December 2014 PTF) for 15.1
XL Fortran Runtime for AIX Fix Pack 2 (December 2014 PTF) for 15.1
XL C for AIX Fix Pack 3 (April 2015 PTF) for 13.1
XL Fortran for AIX Fix Pack 3 (April 2015 PTF) for 15.1
XL Fortran Runtime for AIX Fix Pack 3 (April 2015 PTF) for 15.1
XL C for AIX Fix Pack 4 (July 2015 PTF) for 13.1
XL Fortran for AIX Fix Pack 5 (November 2015 Update) for 15.1
XL Fortran Runtime for AIX Fix Pack 5 (November 2015 PTF) for 15.1
XL C/C++ for AIX Fix Pack 11 (November 2018 PTF) for 13.1
XL C for AIX Fix Pack 11 (November 2018) for 13.1

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The XL SMP runtime 4.1 is behaving differently than v3.1 for the
    SCHEDULE(STATIC,chunk_size) clause when chunk_size < 1 or
    chunk_size is very large.
    
    With V3.1, the behavior I observe is as follows:
    if chunk_size < 1, it appears to default to using a chunk_size
    of ceiling(N/parthds)
    if chunk_size > n, thread 0 is assigned all iterations
    
    With V4.1, the behavior is as follows:
    if chunk_size < 0, the loop doesn't execute
    if chunk_size = 0, it appears to default to using a chunk_size
    of ceiling(N/parthds)
    if chunk_size >> n (in this case I used MAX_INT but it seems to
    start for this test somewhere between 3E9 and 3.1E9) it
    generates extra loop iteration including loop index values < 1
    
    The following test case demonstrates the above scenario:
    
    =====COMPILE COMMAND:
    $ xlf_r foo4.f -ofoo4 -qsmp=omp
    
    =====TEST CASE:
    $ cat foo4.f
    program foo
          implicit none
          integer n
          n = 1000
          call foo1('A',n,0)
          call foo1('B',n,-1)
          call foo1('C',n,2147483647)
          end
    
          subroutine foo1(s,n,chunk_size)
          implicit none
          character*1 s
          integer omp_get_thread_num,n,chunk_size,k
    
    !$OMP PARALLEL DO
    !$OMP+ PRIVATE(k),
    !$OMP+ SCHEDULE(STATIC,chunk_size)
          do k=1,n
           print *, s,omp_get_thread_num(),k
          enddo
          end
    $
    
    ======ACTUAL OUTPUT:
    $./foo4
     A 7 876
     A 7 877
     A 7 878
     A 7 879
     A 1 126
     A 1 127
     A 1 128
     A 4 501
     A 4 502
     A 4 503
     A 4 504
     A 0 1
     A 7 880
     A 5 626
     A 5 627
     A 2 251
     A 6 751
     A 6 752
     A 4 505
     A 4 506
     A 4 507
     A 1 129
     A 5 628
     A 2 252
     A 3 376
     A 6 753
     A 0 2
     A 7 881
    .
    .
    $
    
    ======EXPECTED OUTPUT:
    $./foo4
    A 6 751
     A 6 752
     A 6 753
     A 6 754
     A 6 755
     A 6 756
     A 6 757
     A 6 758
     A 6 759
     A 6 760
     A 6 761
     A 6 762
     A 6 763
     A 6 764
     A 6 765
     A 6 766
     A 6 767
     A 6 768
     A 6 769
     A 6 770
     A 6 771
     A 6 772
     A 6 773
     A 6 774
     A 6 775
     A 6 776
     A 6 777
     A 6 778
     A 6 779
     A 6 780
     A 6 781
     A 6 782
     A 6 783
     A 6 784
     A 6 785
     A 6 786
     A 6 787
     A 6 788
     A 2 251
     A 2 252
     A 2 253
     A 2 254
     A 2 255
     A 2 256
     A 2 257
    .
    .
    .
    $
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    Users requesting large chunksizes with a large number of threads
    or requesting chunksize < 1 are affected by this issue.
    
    PROBLEM DESCRIPTION:
    Negative or large chunksizes can result in bad SMP schedules.
    

Problem conclusion

  • Chunksizes will be properly limited to prevent overflow when too
    large, and revert to the default size when < 1 with this fix
    applied.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV67770

  • Reported component name

    XL SMP AIX

  • Reported component ID

    5725C7401

  • Reported release

    410

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-12-11

  • Closed date

    2014-12-11

  • Last modified date

    2014-12-11

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

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

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: 15.1

Reference #: IV67770

Modified date: 11 December 2014