# PETSC_VIEWER_GLVIS_
Creates a `PETSCVIEWERGLVIS` `PetscViewer` shared by all processors in a communicator. 
## Synopsis
```
#include "petscviewer.h" 
#include "petscsys.h"    
PetscViewer PETSC_VIEWER_GLVIS_(MPI_Comm comm)
```
Collective; No Fortran Support


## Input Parameter

- ***comm -*** the MPI communicator to share the `PETSCVIEWERGLVIS` `PetscViewer`



## Environmental variables

- ***`PETSC_VIEWER_GLVIS_FILENAME` -*** output filename (if specified dump to disk, and takes precedence on `PETSC_VIEWER_GLVIS_HOSTNAME`)
- ***`PETSC_VIEWER_GLVIS_HOSTNAME` -*** machine where the GLVis server is listening (defaults to localhost)
- ***`PETSC_VIEWER_GLVIS_PORT`     -*** port opened by the GLVis server (defaults to 19916)





## Note
Unlike almost all other PETSc routines, `PETSC_VIEWER_GLVIS_()` does not return
an error code.  It is usually used in the form
```none
XXXView(XXX object, PETSC_VIEWER_GLVIS_(comm));
```


## See Also
 [](sec_viewers), `PETSCVIEWERGLVIS`, `PetscViewer`, `PetscViewerGLVISOpen()`, `PetscViewerGLVisType`, `PetscViewerCreate()`, `PetscViewerDestroy()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/glvis/glvis.c.html#PETSC_VIEWER_GLVIS_">src/sys/classes/viewer/impls/glvis/glvis.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/glvis/glvis.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)  
