Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit c0e2099

Browse files
authored
Merge pull request #986 from edgargabriel/pr/fcoll-static-large-ops-fix
fcoll/static: fix the data size counter for large ops for the static fcoll component
2 parents 71fb5ce + 2956377 commit c0e2099

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

ompi/mca/fcoll/static/fcoll_static_file_read_all.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2015 University of Houston. All rights reserved.
12+
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
1313
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved.
1414
*
1515
* $COPYRIGHT$
@@ -475,15 +475,15 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
475475
}
476476
}
477477

478-
if (local_cycles > index) {
479-
if ((index == local_cycles-1) && (max_data % bytes_per_cycle)) {
480-
bytes_to_read_in_cycle = max_data % bytes_per_cycle;
478+
if (index < local_cycles ) {
479+
if ((index == local_cycles-1) && (max_data % (bytes_per_cycle/fh->f_procs_per_group))) {
480+
bytes_to_read_in_cycle = max_data - position;
481481
}
482-
else if (max_data <= bytes_per_cycle) {
482+
else if (max_data <= bytes_per_cycle/fh->f_procs_per_group) {
483483
bytes_to_read_in_cycle = max_data;
484484
}
485485
else {
486-
bytes_to_read_in_cycle = bytes_per_cycle;
486+
bytes_to_read_in_cycle = bytes_per_cycle/fh->f_procs_per_group;
487487
}
488488
}
489489
else {

ompi/mca/fcoll/static/fcoll_static_file_write_all.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2015 University of Houston. All rights reserved.
12+
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
1313
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved.
1414
* Copyright (c) 2015 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
@@ -469,15 +469,15 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
469469
}
470470

471471
}
472-
if (local_cycles > index) {
473-
if ((index == local_cycles-1) && (max_data % bytes_per_cycle)) {
474-
bytes_to_write_in_cycle = max_data % bytes_per_cycle;
472+
if ( index < local_cycles ) {
473+
if ((index == local_cycles-1) && (max_data % (bytes_per_cycle/fh->f_procs_per_group)) ) {
474+
bytes_to_write_in_cycle = max_data - total_bytes_written;
475475
}
476-
else if (max_data <= bytes_per_cycle) {
476+
else if (max_data <= bytes_per_cycle/fh->f_procs_per_group) {
477477
bytes_to_write_in_cycle = max_data;
478478
}
479479
else {
480-
bytes_to_write_in_cycle = bytes_per_cycle;
480+
bytes_to_write_in_cycle = bytes_per_cycle/ fh->f_procs_per_group;
481481
}
482482
}
483483
else {
@@ -527,8 +527,6 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
527527
*/
528528
if (my_aggregator == fh->f_rank) {
529529
for (i=0;i<fh->f_procs_per_group; i++){
530-
/* printf("bytes_per_process[%d]: %d\n", i, bytes_per_process[i]);
531-
*/
532530

533531
#if DEBUG_ON
534532
printf ("%d : bytes_per_process : %d\n",
@@ -835,7 +833,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
835833
MCA_PML_BASE_SEND_STANDARD,
836834
fh->f_comm,
837835
&send_req));
838-
836+
839837
if ( OMPI_SUCCESS != ret ){
840838
fprintf(stderr,"isend error!\n");
841839
goto exit;

0 commit comments

Comments
 (0)