You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-22Lines changed: 63 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
scorep is a module that allows tracing of python scripts using [Score-P](http://www.vi-hps.org/projects/score-p/).
3
3
4
4
# Install
5
-
You need to have scorep-config in your `PATH` variable.
5
+
You need at least Score-P 5.0, build with `--enable-shared`.
6
+
Please make sure, that `scorep-config` is in your `PATH` variable.
6
7
7
8
Then simply run
8
9
```
@@ -26,22 +27,27 @@ and
26
27
27
28
There is also a small [HowTo](https://github.com/score-p/scorep_binding_python/wiki) in the wiki.
28
29
29
-
# Compatibility
30
-
## Working
31
-
* python3
32
-
* python2.7
33
-
* mpi using mpi4py
30
+
Since version 0.9 it is possible to pass the traditional Score-P commands to the Score-P bindings, e.g.:
34
31
35
-
## Not Working
36
-
*python multiprocessing
37
-
* Score-P does currently not support any non MPI or non SHMEM communication. So the different processes will not know from each other. You might want to take a look to https://mpi4py.readthedocs.io/en/stable/mpi4py.futures.html .
To use trace an MPI parallel application, please specify
45
+
46
+
```
47
+
python -m scorep --mpp=mpi <script.py>
48
+
```
49
+
50
+
## User instrumentation
45
51
46
52
In some cases, the user might want to define a region, log some parameters, or just disable tracing for a certain area. To do so the module implements a few functions:
47
53
@@ -52,7 +58,6 @@ scorep.user.region_end(name)
52
58
53
59
These functions allow the definition of user regions. `name` defines the name of a region. Each `user.region_begin` shall have a corresponding call to `user.region_end`.
These functions allow passing user parameters to Score-P. These parameters can be int, uint and string. `name` defines the name of the parameter, while `val` or `string` defines the value that is passed to Score-P.
75
+
Please be aware, that the scorep module still needs to be preloaded, i.e. by using `python -m scorep`.
70
76
71
-
# Tracing
72
-
The tracing uses Score-P User instrumentation. The python trace module was reworked, to pass the region names to ```SCOREP_USER_REGION_BEGIN``` and ```SCOREP_USER_REGION_END``` instead of printing. All other features of the tracing module where striped.
77
+
## Additional Flags
73
78
74
-
# MPI
79
+
The Score-P bindings now also support a `--nopython` flag, which disables the python instrumentation.
80
+
This might be helpful, if only user instrumentation is required, or only some instrumented libraries shall be traced.
75
81
76
-
This version of the Score-P python tracing plugin supports MPI. To use it please specify `--mpi`:
82
+
## Backward Compatibility
83
+
84
+
In order to maintain backwards Compatibility, the following flags are set per default:
To disable compiler instrumentation please specify:
97
+
98
+
```
99
+
python -m scorep --nocompiler <script.py>
100
+
```
101
+
102
+
For other thread schemes just specify `--thread=<something>`. E.g. :
103
+
104
+
```
105
+
python -m scorep --thread=omp <script.py>
106
+
```
107
+
108
+
Please be aware the `--user` is always passed to Score-P, as this is needed for the python instrumentation.
109
+
110
+
# Compatibility
111
+
## Working
112
+
* python3
113
+
* python2.7
114
+
* mpi using mpi4py
115
+
* threaded applications
116
+
117
+
118
+
## Not Working
119
+
* python multiprocessing
120
+
* Score-P does currently not support any non MPI or non SHMEM communication. So the different processes will not know from each other. You might want to take a look to https://mpi4py.readthedocs.io/en/stable/mpi4py.futures.html .
121
+
122
+
# Tracing
123
+
The tracing uses Score-P User instrumentation. The python trace module was reworked, to pass the region names to `SCOREP_USER_REGION_BEGIN` and `SCOREP_USER_REGION_END` instead of printing. All other features of the tracing module where striped.
0 commit comments