[petsc-users] PetscSortRealWithPermutation causes segfaults

S V N Vishwanathan vishy at stat.purdue.edu
Fri May 6 00:37:50 CDT 2011


Hi

I am using PetscSortRealWithPermutation to sort an array with around
200K elements and it causes a segfault. 

STL sort is able to handle this array without any problems. 

I looked at the gdb backtrace. It primarily seems to be because the
stack is exhausted because of recursive calls to
PetscSortRealWithPermutation_Private. I am wondering if it might not be
a better idea to implement PetscSortRealWithPermutation_Private without
recursion to avoid these errors?

vishy



More information about the petsc-users mailing list