petsc-3.4.2 2013-07-02

# PetscViewerAMSOpen

Opens an AMS memory snooper PetscViewer.

### Synopsis

    #include "petscsys.h"  */
    PetscErrorCode 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 if NULL is passed defaults to PETSc

### Output Parameter

lab -the PetscViewer

### Options Database Keys

| -ams_port <port number> | - port number where you are running AMS client
| -xxx_view ams | - publish the object xxx
| -xxx_ams_block | - blocks the program at the end of a critical point (for KSP and SNES it is the end of a solve) until the user unblocks the the problem with an external tool that access the object with the AMS
| -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

Unlike other viewers that only access the object being viewed on the call to XXXView(object,viewer) the AMS viewer allows one to view the object asynchronously as the program continues to run. One can remove AMS access to the object with a call to PetscObjectAMSViewOff().

Information about the AMS is available via http://www.mcs.anl.gov/ams.

### See Also

PetscViewerDestroy(), PetscViewerStringSPrintf(), PETSC_VIEWER_AMS_(), PetscObjectAMSBlock(),
PetscObjectAMSViewOff(), PetscObjectAMSTakeAccess(), PetscObjectAMSGrantAccess()

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