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
Rob Latham
mpich-CVS
Commits
1b778bd8
Commit
1b778bd8
authored
Oct 29, 2007
by
thakur
Browse files
fixed bug reported by Wei-keng, romio req 887
parent
cf54e011
Changes
1
Show whitespace changes
Inline
Side-by-side
src/mpi/romio/adio/common/ad_aggregate.c
View file @
1b778bd8
...
...
@@ -368,7 +368,7 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs,
int
*
count_others_req_per_proc
,
count_others_req_procs
;
int
i
,
j
;
MPI_Request
*
send_requests
,
*
recv_
requests
;
MPI_Request
*
requests
;
MPI_Status
*
statuses
;
ADIOI_Access
*
others_req
;
...
...
@@ -400,46 +400,41 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs,
/* now send the calculated offsets and lengths to respective processes */
send_requests
=
(
MPI_Request
*
)
ADIOI_Malloc
(
2
*
(
count_my_req_procs
+
1
)
*
sizeof
(
MPI_Request
));
recv_requests
=
(
MPI_Request
*
)
ADIOI_Malloc
(
2
*
(
count_others_req_procs
+
1
)
*
sizeof
(
MPI_Request
));
requests
=
(
MPI_Request
*
)
ADIOI_Malloc
(
1
+
2
*
(
count_my_req_procs
+
count_others_req_procs
)
*
sizeof
(
MPI_Request
));
/* +1 to avoid a 0-size malloc */
j
=
0
;
for
(
i
=
0
;
i
<
nprocs
;
i
++
)
{
if
(
others_req
[
i
].
count
)
{
MPI_Irecv
(
others_req
[
i
].
offsets
,
others_req
[
i
].
count
,
ADIO_OFFSET
,
i
,
i
+
myrank
,
fd
->
comm
,
&
recv_
requests
[
j
]);
ADIO_OFFSET
,
i
,
i
+
myrank
,
fd
->
comm
,
&
requests
[
j
]);
j
++
;
MPI_Irecv
(
others_req
[
i
].
lens
,
others_req
[
i
].
count
,
MPI_INT
,
i
,
i
+
myrank
+
1
,
fd
->
comm
,
&
recv_
requests
[
j
]);
MPI_INT
,
i
,
i
+
myrank
+
1
,
fd
->
comm
,
&
requests
[
j
]);
j
++
;
}
}
j
=
0
;
for
(
i
=
0
;
i
<
nprocs
;
i
++
)
{
if
(
my_req
[
i
].
count
)
{
MPI_Isend
(
my_req
[
i
].
offsets
,
my_req
[
i
].
count
,
ADIO_OFFSET
,
i
,
i
+
myrank
,
fd
->
comm
,
&
send_
requests
[
j
]);
ADIO_OFFSET
,
i
,
i
+
myrank
,
fd
->
comm
,
&
requests
[
j
]);
j
++
;
MPI_Isend
(
my_req
[
i
].
lens
,
my_req
[
i
].
count
,
MPI_INT
,
i
,
i
+
myrank
+
1
,
fd
->
comm
,
&
send_
requests
[
j
]);
MPI_INT
,
i
,
i
+
myrank
+
1
,
fd
->
comm
,
&
requests
[
j
]);
j
++
;
}
}
statuses
=
(
MPI_Status
*
)
ADIOI_Malloc
((
1
+
2
*
\
ADIOI_MAX
(
count_my_req_procs
,
count_others_req_procs
))
*
\
(
count_my_req_procs
+
count_others_req_procs
))
*
\
sizeof
(
MPI_Status
));
/* +1 to avoid a 0-size malloc */
MPI_Waitall
(
2
*
count_my_req_procs
,
send_requests
,
statuses
);
MPI_Waitall
(
2
*
count_others_req_procs
,
recv_requests
,
statuses
);
MPI_Waitall
(
j
,
requests
,
statuses
);
ADIOI_Free
(
send_requests
);
ADIOI_Free
(
recv_requests
);
ADIOI_Free
(
requests
);
ADIOI_Free
(
statuses
);
ADIOI_Free
(
count_others_req_per_proc
);
...
...
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