|
9 | 9 | * University of Stuttgart. All rights reserved. |
10 | 10 | * Copyright (c) 2004-2005 The Regents of the University of California. |
11 | 11 | * 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. |
13 | 13 | * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. |
14 | 14 | * Copyright (c) 2015 Research Organization for Information Science |
15 | 15 | * and Technology (RIST). All rights reserved. |
@@ -469,15 +469,15 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, |
469 | 469 | } |
470 | 470 |
|
471 | 471 | } |
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; |
475 | 475 | } |
476 | | - else if (max_data <= bytes_per_cycle) { |
| 476 | + else if (max_data <= bytes_per_cycle/fh->f_procs_per_group) { |
477 | 477 | bytes_to_write_in_cycle = max_data; |
478 | 478 | } |
479 | 479 | else { |
480 | | - bytes_to_write_in_cycle = bytes_per_cycle; |
| 480 | + bytes_to_write_in_cycle = bytes_per_cycle/ fh->f_procs_per_group; |
481 | 481 | } |
482 | 482 | } |
483 | 483 | else { |
@@ -527,8 +527,6 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, |
527 | 527 | */ |
528 | 528 | if (my_aggregator == fh->f_rank) { |
529 | 529 | for (i=0;i<fh->f_procs_per_group; i++){ |
530 | | -/* printf("bytes_per_process[%d]: %d\n", i, bytes_per_process[i]); |
531 | | - */ |
532 | 530 |
|
533 | 531 | #if DEBUG_ON |
534 | 532 | printf ("%d : bytes_per_process : %d\n", |
@@ -835,7 +833,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, |
835 | 833 | MCA_PML_BASE_SEND_STANDARD, |
836 | 834 | fh->f_comm, |
837 | 835 | &send_req)); |
838 | | - |
| 836 | + |
839 | 837 | if ( OMPI_SUCCESS != ret ){ |
840 | 838 | fprintf(stderr,"isend error!\n"); |
841 | 839 | goto exit; |
|
0 commit comments