Commit fa0d2669 authored by Philip Carns's avatar Philip Carns

Preliminary patch to linux-cc to enable Darshan on Cray XE6.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@576 3b7491f3-a168-0410-bf4b-c445ed680a29
parent e5cdeaed
--- /opt/cray/xt-asyncpe/5.01/bin/linux-cc 2011-08-12 12:43:14.000000000 -0500
+++ bin/linux-cc 2012-08-09 14:08:50.742694968 -0500
@@ -1444,6 +1444,39 @@ else
HDF5_INCFLAGS=
fi
+###
+# Process Darshan libraries
+###
+
+if [ ${CRAY_DARSHAN_DIR:+1} ] ; then
+
+ unset LIBDARSHAN
+ unset DARSHAN_POST_LINK_OPTS
+
+ # disable darshan if dynamic linking
+ if [ "$XTPE_LINK_TYPE" != "dynamic" ] ; then
+
+ case $PE_ENV in
+ PGI )
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ ;;
+ GNU )
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ ;;
+ *)
+ # TODO: test with other environments (Pathscale, Intel, and Cray)
+ ;;
+ esac
+
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
##
# PMI
##
@@ -1678,7 +1711,7 @@ fi
CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBGA $LIBONESIDED $LIBNTK $LIBSCIFFT $LIBPETSC \
$LIBTPSL $LIBNETCDF $LIBHDF5 $LIBACML $LIBSCI_ACC $LIBSCI $LIBFFTW ${as_needed_on} $LIBMPT $LIBMPICH2 \
- $LIBSHMEM $LIBSMA $LIBXPMEM $LIBDMAPP $LIBUGNI $LIBPORTALS $LIBPMI $LIBALPS $LIBUDREG ${as_needed_off}"
+ $LIBSHMEM $LIBSMA $LIBXPMEM $LIBDMAPP $LIBUGNI $LIBPORTALS $LIBPMI $LIBALPS $LIBUDREG ${as_needed_off} $LIBDARSHAN"
LIBSPATH="$PRODUCT_LDFLAGS $APP_LIBS_DIR $CNL_LIBS_DIR $SE_LIBS_DIR"
@@ -1706,6 +1739,10 @@ fi
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
comp_only=0
for arg
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment