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

ROMIO Collective IO One-sided aggregation algorithm GPFS enablement



Code to enable the usage of the optimized one-sided collective
IO aggregation algorithm from the ADIOI_GPFS_WriteStridedColl and
ADIOI_GPFS_ReadStridedColl functions.
Signed-off-by: Rob Latham's avatarRob Latham <robl@mcs.anl.gov>
parent 14732967
......@@ -271,6 +271,21 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count,
fd->hints->striping_unit);
GPFSMPIO_T_CIO_SET_GET( r, 1, 1, GPFSMPIO_CIO_T_MYREQ, GPFSMPIO_CIO_T_FD_PART );
if ((gpfsmpio_aggmethod == 1) || (gpfsmpio_aggmethod == 2)) {
/* If the user has specified to use a one-sided aggregation method then do that at
* this point instead of the two-phase I/O.
*/
ADIOI_OneSidedReadAggregation(fd, offset_list, len_list, contig_access_count, buf,
datatype,error_code, st_offsets, end_offsets, fd_start, fd_end);
GPFSMPIO_T_CIO_REPORT( 1, fd, myrank, nprocs)
ADIOI_Free(offset_list);
ADIOI_Free(len_list);
ADIOI_Free(st_offsets);
ADIOI_Free(end_offsets);
ADIOI_Free(fd_start);
ADIOI_Free(fd_end);
goto fn_exit;
}
if (gpfsmpio_p2pcontig==1) {
/* For some simple yet common(?) workloads, full-on two-phase I/O is
* overkill. We can establish sub-groups of processes and their
......
......@@ -263,6 +263,20 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count,
GPFSMPIO_T_CIO_SET_GET( w, 1, 1, GPFSMPIO_CIO_T_MYREQ, GPFSMPIO_CIO_T_FD_PART );
if ((gpfsmpio_aggmethod == 1) || (gpfsmpio_aggmethod == 2)) {
/* If the user has specified to use a one-sided aggregation method then do that at
* this point instead of the two-phase I/O.
*/
ADIOI_OneSidedWriteAggregation(fd, offset_list, len_list, contig_access_count, buf, datatype, error_code, st_offsets, end_offsets, fd_start, fd_end);
GPFSMPIO_T_CIO_REPORT( 1, fd, myrank, nprocs)
ADIOI_Free(offset_list);
ADIOI_Free(len_list);
ADIOI_Free(st_offsets);
ADIOI_Free(end_offsets);
ADIOI_Free(fd_start);
ADIOI_Free(fd_end);
goto fn_exit;
}
if (gpfsmpio_p2pcontig==1) {
/* For some simple yet common(?) workloads, full-on two-phase I/O is overkill. We can establish sub-groups of processes and their aggregator, and then these sub-groups will carry out a simplified two-phase over that sub-group.
*
......
......@@ -7,6 +7,7 @@
#include "adio.h"
#include "adio_extern.h"
extern int gpfsmpio_aggmethod;
#ifdef HAVE_UNISTD_H
#include <unistd.h>
......@@ -115,6 +116,10 @@ void ADIO_Close(ADIO_File fd, int *error_code)
MPI_Info_free(&(fd->info));
if (fd->io_buf != NULL) ADIOI_Free(fd->io_buf);
/* If one-sided aggregation is chosen then free the window over the io_buf.
*/
if ((gpfsmpio_aggmethod == 1) || (gpfsmpio_aggmethod == 2))
MPI_Win_free(&fd->io_buf_window);
/* memory for fd is freed in MPI_File_close */
}
......@@ -126,6 +126,11 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
* (e.g. Blue Gene) more efficent */
fd->io_buf = ADIOI_Malloc(fd->hints->cb_buffer_size);
/* If one-sided aggregation is chosen then create the window over the io_buf.
*/
if ((gpfsmpio_aggmethod == 1) || (gpfsmpio_aggmethod == 2)) {
MPI_Win_create(fd->io_buf,fd->hints->cb_buffer_size,1,MPI_INFO_NULL,fd->comm, &fd->io_buf_window);
}
/* deferred open:
* we can only do this optimization if 'fd->hints->deferred_open' is set
* (which means the user hinted 'no_indep_rw' and collective buffering).
......
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