Skip to content

Commit 85ea3ec

Browse files
author
OutlyingWest
committed
marshalling detailed report env variable documented
1 parent 299370c commit 85ea3ec

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ MODE=[disk,memory]
152152
```
153153

154154
When using persistence in `disk` mode, user can also define directory to which serializer output will be saved with `SCOREP_KERNEL_PERSISTENCE_DIR` environment variable.
155+
To see the detailed report for marshalling steps - `MARSHALLING_DETAILED_REPORT=1` environment variable can be set.
155156

156157
`%%execute_with_scorep`
157158

examples/ExampleBasic.ipynb

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,57 @@
466466
{
467467
"cell_type": "markdown",
468468
"metadata": {},
469-
"source": []
469+
"source": [
470+
"### Large array processing with Score-P\n",
471+
"This example illustrates the steps involved in the marshalling process when a cell instrumented with Score-P is executed with a large data payload as input.\n"
472+
]
473+
},
474+
{
475+
"metadata": {},
476+
"cell_type": "code",
477+
"outputs": [],
478+
"execution_count": null,
479+
"source": [
480+
"import time\n",
481+
"import numpy as np\n",
482+
"\n",
483+
"def generate_array_with_size(size_mb, dtype=np.float32):\n",
484+
" size_bytes = size_mb * 1024 * 1024\n",
485+
" element_size = np.dtype(dtype).itemsize\n",
486+
" num_elements = size_bytes // element_size\n",
487+
" array = np.zeros(num_elements, dtype=dtype)\n",
488+
" return array\n",
489+
"\n",
490+
"big_array = generate_array_with_size(size_mb=1000)"
491+
]
492+
},
493+
{
494+
"metadata": {},
495+
"cell_type": "markdown",
496+
"source": "Enable marshalling detailed report for each step."
497+
},
498+
{
499+
"metadata": {},
500+
"cell_type": "code",
501+
"outputs": [],
502+
"execution_count": null,
503+
"source": "%env MARSHALLING_DETAILED_REPORT=1"
504+
},
505+
{
506+
"metadata": {},
507+
"cell_type": "markdown",
508+
"source": "Run cell with Score-P"
509+
},
510+
{
511+
"metadata": {},
512+
"cell_type": "code",
513+
"outputs": [],
514+
"execution_count": null,
515+
"source": [
516+
"%%execute_with_scorep\n",
517+
"big_array\n",
518+
"time.sleep(4)"
519+
]
470520
}
471521
],
472522
"metadata": {

0 commit comments

Comments
 (0)