Patch darshan-apmpi.c and add Github CI to test autoperf #1082
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should fix the second part of #1077 (Segmentation fault at the run time).
The same compilation problem happens to 3.4.7 release when Darshan is configured
with options
--enable-apmpi-modand--enable-apmpi-coll-sync.Add CI tests to test configure options of
--enable-apmpi-modand--enable-apmpi-coll-syncPatch darshan-apmpi.c to fix variable redefinition compilation errors.
Make __darshan_disabled a local variable.
Without this fix, the compile error messages shown below will appear.
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));
| ^~~~~~~~~