From 8441b4f7e004d78cb7969d4e1d2bcad436dc7cfd Mon Sep 17 00:00:00 2001 From: Matthias Jurenz Date: Mon, 19 Apr 2010 13:46:56 +0000 Subject: [PATCH] Improved configure tests for CrayXT platforms: - added default option file - added detection of the compiler loaded by the programming environment This commit was SVN r22988. --- ompi/contrib/vt/vt/ChangeLog | 1 + ompi/contrib/vt/vt/Makefile.am | 1 + ompi/contrib/vt/vt/config/defaults/crayxt | 9 +++++ .../vt/vt/config/m4/acinclude.compinst.m4 | 36 ++++++++++++++++--- ompi/contrib/vt/vt/vtlib/vt_pform_crayxt.c | 2 +- 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 ompi/contrib/vt/vt/config/defaults/crayxt diff --git a/ompi/contrib/vt/vt/ChangeLog b/ompi/contrib/vt/vt/ChangeLog index 9fcdca2166..5ad98642d4 100644 --- a/ompi/contrib/vt/vt/ChangeLog +++ b/ompi/contrib/vt/vt/ChangeLog @@ -5,6 +5,7 @@ by the GNU, Intel, PathScale, or PGI 9 compiler - extended support for BlueGene/P in terms of tracing libraries (e.g. libc I/O) and tracing of multi-threaded applications + - added default option file for CrayXT platforms - added support for PAPI-C counters which belong to different components - added environment variable VT_METRICS_SEP to specify a string which separate the counter names in VT_METRICS diff --git a/ompi/contrib/vt/vt/Makefile.am b/ompi/contrib/vt/vt/Makefile.am index 7228910dc9..e9d5c41a8f 100644 --- a/ompi/contrib/vt/vt/Makefile.am +++ b/ompi/contrib/vt/vt/Makefile.am @@ -17,6 +17,7 @@ EXTRA_DIST = \ VERSION \ config/defaults/bgl \ config/defaults/bgp \ + config/defaults/crayxt \ config/defaults/ibm \ config/defaults/ibm-64 \ config/defaults/sicortex \ diff --git a/ompi/contrib/vt/vt/config/defaults/crayxt b/ompi/contrib/vt/vt/config/defaults/crayxt new file mode 100644 index 0000000000..818b0065cb --- /dev/null +++ b/ompi/contrib/vt/vt/config/defaults/crayxt @@ -0,0 +1,9 @@ +CC="cc" +CXX="CC" +F77="ftn" +FC="ftn" +CFLAGS="-target=$XTPE_COMPILE_TARGET" +CXXFLAGS="-target=$XTPE_COMPILE_TARGET" +FFLAGS="-target=$XTPE_COMPILE_TARGET" +FCFLAGS="-target=$XTPE_COMPILE_TARGET" +with_mpich2="yes" diff --git a/ompi/contrib/vt/vt/config/m4/acinclude.compinst.m4 b/ompi/contrib/vt/vt/config/m4/acinclude.compinst.m4 index ee1168d152..922f06cc79 100644 --- a/ompi/contrib/vt/vt/config/m4/acinclude.compinst.m4 +++ b/ompi/contrib/vt/vt/config/m4/acinclude.compinst.m4 @@ -45,6 +45,8 @@ AC_DEFUN([ACVT_COMPINST], compinst_openuh_fflags="$compinst_openuh_cflags" compinst_openuh_fcflags="$compinst_openuh_cflags" + AC_REQUIRE([ACVT_PLATFORM]) + AC_ARG_ENABLE(compinst, AC_HELP_STRING([--enable-compinst=TYPE], [enable support for compiler instrumentation (gnu,intel,pathscale,pgi,pgi9,sun,xl,nec,openuh), default: automatically by configure]), @@ -150,11 +152,37 @@ AC_DEFUN([ACVT_COMPINST], AC_MSG_RESULT([sun]) ;; cc*) - compver=`$CC -V 2>&1 | grep "Sun C"` - AS_IF([test "$?" = "0"], + AS_IF([test "$PLATFORM" = "crayxt"], [ - compinst_type="sun" - AC_MSG_RESULT([sun]) + for f in "-V --version"; do + case `$CC $f 2>&1` in + *pgcc\ [1-8].*) + compinst_type="pgi" + AC_MSG_RESULT([pgi]) + ;; + *pgcc\ *) + compinst_type="pgi9" + AC_MSG_RESULT([pgi9]) + ;; + *gcc\ *) + compinst_type="gnu" + AC_MSG_RESULT([gnu]) + ;; + *PathScale*) + compinst_type="gnu" + AC_MSG_RESULT([gnu (pathscale)]) + ;; + esac + AS_IF([test x"$compinst_type" != x], [break]) + done + ], + [ + compver=`$CC -V 2>&1 | grep "Sun C"` + AS_IF([test "$?" = "0"], + [ + compinst_type="sun" + AC_MSG_RESULT([sun]) + ]) ]) ;; uhcc* | opencc*) diff --git a/ompi/contrib/vt/vt/vtlib/vt_pform_crayxt.c b/ompi/contrib/vt/vt/vtlib/vt_pform_crayxt.c index 3909a7dc02..907212b77c 100644 --- a/ompi/contrib/vt/vt/vtlib/vt_pform_crayxt.c +++ b/ompi/contrib/vt/vt/vtlib/vt_pform_crayxt.c @@ -164,7 +164,7 @@ char* vt_pform_ldir() { #ifdef DEFAULT_PFORM_LDIR return DEFAULT_PFORM_LDIR; #else - return "/tmp"; + return "."; #endif }