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