# PetscViewerSAWsOpen
Opens an SAWs `PetscViewer`. 
## Synopsis
```
#include "petscsys.h"  */
PetscErrorCode PetscViewerSAWsOpen(MPI_Comm comm, PetscViewer *lab)
```
Collective; No Fortran Support


## Input Parameters

- ***comm -*** the MPI communicator



## Output Parameter

- ***lab -*** the `PetscViewer`



## Options Database Keys

- ***-saws_port <port number> -*** port number where you are running SAWs client
- ***-xxx_view saws -*** publish the object xxx
- ***-xxx_saws_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 problem with an external tool that access the object with SAWS





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

Information about the SAWs is available via https://bitbucket.org/saws/saws


## See Also
 [](sec_viewers), `PetscViewerDestroy()`, `PetscViewerStringSPrintf()`, `PETSC_VIEWER_SAWS_()`, `PetscObjectSAWsBlock()`,
`PetscObjectSAWsViewOff()`, `PetscObjectSAWsTakeAccess()`, `PetscObjectSAWsGrantAccess()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/ams/amsopen.c.html#PetscViewerSAWsOpen">src/sys/classes/viewer/impls/ams/amsopen.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/ams/amsopen.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
