File: Scientific_24.html

package info (click to toggle)
python-scientific 2.4.11-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,956 kB
  • ctags: 3,063
  • sloc: python: 9,157; ansic: 4,483; xml: 4,145; makefile: 126; sh: 18; csh: 1
file content (45 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<a name="Module:Scientific.MPI.IO"><h1>Module Scientific.MPI.IO</h1></a>

<hr width=70%>
<a name="Class:Scientific.MPI.IO.LogFile"><h2>Class LogFile: File for logging events from all processes</h2></a>

<p>Constructor: LogFile(<i>filename</i>, <i>communicator</i>=None)</p>

<p><dl>
<dt><i>filename</i></dt>
<dd><p>
the name of the file</p></dd>
<dt><i>communicator</i></dt>
<dd><p>
the communicator in which the file is accesible.
                  The default value of <tt>None</tt> means to use the
                  global world communicator, i.e. all possible
                  processes.</p></dd>
</dl>
</p>

<p>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.</p>

<p>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.
</p>

<b>Methods:</b><br>
<ul>
<li> <b><i>write</i></b>(<i>string</i>)
<p>Write <i>string</i> to the file.</p>

<li> <b><i>flush</i></b>()
<p>Write buffered data to the text file.</p>

<li> <b><i>close</i></b>()
<p>Close the file, causing the real text file to be written.</p>

</ul>