petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscPOpen

Runs a program on processor zero and sends either its input or output to a file.

Synopsis

PetscErrorCode  PetscPOpen(MPI_Comm comm,const char machine[],const char program[],const char mode[],FILE **fp)
Logically Collective on MPI_Comm, but only process 0 runs the command Many br

Input Parameters

comm - MPI communicator, only processor zero runs the program Many br
machine - machine to run command on or NULL, or string with 0 in first location Many br
program - name of program to run Many br
mode - either r or w Many br

Output Parameter

fp -the file pointer where program input or output may be read or NULL if don't care Many br

Many br

Notes

Use PetscPClose() to close the file pointer when you are finished with it Many brDoes not work under Windows Many br

If machine is not provided will use the value set with PetsPOpenSetMachine() if that was provided, otherwise Many brwill use the machine running node zero of the communicator Many br

The program string may contain ${DISPLAY}, ${HOMEDIRECTORY} or ${WORKINGDIRECTORY}; these Many brwill be replaced with relevent values. Many br

See Also

PetscFOpen(), PetscFClose(), PetscPClose(), PetscPOpenSetMachine()

Level:intermediate
Location:
src/sys/fileio/mpiuopen.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages