I wrote a C program (lets say A) and used the papi_attach() to attach the counters to an already C code( say B).
Now the program B can be anything ranging from a simple multiplication program to a multithreaded programs to write in files. The program A correctly measures for single threaded program B, but shows incorrect result for parallel write program.
The question is, can program A be used to monitor an already running program B which can use fork() or multiple threads, correctly???