Skip to content

[Peek behaviour] Cannot mismatch horizons #2

@nmnobre

Description

@nmnobre

When peeking, the horizon has to match the burst of the read on the same location. This looks like known behaviour since, when ticking with a burst different from the horizons of the preceding peeks in the same stream location, the runtime issues a warning and seems to not progress further, hanging on a call to sched_yield(). If consuming with an equivalent dummy task, the runtime seems to exit with code 1.

However, it also seems peeks across different output views are not allowed. In fact, the following program crashes with a segmentation fault:

int main(int argc, char **argv)
{
    int stream __attribute__((stream));
    int viewW, viewR[2];

    #pragma omp task output(stream << viewW)
    {
    }

    #pragma omp task output(stream << viewW)
    {
    }

    #pragma omp task input(stream >> viewR[0]) 
    {
    }

    #pragma omp task input(stream >> viewR[2])
    {
    }

    #pragma omp taskwait

    return 0;
}

In this case, even though the peek horizon matches the final consumer's burst, the program still crashes, apparently when trying to clone the data into the peeker's frame:

thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
frame #0: 0x000000010010e03c libwstream_df.so`__builtin_ia32_broadcast at wstream_df.c:1541
-> memcpy (((char *)peek_view->data) + offset, first_cons_view->data, burst);

Short term, if we don't intend to fix this, we should perhaps mention it in the README.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompilerCompiler related issueruntimeRuntime related issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions