From dc1a9eb90c044ecb054cc50e7400c2bc3a9080e7 Mon Sep 17 00:00:00 2001 From: "Glenn K. Lockwood" Date: Fri, 3 Jun 2016 10:39:14 -0700 Subject: [PATCH] add rank shuffling to non-MPI tester --- darshan-test/lustre/Makefile | 2 +- darshan-test/lustre/darshan-core-stub.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/darshan-test/lustre/Makefile b/darshan-test/lustre/Makefile index a41fa44..9a64f34 100644 --- a/darshan-test/lustre/Makefile +++ b/darshan-test/lustre/Makefile @@ -1,6 +1,6 @@ .PHONY: clean BINS = darshan-tester darshan-tester-mpi -OBJS = darshan-core-stub.o darshan-lustre.o +OBJS = darshan-lustre.o darshan-core-stub.o CFLAGS = -O0 -g -I../.. -I../../darshan-runtime ### Include -I. when building non-MPI tests to include the mpi.h stub header diff --git a/darshan-test/lustre/darshan-core-stub.c b/darshan-test/lustre/darshan-core-stub.c index 105f85a..acad98c 100644 --- a/darshan-test/lustre/darshan-core-stub.c +++ b/darshan-test/lustre/darshan-core-stub.c @@ -10,6 +10,8 @@ #include #include +#include "darshan-lustre.h" + /* * Global variables */ @@ -20,6 +22,7 @@ static struct darshan_module_funcs mod_funcs; /* * Import routines from Lustre module */ +extern struct lustre_runtime *lustre_runtime; void darshan_core_register_record( void *name, @@ -90,6 +93,9 @@ int main( int argc, char **argv ) close(fd); } + for ( i = 0; i < lustre_runtime->record_count; i++ ) + (lustre_runtime->record_runtime_array[i]).record->rank = rand() % 10; + print_lustre_runtime(); darshan_core_shutdown(); -- 2.26.2