From dee3e1e5d4a28ad5f4c722e7f515d6a66257dd9d Mon Sep 17 00:00:00 2001 From: zab Date: Mon, 20 Oct 2003 21:42:46 +0000 Subject: [PATCH] - commit the write_disjoint test from bug 968 so we can always have it on hand and change it to actually provide information in the case of failure --- lustre/tests/write_disjoint.c | 105 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 lustre/tests/write_disjoint.c diff --git a/lustre/tests/write_disjoint.c b/lustre/tests/write_disjoint.c new file mode 100644 index 0000000..65eadf4 --- /dev/null +++ b/lustre/tests/write_disjoint.c @@ -0,0 +1,105 @@ +#include +#include +#include +#include +#include +#include +#include +#include "mpi.h" + + +#define FILENAME "/mnt/lustre/write_disjoint" +#define CHUNK_MAX_SIZE 123456 + + +int main( int argc,char *argv[] ) { + int i, n, fd, chunk_size, file_size; + int rank, noProcessors, ret, done; + off_t offset; + char **chunk_buf; + char *read_buf; + struct stat stat_buf; + + MPI_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &noProcessors); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + chunk_buf = (char**)malloc(noProcessors * sizeof(void*)); + for( i=0; i