fix crayxc/xe papi path 40/240/4
authorYanhuaSun <sun51@illinois.edu>
Wed, 21 May 2014 17:58:18 +0000 (12:58 -0500)
committerGerrit Code Review <gerrit2@charm.cs.uiuc.edu>
Wed, 28 May 2014 01:25:06 +0000 (20:25 -0500)
Change-Id: Iec428048240ad59d7280ec8ab6f4b9285a29f6a2

src/arch/gni-crayxc/conv-mach-papi.h [deleted file]
src/arch/gni-crayxc/conv-mach-papi.sh [deleted file]
src/arch/gni-crayxe/conv-mach-papi.h [deleted file]
src/arch/gni-crayxe/conv-mach-papi.sh [deleted file]
src/arch/gni/conv-mach-papi.h [new file with mode: 0644]
src/arch/gni/conv-mach-papi.sh [new file with mode: 0644]

diff --git a/src/arch/gni-crayxc/conv-mach-papi.h b/src/arch/gni-crayxc/conv-mach-papi.h
deleted file mode 100644 (file)
index 68f51a1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// Chee Wai 3/11/2004
-// This is really stupid, instead of being able to say "#include <papi.h>"
-// here, I am forced to not say anything and wait for the configure script
-// to decide if the library exists before adding the line to conv-mach-opt.h
-//
-// If this is not the intended idiom, then please enlighten me.
diff --git a/src/arch/gni-crayxc/conv-mach-papi.sh b/src/arch/gni-crayxc/conv-mach-papi.sh
deleted file mode 100644 (file)
index 518f895..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CMK_USE_PAPI=true
-USE_SPP_PAPI=true
-#you should run module load papi
-PAPI_LIBDIR="/opt/cray/papi/4.3.0.1/perf_events/no-cuda/lib"
-PAPI_INCDIR="/opt/cray/papi/4.3.0.1/perf_events/no-cuda/include"
-CMK_INCDIR="$CMK_INCDIR -I$PAPI_INCDIR"
-CMK_LIBDIR="-L $PAPI_LIBDIR"
-CMK_LD="$CMK_LD -Wl,-rpath,$PAPI_LIBDIR"
-CMK_LDXX="$CMK_LDXX -Wl,-rpath,$PAPI_LIBDIR" 
-CMK_LIBS="$CMK_LIBS -lpapi"
diff --git a/src/arch/gni-crayxe/conv-mach-papi.h b/src/arch/gni-crayxe/conv-mach-papi.h
deleted file mode 100644 (file)
index 68f51a1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// Chee Wai 3/11/2004
-// This is really stupid, instead of being able to say "#include <papi.h>"
-// here, I am forced to not say anything and wait for the configure script
-// to decide if the library exists before adding the line to conv-mach-opt.h
-//
-// If this is not the intended idiom, then please enlighten me.
diff --git a/src/arch/gni-crayxe/conv-mach-papi.sh b/src/arch/gni-crayxe/conv-mach-papi.sh
deleted file mode 100644 (file)
index ba50cdd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-CMK_USE_PAPI=true
-USE_SPP_PAPI=true
-#you should run module load papi
-if test "x$PAT_BUILD_PAPI_BASEDIR" != "x"
-then
-PAPI_LIBDIR="$PAT_BUILD_PAPI_BASEDIR/lib"
-PAPI_INCDIR="$PAT_BUILD_PAPI_BASEDIR/include"
-else
-PAPI_LIBDIR="/opt/cray/papi/4.3.0.1/perf_events/no-cuda/lib"
-PAPI_INCDIR="/opt/cray/papi/4.3.0.1/perf_events/no-cuda/include"
-fi
-CMK_INCDIR="$CMK_INCDIR -I$PAPI_INCDIR"
-CMK_LIBDIR="-L $PAPI_LIBDIR"
-CMK_LD="$CMK_LD -Wl,-rpath,$PAPI_LIBDIR"
-CMK_LDXX="$CMK_LDXX -Wl,-rpath,$PAPI_LIBDIR" 
-CMK_LIBS="$CMK_LIBS -lpapi"
diff --git a/src/arch/gni/conv-mach-papi.h b/src/arch/gni/conv-mach-papi.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/arch/gni/conv-mach-papi.sh b/src/arch/gni/conv-mach-papi.sh
new file mode 100644 (file)
index 0000000..6a7417b
--- /dev/null
@@ -0,0 +1,15 @@
+if echo $LOADEDMODULES | grep -q papi; then
+    true
+else
+    echo 'Must have a papi module loaded (e.g. module load papi)' >&2
+    exit 1
+fi
+CMK_USE_PAPI=true
+USE_SPP_PAPI=true
+#you should run module load papi
+PAPI_INCDIR=`pkg-config --cflags papi`
+PAPI_LIBDIR=`pkg-config --libs papi`
+CMK_INCDIR="$CMK_INCDIR $PAPI_INCDIR"
+CMK_LIBDIR="$CMK_LIBDIR $PAPI_LIBDIR"
+CMK_LD="$CMK_LD -Wl,-rpath,$PAPI_LIBDIR"
+CMK_LDXX="$CMK_LDXX -Wl,-rpath,$PAPI_LIBDIR"