appio with dynamically-linked libpapi

11 views
Skip to first unread message

Nicholas Chaimov

unread,
Oct 28, 2025, 8:29:54 PMOct 28
to ptools-perfapi
Hello,

I'm a TAU developer. I've been trying to get the appio component to work with PAPI through TAU. Towards that end, I've been experimenting with the tests in src/components/appio/tests.

The test appio_test_read_write, run as built by the Makefile, prints the expected results:

This program will read /etc/group and write it to /dev/null
----
appio:::OPEN_CALLS: 2
appio:::OPEN_FDS: 0
appio:::READ_CALLS: 9
appio:::READ_BYTES: 7993
appio:::READ_USEC: 14
appio:::READ_ERR: 0
appio:::READ_INTERRUPTED: 0
appio:::READ_WOULD_BLOCK: 0
appio:::WRITE_CALLS: 8
appio:::WRITE_BYTES: 7993
appio:::WRITE_USEC: 6
appio:::WRITE_WOULD_BLOCK: 0

The Makefile builds the test statically linked against libpapi.a. If I instead build it dynamically linked against libpapi.so, then all of the counters are zero:

This program will read /etc/group and write it to /dev/null
----
appio:::OPEN_CALLS: 0
appio:::OPEN_FDS: 0
appio:::READ_CALLS: 0
appio:::READ_BYTES: 0
appio:::READ_USEC: 0
appio:::READ_ERR: 0
appio:::READ_INTERRUPTED: 0
appio:::READ_WOULD_BLOCK: 0
appio:::WRITE_CALLS: 0
appio:::WRITE_BYTES: 0
appio:::WRITE_USEC: 0
appio:::WRITE_WOULD_BLOCK: 0

Does using the appio component require that the application be linked statically against libpapi.a in order to intercept the I/O calls?

Thanks,

Nicholas Chaimov
HPC Computer Scientist
ParaTools, Inc.
1900 Millrace Dr Ste 104
Eugene, OR 97403
(503) 869-8513

Treece Burgess

unread,
Oct 30, 2025, 10:14:10 AMOct 30
to Nicholas Chaimov, ptools-perfapi
Hello Nicholas,

The appio component should not require the application to be linked statically against libpapi.a to run successfully.

I have been able to reproduce this behavior and am looking further into it.

Best wishes,

Treece

--
You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ptools-perfap...@icl.utk.edu.
To view this discussion visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/479603b5-bf01-4298-9937-986434c0c7ebn%40icl.utk.edu.

Treece Burgess

unread,
Oct 31, 2025, 8:38:24 AMOct 31
to Nicholas Chaimov, ptools-perfapi
Hello Nicholas,

I have created PR #501 that from my testing resolves this issue. If you have time to test this PR to see if it resolves the issue for yourself as well, that would be great.

Best wishes,

Treece

Phil Mucci

unread,
Oct 31, 2025, 9:15:47 AMOct 31
to Burgess Treece, Nicholas Chaimov, ptools-perfapi

Nicholas Chaimov

unread,
Oct 31, 2025, 2:02:47 PMOct 31
to Treece Burgess, ptools-perfapi
Hi Treece,

I have tested the PR and confirm that it fixes the issue with the test for me. I can also now use this component successfully with TAU.

Thanks!
Reply all
Reply to author
Forward
0 new messages