ct-clmsn / chplx

A Chapel backend
Apache License 2.0
4 stars 2 forks source link

chplx::forall over ranges #53

Open ct-clmsn opened 1 year ago

ct-clmsn commented 1 year ago

The following code in backend/test/heat.chpl segmentation faults. The sequential version of the loop is working correctly.

Parallel version

        chplx::forall(chplx::Range(0, 4), [&](auto i) {
#line 44 "heat.chpl"
            data(i) = 1 + (((i - 1) + nx) % nx);
#line 45 "heat.chpl"
            data2(i) = 0;
        });

Sequential version

        chplx::forLoop(chplx::Range(0, 4), [&](auto i) {
#line 44 "heat.chpl"
            data(i) = 1 + (((i - 1) + nx) % nx);
#line 45 "heat.chpl"
            data2(i) = 0;
        });
ct-clmsn commented 1 year ago

@hkaiser ran the unit tests and got a similar segfault. I'll have to double back and see if this is an issue on x86 (I'm working off arm at the moment).

hkaiser commented 1 year ago

@hkaiser ran the unit tests and got a similar segfault. I'll have to double back and see if this is an issue on x86 (I'm working off arm at the moment).

I'll have a look, thanks!