Misaligned parallel chunk when processing BOTS sparselu
Closed this issue · 2 comments
adamtuft commented
When running OMP_TOOL_LIBRARIES=/home/adam/git/otter/lib/libotter.so bin/sparselu.clang.for-omp-tasks-tied
encountered the following error during post-processing:
*** ERROR: Misaligned parallel location map: ***
>>> print(f"{endpoints=}")
endpoints={'discrete', 'leave'}
>>> print(f"{region_types=}")
region_types={'loop', 'explicit_task'}
>>> print(f"{event_types=}")
event_types={'task_create', 'workshare_end'}
Think this is possibly due to not correctly detecting imbalanced sharing of loop iterations in a parallel region, and assuming all threads encounter the same number of loop iterations. Needs further investigation.
adamtuft commented
Replicated with the following source:
int num[LEN] = {0}, k=0;
omp_set_num_threads(THREADS);
#pragma omp parallel for
for (k=0; k<LEN; k++)
{
#pragma omp task
{
num[k] = omp_get_thread_num();
usleep(50);
}
}
Error:
*** ERROR: Misaligned parallel location map: ***
endpoints={'leave', 'discrete'}
region_types={'explicit_task', 'loop'}
event_types={'task_create', 'workshare_end'}
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/adam/git/otter/src/python/otter/__main__.py", line 330, in <module>
(endpoint,), (region_type,), (event_type,) = endpoints, region_types, event_types
ValueError: too many values to unpack (expected 1)
adamtuft commented
Resolved this some time ago