[petsc-users] Collective abort of all ranks

Barry Smith bsmith at mcs.anl.gov
Thu Jul 8 21:59:08 CDT 2010


  Take out the CHKERRQ() AFTER the PetscFinalize() that may be the problem.

  If not, I think you are basically stuck running in the debugger to see what is generating the message.

   barry

On Jul 8, 2010, at 5:42 PM, Немања Илић (Nemanja Ilic) wrote:

> Hello,
> 
> I am developing a PETSc application and I encountered the following problem:
> My parallel program does everything ok, finishes the meaningful job, and near the end it breaks with the following line:
> 
> "rank 0 in job 17  wg_49925   caused collective abort of all ranks
>  exit status of rank 0: killed by signal 9"
> 
> It happends regardless of number of processes in the job.
> 
> Here is the ending of the function 'calculate' which does the work:
> 
>      "....
> 	// write result to file
> 	PetscViewer viewer;
> 	ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, output_file_name, &viewer); CHKERRQ(ierr);
> 	ierr = PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_COMMON); CHKERRQ(ierr);
> 	ierr = VecView(bp, viewer); CHKERRQ(ierr);
> 
> 
> 	// clean-up
> 	ierr = MatDestroy(Ap); CHKERRQ(ierr);
> 	ierr = VecDestroy(bp); CHKERRQ(ierr);
> 	ierr = VecDestroy(xp); CHKERRQ(ierr);
> 
> 	free(col);
> 	free(row);
> 	free(row_values);
> 	
> 	return b;"
> 
> The file 'viewer' is outputed correctly.
> When 'calculate' finishes the finalization function gets called:
> 	"ierr = PetscFinalize(); CHKERRQ(ierr);"
> 
> Does anyone have any idea to why my program breaks?
> 
> Thank you in advance,
> Best regards,
> Nemanja Ilic
> 
> PS
> Sorry if this is not the right place for my question :)



More information about the petsc-users mailing list