[dcmf] [PATCH 2/2] Issue 2632: Use stat64() to determine the true block size for BGL file system.
Bob Cernohous
bobc at us.ibm.com
Wed Feb 6 13:02:54 CST 2008
The BGL ADIO in romio always defaulted to a 1M (assuming GPFS) blocksize
when tuning collective i/o. Changed to using stat64() to determine the
real blocksize for any file.
When the file is opened, the file system specific (BGL) pointer
(ADIOI_FileD->fs_ptr) is allocated and initialized with the blocksize.
This pointer is passed as needed to the tuning functions.
Also added ADIOI_BGL_Close() to free the file system specific storage.
Did a little cleanup of compiler warnings in the affected code.
Signed-off-by: Bob Cernohous <bobc at us.ibm.com>
---
.../mpich2/src/mpi/romio/adio/ad_bgl/Makefile.in | 2 +-
lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.c | 2 +-
lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.h | 2 +
.../src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.c | 94 +++++++++++++-------
.../src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.h | 12 ++-
.../src/mpi/romio/adio/ad_bgl/ad_bgl_close.c | 54 +++++-------
.../mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_open.c | 17 ++++
.../mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_pset.h | 22 -----
.../src/mpi/romio/adio/ad_bgl/ad_bgl_rdcoll.c | 2 +-
.../src/mpi/romio/adio/ad_bgl/ad_bgl_wrcoll.c | 2 +-
10 files changed, 116 insertions(+), 93 deletions(-)
mode change 100755 => 100644 lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_close.c
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/Makefile.in b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/Makefile.in
index dad62be..86e61f1 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/Makefile.in
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/Makefile.in
@@ -13,7 +13,7 @@ C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR)
@VPATH@
AD_BGL_OBJECTS = \
- ad_bgl_open.o ad_bgl_done.o \
+ ad_bgl_open.o ad_bgl_close.o ad_bgl_done.o \
ad_bgl_fcntl.o ad_bgl_iread.o ad_bgl_iwrite.o ad_bgl_wait.o \
ad_bgl_read.o ad_bgl_write.o ad_bgl_getsh.o ad_bgl_setsh.o \
ad_bgl.o ad_bgl_aggrs.o ad_bgl_pset.o ad_bgl_hints.o \
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.c
index 7ea0407..a2e3511 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.c
@@ -42,7 +42,7 @@ struct ADIOI_Fns_struct ADIO_BGL_operations = {
#endif
ADIOI_BGL_ReadStrided, /* ReadStrided */
ADIOI_BGL_WriteStrided, /* WriteStrided */
- ADIOI_GEN_Close, /* Close */
+ ADIOI_BGL_Close, /* Close */
ADIOI_BGL_IreadContig, /* IreadContig */
ADIOI_BGL_IwriteContig, /* IwriteContig */
ADIOI_BGL_ReadDone, /* ReadDone */
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.h b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.h
index 9f6b0c3..1ec22f5 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.h
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl.h
@@ -38,6 +38,8 @@ int ADIOI_BGL_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
void ADIOI_BGL_Open(ADIO_File fd, int *error_code);
+void ADIOI_BGL_Close(ADIO_File fd, int *error_code);
+
void ADIOI_BGL_ReadContig(ADIO_File fd, void *buf, int count,
MPI_Datatype datatype, int file_ptr_type,
ADIO_Offset offset, ADIO_Status *status, int
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.c
index 30bc39a..33dc6ee 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.c
@@ -26,7 +26,6 @@
int aggrsInPsetSize=0;
int *aggrsInPset=NULL;
-int GPFS_BSIZE=1048576;
/* forward declaration */
static void
@@ -226,14 +225,16 @@ ADIOI_BGL_compute_agg_ranklist_serial ( ADIO_File fd,
ADIOI_BGL_ProcInfo_t *all_procInfo,
int *aggrsInPset )
{
+# define DEBUG 0
+# if DEBUG
int i;
+# endif
int naggs;
int *tmp_ranklist;
/* compute the ranklist of IO aggregators and put into tmp_ranklist */
tmp_ranklist = (int *) ADIOI_Malloc (confInfo->nProcs * sizeof(int));
-# define DEBUG 0
# if DEBUG
for (i=0; i<confInfo->nProcs; i++)
printf( "\tcpuid %1d, rank = %6d\n", all_procInfo[i].cpuid, all_procInfo[i].rank );
@@ -291,10 +292,16 @@ void ADIOI_BGL_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
ADIO_Offset *min_st_offset_ptr,
ADIO_Offset **fd_start_ptr,
ADIO_Offset **fd_end_ptr,
- ADIO_Offset *fd_size_ptr)
+ ADIO_Offset *fd_size_ptr,
+ void *fs_ptr)
{
ADIO_Offset min_st_offset, max_end_offset, *fd_start, *fd_end, *fd_size;
int i, aggr;
+ static char myname[] = "ADIOI_BGL_GPFS_Calc_file_domains";
+ __blksize_t blksize = 1048576; /* default to 1M */
+ if(fs_ptr && ((ADIOI_BGL_fs*)fs_ptr)->blksize) /* ignore null ptr or 0 blksize */
+ blksize = ((ADIOI_BGL_fs*)fs_ptr)->blksize;
+/* FPRINTF(stderr,"%s(%d): Blocksize=%ld\n",myname,__LINE__,blksize);*/
/* find the range of all the requests */
min_st_offset = st_offsets [0];
@@ -309,10 +316,10 @@ void ADIOI_BGL_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
/* determine the "file domain (FD)" of each process, i.e., the portion of
the file that will be "owned" by each process */
- ADIO_Offset gpfs_ub = (max_end_offset +GPFS_BSIZE-1) / GPFS_BSIZE * GPFS_BSIZE - 1;
- ADIO_Offset gpfs_lb = min_st_offset / GPFS_BSIZE * GPFS_BSIZE;
- ADIO_Offset gpfs_ub_rdoff = (max_end_offset +GPFS_BSIZE-1) / GPFS_BSIZE * GPFS_BSIZE - 1 - max_end_offset;
- ADIO_Offset gpfs_lb_rdoff = min_st_offset - min_st_offset / GPFS_BSIZE * GPFS_BSIZE;
+ ADIO_Offset gpfs_ub = (max_end_offset +blksize-1) / blksize * blksize - 1;
+ ADIO_Offset gpfs_lb = min_st_offset / blksize * blksize;
+ ADIO_Offset gpfs_ub_rdoff = (max_end_offset +blksize-1) / blksize * blksize - 1 - max_end_offset;
+ ADIO_Offset gpfs_lb_rdoff = min_st_offset - min_st_offset / blksize * blksize;
ADIO_Offset fd_gpfs_range = gpfs_ub - gpfs_lb + 1;
int naggs = nprocs_for_coll;
@@ -322,15 +329,38 @@ void ADIOI_BGL_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
fd_start = *fd_start_ptr;
fd_end = *fd_end_ptr;
- ADIO_Offset n_gpfs_blk = fd_gpfs_range / GPFS_BSIZE;
+ ADIO_Offset n_gpfs_blk = fd_gpfs_range / blksize;
ADIO_Offset nb_cn_small = n_gpfs_blk/naggs;
ADIO_Offset naggs_large = n_gpfs_blk - naggs * (n_gpfs_blk/naggs);
ADIO_Offset naggs_small = naggs - naggs_large;
for (i=0; i<naggs; i++)
- if (i < naggs_small) fd_size[i] = nb_cn_small * GPFS_BSIZE;
- else fd_size[i] = (nb_cn_small+1) * GPFS_BSIZE;
-
+ if (i < naggs_small) fd_size[i] = nb_cn_small * blksize;
+ else fd_size[i] = (nb_cn_small+1) * blksize;
+
+/* FPRINTF(stderr,"%s(%d): "
+ "gpfs_ub %llu, "
+ "gpfs_lb %llu, "
+ "gpfs_ub_rdoff %llu, "
+ "gpfs_lb_rdoff %llu, "
+ "fd_gpfs_range %llu, "
+ "n_gpfs_blk %llu, "
+ "nb_cn_small %llu, "
+ "naggs_large %llu, "
+ "naggs_small %llu, "
+ "\n",
+ myname,__LINE__,
+ gpfs_ub ,
+ gpfs_lb ,
+ gpfs_ub_rdoff,
+ gpfs_lb_rdoff,
+ fd_gpfs_range,
+ n_gpfs_blk ,
+ nb_cn_small ,
+ naggs_large ,
+ naggs_small
+ );
+*/
fd_size[0] -= gpfs_lb_rdoff;
fd_size[naggs-1] -= gpfs_ub_rdoff;
@@ -351,7 +381,7 @@ void ADIOI_BGL_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
/*
* deprecated
- */
+ *
void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
ADIO_Offset *end_offsets,
int nprocs,
@@ -363,8 +393,8 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
{
ADIO_Offset min_st_offset, max_end_offset, *fd_start, *fd_end, *fd_size;
int i;
-
- /* find the range of all the requests */
+static int GPFS_BSIZE=1048576;
+ * find the range of all the requests *
min_st_offset = st_offsets [0];
max_end_offset = end_offsets[0];
for (i=1; i<nprocs; i++) {
@@ -372,30 +402,30 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
max_end_offset = ADIOI_MAX(max_end_offset, end_offsets[i]);
}
- /* determine the "file domain (FD)" of each process, i.e., the portion of
- the file that will be "owned" by each process */
+ * determine the "file domain (FD)" of each process, i.e., the portion of
+ the file that will be "owned" by each process *
- /* GPFS specific, pseudo starting/end point has to round to GPFS_BSIZE */
+ * GPFS specific, pseudo starting/end point has to round to GPFS_BSIZE *
ADIO_Offset gpfs_ub = (max_end_offset +GPFS_BSIZE-1) / GPFS_BSIZE * GPFS_BSIZE - 1;
ADIO_Offset gpfs_lb = min_st_offset / GPFS_BSIZE * GPFS_BSIZE;
ADIO_Offset gpfs_ub_rdoff = (max_end_offset +GPFS_BSIZE-1) / GPFS_BSIZE * GPFS_BSIZE - 1 - max_end_offset;
ADIO_Offset gpfs_lb_rdoff = min_st_offset - min_st_offset / GPFS_BSIZE * GPFS_BSIZE;
ADIO_Offset fd_gpfs_range = gpfs_ub - gpfs_lb + 1;
- /* all computation of partition is based on the rounded pseudo-range */
+ * all computation of partition is based on the rounded pseudo-range *
ADIO_Offset fds_ub = (fd_gpfs_range +nprocs_for_coll-1) / nprocs_for_coll;
ADIO_Offset fds_lb = fd_gpfs_range / nprocs_for_coll;
int naggs = nprocs_for_coll;
- int npsets = aggrsInPset[0]; /* special meaning for element 0 */
+ int npsets = aggrsInPset[0]; * special meaning for element 0 *
fd_size = (ADIO_Offset *) ADIOI_Malloc(naggs * sizeof(ADIO_Offset));
*fd_start_ptr = (ADIO_Offset *) ADIOI_Malloc(naggs * sizeof(ADIO_Offset));
*fd_end_ptr = (ADIO_Offset *) ADIOI_Malloc(naggs * sizeof(ADIO_Offset));
fd_start = *fd_start_ptr;
fd_end = *fd_end_ptr;
- /* some pre-computation to determine rough ratio of when to up-fit, when to low-fit */
- /* 1. get the estimated data per pset */
- /* 2. determine a factor between up and down */
+ * some pre-computation to determine rough ratio of when to up-fit, when to low-fit *
+ * 1. get the estimated data per pset *
+ * 2. determine a factor between up and down *
int avg_aggrsInPset = (naggs +npsets-1)/npsets;
ADIO_Offset avg_bytes_perPset = fd_gpfs_range / npsets;
ADIO_Offset resid = avg_bytes_perPset % GPFS_BSIZE;
@@ -405,7 +435,7 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
if (small) ratio = resid == 0 ? npsets + 2 : (downr +resid-1)/resid;
- /* go through aggrsInfo of all PSETs */
+ * go through aggrsInfo of all PSETs *
ADIO_Offset fd_range = fd_gpfs_range;
int aggr = 0, pset;
for (pset=0; pset<npsets; pset++) {
@@ -414,7 +444,7 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
int my_naggs = aggrsInPset[pset+1];
ADIO_Offset fds_pset;
- /* Last pset will deal with the residuals */
+ * Last pset will deal with the residuals *
if (pset == npsets-1)
fds_pset = fd_range;
else
@@ -440,7 +470,7 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
}
}
- /* for aggrs in each PSET, divide evenly the data range */
+ * for aggrs in each PSET, divide evenly the data range *
#define CN_ALIGN 1
#if !CN_ALIGN
fd_range -= fds_pset;
@@ -482,14 +512,14 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
#endif
}
- /* after scheduling, the first and the last region has to remove the round-off effect */
+ * after scheduling, the first and the last region has to remove the round-off effect *
#if CN_ALIGN
fd_size[0] -= gpfs_lb_rdoff;
fd_size[naggs-1] -= gpfs_ub_rdoff;
#endif
- /* compute the file domain for each aggr */
+ * compute the file domain for each aggr *
ADIO_Offset offset = min_st_offset;
for (aggr=0; aggr<naggs; aggr++) {
fd_start[aggr] = offset;
@@ -497,7 +527,7 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
offset += fd_size[aggr];
}
- /*
+ *
printf( "\t%6d : %12qd:%12qd, %12qd:%12qd:%12qd, %12qd:%12qd:%12qd\n",
naggs,
min_st_offset,
@@ -508,7 +538,7 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
fd_start[naggs-1],
fd_end [naggs-1],
fd_size [naggs-1] );
- */
+ *
*fd_size_ptr = fd_size[0];
@@ -516,7 +546,7 @@ void ADIOI_BGL_GPFS_Calc_file_domain0(ADIO_Offset *st_offsets,
ADIOI_Free (fd_size);
}
-
+*/
/*
* When a process is an IO aggregator, this will return its index in the aggrs list.
@@ -785,9 +815,7 @@ void ADIOI_BGL_Calc_others_req(ADIO_File fd, int count_my_req_procs,
requests of proc. i lie in this process's file domain. */
int *count_others_req_per_proc, count_others_req_procs;
- int i, j;
- MPI_Request *send_requests, *recv_requests;
- MPI_Status *statuses;
+ int i;
ADIOI_Access *others_req;
/* Parameters for MPI_Alltoallv */
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.h b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.h
index f00feb9..573517a 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.h
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_aggrs.h
@@ -26,12 +26,17 @@
#define AD_BGL_AGGRS_H_
#include "adio.h"
-
+#include <sys/stat.h>
extern int *aggrsInPset; /* defined in ad_bgl_aggrs.c */
- extern int GPFS_BSIZE; /* FIXME: should be moved to HINT interface */
+ /* File system (BGL) specific information -
+ hung off of ADIOI_FileD file descriptor (fd->fs_ptr) at open */
+ typedef struct ADIOI_BGL_fs_s {
+ __blksize_t blksize;
+ } ADIOI_BGL_fs;
+
/* generate a list of I/O aggregators that utilizes BGL-PSET orginization. */
int ADIOI_BGL_gen_agg_ranklist(ADIO_File fd, int n_aggrs_per_pset);
@@ -43,7 +48,8 @@
ADIO_Offset *min_st_offset_ptr,
ADIO_Offset **fd_start_ptr,
ADIO_Offset **fd_end_ptr,
- ADIO_Offset *fd_size_ptr);
+ ADIO_Offset *fd_size_ptr,
+ void *fs_ptr);
/* a utilitiy function for debugging */
int ADIOI_BGL_Aggrs_index(ADIO_File fd, int myrank );
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_close.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_close.c
old mode 100755
new mode 100644
index 02ad46e..844d5d6
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_close.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_close.c
@@ -19,46 +19,38 @@
#include "ad_bgl.h"
#include "ad_bgl_aggrs.h"
-//
-// #include "adio.h"
-//
-// #ifdef HAVE_UNISTD_H
-// #include <unistd.h>
-// #endif
-//
-// #ifdef PROFILE
-// #include "mpe.h"
-// #endif
-//
void ADIOI_BGL_Close(ADIO_File fd, int *error_code)
{
- int err, derr=0;
- static char myname[] = "ADIOI_BGL_CLOSE";
+ int err, derr=0;
+ static char myname[] = "ADIOI_BGL_CLOSE";
#ifdef PROFILE
- MPE_Log_event(9, 0, "start close");
+ MPE_Log_event(9, 0, "start close");
#endif
- err = close(fd->fd_sys);
- if (fd->fd_direct >= 0) {
- derr = close(fd->fd_direct);
- }
+ err = close(fd->fd_sys);
+ if (fd->fd_direct >= 0)
+ {
+ derr = close(fd->fd_direct);
+ }
#ifdef PROFILE
- MPE_Log_event(10, 0, "end close");
+ MPE_Log_event(10, 0, "end close");
#endif
- ADIOI_Free(fd->fs_ptr);
- fd->fs_ptr = NULL;
- fd->fd_sys = -1;
- fd->fd_direct = -1;
-
- if (err == -1 || derr == -1) {
- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
- myname, __LINE__, MPI_ERR_IO,
- "**io",
- "**io %s", strerror(errno));
- }
- else *error_code = MPI_SUCCESS;
+/* FPRINTF(stderr,"%s(%d):'%s'. Free %#X\n",myname,__LINE__,fd->filename,(int)fd->fs_ptr);*/
+ ADIOI_Free(fd->fs_ptr);
+ fd->fs_ptr = NULL;
+ fd->fd_sys = -1;
+ fd->fd_direct = -1;
+
+ if (err == -1 || derr == -1)
+ {
+ *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
+ myname, __LINE__, MPI_ERR_IO,
+ "**io",
+ "**io %s", strerror(errno));
+ }
+ else *error_code = MPI_SUCCESS;
}
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_open.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_open.c
index 240e4c6..2b8956b 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_open.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_open.c
@@ -18,6 +18,7 @@
*/
#include "ad_bgl.h"
+#include "ad_bgl_aggrs.h"
void ADIOI_BGL_Open(ADIO_File fd, int *error_code)
{
@@ -52,6 +53,22 @@ void ADIOI_BGL_Open(ADIO_File fd, int *error_code)
if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND))
fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
+ if(fd->fd_sys != -1)
+ {
+ struct stat64 bgl_stat;
+ int rc = stat64(fd->filename,&bgl_stat);
+ if (rc >= 0)
+ {
+ /* store the blksize in the file system specific storage */
+ AD_BGL_assert(fd->fs_ptr == NULL);
+ fd->fs_ptr = (ADIOI_BGL_fs*) ADIOI_Malloc(sizeof(ADIOI_BGL_fs));
+ ((ADIOI_BGL_fs*)fd->fs_ptr)->blksize = bgl_stat.st_blksize;
+/* FPRINTF(stderr,"%s(%d):Successful stat '%s'. Blocksize=%ld\n",myname,__LINE__,fd->filename,bgl_stat.st_blksize);*/
+ }
+/* else
+ FPRINTF(stderr,"%s(%d):Stat '%s' failed with rc=%d, errno=%d\n",myname,__LINE__,fd->filename,rc,errno);*/
+ }
+
if (fd->fd_sys == -1) {
if (errno == ENAMETOOLONG)
*error_code = MPIO_Err_create_code(MPI_SUCCESS,
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_pset.h b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_pset.h
index e3f25f9..1628ef6 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_pset.h
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_pset.h
@@ -81,27 +81,5 @@ typedef struct {
void ADIOI_BGL_persInfo_free( ADIOI_BGL_ConfInfo_t *conf,
ADIOI_BGL_ProcInfo_t *proc );
-/* public funcs for aggrsInPset objects, support for special file domain */
- extern int *aggrsInPset; /* defined in ad_bgl_aggrs.c */
- extern int GPFS_BSIZE;
-
- void ADIOI_BGL_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
- ADIO_Offset *end_offsets,
- int nprocs,
- int nprocs_for_coll,
- ADIO_Offset *min_st_offset_ptr,
- ADIO_Offset **fd_start_ptr,
- ADIO_Offset **fd_end_ptr,
- ADIO_Offset *fd_size_ptr);
-
- int ADIOI_BGL_Aggrs_index(ADIO_File fd, int myrank );
-
- int ADIOI_BGL_Calc_aggregator(ADIO_File fd,
- ADIO_Offset off,
- ADIO_Offset min_off,
- ADIO_Offset *len,
- ADIO_Offset fd_size,
- ADIO_Offset *fd_start,
- ADIO_Offset *fd_end);
#endif /* AD_BGL_PSET_H_ */
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_rdcoll.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_rdcoll.c
index ff65b7e..195b702 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_rdcoll.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_rdcoll.c
@@ -264,7 +264,7 @@ void ADIOI_BGL_ReadStridedColl(ADIO_File fd, void *buf, int count,
if (bglmpio_tuneblocking)
ADIOI_BGL_GPFS_Calc_file_domains(st_offsets, end_offsets, nprocs,
nprocs_for_coll, &min_st_offset,
- &fd_start, &fd_end, &fd_size);
+ &fd_start, &fd_end, &fd_size, fd->fs_ptr);
else
ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs,
nprocs_for_coll, &min_st_offset,
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_wrcoll.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_wrcoll.c
index 6126a48..ff3ea24 100644
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_wrcoll.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_bgl/ad_bgl_wrcoll.c
@@ -261,7 +261,7 @@ void ADIOI_BGL_WriteStridedColl(ADIO_File fd, void *buf, int count,
if (bglmpio_tuneblocking)
ADIOI_BGL_GPFS_Calc_file_domains(st_offsets, end_offsets, nprocs,
nprocs_for_coll, &min_st_offset,
- &fd_start, &fd_end, &fd_size);
+ &fd_start, &fd_end, &fd_size, fd->fs_ptr);
else
ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs,
nprocs_for_coll, &min_st_offset,
--
1.5.3.7
More information about the dcmf
mailing list