diff --git a/darshan-runtime/darshan-config.in b/darshan-runtime/darshan-config.in index 5ae43c09f6e39bc17928f4f672df6e9219c1015a..5863eaa1aab67e72c10515b49e4bd69fbf1caa13 100755 --- a/darshan-runtime/darshan-config.in +++ b/darshan-runtime/darshan-config.in @@ -4,8 +4,15 @@ CP_WRAPPERS="@CP_WRAPPERS@" DARSHAN_LIB_PATH="@darshan_lib_path@" DARSHAN_LD_FLAGS="@LDFLAGS@" +# NOTE: +# - we deliberately list libdarshan-mpi-io twice in the link command. The +# first is necessary to correctly use the MPI profiling interface. The +# final one is necessary to give the linker a change to resolve indirect +# dependencies on PnetCDF and HDF5 symbols (if the app used a library which +# in turn used one of those HLLs). PRE_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS" -POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -ldarshan-posix" +POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -ldarshan-posix -ldarshan-mpi-io" + usage="\ Usage: darshan-config [--pre-ld-flags] [--post-ld-flags]"