Skip to content

Conversation

@wkliao
Copy link

@wkliao wkliao commented Oct 14, 2025

This PR fixes file darshan-apmpi.c by making variable __darshan_disabled
local to its caller functions. Otherwise, building Darshan 3.4.7 with configure
command-line option --enable-apmpi-mod --enable-apmpi-coll-sync would
fail with the error messages below.

In file included from darshan-apmpi.c:18:
darshan-apmpi.c: In function ‘__wrap_MPI_Barrier’:
/home/runner/work/darshan/darshan/darshan-runtime/lib/darshan.h:227:9:
error: redefinition of ‘__darshan_disabled’
227 | int __darshan_disabled =
darshan_core_disabled_instrumentation()
| ^~~~~~~~~~~~~~~~~~
darshan-apmpi.c:32:11: note: in expansion of macro ‘MAP_OR_FAIL’
32 | MAP_OR_FAIL(PMPI_Barrier);
| ^~~~~~~~~~~
darshan-apmpi.c:1389:5: note: in expansion of macro ‘TIME_SYNC’
1389 | TIME_SYNC(__real_PMPI_Barrier(comm));
| ^~~~~~~~~

Darshan 3.5.0, to be released soon, has incorporated this same fix in
darshan-hpc/darshan#1082

cc @carns @roblatham00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant