IOR
aiori-MPIIO.c
Go to the documentation of this file.
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4 /******************************************************************************\
5 * *
6 * Copyright (c) 2003, The Regents of the University of California *
7 * See the file COPYRIGHT for a complete copyright notice and license. *
8 * *
9 ********************************************************************************
10 *
11 * Implement abstract I/O interface for MPIIO.
12 *
13 \******************************************************************************/
14 
15 #ifdef HAVE_CONFIG_H
16 #include "config.h"
17 #endif
18 
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <sys/stat.h>
22 
23 #include "ior.h"
24 #include "iordef.h"
25 #include "aiori.h"
26 #include "utilities.h"
27 
28 #ifndef MPIAPI
29 #define MPIAPI /* defined as __stdcall on Windows */
30 #endif
31 
32 /**************************** P R O T O T Y P E S *****************************/
33 
35 
36 static aiori_fd_t *MPIIO_Create(char *, int iorflags, aiori_mod_opt_t *);
37 static aiori_fd_t *MPIIO_Open(char *, int flags, aiori_mod_opt_t *);
40 static void MPIIO_Close(aiori_fd_t *, aiori_mod_opt_t *);
41 static char* MPIIO_GetVersion();
42 static void MPIIO_Fsync(aiori_fd_t *, aiori_mod_opt_t *);
44 
45 /************************** D E C L A R A T I O N S ***************************/
46 
47 typedef struct{
48  MPI_File fd;
49  MPI_Datatype transferType; /* datatype for transfer */
50  MPI_Datatype contigType; /* elem datatype */
51  MPI_Datatype fileType; /* filetype for file view */
52 } mpiio_fd_t;
53 
54 typedef struct {
55  int showHints; /* show hints */
56  int useFileView; /* use MPI_File_set_view */
57  int preallocate; /* preallocate file size */
58  int useSharedFilePointer; /* use shared file pointer */
59  int useStridedDatatype; /* put strided access into datatype */
60  char * hintsFileName; /* full name for hints file */
62 
63 static option_help * MPIIO_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values){
64  mpiio_options_t * o = malloc(sizeof(mpiio_options_t));
65  if (init_values != NULL){
66  memcpy(o, init_values, sizeof(mpiio_options_t));
67  }else{
68  memset(o, 0, sizeof(mpiio_options_t));
69  }
70  *init_backend_options = (aiori_mod_opt_t*) o;
71 
72  option_help h [] = {
73  {0, "mpiio.hintsFileName","Full name for hints file", OPTION_OPTIONAL_ARGUMENT, 's', & o->hintsFileName},
74  {0, "mpiio.showHints", "Show MPI hints", OPTION_FLAG, 'd', & o->showHints},
75  {0, "mpiio.preallocate", "Preallocate file size", OPTION_FLAG, 'd', & o->preallocate},
76  {0, "mpiio.useStridedDatatype", "put strided access into datatype", OPTION_FLAG, 'd', & o->useStridedDatatype},
77  //{'P', NULL, "useSharedFilePointer -- use shared file pointer [not working]", OPTION_FLAG, 'd', & params->useSharedFilePointer},
78  {0, "mpiio.useFileView", "Use MPI_File_set_view", OPTION_FLAG, 'd', & o->useFileView},
80  };
81  option_help * help = malloc(sizeof(h));
82  memcpy(help, h, sizeof(h));
83  return help;
84 }
85 
86 
88  .name = "MPIIO",
89  .name_legacy = NULL,
90  .create = MPIIO_Create,
91  .get_options = MPIIO_options,
92  .xfer_hints = MPIIO_xfer_hints,
93  .open = MPIIO_Open,
94  .xfer = MPIIO_Xfer,
95  .close = MPIIO_Close,
96  .delete = MPIIO_Delete,
97  .get_version = MPIIO_GetVersion,
98  .fsync = MPIIO_Fsync,
99  .get_file_size = MPIIO_GetFileSize,
100  .statfs = aiori_posix_statfs,
101  .mkdir = aiori_posix_mkdir,
102  .rmdir = aiori_posix_rmdir,
103  .access = MPIIO_Access,
104  .stat = aiori_posix_stat,
105  .check_params = MPIIO_check_params
106 };
107 
108 /***************************** F U N C T I O N S ******************************/
110 
112  hints = params;
113 }
114 
115 static int MPIIO_check_params(aiori_mod_opt_t * module_options){
116  mpiio_options_t * param = (mpiio_options_t*) module_options;
117  if ((param->useFileView == TRUE)
118  && (sizeof(MPI_Aint) < 8) /* used for 64-bit datatypes */
119  &&((hints->numTasks * hints->blockSize) >
120  (2 * (IOR_offset_t) GIBIBYTE)))
121  ERR("segment size must be < 2GiB");
122  if (param->useSharedFilePointer)
123  ERR("shared file pointer not implemented");
124  if (param->useStridedDatatype && (hints->blockSize < sizeof(IOR_size_t)
125  || hints->transferSize <
126  sizeof(IOR_size_t)))
127  ERR("need larger file size for strided datatype in MPIIO");
128  if (hints->randomOffset && hints->collective)
129  ERR("random offset not available with collective MPIIO");
130  if (hints->randomOffset && param->useFileView)
131  ERR("random offset not available with MPIIO fileviews");
132 
133  return 0;
134 }
135 
136 /*
137  * Try to access a file through the MPIIO interface.
138  */
139 int MPIIO_Access(const char *path, int mode, aiori_mod_opt_t *module_options)
140 {
141  if(hints->dryRun){
142  return MPI_SUCCESS;
143  }
144  mpiio_options_t * param = (mpiio_options_t*) module_options;
145  MPI_File fd;
146  int mpi_mode = MPI_MODE_UNIQUE_OPEN;
147  MPI_Info mpiHints = MPI_INFO_NULL;
148 
149  if ((mode & W_OK) && (mode & R_OK))
150  mpi_mode |= MPI_MODE_RDWR;
151  else if (mode & W_OK)
152  mpi_mode |= MPI_MODE_WRONLY;
153  else
154  mpi_mode |= MPI_MODE_RDONLY;
155 
156  SetHints(&mpiHints, param->hintsFileName);
157 
158  int ret = MPI_File_open(MPI_COMM_SELF, path, mpi_mode, mpiHints, &fd);
159 
160  if (!ret)
161  MPI_File_close(&fd);
162 
163  if (mpiHints != MPI_INFO_NULL)
164  MPI_CHECK(MPI_Info_free(&mpiHints), "MPI_Info_free failed");
165  return ret;
166 }
167 
168 /*
169  * Create and open a file through the MPIIO interface.
170  */
171 static aiori_fd_t *MPIIO_Create(char *testFileName, int iorflags, aiori_mod_opt_t * module_options)
172 {
173  return MPIIO_Open(testFileName, iorflags, module_options);
174 }
175 
176 /*
177  * Open a file through the MPIIO interface. Setup file view.
178  */
179 static aiori_fd_t *MPIIO_Open(char *testFileName, int flags, aiori_mod_opt_t * module_options)
180 {
181  mpiio_options_t * param = (mpiio_options_t*) module_options;
182  int fd_mode = (int)0,
183  offsetFactor,
184  tasksPerFile,
185  transfersPerBlock = hints->blockSize / hints->transferSize;
186 
187 
188  mpiio_fd_t * mfd = malloc(sizeof(mpiio_fd_t));
189  memset(mfd, 0, sizeof(mpiio_fd_t));
190  MPI_Comm comm;
191  MPI_Info mpiHints = MPI_INFO_NULL;
192 
193  /* set IOR file flags to MPIIO flags */
194  /* -- file open flags -- */
195  if (flags & IOR_RDONLY) {
196  fd_mode |= MPI_MODE_RDONLY;
197  }
198  if (flags & IOR_WRONLY) {
199  fd_mode |= MPI_MODE_WRONLY;
200  }
201  if (flags & IOR_RDWR) {
202  fd_mode |= MPI_MODE_RDWR;
203  }
204  if (flags & IOR_APPEND) {
205  fd_mode |= MPI_MODE_APPEND;
206  }
207  if (flags & IOR_CREAT) {
208  fd_mode |= MPI_MODE_CREATE;
209  }
210  if (flags & IOR_EXCL) {
211  fd_mode |= MPI_MODE_EXCL;
212  }
213  if (flags & IOR_DIRECT) {
214  fprintf(stdout, "O_DIRECT not implemented in MPIIO\n");
215  }
216 
217  /*
218  * MPI_MODE_UNIQUE_OPEN mode optimization eliminates the overhead of file
219  * locking. Only open a file in this mode when the file will not be con-
220  * currently opened elsewhere, either inside or outside the MPI environment.
221  */
222  fd_mode |= MPI_MODE_UNIQUE_OPEN;
223 
224  if (hints->filePerProc) {
225  comm = MPI_COMM_SELF;
226  } else {
227  comm = testComm;
228  }
229 
230  SetHints(&mpiHints, param->hintsFileName);
231  /*
232  * note that with MP_HINTS_FILTERED=no, all key/value pairs will
233  * be in the info object. The info object that is attached to
234  * the file during MPI_File_open() will only contain those pairs
235  * deemed valid by the implementation.
236  */
237  /* show hints passed to file */
238  if (rank == 0 && param->showHints) {
239  fprintf(stdout, "\nhints passed to MPI_File_open() {\n");
240  ShowHints(&mpiHints);
241  fprintf(stdout, "}\n");
242  }
243  if(! hints->dryRun){
244  MPI_CHECKF(MPI_File_open(comm, testFileName, fd_mode, mpiHints, & mfd->fd),
245  "cannot open file: %s", testFileName);
246  if (flags & IOR_TRUNC) {
247  MPI_CHECKF(MPI_File_set_size(mfd->fd, 0), "cannot truncate file: %s", testFileName);
248  }
249  }
250 
251  /* show hints actually attached to file handle */
252  if (rank == 0 && param->showHints && ! hints->dryRun) {
253  if (mpiHints != MPI_INFO_NULL)
254  MPI_CHECK(MPI_Info_free(&mpiHints), "MPI_Info_free failed");
255  MPI_CHECK(MPI_File_get_info(mfd->fd, &mpiHints),
256  "cannot get file info");
257  fprintf(stdout, "\nhints returned from opened file {\n");
258  ShowHints(&mpiHints);
259  fprintf(stdout, "}\n");
260  }
261 
262  /* preallocate space for file */
263  if (param->preallocate && flags & IOR_CREAT && ! hints->dryRun) {
264  MPI_CHECK(MPI_File_preallocate(mfd->fd,
265  (MPI_Offset) (hints->segmentCount
266  *
267  hints->blockSize *
268  hints->numTasks)),
269  "cannot preallocate file");
270  }
271 
272 
273  /* create file view */
274  if (param->useFileView) {
275  /* Create in-memory datatype */
276  MPI_CHECK(MPI_Type_contiguous (hints->transferSize / sizeof(IOR_size_t), MPI_LONG_LONG_INT, & mfd->contigType), "cannot create contiguous datatype");
277  MPI_CHECK(MPI_Type_create_resized( mfd->contigType, 0, 0, & mfd->transferType), "cannot create resized type");
278  MPI_CHECK(MPI_Type_commit(& mfd->contigType), "cannot commit datatype");
279  MPI_CHECK(MPI_Type_commit(& mfd->transferType), "cannot commit datatype");
280 
281  /* create contiguous transfer datatype */
282 
283  if (hints->filePerProc) {
284  offsetFactor = 0;
285  tasksPerFile = 1;
286  } else {
287  offsetFactor = (rank + rankOffset) % hints->numTasks;
288  tasksPerFile = hints->numTasks;
289  }
290 
291  if(! hints->dryRun) {
292  if(! param->useStridedDatatype){
293  struct fileTypeStruct {
294  int globalSizes[2], localSizes[2], startIndices[2];
295  } fileTypeStruct;
296 
297  /*
298  * create file type using subarray
299  */
300  fileTypeStruct.globalSizes[0] = 1;
301  fileTypeStruct.globalSizes[1] = transfersPerBlock * tasksPerFile;
302  fileTypeStruct.localSizes[0] = 1;
303  fileTypeStruct.localSizes[1] = transfersPerBlock;
304  fileTypeStruct.startIndices[0] = 0;
305  fileTypeStruct.startIndices[1] = transfersPerBlock * offsetFactor;
306 
307  MPI_CHECK(MPI_Type_create_subarray
308  (2, fileTypeStruct.globalSizes,
309  fileTypeStruct.localSizes,
310  fileTypeStruct.startIndices, MPI_ORDER_C,
311  mfd->contigType, & mfd->fileType),
312  "cannot create subarray");
313  MPI_CHECK(MPI_Type_commit(& mfd->fileType), "cannot commit datatype");
314  MPI_CHECK(MPI_File_set_view(mfd->fd, 0,
315  mfd->contigType,
316  mfd->fileType,
317  "native",
318  (MPI_Info) MPI_INFO_NULL),
319  "cannot set file view");
320  }else{
321  MPI_CHECK(MPI_Type_create_resized(mfd->contigType, 0, tasksPerFile * hints->blockSize, & mfd->fileType), "cannot create MPI_Type_create_hvector");
322  MPI_CHECK(MPI_Type_commit(& mfd->fileType), "cannot commit datatype");
323  }
324  }
325  }
326  if (mpiHints != MPI_INFO_NULL)
327  MPI_CHECK(MPI_Info_free(&mpiHints), "MPI_Info_free failed");
328  return ((void *) mfd);
329 }
330 
331 /*
332  * Write or read access to file using the MPIIO interface.
333  */
334 static IOR_offset_t MPIIO_Xfer(int access, aiori_fd_t * fdp, IOR_size_t * buffer,
335  IOR_offset_t length, IOR_offset_t offset, aiori_mod_opt_t * module_options)
336 {
337  /* NOTE: The second arg is (void *) for reads, and (const void *)
338  for writes. Therefore, one of the two sets of assignments below
339  will get "assignment from incompatible pointer-type" warnings,
340  if we only use this one set of signatures. */
341  mpiio_options_t * param = (mpiio_options_t*) module_options;
342  if(hints->dryRun)
343  return length;
344  mpiio_fd_t * mfd = (mpiio_fd_t*) fdp;
345 
346  int (MPIAPI * Access) (MPI_File, void *, int,
347  MPI_Datatype, MPI_Status *);
348  int (MPIAPI * Access_at) (MPI_File, MPI_Offset, void *, int,
349  MPI_Datatype, MPI_Status *);
350  int (MPIAPI * Access_all) (MPI_File, void *, int,
351  MPI_Datatype, MPI_Status *);
352  int (MPIAPI * Access_at_all) (MPI_File, MPI_Offset, void *, int,
353  MPI_Datatype, MPI_Status *);
354  /*
355  * this needs to be properly implemented:
356  *
357  * int (*Access_ordered)(MPI_File, void *, int,
358  * MPI_Datatype, MPI_Status *);
359  */
360  MPI_Status status;
361 
362  /* point functions to appropriate MPIIO calls */
363  if (access == WRITE) { /* WRITE */
364  Access = (int (MPIAPI *)(MPI_File, void *, int,
365  MPI_Datatype, MPI_Status *)) MPI_File_write;
366  Access_at = (int (MPIAPI *)(MPI_File, MPI_Offset, void *, int,
367  MPI_Datatype, MPI_Status *)) MPI_File_write_at;
368  Access_all = (int (MPIAPI *) (MPI_File, void *, int,
369  MPI_Datatype, MPI_Status *)) MPI_File_write_all;
370  Access_at_all = (int (MPIAPI *) (MPI_File, MPI_Offset, void *, int,
371  MPI_Datatype, MPI_Status *)) MPI_File_write_at_all;
372  /*
373  * this needs to be properly implemented:
374  *
375  * Access_ordered = MPI_File_write_ordered;
376  */
377  } else { /* READ or CHECK */
378  Access = MPI_File_read;
379  Access_at = MPI_File_read_at;
380  Access_all = MPI_File_read_all;
381  Access_at_all = MPI_File_read_at_all;
382  /*
383  * this needs to be properly implemented:
384  *
385  * Access_ordered = MPI_File_read_ordered;
386  */
387  }
388 
389  /*
390  * 'useFileView' uses derived datatypes and individual file pointers
391  */
392  if (param->useFileView) {
393  /* find offset in file */
394  if (SeekOffset(mfd->fd, offset, module_options) <
395  0) {
396  /* if unsuccessful */
397  length = -1;
398  } else {
399 
400  /*
401  * 'useStridedDatatype' fits multi-strided pattern into a datatype;
402  * must use 'length' to determine repetitions (fix this for
403  * multi-segments someday, WEL):
404  * e.g., 'IOR -s 2 -b 32K -t 32K -a MPIIO --mpiio.useStridedDatatype --mpiio.useFileView'
405  */
406  if (param->useStridedDatatype) {
407  if(offset >= (rank+1) * hints->blockSize){
408  /* we shall write only once per transferSize */
409  /* printf("FAKE access %d %lld\n", rank, offset); */
410  return hints->transferSize;
411  }
412  length = hints->segmentCount;
413  MPI_CHECK(MPI_File_set_view(mfd->fd, offset,
414  mfd->contigType,
415  mfd->fileType,
416  "native",
417  (MPI_Info) MPI_INFO_NULL), "cannot set file view");
418  /* printf("ACCESS %d %lld -> %lld\n", rank, offset, length); */
419  }else{
420  length = 1;
421  }
422  if (hints->collective) {
423  /* individual, collective call */
424  MPI_CHECK(Access_all
425  (mfd->fd, buffer, length,
426  mfd->transferType, &status),
427  "cannot access collective");
428  } else {
429  /* individual, noncollective call */
430  MPI_CHECK(Access
431  (mfd->fd, buffer, length,
432  mfd->transferType, &status),
433  "cannot access noncollective");
434  }
435  /* MPI-IO driver does "nontcontiguous" by transfering
436  * 'segment' regions of 'transfersize' bytes, but
437  * our caller WriteOrReadSingle does not know how to
438  * deal with us reporting that we wrote N times more
439  * data than requested. */
440  length = hints->transferSize;
441  }
442  } else {
443  /*
444  * !useFileView does not use derived datatypes, but it uses either
445  * shared or explicit file pointers
446  */
447  if (param->useSharedFilePointer) {
448  /* find offset in file */
449  if (SeekOffset
450  (mfd->fd, offset, module_options) < 0) {
451  /* if unsuccessful */
452  length = -1;
453  } else {
454  /* shared, collective call */
455  /*
456  * this needs to be properly implemented:
457  *
458  * MPI_CHECK(Access_ordered(fd.MPIIO, buffer, length,
459  * MPI_BYTE, &status),
460  * "cannot access shared, collective");
461  */
462  fprintf(stdout,
463  "useSharedFilePointer not implemented\n");
464  }
465  } else {
466  if (hints->collective) {
467  /* explicit, collective call */
468  MPI_CHECK(Access_at_all
469  (mfd->fd, offset,
470  buffer, length, MPI_BYTE, &status),
471  "cannot access explicit, collective");
472  } else {
473  /* explicit, noncollective call */
474  MPI_CHECK(Access_at
475  (mfd->fd, offset,
476  buffer, length, MPI_BYTE, &status),
477  "cannot access explicit, noncollective");
478  }
479  }
480  }
481  return hints->transferSize;
482 }
483 
484 /*
485  * Perform fsync().
486  */
487 static void MPIIO_Fsync(aiori_fd_t *fdp, aiori_mod_opt_t * module_options)
488 {
489  mpiio_options_t * param = (mpiio_options_t*) module_options;
490  if(hints->dryRun)
491  return;
492  mpiio_fd_t * mfd = (mpiio_fd_t*) fdp;
493  if (MPI_File_sync(mfd->fd) != MPI_SUCCESS)
494  EWARN("fsync() failed");
495 }
496 
497 /*
498  * Close a file through the MPIIO interface.
499  */
500 static void MPIIO_Close(aiori_fd_t *fdp, aiori_mod_opt_t * module_options)
501 {
502  mpiio_options_t * param = (mpiio_options_t*) module_options;
503  mpiio_fd_t * mfd = (mpiio_fd_t*) fdp;
504  if(! hints->dryRun){
505  MPI_CHECK(MPI_File_close(& mfd->fd), "cannot close file");
506  }
507  if (param->useFileView == TRUE) {
508  /*
509  * need to free the datatype, so done in the close process
510  */
511  MPI_CHECK(MPI_Type_free(& mfd->fileType), "cannot free MPI file datatype");
512  MPI_CHECK(MPI_Type_free(& mfd->transferType), "cannot free MPI transfer datatype");
513  MPI_CHECK(MPI_Type_free(& mfd->contigType), "cannot free type");
514  }
515  free(fdp);
516 }
517 
518 /*
519  * Delete a file through the MPIIO interface.
520  */
521 void MPIIO_Delete(char *testFileName, aiori_mod_opt_t * module_options)
522 {
523  mpiio_options_t * param = (mpiio_options_t*) module_options;
524  if(hints->dryRun)
525  return;
526  MPI_CHECKF(MPI_File_delete(testFileName, (MPI_Info) MPI_INFO_NULL),
527  "cannot delete file: %s", testFileName);
528 }
529 
530 /*
531  * Determine api version.
532  */
533 static char* MPIIO_GetVersion()
534 {
535  static char ver[1024] = {};
536  int version, subversion;
537  MPI_CHECK(MPI_Get_version(&version, &subversion), "cannot get MPI version");
538  sprintf(ver, "(%d.%d)", version, subversion);
539  return ver;
540 }
541 
542 /*
543  * Seek to offset in file using the MPIIO interface.
544  */
546  aiori_mod_opt_t * module_options)
547 {
548  mpiio_options_t * param = (mpiio_options_t*) module_options;
549  int offsetFactor, tasksPerFile;
550  IOR_offset_t tempOffset;
551 
552  tempOffset = offset;
553 
554  if (hints->filePerProc) {
555  offsetFactor = 0;
556  tasksPerFile = 1;
557  } else {
558  offsetFactor = (rank + rankOffset) % hints->numTasks;
559  tasksPerFile = hints->numTasks;
560  }
561  if (param->useFileView) {
562  /* recall that offsets in a file view are
563  counted in units of transfer size */
564  if (hints->filePerProc) {
565  tempOffset = tempOffset / hints->transferSize;
566  } else {
567  /*
568  * this formula finds a file view offset for a task
569  * from an absolute offset
570  */
571  tempOffset = ((hints->blockSize / hints->transferSize)
572  * (tempOffset /
573  (hints->blockSize * tasksPerFile)))
574  + (((tempOffset % (hints->blockSize * tasksPerFile))
575  - (offsetFactor * hints->blockSize))
576  / hints->transferSize);
577  }
578  }
579  MPI_CHECK(MPI_File_seek(fd, tempOffset, MPI_SEEK_SET),
580  "cannot seek offset");
581  return (offset);
582 }
583 
584 /*
585  * Use MPI_File_get_size() to return aggregate file size.
586  * NOTE: This function is used by the HDF5 and NCMPI backends.
587  */
588 IOR_offset_t MPIIO_GetFileSize(aiori_mod_opt_t * module_options, char *testFileName)
589 {
590  mpiio_options_t * test = (mpiio_options_t*) module_options;
591  if(hints->dryRun)
592  return 0;
593  IOR_offset_t aggFileSizeFromStat, tmpMin, tmpMax, tmpSum;
594  MPI_File fd;
595  MPI_Comm comm;
596  MPI_Info mpiHints = MPI_INFO_NULL;
597 
598  if (hints->filePerProc == TRUE) {
599  comm = MPI_COMM_SELF;
600  } else {
601  comm = testComm;
602  }
603 
604  SetHints(&mpiHints, test->hintsFileName);
605  MPI_CHECK(MPI_File_open(comm, testFileName, MPI_MODE_RDONLY,
606  mpiHints, &fd),
607  "cannot open file to get file size");
608  MPI_CHECK(MPI_File_get_size(fd, (MPI_Offset *) & aggFileSizeFromStat),
609  "cannot get file size");
610  MPI_CHECK(MPI_File_close(&fd), "cannot close file");
611  if (mpiHints != MPI_INFO_NULL)
612  MPI_CHECK(MPI_Info_free(&mpiHints), "MPI_Info_free failed");
613 
614  return (aggFileSizeFromStat);
615 }
static aiori_fd_t * MPIIO_Create(char *, int iorflags, aiori_mod_opt_t *)
Definition: aiori-MPIIO.c:171
void ShowHints(MPI_Info *mpiHints)
Definition: utilities.c:572
#define LAST_OPTION
Definition: option.h:39
IOR_offset_t segmentCount
Definition: aiori.h:71
static aiori_xfer_hint_t * hints
Definition: aiori-MPIIO.c:109
MPI_File fd
Definition: aiori-MPIIO.c:48
#define MPI_CHECKF(MPI_STATUS, FORMAT,...)
Definition: aiori-debug.h:106
struct benchmark_options o
Definition: md-workbench.c:128
IOR_offset_t blockSize
Definition: aiori.h:72
MPI_Datatype fileType
Definition: aiori-MPIIO.c:51
MPI_Datatype contigType
Definition: aiori-MPIIO.c:50
int useSharedFilePointer
Definition: aiori-MPIIO.c:58
#define IOR_APPEND
Definition: aiori.h:31
static int MPIIO_check_params(aiori_mod_opt_t *options)
Definition: aiori-MPIIO.c:115
IOR_offset_t MPIIO_GetFileSize(aiori_mod_opt_t *module_options, char *testFileName)
Definition: aiori-MPIIO.c:588
#define IOR_RDONLY
Definition: aiori.h:28
#define GIBIBYTE
Definition: iordef.h:79
#define MPI_CHECK(MPI_STATUS, MSG)
Definition: aiori-debug.h:127
#define WRITE
Definition: iordef.h:86
int aiori_posix_stat(const char *path, struct stat *buf, aiori_mod_opt_t *module_options)
Definition: aiori.c:227
#define IOR_CREAT
Definition: aiori.h:32
#define IOR_EXCL
Definition: aiori.h:34
int MPIIO_Access(const char *path, int mode, aiori_mod_opt_t *module_options)
Definition: aiori-MPIIO.c:139
MPI_Comm testComm
Definition: utilities.c:71
static option_help options[]
Definition: aiori-CEPHFS.c:54
#define IOR_TRUNC
Definition: aiori.h:33
int collective
Definition: aiori.h:66
static aiori_fd_t * MPIIO_Open(char *, int flags, aiori_mod_opt_t *)
Definition: aiori-MPIIO.c:179
void MPIIO_xfer_hints(aiori_xfer_hint_t *params)
Definition: aiori-MPIIO.c:111
Definition: ior.h:56
#define EWARN(MSG)
Definition: aiori-debug.h:59
char * hintsFileName
Definition: aiori-MPIIO.c:60
IOR_offset_t transferSize
Definition: aiori.h:73
static option_help * MPIIO_options(aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values)
Definition: aiori-MPIIO.c:63
static IOR_offset_t SeekOffset(MPI_File, IOR_offset_t, aiori_mod_opt_t *)
Definition: aiori-MPIIO.c:545
static IOR_offset_t MPIIO_Xfer(int, aiori_fd_t *, IOR_size_t *, IOR_offset_t, IOR_offset_t, aiori_mod_opt_t *)
Definition: aiori-MPIIO.c:334
#define IOR_WRONLY
Definition: aiori.h:29
static char * MPIIO_GetVersion()
Definition: aiori-MPIIO.c:533
int rankOffset
Definition: utilities.c:69
long long int IOR_size_t
Definition: iordef.h:110
int aiori_posix_rmdir(const char *path, aiori_mod_opt_t *module_options)
Definition: aiori.c:217
int aiori_posix_mkdir(const char *path, mode_t mode, aiori_mod_opt_t *module_options)
Definition: aiori.c:212
static void MPIIO_Close(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-MPIIO.c:500
ior_aiori_t mpiio_aiori
Definition: aiori-MPIIO.c:87
int randomOffset
Definition: aiori.h:69
int useStridedDatatype
Definition: aiori-MPIIO.c:59
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, aiori_mod_opt_t *module_options)
Definition: aiori.c:166
MPI_Datatype transferType
Definition: aiori-MPIIO.c:49
void SetHints(MPI_Info *mpiHints, char *hintsFileName)
Definition: utilities.c:511
#define ERR(MSG)
Definition: aiori-debug.h:92
#define IOR_RDWR
Definition: aiori.h:30
void MPIIO_Delete(char *testFileName, aiori_mod_opt_t *module_options)
Definition: aiori-MPIIO.c:521
#define MPIAPI
Definition: aiori-MPIIO.c:29
char * name
Definition: aiori.h:88
int filePerProc
Definition: aiori.h:65
long long int IOR_offset_t
Definition: iordef.h:109
int rank
Definition: utilities.c:68
#define TRUE
Definition: iordef.h:66
static void MPIIO_Fsync(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-MPIIO.c:487
#define IOR_DIRECT
Definition: aiori.h:35
#define NULL
Definition: iordef.h:70