2: #include <private/viewerimpl.h> /*I "petsc.h" */
6: /*@C
7: PetscViewerAMSOpen - Opens an AMS memory snooper PetscViewer.
9: Collective on MPI_Comm
11: Input Parameters:
12: + comm - the MPI communicator
13: - name - name of AMS communicator being created
15: Output Parameter:
16: . lab - the PetscViewer
18: Options Database Keys:
19: + -ams_port <port number> - port number where you are running AMS client
20: . -ams_publish_objects - publish all PETSc objects to be visible to the AMS memory snooper,
21: use PetscObjectAMSPublish() to publish individual objects
22: - -ams_java - open JAVA AMS client
24: Level: advanced
26: Fortran Note:
27: This routine is not supported in Fortran.
29: See the matlab/petsc directory in the AMS installation for one example of external
30: tools that can monitor PETSc objects that have been published.
32: Notes:
33: This PetscViewer can be destroyed with PetscViewerDestroy().
35: Information about the AMS is available via http://www.mcs.anl.gov/ams.
37: Concepts: AMS
38: Concepts: ALICE Memory Snooper
39: Concepts: Asynchronous Memory Snooper
41: .seealso: PetscObjectAMSPublish(), PetscViewerDestroy(), PetscViewerStringSPrintf()
43: @*/
44: PetscErrorCode PetscViewerAMSOpen(MPI_Comm comm,const char name[],PetscViewer *lab)
45: {
47:
49: PetscViewerCreate(comm,lab);
50: PetscViewerSetType(*lab,PETSCVIEWERAMS);
51: PetscViewerAMSSetCommName(*lab,name);
52: return(0);
53: }