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

Commit 2956377

Browse files
committed
fix the data size counter for large ops for the static fcoll component
1 parent a8fcaa8 commit 2956377

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$
@@ -482,15 +482,15 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
482482
}
483483
}
484484

485-
if (local_cycles > index) {
486-
if ((index == local_cycles-1) && (max_data % bytes_per_cycle)) {
487-
bytes_to_read_in_cycle = max_data % bytes_per_cycle;
485+
if (index < local_cycles ) {
486+
if ((index == local_cycles-1) && (max_data % (bytes_per_cycle/fh->f_procs_per_group))) {
487+
bytes_to_read_in_cycle = max_data - position;
488488
}
489-
else if (max_data <= bytes_per_cycle) {
489+
else if (max_data <= bytes_per_cycle/fh->f_procs_per_group) {
490490
bytes_to_read_in_cycle = max_data;
491491
}
492492
else {
493-
bytes_to_read_in_cycle = bytes_per_cycle;
493+
bytes_to_read_in_cycle = bytes_per_cycle/fh->f_procs_per_group;
494494
}
495495
}
496496
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)