Commit bf6dc626 authored by Shane Snyder's avatar Shane Snyder

Add support for UIUC replay workload

Add code sent to me from Babak @ UIUC for generating events from
their I/O trace recorder.
parent 081c74bf
......@@ -43,3 +43,8 @@ tests_workload_codes_workload_test_LDFLAGS += ${DARSHAN_LDFLAGS}
tests_workload_codes_workload_mpi_replay_LDADD += ${DARSHAN_LIBS}
tests_workload_codes_workload_mpi_replay_LDFLAGS += ${DARSHAN_LDFLAGS}
endif
if USE_RECORDER
AM_CPPFLAGS += ${RECORDER_CPPFLAGS}
src_libcodes_base_a_SOURCES += src/workload/codes-recorder-io-wrkld.c
endif
......@@ -73,10 +73,10 @@ if test "x${with_ross}" != "x" ; then
checkpath="${with_ross}/bin"
ROSS_CONFIG=""
AC_CHECK_PROGS(ROSS_CONFIG, [ross-config], [NOT_FOUND], [$checkpath])
if test "${ROSS_CONFIG}" = "NOT_FOUND" ; then
if test "${ROSS_CONFIG}" = "NOT_FOUND" ; then
AC_MSG_ERROR(ROSS not found at: $with_ross)
fi
ROSS_LDFLAGS=`${with_ross}/bin/ross-config --ldflags`
ROSS_CFLAGS=`${with_ross}/bin/ross-config --cflags`
ROSS_CPPFLAGS=`${with_ross}/bin/ross-config --cflags`
......@@ -107,6 +107,11 @@ else
AM_CONDITIONAL(USE_DARSHAN, false)
fi
# check for Recorder
AM_CONDITIONAL(USE_RECORDER, true)
RECORDER_CPPFLAGS="-DUSE_RECORDER=1"
AC_SUBST(RECORDER_CPPFLAGS)
dnl ======================================================================
dnl Try harder to be valgrind safe
dnl ======================================================================
......
This diff is collapsed.
......@@ -11,20 +11,26 @@
#include "codes-workload-method.h"
/* list of available methods. These are statically compiled for now, but we
* could make generators optional via autoconf tests etc. if needed
*/
* could make generators optional via autoconf tests etc. if needed
*/
extern struct codes_workload_method test_workload_method;
extern struct codes_workload_method bgp_io_workload_method;
#ifdef USE_DARSHAN
extern struct codes_workload_method darshan_io_workload_method;
#endif
#ifdef USE_RECORDER
extern struct codes_workload_method recorder_io_workload_method;
#endif
static struct codes_workload_method *method_array[] =
static struct codes_workload_method *method_array[] =
{
&test_workload_method,
&bgp_io_workload_method,
#ifdef USE_DARSHAN
&darshan_io_workload_method,
#endif
#ifdef USE_RECORDER
&recorder_io_workload_method,
#endif
NULL};
......@@ -117,7 +123,7 @@ void codes_workload_get_next(int wkld_id, int rank, struct codes_workload_op *op
if(tmp->lifo)
{
tmp_op = tmp->lifo;
tmp->lifo = tmp_op->next;
tmp->lifo = tmp_op->next;
*op = tmp_op->op;
free(tmp_op);
......@@ -166,11 +172,11 @@ void codes_workload_print_op(FILE *f, struct codes_workload_op *op, int rank){
fprintf(f, "op: rank:%d, type:end\n", rank);
break;
case CODES_WK_DELAY:
fprintf(f, "op: rank:%d, type:delay, seconds:%lf\n",
fprintf(f, "op: rank:%d, type:delay, seconds:%lf\n",
rank, op->u.delay.seconds);
break;
case CODES_WK_BARRIER:
fprintf(f, "op: rank:%d, type:barrier, count:%d, root:%d\n",
fprintf(f, "op: rank:%d, type:barrier, count:%d, root:%d\n",
rank, op->u.barrier.count, op->u.barrier.root);
break;
case CODES_WK_OPEN:
......@@ -184,13 +190,13 @@ void codes_workload_print_op(FILE *f, struct codes_workload_op *op, int rank){
case CODES_WK_WRITE:
fprintf(f, "op: rank:%d, type:write, "
"file_id:%lu, off:%lu, size:%lu\n",
rank, op->u.write.file_id, op->u.write.offset,
rank, op->u.write.file_id, op->u.write.offset,
op->u.write.size);
break;
case CODES_WK_READ:
fprintf(f, "op: rank:%d, type:read, "
"file_id:%lu, off:%lu, size:%lu\n",
rank, op->u.read.file_id, op->u.read.offset,
rank, op->u.read.file_id, op->u.read.offset,
op->u.read.size);
break;
}
......
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