> I think you're already on the trail of the "Killed" problem

Hi Greg,

It's definitely an Out of Memory error, and I think a leak within
Chapel.

Here's a test case similar to what was triggering the problem:

     class tst {
       var Lalloc : domain(rank=1) = 1..2000;
       var data1 : [Lalloc] int;
       var data2 : [Lalloc] int;
     }

     proc eat_memory(ind : int, val : int) {
       var mem = new tst();

       mem.data1(ind) = val;
       mem.data2(val) = ind;
     }

     for i in 1..500 {
       for j in 1..1500 {
         eat_memory(i, j);
       }
     }

The arrays in the class don't seem to be freed when the procedure
is done with them (if the class is even freed).

The STATUS file at the top of the Chapel distribution says that
privatized arrays are leaked - would this be an example of that?

The fix was to re-work the code to allocate the arrays in the
procedure (ie. to not use the class) and to change the logic to
avoid the double-free on early return, as reported yesterday to
the bugs list.  Memory usage is stable now no matter how many
iterations of the loops are done.

Greg

------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to