Commit 7fb425d6 authored by Shane Snyder's avatar Shane Snyder

Fix build issues with linking with darshan

Now, specify the darshan install directory with --with-darshan=/dir/
to build the darshan workload generator and link it with test
applications.
parent bffa8e57
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* See COPYRIGHT notice in top-level directory. * See COPYRIGHT notice in top-level directory.
* *
*/ */
#include <assert.h>
#include "codes/codes-workload.h" #include "codes/codes-workload.h"
#include "codes/quickhash.h" #include "codes/quickhash.h"
...@@ -82,6 +83,23 @@ static void calc_io_delays(struct darshan_file *file, int64_t num_opens, int64_t ...@@ -82,6 +83,23 @@ static void calc_io_delays(struct darshan_file *file, int64_t num_opens, int64_t
double *inter_open_delay, double *inter_io_delay); double *inter_open_delay, double *inter_io_delay);
static void file_sanity_check(struct darshan_file *file, struct darshan_job *job); static void file_sanity_check(struct darshan_file *file, struct darshan_job *job);
/* helper functions for implementing the darshan workload generator */
static void generate_psx_ind_file_events(struct darshan_file *file);
static double generate_psx_open_event(struct darshan_file *file, int create_flag,
double meta_op_time, double cur_time);
static double generate_psx_close_event(struct darshan_file *file, double meta_op_time,
double cur_time);
static double generate_barrier_event(struct darshan_file *file, int64_t root, double cur_time);
static double generate_psx_ind_io_events(struct darshan_file *file, int64_t io_ops_this_cycle,
int64_t open_ndx, double inter_io_delay,
double meta_op_time, double cur_time);
static void determine_io_params(struct darshan_file *file, int write_flag, int coll_flag,
int64_t io_cycles, size_t *io_sz, off_t *io_off);
static void calc_io_delays(struct darshan_file *file, int64_t num_opens, int64_t num_io_ops,
double delay_per_cycle, double *first_io_delay, double *close_delay,
double *inter_open_delay, double *inter_io_delay);
static void file_sanity_check(struct darshan_file *file, struct darshan_job *job);
/* workload method name and function pointers for the CODES workload API */ /* workload method name and function pointers for the CODES workload API */
struct codes_workload_method darshan_io_workload_method = struct codes_workload_method darshan_io_workload_method =
{ {
...@@ -159,6 +177,7 @@ static int darshan_io_workload_load(const char *params, int rank) ...@@ -159,6 +177,7 @@ static int darshan_io_workload_load(const char *params, int rank)
generate_psx_coll_file_events(&next_file, my_ctx, job.nprocs, d_params->aggregator_cnt); generate_psx_coll_file_events(&next_file, my_ctx, job.nprocs, d_params->aggregator_cnt);
} }
} }
if (ret < 0) if (ret < 0)
return -1; return -1;
......
...@@ -24,5 +24,6 @@ tests_workload_codes_workload_test_SOURCES = \ ...@@ -24,5 +24,6 @@ tests_workload_codes_workload_test_SOURCES = \
tests/workload/codes-workload-test-cn-lp.c \ tests/workload/codes-workload-test-cn-lp.c \
tests/workload/codes-workload-test-cn-lp.h tests/workload/codes-workload-test-cn-lp.h
tests_workload_codes_workload_mpi_replay_LDADD = $(testlib) 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_mpi_replay_SOURCES = tests/workload/codes-workload-mpi-replay.c
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