Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ATPESC-IO
hands-on-2015
Commits
6be36e51
Commit
6be36e51
authored
Aug 10, 2015
by
Philip Carns
Browse files
warpdrive bug fixes and size adjustments
parent
f480653b
Changes
2
Hide whitespace changes
Inline
Side-by-side
darshan/warpdrive/warpdriveA.c
View file @
6be36e51
...
...
@@ -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
;
...
...
darshan/warpdrive/warpdriveB.c
View file @
6be36e51
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment