Commit c16466e3 authored by Paul Coffman's avatar Paul Coffman Committed by Rob Latham
Browse files

Assign large blocks first in ADIOI_GPFS_Calc_file_domains



For files that are less than the size of a gpfs block there seems to be
an issue if successive MPI_File_write_at_all are called with proceeding
offsets.  Given the simple case of 2 aggs, the 2nd agg/fd will be utilized,
however the initial offset into the 2nd agg is distorted on the 2nd call
to MPI_File_write_at_all because of the negative size of the 1st agg/fd
because the offset info the 2nd agg/fd is influenced by the size of the
first.  Simple solution is to reverse the default large block assignment so
in the case where only 1 agg/fd will be used it will be the first.  By chance
in the 2 agg situation this is what the GPFSMPIO_BALANCECONTIG
optimization does and it does not have this problem.
Signed-off-by: Rob Latham's avatarRob Latham <robl@mcs.anl.gov>
parent 976272a7
......@@ -367,10 +367,10 @@ void ADIOI_GPFS_Calc_file_domains(ADIO_File fd,
/* BG/L- and BG/P-style distribution of file domains: simple allocation of
* file domins to each aggregator */
for (i=0; i<naggs; i++) {
if (i < naggs_small) {
fd_size[i] = nb_cn_small * blksize;
} else {
if (i < naggs_large) {
fd_size[i] = (nb_cn_small+1) * blksize;
} else {
fd_size[i] = nb_cn_small * blksize;
}
}
}
......@@ -387,12 +387,12 @@ void ADIOI_GPFS_Calc_file_domains(ADIO_File fd,
#else // not BGQ platform
for (i=0; i<naggs; i++) {
if (i < naggs_small) {
fd_size[i] = nb_cn_small * blksize;
} else {
if (i < naggs_large) {
fd_size[i] = (nb_cn_small+1) * blksize;
} else {
fd_size[i] = nb_cn_small * blksize;
}
}
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment