Commit 2d6a1673 authored by Shane Snyder's avatar Shane Snyder

small changes to darshan workload api as well as tests Makefile

parent 4c8ccf14
......@@ -76,21 +76,21 @@ struct codes_workload_op
int root; /* root rank */
} barrier;
struct {
int file_id; /* integer identifier for the file */
uint64_t file_id; /* integer identifier for the file */
int create_flag; /* file must be created, not just opened */
} open;
struct {
int file_id; /* file to operate on */
uint64_t file_id; /* file to operate on */
off_t offset; /* offset and size */
size_t size;
} write;
struct {
int file_id; /* file to operate on */
uint64_t file_id; /* file to operate on */
off_t offset; /* offset and size */
size_t size;
} read;
struct {
int file_id; /* file to operate on */
uint64_t file_id; /* file to operate on */
} close;
}u;
};
......
......@@ -73,6 +73,9 @@ static int darshan_io_workload_load(const char *params, int rank)
int ret;
struct rank_events_context *new = NULL;
if (!event_file)
return -1;
/* allocate a new event context for this rank */
new = malloc(sizeof(*new));
if (!new)
......@@ -362,7 +365,7 @@ static struct codes_workload_op darshan_event_to_codes_workload_op(struct darsha
{
struct codes_workload_op codes_op;
switch(event.type)
switch (event.type)
{
case POSIX_OPEN:
codes_op.op_type = CODES_WK_OPEN;
......
......@@ -15,9 +15,10 @@
*/
extern struct codes_workload_method test_workload_method;
extern struct codes_workload_method bgp_io_workload_method;
extern struct codes_workload_method darshan_io_workload_method;
static struct codes_workload_method *method_array[] =
{&test_workload_method, &bgp_io_workload_method, NULL};
{&test_workload_method, &bgp_io_workload_method, &darshan_io_workload_method, NULL};
/* This shim layer is responsible for queueing up reversed operations and
* re-issuing them so that the underlying workload generator method doesn't
......
check_PROGRAMS += tests/lp-io-test \
tests/workload/codes-workload-test
tests/workload/codes-workload-test \
tests/workload/codes-workload-mpi-replay
TESTS += tests/lp-io-test.sh \
tests/workload/codes-workload-test.sh
......@@ -14,6 +15,10 @@ tests_lp_io_test_LDADD = $(testlib) ${ROSS_LIBS}
tests_lp_io_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_lp_io_test_SOURCES = tests/lp-io-test.c
tests_workload_codes_workload_mpi_replay_LDADD = $(testlib) ${ROSS_LIBS}
tests_workload_codes_workload_mpi_replay_LDFLAGS = ${ROSS_LDFLAGS}
tests_workload_codes_workload_mpi_replay_SOURCES = tests/workload/codes-workload-mpi-replay.c
tests_workload_codes_workload_test_LDADD = $(testlib) ${ROSS_LIBS}
tests_workload_codes_workload_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_workload_codes_workload_test_SOURCES = \
......@@ -21,4 +26,4 @@ tests_workload_codes_workload_test_SOURCES = \
tests/workload/codes-workload-test-svr-lp.c \
tests/workload/codes-workload-test-svr-lp.h \
tests/workload/codes-workload-test-cn-lp.c \
tests/workload/codes-workload-test-cn-lp.h
tests/workload/codes-workload-test-cn-lp.h
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