On Tue, Aug 28, 2012 at 10:48 AM, shu guo <span dir="ltr"><<a href="mailto:greatgs2008@gmail.com" target="_blank">greatgs2008@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am using totalview instead of Valgrind. Where can I find the<br>
information of the stack trace?... Sorry about this easy question, I<br>
am really a beginner in programming...<br></blockquote><div><br></div><div>'where'</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Shu<br>
<br>
On Tue, Aug 28, 2012 at 11:44 AM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
> On Tue, Aug 28, 2012 at 10:42 AM, shu guo <<a href="mailto:greatgs2008@gmail.com">greatgs2008@gmail.com</a>> wrote:<br>
>><br>
>> Hi Jed,<br>
>><br>
>> I was thinking about this issue either. But when I create the matrix,<br>
>> I hardcoded as<br>
>><br>
>> call MatCreateMPIBAIJ (PETSC_COMM_WORLD,4,32,32,<br>
>> & PETSC_DETERMINE, PETSC_DETERMINE,<br>
>> & PETSC_NULL_INTEGER, mr(np(246)),<br>
>> & PETSC_NULL_INTEGER, mr(np(247)),<br>
>> & Kmatem, ierr)<br>
>><br>
>> And it works good. Does that mean this should not be a concern as you<br>
>> mentioned?<br>
><br>
><br>
> Probably, but it's still bad practice when using Fortran, and it will cause<br>
> problems if you change the integer size later (e.g. to solve problems with<br>
> more than 2B degrees of freedom). What does Valgrind say?<br>
><br>
>><br>
>><br>
>> Thanks.<br>
>><br>
>> Shu<br>
>><br>
>><br>
>><br>
>> On Tue, Aug 28, 2012 at 11:37 AM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
>> > On Tue, Aug 28, 2012 at 10:33 AM, shu guo <<a href="mailto:greatgs2008@gmail.com">greatgs2008@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Dear All,<br>
>> >><br>
>> >> I want to extract a sequential matrix from a MPIBAIJ matrix A with a<br>
>> >> dimension of 4n*4n. After assembly A, I use ISCreateStride to define<br>
>> >> the index by<br>
>> >><br>
>> >> call ISCreateStride(PETSC_COMM_WORLD,n,0,1,isrow,ierr)<br>
>> ><br>
>> ><br>
>> > Fortran does not do type conversion without interfaces (which are about<br>
>> > as<br>
>> > much hassle as benefit). If you configured PETSc with non-default<br>
>> > integer<br>
>> > sizes, be sure to declare PetscInt zero,one instead of using numeric<br>
>> > literals.<br>
>> ><br>
>> > Otherwise, run in valgrind to check that there isn't earlier corruption<br>
>> > and<br>
>> > run in a debugger to get a stack trace.<br>
>> ><br>
>> >><br>
>> >><br>
>> >> And extract the matrix as<br>
>> >> call MatGetSubMatrices(Kmatem,1,isrow,isrow,<br>
>> >> & MAT_INITIAL_MATRIX,Kmatemseq)<br>
>> >><br>
>> >> But it gives me a segmentation fault when I call ISCreateStride. Is<br>
>> >> there anything I did wrong? Thanks for any advice.<br>
>> >><br>
>> >> Shu<br>
>> ><br>
>> ><br>
><br>
><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>