Zoltan2: MJ memory leak when num_global_parts==1
Created by: kddevin
@trilinos/zoltan2 @mndevec @tscoffe
Mehmet: would you look at this memory leak in MJ detected by STK testing?
The problem occurs in an obscure case, when MJ is called with num_global_parts=1.
The memory leak is for array part_xadj.
part_xadj is allocated at line 2121.
In most cases, it is freed and reset at lines 1753-1754.
But when num_global_parts==1, the "continue" at line 1499 skips the free/reset, so part_xadj is never freed.
Given the comment at line 1492, I was afraid I might break cases like the P=4,5,1,2 case mentioned if I tried to fix it. Do we have a test that exercises that case?
I created a test problem that demonstrates the memory leak; I can see it in purify, and the STK team sees it in valgrind: test/driver/driverinputs/coffey
Thanks, Mehmet.