Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block selection issue when one step does not have any block #1688

Open
pnorbert opened this issue Aug 20, 2019 · 2 comments
Open

Block selection issue when one step does not have any block #1688

pnorbert opened this issue Aug 20, 2019 · 2 comments
Assignees
Labels

Comments

@pnorbert
Copy link
Contributor

ERROR: invalid blockID 0 from steps start 2 in variable v3, check argument to Variable<T>::SetBlockID, in call to Get

The issue shows up in the next step where the variable appears again.

The examples/basics/localArray example shows this bug if the writer code is forced to omit writing a variable (v3) in step 2 in localArray_write.cpp:166-169

            if (step == 2)
            {
                chance = 0;
            }

This will result in v3 missing in step 2:

$ bpls -l localArray.bp/ -D v3
  double   v3    4*[__]*{__} = 0 / 3.4
        step 0: 
          block 0: [0:8] = 0 / 0
        step 1: 
          block 0: [0:5] = 0.1 / 0.1
          block 1: [0:6] = 1.1 / 1.1
        step 3: 
          block 0: [0:9] = 1.3 / 1.3
        step 4: 
          block 0: [0:5] = 0.4 / 0.4
          block 1: [0:5] = 1.4 / 1.4
          block 2: [0:5] = 3.4 / 3.4

Then the read example fails when getting variable v3 in step 3.

$ ./bin/localArray_read 
Process step 0: 
...
Process step 2: 
    v0 has 4 blocks in step 2
        block 0 size = "6" offset = "" : 0.2 0.2 0.2 0.2 0.2 0.2 
        block 1 size = "6" offset = "" : 1.2 1.2 1.2 1.2 1.2 1.2 
        block 2 size = "6" offset = "" : 2.2 2.2 2.2 2.2 2.2 2.2 
        block 3 size = "6" offset = "" : 3.2 3.2 3.2 3.2 3.2 3.2 
    v1 has 4 blocks in step 2
        block 0 size = "6" offset = "" : 0.2 0.2 0.2 0.2 0.2 0.2 
        block 1 size = "10" offset = "" : 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 
        block 2 size = "5" offset = "" : 2.2 2.2 2.2 2.2 2.2 
        block 3 size = "10" offset = "" : 3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 
    v2 has 4 blocks in step 2
        block 0 size = "6" offset = "" : 0.2 0.2 0.2 0.2 0.2 0.2 
        block 1 size = "7" offset = "" : 1.2 1.2 1.2 1.2 1.2 1.2 1.2 
        block 2 size = "9" offset = "" : 2.2 2.2 2.2 2.2 2.2 2.2 2.2 2.2 2.2 
        block 3 size = "10" offset = "" : 3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 3.2 
    Variable v3 not found in step 2
Process step 3: 
    v0 has 4 blocks in step 3
        block 0 size = "6" offset = "" : 0.3 0.3 0.3 0.3 0.3 0.3 
        block 1 size = "6" offset = "" : 1.3 1.3 1.3 1.3 1.3 1.3 
        block 2 size = "6" offset = "" : 2.3 2.3 2.3 2.3 2.3 2.3 
        block 3 size = "6" offset = "" : 3.3 3.3 3.3 3.3 3.3 3.3 
    v1 has 4 blocks in step 3
        block 0 size = "6" offset = "" : 0.3 0.3 0.3 0.3 0.3 0.3 
        block 1 size = "10" offset = "" : 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 
        block 2 size = "5" offset = "" : 2.3 2.3 2.3 2.3 2.3 
        block 3 size = "10" offset = "" : 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 
    v2 has 4 blocks in step 3
        block 0 size = "5" offset = "" : 0.3 0.3 0.3 0.3 0.3 
        block 1 size = "10" offset = "" : 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 
        block 2 size = "7" offset = "" : 2.3 2.3 2.3 2.3 2.3 2.3 2.3 
        block 3 size = "9" offset = "" : 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.3 
    v3 has 1 blocks in step 3
Invalid argument exception, STOPPING PROGRAM
ERROR: invalid blockID 0 from steps start 2 in variable v3, check argument to Variable<T>::SetBlockID, in call to Get

Note: This reading example uses BeginStep/EndStep to step through the steps, so no SetStepSelection() is used here.
Note: The bug appears with both BP3 and BP4 engines.

@pnorbert pnorbert added the bug label Aug 20, 2019
@pnorbert pnorbert added this to the 2.5.0 Produciton Release milestone Sep 3, 2019
@williamfgc williamfgc modified the milestones: 2.5.0 Production Release, 2.6.0 Production Release Oct 15, 2019
@pnorbert
Copy link
Contributor Author

pnorbert commented May 21, 2020

Same bug as #1639

@chuckatkins chuckatkins removed this from the 2.6.0 Production Release milestone Dec 23, 2020
@pnorbert
Copy link
Contributor Author

This looks failing now with BP5 without even having zero block. Needs testing.

@pnorbert pnorbert assigned pnorbert and unassigned williamfgc Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants