---
name: "MPE_Open_graphics"
section: "4"
platform: "linux"
package: "mpi-doc"
version: "1.2.7-9.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/MPE_Open_graphics"
---

# MPE\_Open\_graphics(4)

(collectively) opens an X Windows display

## NAME

MPE\_Open\_graphics -  (collectively) opens an X Windows display

## SYNOPSIS

```
#include "mpe.h"
int MPE_Open_graphics( handle, comm, display, x, y, w, h, is_collective )
MPE_XGraph *handle;
MPI_Comm   comm;
char       display[MPI_MAX_PROCESSOR_NAME+4];
int        x, y;
int        w, h;
int        is_collective;
```

## INPUT PARAMETERS

- **comm**

  \- Communicator of participating processes

- **display**

  \- Name of X window display.  If null, display will be taken from the DISPLAY variable on the process with rank 0 in  *comm* . If that is either undefined, or starts with w ":", then the value of display is \`hostname\`:0

- **x,y**

  \- position of the window.  If  *(-1,-1)* , then the user should be asked to position the window (this is a window manager issue).

- **w,h**

  \- width and height of the window, in pixels.

- **is\_collective**

  \- true if the graphics operations are collective; this allows the MPE graphics operations to make fewer connections to the  display.  If false, then all processes in the communicator comm will  open the display; this could exceed the number of connections that your X window server allows.  Not yet implemented.

## OUTPUT PARAMETER

- **handle**

  \- Graphics handle to be given to other MPE graphics routines.

## NOTES

This is a collective routine.  All processes in the given communicator must call it, and it has the same semantics as  *MPI\_Barrier* (that is, other collective operations can not cross this routine).

## NOTES FOR FORTRAN INTERFACE

The Fortran interface to this routine is different from its C counterpart and it has an additional argument, ierr, at the end of the argument list, i.e. the returned function value (the error code) in C interface is returned as the additional argument in Fortran interface.  The Fortran interface is invoked with the CALL statement.

All MPI and MPE objects, MPI\_Comm, MPE\_XGraph and MPE\_Color, are of type INTEGER in Fortran.

## ADDITIONAL NOTES FOR FORTRAN INTERFACE

If Fortran  *display* argument is an empty string, "", display will be taken from the DISPLAY variable on the process with rank 0 in  *comm* .

The trailing blanks in Fortran CHARACTER string argument will be ignored.

## LOCATION

mpe\_graphics.c
