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