Commit 7461c3b6 authored by Philip Carns's avatar Philip Carns

patches for cray programming environment (all compilers)


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@580 3b7491f3-a168-0410-bf4b-c445ed680a29
parent f44ea1e7
diff -Naupr asyncpe-bin-orig/crayc++ asyncpe-bin/crayc++
--- asyncpe-bin-orig/crayc++ 2012-08-10 05:23:25.127227000 -0700
+++ asyncpe-bin/crayc++ 2012-08-10 05:34:35.586983719 -0700
@@ -1527,6 +1527,28 @@ else
LIBPNETCDF=
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
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ DARSHAN_POST_LINK_OPTS="-lmpichcxx ${DARSHAN_POST_LINK_OPTS}"
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
+
##
# PMI
##
@@ -1735,6 +1757,12 @@ if [ -f ${BUILD_OPTS} ] ; then
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
+
_RUN_OPTIONS="$compile_opts $PRE_COMPILE_OPTS $PRE_LINK_OPTS \
"$@" -hlast_user_arg \
-nostdinc \
diff -Naupr asyncpe-bin-orig/craycc asyncpe-bin/craycc
--- asyncpe-bin-orig/craycc 2012-08-10 05:23:25.129673000 -0700
+++ asyncpe-bin/craycc 2012-08-10 05:25:55.150733538 -0700
@@ -1436,6 +1436,27 @@ else
LIBPNETCDF=
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
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
+
##
# PMI
##
@@ -1652,6 +1673,11 @@ if [ -f ${BUILD_OPTS} ] ; then
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
_RUN_OPTIONS="$compile_opts $PRE_COMPILE_OPTS $PRE_LINK_OPTS "$@" -hlast_user_arg \
-nostdinc \
$INCLUDE_OPTS ${COMPILER_INCLUDE} ${INC_PATH} ${GCC_XX_INCLUDE_PATH_LIST} ${GCC_BASE} $SYSROOT $SYSROOT_INC_PATH \
diff -Naupr asyncpe-bin-orig/crayftn asyncpe-bin/crayftn
--- asyncpe-bin-orig/crayftn 2012-08-10 05:23:25.130400000 -0700
+++ asyncpe-bin/crayftn 2012-08-10 05:35:56.343944159 -0700
@@ -1434,6 +1434,28 @@ else
pnetcdf_fmodules_dir=
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
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ DARSHAN_POST_LINK_OPTS="-lfmpich ${DARSHAN_POST_LINK_OPTS}"
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
+
##
# PMI
##
@@ -1664,6 +1686,11 @@ if [ -f ${BUILD_OPTS} ] ; then
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
_RUN_OPTIONS="${_FTN_OPTS} $compile_opts $PRE_COMPILE_OPTS $PRE_LINK_OPTS "$@" $END_USER_ARG \
$INCLUDE_OPTS ${INC_PATH} $SYSROOT_INC_PATH ${INCDIRS} \
$POST_COMPILE_OPTS $POST_LINK_OPTS -L${CRAYLIBS} ${rpath_prefix}${CRAYLIBS} ${LIB_PATH} \
diff -Naupr asyncpe-bin-orig/linux-cc asyncpe-bin/linux-cc
--- asyncpe-bin-orig/linux-cc 2012-08-10 05:23:20.575150000 -0700
+++ asyncpe-bin/linux-cc 2012-08-10 05:36:33.540531285 -0700
@@ -1701,6 +1701,35 @@ else
LIBPNETCDF=
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|GNU|PATHSCALE|INTEL )
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ ;;
+ *)
+ # Darshan has not been tested with other compiler combinations
+ ;;
+ esac
+
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
##
# PMI
##
@@ -1979,6 +2008,11 @@ fi
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
comp_only=0
for arg
diff -Naupr asyncpe-bin-orig/linux-CC asyncpe-bin/linux-CC
--- asyncpe-bin-orig/linux-CC 2012-08-10 05:23:20.579725000 -0700
+++ asyncpe-bin/linux-CC 2012-08-10 05:36:41.296047857 -0700
@@ -1948,6 +1948,37 @@ else
LIBPNETCDF=
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|GNU|PATHSCALE|INTEL )
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ DARSHAN_POST_LINK_OPTS="-lmpichcxx ${DARSHAN_POST_LINK_OPTS}"
+ ;;
+ *)
+ # Darshan has not been tested with other compiler combinations
+ ;;
+ esac
+
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
+
##
# PMI
##
@@ -2218,6 +2249,11 @@ fi
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
comp_only=0
for arg
diff -Naupr asyncpe-bin-orig/linux-f90 asyncpe-bin/linux-f90
--- asyncpe-bin-orig/linux-f90 2012-08-10 05:23:20.580895000 -0700
+++ asyncpe-bin/linux-f90 2012-08-10 05:36:53.469547409 -0700
@@ -1779,6 +1779,37 @@ else
LIBPNETCDF=
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|GNU|PATHSCALE|INTEL )
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ DARSHAN_POST_LINK_OPTS="-lfmpich ${DARSHAN_POST_LINK_OPTS}"
+ ;;
+ *)
+ # Darshan has not been tested with other compiler combinations
+ ;;
+ esac
+
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
+
##
# PMI
##
@@ -2088,6 +2119,11 @@ fi
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
comp_only=0
for arg
do
--- /opt/cray/xt-asyncpe/5.01/bin/craycc 2011-08-12 12:43:14.000000000 -0500
+++ bin/craycc 2012-08-09 15:00:51.179554459 -0500
@@ -1167,6 +1167,27 @@ 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
+ LIBDARSHAN=`${CRAY_DARSHAN_DIR}/bin/darshan-config --post-ld-flags`
+ DARSHAN_POST_LINK_OPTS=`${CRAY_DARSHAN_DIR}/bin/darshan-config --pre-ld-flags`
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
+
##
# PMI
##
@@ -1370,6 +1391,11 @@ if [ -f ${BUILD_OPTS} ] ; then
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ POST_COMPILE_OPTS="${DARSHAN_POST_LINK_OPTS} ${POST_LINK_OPTS}"
+fi
+
_RUN_OPTIONS="$compile_opts $PRE_COMPILE_OPTS $PRE_LINK_OPTS "$@" -hlast_user_arg \
-nostdinc \
$INCLUDE_OPTS ${COMPILER_INCLUDE} ${INC_PATH} ${GCC_XX_INCLUDE_PATH_LIST} ${GCC_BASE} $SYSROOT $SYSROOT_INC_PATH \
--- linux-cc 2012-05-09 06:01:41.000000000 -0700
+++ bin/linux-cc 2012-08-09 12:58:37.283453567 -0700
@@ -1701,6 +1701,35 @@ else
LIBPNETCDF=
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|GNU|PATHSCALE|INTEL )
+ 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 Cray environment
+ ;;
+ esac
+
+ fi
+
+else
+ LIBDARSHAN=
+ DARSHAN_POST_LINK_OPTS=
+fi
+
##
# PMI
##
@@ -1979,6 +2008,11 @@ fi
eval $($BUILD_OPTS)
fi
+if [ ${DARSHAN_POST_LINK_OPTS:+1} ] ; then
+ CNL_LIBS_LIST="$CNL_LIBS_LIST $LIBDARSHAN"
+ 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