# PetscViewerAMSOpen

Opens an AMS memory snooper PetscViewer.

### Synopsis

    #include "petsc.h"  */
    int PetscViewerAMSOpen(MPI_Comm comm,const char name[],PetscViewer *lab)

Collective on MPI_Comm

### Input Parameters

| comm | - the MPI communicator
| name | - name of AMS communicator being created

### Output Parameter

lab -the PetscViewer

### Options Database Keys

| -ams_port <port number> | - port number where you are running AMS client
| -ams_publish_objects | - publish all PETSc objects to be visible to the AMS memory snooper, use PetscObjectPublish() to publish individual objects
| -ams_publish_stack | - publish the PETSc stack frames to the snooper
| -ams_matlab | - open Matlab Petscview AMS client
| -ams_java | - open JAVA AMS client

### Fortran Note

This routine is not supported in Fortran.

See the matlab/petsc directory in the AMS installation for one example of external tools that can monitor PETSc objects that have been published.

### Notes

This PetscViewer can be destroyed with PetscViewerDestroy().

Information about the AMS (ALICE Memory Snooper) is available via http://www.mcs.anl.gov/ams.

### See Also

PetscObjectPublish(), PetscViewerDestroy(), PetscViewerStringSPrintf()

Level:advanced
Location: src/sys/src/viewer/impls/ams/amsopen.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages