Skip to content

Commit c56c3f3

Browse files
committed
OpenMP explorer and supporting changes
* Change PRV class to allow lazy loading of the prv data * Some refactoring to use PRV class for all PRVTrace Metadata operations
1 parent 2ee27c8 commit c56c3f3

File tree

12 files changed

+1508
-819
lines changed

12 files changed

+1508
-819
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ recursive-include pypop/cfgs *
66
recursive-include pypop/cutters *
77
recursive-include pypop/filters *
88
global-exclude */.ipynb_checkpoints/*
9+
global-exclude */*.bincache

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ additional formats.
1010

1111
## Requirements
1212

13-
* [Extrae] (for trace creation)
13+
* [Extrae] (for trace capture)
1414
* [Paraver/Paramedir] (for trace analysis)
1515
* [Dimemas] *optional* (for ideal network analysis)
1616
* [Numpy]
@@ -28,7 +28,7 @@ additional formats.
2828

2929
## Installation
3030

31-
Install using pip:
31+
PyPOP itself can be installed using the `pip` package manager:
3232

3333
```bash
3434
$ pip install [--user] NAG-PyPOP
@@ -40,6 +40,9 @@ system site package directory.
4040
**N.B: Some linux distributions are still shipping Python2 alongside Python3. PyPOP requires
4141
Python3 and so you may need to install using the `pip3` command rather than the `pip` command.**
4242

43+
Note that the [Extrae] tool is needed to collect application traces and the [Paraver/Paramedir] and
44+
[Dimemas] tools must be installed for trace Analysis.
45+
4346
## Usage
4447

4548
Jupyter notebooks are intended to be the primary interface to PyPOP. This guide uses several

pypop/dimemas.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from pkg_resources import resource_filename
2121

22-
from .prv import _parse_paraver_headerline
22+
from .prv import PRV
2323
from .utils.io import zipopen
2424
from .extrae import remove_trace
2525
from . import config
@@ -46,13 +46,12 @@ def dimemas_idealise(tracefile, outpath=None):
4646
"""
4747

4848
# First we need the application layout info
49-
with zipopen(tracefile, "rt") as fh:
50-
metadata = _parse_paraver_headerline(fh.readline().strip())
49+
metadata = PRV(tracefile, lazy_load=True).metadata
5150

5251
# Populate run specfic config data
5352
subs = {
54-
"@NUM_NODES@": metadata.application_layout.commsize,
55-
"@PROCS_PER_NODE@": max(metadata.procs_per_node),
53+
"@NUM_NODES@": metadata.num_processes,
54+
"@PROCS_PER_NODE@": max(metadata.cores_per_node),
5655
"@RANKS_PER_NODE@": 1,
5756
"@COLLECTIVES_PATH@": IDEAL_COLL_PATH,
5857
}

pypop/examples/mpi/MPI Metrics Example.ipynb

Lines changed: 20 additions & 593 deletions
Large diffs are not rendered by default.

pypop/examples/mpi/pypop_gui.ipynb

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"hide_input": true
8+
},
9+
"outputs": [],
10+
"source": [
11+
"import os\n",
12+
"from pypop.notebook_interface import MetricsWizard\n",
13+
"from pypop.metrics import MPI_Metrics\n",
14+
"\n",
15+
"tracedir=\"./epoch_example_traces\"\n",
16+
"gui = MetricsWizard(MPI_Metrics,\n",
17+
" starting_files=[os.path.join(tracedir, x)\n",
18+
" for x in os.listdir(tracedir)\n",
19+
" if x.endswith(\".prv.gz\")])\n",
20+
"display(gui)"
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": null,
26+
"metadata": {},
27+
"outputs": [],
28+
"source": []
29+
}
30+
],
31+
"metadata": {
32+
"kernelspec": {
33+
"display_name": "Python 3",
34+
"language": "python",
35+
"name": "python3"
36+
},
37+
"language_info": {
38+
"codemirror_mode": {
39+
"name": "ipython",
40+
"version": 3
41+
},
42+
"file_extension": ".py",
43+
"mimetype": "text/x-python",
44+
"name": "python",
45+
"nbconvert_exporter": "python",
46+
"pygments_lexer": "ipython3",
47+
"version": "3.8.6"
48+
}
49+
},
50+
"nbformat": 4,
51+
"nbformat_minor": 4
52+
}

0 commit comments

Comments
 (0)