ViewerSocketOpen

Opens a connection to a Matlab or other socket based server.

Synopsis

int ViewerSocketOpen(MPI_Comm comm,const char machine[],int port,Viewer *lab)
Collective on MPI_Comm

Input Parameters

comm - the MPI communicator
machine - the machine the server is running on
port - the port to connect to, use PETSC_DEFAULT for the default

Output Parameter

lab -a context to use when communicating with the server

Notes

Most users should employ the following commands to access the Matlab viewers

   ViewerSocketOpen(MPI_Comm comm, char *machine,int port,Viewer &viewer)
   MatView(Mat matrix,Viewer viewer)

               or

   ViewerSocketOpen(MPI_Comm comm, char *machine,int port,Viewer &viewer)
   VecView(Vec vector,Viewer viewer)

Options Database Keys

For use with the default Matlab viewer, VIEWER_SOCKET_WORLD or if PETSC_NULL is passed for machine or PETSC_DEFAULT is passed for port
   -viewer_socket_machine <machine>
   -viewer_socket_port <port>

Environmental variables

PETSC_VIEWER_SOCKET_PORT portnumber - Currently the only socket client available is Matlab. See src/dm/da/examples/tests/ex12.c and ex12.m for an example of usage.

Keywords

Viewer, Socket, open

See Also

MatView(), VecView()

Level:intermediate
Location:src/sys/src/viewer/impls/socket/send.c
Viewer Index
Table of Contents