1: /*$Id: amsopen.c,v 1.15 2001/03/23 23:20:01 balay Exp $*/ 3: #include "src/sys/src/viewer/viewerimpl.h" /*I "petsc.h" */ 5: /*@C 6: PetscViewerAMSOpen - Opens an AMS memory snooper PetscViewer. 8: Collective on MPI_Comm 10: Input Parameters: 11: + comm - the MPI communicator 12: - name - name of AMS communicator being created 14: Output Parameter: 15: . lab - the PetscViewer 17: Options Database Keys: 18: + -ams_port <port number> 19: . -ams_publish_objects - publish all PETSc objects to be visible to the AMS memory snooper, 20: use PetscObjectPublish() to publish individual objects 21: . -ams_publish_stack - publish the PETSc stack frames to the snooper 22: . -ams_matlab - open Matlab Petscview AMS client 23: - -ams_java - open JAVA AMS client 25: Level: advanced 27: Fortran Note: 28: This routine is not supported in Fortran. 30: See the matlab/petsc directory in the AMS installation for one example of external 31: tools that can monitor PETSc objects that have been published. 33: Notes: 34: This PetscViewer can be destroyed with PetscViewerDestroy(). 36: Information about the AMS (ALICE Memory Snooper) is available via 37: http://www.mcs.anl.gov/ams. 39: Concepts: AMS 40: Concepts: ALICE Memory Snooper 41: Concepts: Asynchronous Memory Snooper 43: .seealso: PetscObjectPublish(), PetscViewerDestroy(), PetscViewerStringSPrintf() 45: @*/ 46: int PetscViewerAMSOpen(MPI_Comm comm,const char name[],PetscViewer *lab) 47: { 49: 51: PetscViewerCreate(comm,lab); 52: PetscViewerSetType(*lab,PETSC_VIEWER_AMS); 53: PetscViewerAMSSetCommName(*lab,name); 54: return(0); 55: }