Commit 6be36e51 authored by Philip Carns's avatar Philip Carns
Browse files

warpdrive bug fixes and size adjustments

parent f480653b
......@@ -21,7 +21,7 @@
#include <getopt.h>
#include <limits.h>
#define IOSIZE 8192
#define IOSIZE 16384
static int example1A(const char* dir, int rank, int nprocs);
......@@ -79,7 +79,7 @@ static int example1A(const char* dir, int rank, int nprocs)
MPI_Offset offset;
MPI_Offset i;
buffer = malloc(16384);
buffer = malloc(IOSIZE);
sprintf(file_name, "%s/warpdriveA", dir);
......@@ -93,7 +93,7 @@ static int example1A(const char* dir, int rank, int nprocs)
return(-1);
}
for(i=0; i<4; i++)
for(i=0; i<2; i++)
{
/* skip ahead in file for each round of I/O */
offset = (MPI_Offset)nprocs*i*IOSIZE;
......
......@@ -21,7 +21,7 @@
#include <getopt.h>
#include <limits.h>
#define IOSIZE 8192
#define IOSIZE 16384
static int example1B(const char* dir, int rank, int nprocs);
......@@ -79,7 +79,7 @@ static int example1B(const char* dir, int rank, int nprocs)
MPI_Offset offset;
int i;
buffer = malloc(16384);
buffer = malloc(IOSIZE);
sprintf(file_name, "%s/warpdriveB", dir);
......@@ -93,14 +93,14 @@ static int example1B(const char* dir, int rank, int nprocs)
return(-1);
}
for(i=0; i<4; i++)
for(i=0; i<2; i++)
{
/* skip ahead in file for each round of I/O */
offset = (MPI_Offset)nprocs*i*IOSIZE;
/* skip ahead to offset for this process' data */
offset += (MPI_Offset)rank*IOSIZE;
ret = MPI_File_write_at(fh, (rank*16384)+(i*16384*nprocs), buffer, 16384, MPI_CHAR,
ret = MPI_File_write_at(fh, offset, buffer, IOSIZE, MPI_CHAR,
&status);
if(ret != MPI_SUCCESS)
{
......
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