flux-framework / PerfFlowAspect

An Aspect Oriented Programming (AOP)-based tool to analyze cross-cutting performance concerns of composite science workflows.
https://perfflowaspect.readthedocs.io
GNU Lesser General Public License v3.0
2 stars 15 forks source link

Multithreaded smoketest produces no end events #156

Open slabasan opened 6 months ago

slabasan commented 6 months ago

First reported by Henry on turing, but can also produce on lassen.

mkdir build
cd build
cmake -C ../host-configs/lassen*.cmake -DPERFFLOWASPECT_WITH_MULTITHREADING=ON ../
make

Running

$ cd test
$ ./smoketest_MT 
This is worker_thread() 3 
This is worker_thread() 2 
This is worker_thread() 1 
$ cat perfflow.lassen709.19136.pfw 
[
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19138, "ts": 1714069138376341.0, "ph": "B"},
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19139, "ts": 1714069138376361.0, "ph": "B"},
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19137, "ts": 1714069138376325.0, "ph": "B"},

Test notes:

Could be an issue with locks. Perhaps using the same lock causes problem with threads. Would adding another lock variable and using different ones solve the problem?

tpatki commented 6 months ago

Capturing notes from discussion with @slabasan .

The different cases need to be clearly documented and tested.