Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-2802

parfor-loop is not executed in certain cases when counting backwards

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • SystemDS 2.1
    • ParFor, Runtime
    • None

    Description

      As far as I understand, the for and parfor-loops should execute the same iterations given the same sequence. However, when counting backwards, the parfor-loop is not executed if to == from - 1. So for example:

      for(i in 1:0) {
        print(i);
      }

      prints 1 and 0. However,

      parfor(i in 1:0) {
        print(i);
      }
      

      does not print anything. The analogous holds, e.g., for "i in 123:122" etc.

      The problem seems to be in org.apache.sysds.runtime.controlprogram.ParForProgramBlock.computeNumIterations(), which does not work correctly when counting backwards.

       

       

      Attachments

        Activity

          People

            mboehm7 Matthias Boehm
            pdamme Patrick Damme
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: