forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.io.abinit.abitimer.html
691 lines (637 loc) · 39.5 KB
/
pymatgen.io.abinit.abitimer.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.io.abinit.abitimer module — pymatgen 2019.5.1 documentation</title>
<link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33990148-1']);
_gaq.push(['_trackPageview']);
</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pymatgen 2019.5.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pymatgen.io.abinit.abitimer">
<span id="pymatgen-io-abinit-abitimer-module"></span><h1>pymatgen.io.abinit.abitimer module<a class="headerlink" href="#module-pymatgen.io.abinit.abitimer" title="Permalink to this headline">¶</a></h1>
<p>This module provides objects for extracting timing data from the ABINIT output files
It also provides tools to analye and to visualize the parallel efficiency.</p>
<dl class="class">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer">
<em class="property">class </em><code class="descname">AbinitTimer</code><span class="sig-paren">(</span><em>sections</em>, <em>info</em>, <em>cpu_time</em>, <em>wall_time</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Container class storing the timing results.</p>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.cpuwall_histogram">
<code class="descname">cpuwall_histogram</code><span class="sig-paren">(</span><em>ax=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.cpuwall_histogram"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.cpuwall_histogram" title="Permalink to this definition">¶</a></dt>
<dd><p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.get_dataframe">
<code class="descname">get_dataframe</code><span class="sig-paren">(</span><em>sort_key='wall_time'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.get_dataframe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.get_dataframe" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a pandas DataFrame with entries sorted according to <cite>sort_key</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.get_section">
<code class="descname">get_section</code><span class="sig-paren">(</span><em>section_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.get_section"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.get_section" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.get_values">
<code class="descname">get_values</code><span class="sig-paren">(</span><em>keys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.get_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.get_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of values associated to a particular list of keys.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.names_and_values">
<code class="descname">names_and_values</code><span class="sig-paren">(</span><em>key</em>, <em>minval=None</em>, <em>minfract=None</em>, <em>sorted=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.names_and_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.names_and_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Select the entries whose value[key] is >= minval or whose fraction[key] is >= minfract
Return the names of the sections and the corresponding values.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.ncpus">
<code class="descname">ncpus</code><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.ncpus" title="Permalink to this definition">¶</a></dt>
<dd><p>Total number of CPUs employed.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.order_sections">
<code class="descname">order_sections</code><span class="sig-paren">(</span><em>key</em>, <em>reverse=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.order_sections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.order_sections" title="Permalink to this definition">¶</a></dt>
<dd><p>Sort sections according to the value of key.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.pie">
<code class="descname">pie</code><span class="sig-paren">(</span><em>key='wall_time'</em>, <em>minfract=0.05</em>, <em>ax=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.pie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.pie" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot pie chart for this timer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> – Keyword used to extract data from the timer.</p></li>
<li><p><strong>minfract</strong> – Don’t show sections whose relative weight is less that minfract.</p></li>
<li><p><strong>ax</strong> – matplotlib <code class="xref py py-class docutils literal notranslate"><span class="pre">Axes</span></code> or None if a new figure should be created.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><cite>matplotlib</cite> figure</p>
</dd>
</dl>
<p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.scatter_hist">
<code class="descname">scatter_hist</code><span class="sig-paren">(</span><em>ax=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.scatter_hist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.scatter_hist" title="Permalink to this definition">¶</a></dt>
<dd><p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.sum_sections">
<code class="descname">sum_sections</code><span class="sig-paren">(</span><em>keys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.sum_sections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.sum_sections" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.to_csv">
<code class="descname">to_csv</code><span class="sig-paren">(</span><em>fileobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.to_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.to_csv" title="Permalink to this definition">¶</a></dt>
<dd><p>Write data on file fileobj using CSV format.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.to_table">
<code class="descname">to_table</code><span class="sig-paren">(</span><em>sort_key='wall_time'</em>, <em>stop=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimer.to_table"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.to_table" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a table (list of lists) with timer data</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimer.totable">
<code class="descname">totable</code><span class="sig-paren">(</span><em>sort_key='wall_time'</em>, <em>stop=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimer.totable" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a table (list of lists) with timer data</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser">
<em class="property">class </em><code class="descname">AbinitTimerParser</code><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">collections.abc.Iterable</span></code></p>
<p>Responsible for parsing a list of output files, extracting the timing results
and analyzing the results.
Assume the Abinit output files have been produced with <cite>timopt -1</cite>.</p>
<p class="rubric">Example</p>
<p>parser = AbinitTimerParser()
parser.parse(list_of_files)</p>
<p>To analyze all <a href="#id1"><span class="problematic" id="id2">*</span></a>.abo files withing top, use:</p>
<blockquote>
<div><p>parser, paths, okfiles = AbinitTimerParser.walk(top=”.”, ext=”.abo”)</p>
</div></blockquote>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.BEGIN_TAG">
<code class="descname">BEGIN_TAG</code><em class="property"> = '-<BEGIN_TIMER'</em><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.BEGIN_TAG" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.END_TAG">
<code class="descname">END_TAG</code><em class="property"> = '-<END_TIMER>'</em><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.END_TAG" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.Error">
<code class="descname">Error</code><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.Error" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#pymatgen.io.abinit.abitimer.AbinitTimerParserError" title="pymatgen.io.abinit.abitimer.AbinitTimerParserError"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbinitTimerParserError</span></code></a></p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.filenames">
<code class="descname">filenames</code><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.filenames" title="Permalink to this definition">¶</a></dt>
<dd><p>List of files that have been parsed successfully.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.get_sections">
<code class="descname">get_sections</code><span class="sig-paren">(</span><em>section_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.get_sections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.get_sections" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of sections stored in self.timers() given <cite>section_name</cite>
A fake section is returned if the timer does not have section_name.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.parse">
<code class="descname">parse</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.parse" title="Permalink to this definition">¶</a></dt>
<dd><p>Read and parse a filename or a list of filenames.
Files that cannot be opened are ignored. A single filename may also be given.</p>
<p>Return: list of successfully read files.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.pefficiency">
<code class="descname">pefficiency</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.pefficiency"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.pefficiency" title="Permalink to this definition">¶</a></dt>
<dd><p>Analyze the parallel efficiency.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><a class="reference internal" href="#pymatgen.io.abinit.abitimer.ParallelEfficiency" title="pymatgen.io.abinit.abitimer.ParallelEfficiency"><code class="xref py py-class docutils literal notranslate"><span class="pre">ParallelEfficiency</span></code></a> object.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_all">
<code class="descname">plot_all</code><span class="sig-paren">(</span><em>show=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.plot_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_all" title="Permalink to this definition">¶</a></dt>
<dd><p>Call all plot methods provided by the parser.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_efficiency">
<code class="descname">plot_efficiency</code><span class="sig-paren">(</span><em>key='wall_time'</em>, <em>what='good+bad'</em>, <em>nmax=5</em>, <em>ax=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.plot_efficiency"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_efficiency" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot the parallel efficiency</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> – Parallel efficiency is computed using the wall_time.</p></li>
<li><p><strong>what</strong> – Specifies what to plot: <cite>good</cite> for sections with good parallel efficiency.
<cite>bad</cite> for sections with bad efficiency. Options can be concatenated with <cite>+</cite>.</p></li>
<li><p><strong>nmax</strong> – Maximum number of entries in plot</p></li>
<li><p><strong>ax</strong> – matplotlib <code class="xref py py-class docutils literal notranslate"><span class="pre">Axes</span></code> or None if a new figure should be created.</p></li>
</ul>
</dd>
</dl>
<table class="docutils align-center">
<colgroup>
<col style="width: 24%" />
<col style="width: 76%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>linewidth</p></td>
<td><p>matplotlib linewidth. Default: 2.0</p></td>
</tr>
<tr class="row-odd"><td><p>markersize</p></td>
<td><p>matplotlib markersize. Default: 10</p></td>
</tr>
</tbody>
</table>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><cite>matplotlib</cite> figure</p>
</dd>
</dl>
<p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_pie">
<code class="descname">plot_pie</code><span class="sig-paren">(</span><em>key='wall_time'</em>, <em>minfract=0.05</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.plot_pie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_pie" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot pie charts of the different timers.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> – Keyword used to extract data from timers.</p></li>
<li><p><strong>minfract</strong> – Don’t show sections whose relative weight is less that minfract.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><cite>matplotlib</cite> figure</p>
</dd>
</dl>
<p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_stacked_hist">
<code class="descname">plot_stacked_hist</code><span class="sig-paren">(</span><em>key='wall_time'</em>, <em>nmax=5</em>, <em>ax=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.plot_stacked_hist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.plot_stacked_hist" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot stacked histogram of the different timers.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> – Keyword used to extract data from the timers. Only the first <cite>nmax</cite>
sections with largest value are show.</p></li>
<li><p><strong>mmax</strong> – Maximum nuber of sections to show. Other entries are grouped together
in the <cite>others</cite> section.</p></li>
<li><p><strong>ax</strong> – matplotlib <code class="xref py py-class docutils literal notranslate"><span class="pre">Axes</span></code> or None if a new figure should be created.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><cite>matplotlib</cite> figure</p>
</dd>
</dl>
<p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.section_names">
<code class="descname">section_names</code><span class="sig-paren">(</span><em>ordkey='wall_time'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.section_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.section_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the names of sections ordered by ordkey.
For the time being, the values are taken from the first timer.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.summarize">
<code class="descname">summarize</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.summarize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.summarize" title="Permalink to this definition">¶</a></dt>
<dd><p>Return pandas DataFrame with the most important results stored in the timers.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.timers">
<code class="descname">timers</code><span class="sig-paren">(</span><em>filename=None</em>, <em>mpi_rank='0'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.timers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.timers" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of timers associated to the given <cite>filename</cite> and MPI rank mpi_rank.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParser.walk">
<em class="property">classmethod </em><code class="descname">walk</code><span class="sig-paren">(</span><em>top='.'</em>, <em>ext='.abo'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParser.walk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParser.walk" title="Permalink to this definition">¶</a></dt>
<dd><p>Scan directory tree starting from top, look for files with extension <cite>ext</cite> and
parse timing data.</p>
<dl class="simple">
<dt>Return: (parser, paths, okfiles)</dt><dd><p>where <cite>parser</cite> is the new object, <cite>paths</cite> is the list of files found and <cite>okfiles</cite>
is the list of files that have been parsed successfully.
(okfiles == paths) if all files have been parsed.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerParserError">
<em class="property">exception </em><code class="descname">AbinitTimerParserError</code><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerParserError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerParserError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Errors raised by AbinitTimerParser</p>
</dd></dl>
<dl class="class">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection">
<em class="property">class </em><code class="descname">AbinitTimerSection</code><span class="sig-paren">(</span><em>name</em>, <em>cpu_time</em>, <em>cpu_fract</em>, <em>wall_time</em>, <em>wall_fract</em>, <em>ncalls</em>, <em>gflops</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerSection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Record with the timing results associated to a section of code.</p>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.FIELDS">
<code class="descname">FIELDS</code><em class="property"> = ('name', 'wall_time', 'wall_fract', 'cpu_time', 'cpu_fract', 'ncalls', 'gflops')</em><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.FIELDS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.NUMERIC_FIELDS">
<code class="descname">NUMERIC_FIELDS</code><em class="property"> = ['wall_time', 'wall_fract', 'cpu_time', 'cpu_fract', 'ncalls', 'gflops']</em><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.NUMERIC_FIELDS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.STR_FIELDS">
<code class="descname">STR_FIELDS</code><em class="property"> = ['name']</em><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.STR_FIELDS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.fake">
<em class="property">classmethod </em><code class="descname">fake</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerSection.fake"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.fake" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.to_csvline">
<code class="descname">to_csvline</code><span class="sig-paren">(</span><em>with_header=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerSection.to_csvline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.to_csvline" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string with data in CSV format</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.to_dict">
<code class="descname">to_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerSection.to_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.to_dict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.AbinitTimerSection.to_tuple">
<code class="descname">to_tuple</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#AbinitTimerSection.to_tuple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.AbinitTimerSection.to_tuple" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.io.abinit.abitimer.ParallelEfficiency">
<em class="property">class </em><code class="descname">ParallelEfficiency</code><span class="sig-paren">(</span><em>filenames</em>, <em>ref_idx</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#ParallelEfficiency"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.ParallelEfficiency" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.ParallelEfficiency.bad_sections">
<code class="descname">bad_sections</code><span class="sig-paren">(</span><em>key='wall_time'</em>, <em>criterion='mean'</em>, <em>nmax=5</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#ParallelEfficiency.bad_sections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.ParallelEfficiency.bad_sections" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.ParallelEfficiency.good_sections">
<code class="descname">good_sections</code><span class="sig-paren">(</span><em>key='wall_time'</em>, <em>criterion='mean'</em>, <em>nmax=5</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#ParallelEfficiency.good_sections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.ParallelEfficiency.good_sections" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.abitimer.ParallelEfficiency.totable">
<code class="descname">totable</code><span class="sig-paren">(</span><em>stop=None</em>, <em>reverse=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#ParallelEfficiency.totable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.ParallelEfficiency.totable" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.io.abinit.abitimer.alternate">
<code class="descname">alternate</code><span class="sig-paren">(</span><em>*iterables</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/abitimer.html#alternate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.abitimer.alternate" title="Permalink to this definition">¶</a></dt>
<dd><p>[a[0], b[0], … , a[1], b[1], …, a[n], b[n] …]
>>> alternate([1,4], [2,5], [3,6])
[1, 2, 3, 4, 5, 6]</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/pymatgen.io.abinit.abitimer.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pymatgen 2019.5.1 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2011, Pymatgen Development Team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.0.1.
</div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ?
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
</div>
</body>
</html>