Revision: 8aa99d0540f8
Branch: default
Author: David DeBonis <
dde...@sandia.gov>
Date: Mon Jul 29 10:48:11 2013
Log: Updated PIAPI interface and compilation
http://code.google.com/p/kitten/source/detail?r=8aa99d0540f8
Modified:
/user/runtime2/pct/Makefile
/user/runtime2/pct/pct.c
/user/runtime2/pct/pct.h
=======================================
--- /user/runtime2/pct/Makefile Wed Jun 12 11:34:29 2013
+++ /user/runtime2/pct/Makefile Mon Jul 29 10:48:11 2013
@@ -18,12 +18,12 @@
CFLAGS += -std=gnu99 -D_GNU_SOURCE -DHAVE_KITTEN -Wall -pthread
INCDIRS += -Ipmi
-pct_LDADD = -lportals -lportals_ppe -lportals_util -lxpmem -llwk -lrt
-lpthread
-
-ifdef USE_PIAPI
+pct_LDADD = -lportals -lportals_ppe -lportals_util -lxpmem -llwk -lrt
+ifeq ($(PIAPI),y)
CFLAGS += -DUSING_PIAPI
pct_LDADD += -lpiapi
endif
+pct_LDADD += -lpthread
# Embed the app ELF executable in the PCT's ELF image
pct_RAWDATA = ../libpmi/test_pmi_hello
=======================================
--- /user/runtime2/pct/pct.c Tue Jul 9 16:03:24 2013
+++ /user/runtime2/pct/pct.c Mon Jul 29 10:48:11 2013
@@ -323,7 +323,7 @@
#ifdef USING_PIAPI
void
-piapi_callback( struct piapi_sample *sample )
+piapi_callback( piapi_sample_t *sample )
{
printf( "PIAPI:\n");
printf( "\tsample - %u of %u\n", sample->number, sample->total );
@@ -361,7 +361,7 @@
#ifdef USING_PIAPI
void *cntx = 0x0;
- piapi_init( &cntx, piapi_callback );
+ piapi_init( &cntx, PIAPI_MODE_PROXY, piapi_callback, PIAPI_AGNT_SADDR,
PIAPI_AGNT_PORT );
#endif
// Load the application into memory, but don't start it executing yet
@@ -379,7 +379,7 @@
printf("DONE LOADING APPLICATION\n");
#ifdef USING_PIAPI
- piapi_collect( cntx, PIAPI_CPU, 60, 1 );
+ piapi_collect( cntx, PIAPI_PORT_CPU, 60, 1 );
#endif
/*************************************************************************/
=======================================
--- /user/runtime2/pct/pct.h Wed Apr 3 13:43:34 2013
+++ /user/runtime2/pct/pct.h Mon Jul 29 10:48:11 2013
@@ -13,4 +13,12 @@
// The well-known maximum size of PMI message, in bytes
#define PCT_MAX_PMI_MSG 1024
+#ifdef USING_PIAPI
+/* The well-known powerinsight agent saddr */
+#define PIAPI_AGNT_SADDR 0x0a361500
+
+/* The well-known powerinsight agent port */
+#define PIAPI_AGNT_PORT 20201
+#endif
+
#endif