On Fri, Jul 9, 2010 at 12:42 AM, Немања Илић (Nemanja Ilic) <span dir="ltr"><<a href="mailto:nemanja.ilic.81@gmail.com">nemanja.ilic.81@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;">
Hello,<br>
<br>
I am developing a PETSc application and I encountered the following problem:<br>
My parallel program does everything ok, finishes the meaningful job, and near the end it breaks with the following line:<br>
<br>
"rank 0 in job 17 wg_49925 caused collective abort of all ranks<br>
exit status of rank 0: killed by signal 9"<br>
<br>
It happends regardless of number of processes in the job.<br>
<br>
Here is the ending of the function 'calculate' which does the work:<br>
<br>
"....<br>
// write result to file<br>
PetscViewer viewer;<br>
ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, output_file_name, &viewer); CHKERRQ(ierr);<br>
ierr = PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_COMMON); CHKERRQ(ierr);<br>
ierr = VecView(bp, viewer); CHKERRQ(ierr);<br>
<br>
<br>
// clean-up<br>
ierr = MatDestroy(Ap); CHKERRQ(ierr);<br>
ierr = VecDestroy(bp); CHKERRQ(ierr);<br>
ierr = VecDestroy(xp); CHKERRQ(ierr);<br>
<br>
free(col);<br>
free(row);<br>
free(row_values);<br></blockquote><div><br></div><div>Did you malloc() or PetscMalloc() these? You cannot free() stuff you get from PetscMalloc().</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;">
return b;"<br>
<br>
The file 'viewer' is outputed correctly.<br>
When 'calculate' finishes the finalization function gets called:<br>
"ierr = PetscFinalize(); CHKERRQ(ierr);"<br>
<br>
Does anyone have any idea to why my program breaks?<br>
<br>
Thank you in advance,<br>
Best regards,<br>
<font color="#888888">Nemanja Ilic<br>
</font><br>
PS<br>
Sorry if this is not the right place for my question :)<br>
</blockquote></div><br><br clear="all"><br>-- <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>