Skip to content

fix darshan-apmpi.c - #18

Open
wkliao wants to merge 2 commits into
argonne-lcf:mainfrom
wkliao:__darshan_disabled
Open

fix darshan-apmpi.c#18
wkliao wants to merge 2 commits into
argonne-lcf:mainfrom
wkliao:__darshan_disabled

Conversation

@wkliao

@wkliao wkliao commented Oct 14, 2025

Copy link
Copy Markdown

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