Module Scientific.MPI.IO


Class LogFile: File for logging events from all processes

Constructor: LogFile(filename, communicator=None)

filename

the name of the file

communicator

the communicator in which the file is accesible. The default value of None means to use the global world communicator, i.e. all possible processes.

The purpose of LogFile objects is to collect short text output from all processors into a single file. All processes can write whatever they want at any time; the date is simply stored locally. After the file has been closed by all processes, the data is sent to process 0, which then writes everything to one text file, neatly separated by process rank number.

Note that due to the intermediate storage of the data, LogFile objects should not be used for large amounts of data. Also note that all data is lost if a process crashes before closing the file.

Methods: