1 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre.c romio-ornl/adio/ad_lustre/ad_lustre.c
2 --- romio-orig/adio/ad_lustre/ad_lustre.c 1969-12-31 19:00:00.000000000 -0500
3 +++ romio-ornl/adio/ad_lustre/ad_lustre.c 2007-11-10 07:13:32.554840000 -0500
5 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
7 + * Copyright (C) 2001 University of Chicago.
8 + * See COPYRIGHT notice in top-level directory.
10 + * Copyright (C) 2007 Oak Ridge National Laboratory
13 +#include "ad_lustre.h"
15 +struct ADIOI_Fns_struct ADIO_LUSTRE_operations = {
16 + ADIOI_LUSTRE_Open, /* Open */
17 + ADIOI_LUSTRE_ReadContig, /* ReadContig */
18 + ADIOI_LUSTRE_WriteContig, /* WriteContig */
19 + ADIOI_LUSTRE_ReadStridedColl, /* ReadStridedColl */
20 + ADIOI_LUSTRE_WriteStridedColl, /* WriteStridedColl */
21 + ADIOI_GEN_SeekIndividual, /* SeekIndividual */
22 + ADIOI_LUSTRE_Fcntl, /* Fcntl */
23 + ADIOI_LUSTRE_SetInfo, /* SetInfo */
24 + ADIOI_GEN_ReadStrided, /* ReadStrided */
25 + ADIOI_GEN_WriteStrided, /* WriteStrided */
26 + ADIOI_LUSTRE_Close, /* Close */
27 + ADIOI_GEN_IreadContig, /* IreadContig */
28 + ADIOI_GEN_IwriteContig, /* IwriteContig */
29 + ADIOI_GEN_IODone, /* ReadDone */
30 + ADIOI_GEN_IODone, /* WriteDone */
31 + ADIOI_GEN_IOComplete, /* ReadComplete */
32 + ADIOI_GEN_IOComplete, /* WriteComplete */
33 + ADIOI_GEN_IreadStrided, /* IreadStrided */
34 + ADIOI_GEN_IwriteStrided, /* IwriteStrided */
35 + ADIOI_GEN_Flush, /* Flush */
36 + ADIOI_GEN_Resize, /* Resize */
37 + ADIOI_GEN_Delete, /* Delete */
39 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_close.c romio-ornl/adio/ad_lustre/ad_lustre_close.c
40 --- romio-orig/adio/ad_lustre/ad_lustre_close.c 1969-12-31 19:00:00.000000000 -0500
41 +++ romio-ornl/adio/ad_lustre/ad_lustre_close.c 2007-11-10 07:13:32.557840000 -0500
43 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
46 + * Copyright (C) 1997 University of Chicago.
47 + * See COPYRIGHT notice in top-level directory.
49 + * Copyright (C) 2007 Oak Ridge National Laboratory
52 +#include "ad_lustre.h"
58 +void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code)
61 + static char myname[] = "ADIOI_LUSTRE_CLOSE";
64 + MPE_Log_event(9, 0, "start close");
67 + err = close(fd->fd_sys);
70 + MPE_Log_event(10, 0, "end close");
75 + if (err == -1 || derr == -1) {
76 + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
77 + myname, __LINE__, MPI_ERR_IO,
79 + "**io %s", strerror(errno));
81 + else *error_code = MPI_SUCCESS;
83 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_fcntl.c romio-ornl/adio/ad_lustre/ad_lustre_fcntl.c
84 --- romio-orig/adio/ad_lustre/ad_lustre_fcntl.c 1969-12-31 19:00:00.000000000 -0500
85 +++ romio-ornl/adio/ad_lustre/ad_lustre_fcntl.c 2007-11-10 07:13:32.561833000 -0500
87 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
89 + * Copyright (C) 1997 University of Chicago.
90 + * See COPYRIGHT notice in top-level directory.
92 + * Copyright (C) 2007 Oak Ridge National Laboratory
95 +#include "ad_lustre.h"
96 +#include "adio_extern.h"
98 +void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code)
101 + ADIO_Offset curr_fsize, alloc_size, size, len, done;
102 + ADIO_Status status;
104 +#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
105 + static char myname[] = "ADIOI_LUSTRE_FCNTL";
109 + case ADIO_FCNTL_GET_FSIZE:
110 + fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END);
111 + if (fd->fp_sys_posn != -1)
112 + lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
113 + if (fcntl_struct->fsize == -1) {
114 + *error_code = MPIR_Err_create_code(MPI_SUCCESS,
115 + MPIR_ERR_RECOVERABLE, myname, __LINE__,
116 + MPI_ERR_IO, "**io", "**io %s", strerror(errno));
118 + else *error_code = MPI_SUCCESS;
121 + case ADIO_FCNTL_SET_DISKSPACE:
122 + /* will be called by one process only */
123 + /* On file systems with no preallocation function, I have to
125 + to allocate space. Since there could be holes in the file,
126 + I need to read up to the current file size, write it back,
127 + and then write beyond that depending on how much
128 + preallocation is needed.
129 + read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */
131 + curr_fsize = lseek(fd->fd_sys, 0, SEEK_END);
132 + alloc_size = fcntl_struct->diskspace;
134 + size = ADIOI_MIN(curr_fsize, alloc_size);
136 + ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
137 + buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ);
140 + for (i=0; i<ntimes; i++) {
141 + len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ);
142 + ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done,
143 + &status, error_code);
144 + if (*error_code != MPI_SUCCESS) {
145 + *error_code = MPIR_Err_create_code(MPI_SUCCESS,
146 + MPIR_ERR_RECOVERABLE, myname, __LINE__,
147 + MPI_ERR_IO, "**io", "**io %s", strerror(errno));
150 + ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
151 + done, &status, error_code);
152 + if (*error_code != MPI_SUCCESS) return;
156 + if (alloc_size > curr_fsize) {
157 + memset(buf, 0, ADIOI_PREALLOC_BUFSZ);
158 + size = alloc_size - curr_fsize;
159 + ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
160 + for (i=0; i<ntimes; i++) {
161 + len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ);
162 + ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
163 + done, &status, error_code);
164 + if (*error_code != MPI_SUCCESS) return;
169 + if (fd->fp_sys_posn != -1)
170 + lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
171 + *error_code = MPI_SUCCESS;
174 + case ADIO_FCNTL_SET_ATOMICITY:
175 + fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1;
176 + *error_code = MPI_SUCCESS;
180 + FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n");
181 + MPI_Abort(MPI_COMM_WORLD, 1);
184 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre.h romio-ornl/adio/ad_lustre/ad_lustre.h
185 --- romio-orig/adio/ad_lustre/ad_lustre.h 1969-12-31 19:00:00.000000000 -0500
186 +++ romio-ornl/adio/ad_lustre/ad_lustre.h 2007-11-10 07:13:32.565828000 -0500
188 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
190 + * Copyright (C) 1997 University of Chicago.
191 + * See COPYRIGHT notice in top-level directory.
193 + * Copyright (C) 2007 Oak Ridge National Laboratory
196 +#ifndef AD_UNIX_INCLUDE
197 +#define AD_UNIX_INCLUDE
200 +#define HAVE_ASM_TYPES_H 1
203 +#include <linux/types.h>
205 +#include <sys/ioctl.h>
206 +#include "lustre/lustre_user.h"
208 +/*#include "adioi.h"*/
210 +#ifdef HAVE_SIGNAL_H
216 +#ifdef HAVE_SYS_AIO_H
217 +#include <sys/aio.h>
219 +#endif /* End of HAVE_SYS_AIO_H */
221 +#endif /* End of AD_UNIX_INCLUDE */
222 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_hints.c romio-ornl/adio/ad_lustre/ad_lustre_hints.c
223 --- romio-orig/adio/ad_lustre/ad_lustre_hints.c 1969-12-31 19:00:00.000000000 -0500
224 +++ romio-ornl/adio/ad_lustre/ad_lustre_hints.c 2007-11-10 07:13:32.569824000 -0500
226 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
228 + * Copyright (C) 1997 University of Chicago.
229 + * See COPYRIGHT notice in top-level directory.
231 + * Copyright (C) 2007 Oak Ridge National Laboratory
234 +#include "ad_lustre.h"
236 +void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
238 + char *value, *value_in_fd;
239 + int flag, tmp_val[3], str_factor=-1, str_unit=0, start_iodev=-1;
240 + struct lov_user_md lum = { 0 };
241 + int err, myrank, fd_sys, perm, amode, old_mask;
243 + if ( (fd->info) == MPI_INFO_NULL) {
244 + /* This must be part of the open call. can set striping parameters
246 + MPI_Info_create(&(fd->info));
248 + /* has user specified striping or server buffering parameters
249 + and do they have the same value on all processes? */
250 + if (users_info != MPI_INFO_NULL) {
251 + value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
253 + MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL,
256 + str_unit=atoi(value);
259 + MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL,
262 + str_factor=atoi(value);
265 + MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL,
268 + start_iodev=atoi(value);
274 + MPI_Comm_rank(fd->comm, &myrank);
276 + tmp_val[0] = str_factor;
277 + tmp_val[1] = str_unit;
278 + tmp_val[2] = start_iodev;
280 + MPI_Bcast(tmp_val, 3, MPI_INT, 0, fd->comm);
282 + if (tmp_val[0] != str_factor
283 + || tmp_val[1] != str_unit
284 + || tmp_val[2] != start_iodev) {
285 + FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: All keys"
286 + "-striping_factor:striping_unit:start_iodevice "
287 + "need to be identical across all processes\n");
288 + MPI_Abort(MPI_COMM_WORLD, 1);
289 + } else if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) {
290 + /* if user has specified striping info, process 0 tries to set it */
292 + if (fd->perm == ADIO_PERM_NULL) {
293 + old_mask = umask(022);
295 + perm = old_mask ^ 0666;
297 + else perm = fd->perm;
300 + if (fd->access_mode & ADIO_CREATE)
301 + amode = amode | O_CREAT;
302 + if (fd->access_mode & ADIO_RDONLY)
303 + amode = amode | O_RDONLY;
304 + if (fd->access_mode & ADIO_WRONLY)
305 + amode = amode | O_WRONLY;
306 + if (fd->access_mode & ADIO_RDWR)
307 + amode = amode | O_RDWR;
308 + if (fd->access_mode & ADIO_EXCL)
309 + amode = amode | O_EXCL;
311 + /* we need to create file so ensure this is set */
312 + amode = amode | O_LOV_DELAY_CREATE | O_CREAT;
314 + fd_sys = open(fd->filename, amode, perm);
315 + if (fd_sys == -1) {
316 + if (errno != EEXIST)
318 + "Failure to open file %s %d %d\n",strerror(errno), amode, perm);
320 + lum.lmm_magic = LOV_USER_MAGIC;
321 + lum.lmm_pattern = 0;
322 + lum.lmm_stripe_size = str_unit;
323 + lum.lmm_stripe_count = str_factor;
324 + lum.lmm_stripe_offset = start_iodev;
326 + err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum);
327 + if (err == -1 && errno != EEXIST) {
328 + fprintf(stderr, "Failure to set stripe info %s \n", strerror(errno));
332 + } /* End of striping parameters validation */
335 + MPI_Barrier(fd->comm);
336 + /* set the values for collective I/O and data sieving parameters */
337 + ADIOI_GEN_SetInfo(fd, users_info, error_code);
339 + /* The file has been opened previously and fd->fd_sys is a valid
340 + file descriptor. cannot set striping parameters now. */
342 + /* set the values for collective I/O and data sieving parameters */
343 + ADIOI_GEN_SetInfo(fd, users_info, error_code);
346 + *error_code = MPI_SUCCESS;
348 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_open.c romio-ornl/adio/ad_lustre/ad_lustre_open.c
349 --- romio-orig/adio/ad_lustre/ad_lustre_open.c 1969-12-31 19:00:00.000000000 -0500
350 +++ romio-ornl/adio/ad_lustre/ad_lustre_open.c 2007-11-10 08:22:01.202750000 -0500
352 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
354 + * Copyright (C) 1997 University of Chicago.
355 + * See COPYRIGHT notice in top-level directory.
357 + * Copyright (C) 2007 Oak Ridge National Laboratory
360 +#include "ad_lustre.h"
362 +void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code)
364 + int perm, old_mask, amode;
365 + struct lov_user_md lum = { 0 };
368 +#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
369 + static char myname[] = "ADIOI_LUSTRE_OPEN";
372 + if (fd->perm == ADIO_PERM_NULL) {
373 + old_mask = umask(022);
375 + perm = old_mask ^ 0666;
377 + else perm = fd->perm;
380 + if (fd->access_mode & ADIO_CREATE)
381 + amode = amode | O_CREAT;
382 + if (fd->access_mode & ADIO_RDONLY)
383 + amode = amode | O_RDONLY;
384 + if (fd->access_mode & ADIO_WRONLY)
385 + amode = amode | O_WRONLY;
386 + if (fd->access_mode & ADIO_RDWR)
387 + amode = amode | O_RDWR;
388 + if (fd->access_mode & ADIO_EXCL)
389 + amode = amode | O_EXCL;
391 + fd->fd_sys = open(fd->filename, amode, perm);
393 + if (fd->fd_sys != -1) {
396 + value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
398 + /* get file striping information and set it in info */
399 + lum.lmm_magic = LOV_USER_MAGIC;
400 + err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum);
403 + sprintf(value, "%d", lum.lmm_stripe_size);
404 + MPI_Info_set(fd->info, "striping_unit", value);
406 + sprintf(value, "%d", lum.lmm_stripe_count);
407 + MPI_Info_set(fd->info, "striping_factor", value);
409 + sprintf(value, "%d", lum.lmm_stripe_offset);
410 + MPI_Info_set(fd->info, "start_iodevice", value);
414 + if (fd->access_mode & ADIO_APPEND)
415 + fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
418 + if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND))
419 + fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
421 + /* --BEGIN ERROR HANDLING-- */
422 + if (fd->fd_sys == -1) {
423 + if (errno == ENAMETOOLONG)
424 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
425 + MPIR_ERR_RECOVERABLE, myname,
426 + __LINE__, MPI_ERR_BAD_FILE,
428 + "**filenamelong %s %d",
430 + strlen(fd->filename));
431 + else if (errno == ENOENT)
432 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
433 + MPIR_ERR_RECOVERABLE, myname,
434 + __LINE__, MPI_ERR_NO_SUCH_FILE,
436 + "**filenoexist %s",
438 + else if (errno == ENOTDIR || errno == ELOOP)
439 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
440 + MPIR_ERR_RECOVERABLE,
444 + "**filenamedir %s",
446 + else if (errno == EACCES) {
447 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
448 + MPIR_ERR_RECOVERABLE, myname,
449 + __LINE__, MPI_ERR_ACCESS,
454 + else if (errno == EROFS) {
455 + /* Read only file or file system and write access requested */
456 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
457 + MPIR_ERR_RECOVERABLE, myname,
458 + __LINE__, MPI_ERR_READ_ONLY,
462 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
463 + MPIR_ERR_RECOVERABLE, myname,
464 + __LINE__, MPI_ERR_IO, "**io",
465 + "**io %s", strerror(errno));
468 + /* --END ERROR HANDLING-- */
469 + else *error_code = MPI_SUCCESS;
472 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c romio-ornl/adio/ad_lustre/ad_lustre_rdcoll.c
473 --- romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c 1969-12-31 19:00:00.000000000 -0500
474 +++ romio-ornl/adio/ad_lustre/ad_lustre_rdcoll.c 2007-11-10 07:13:32.577816000 -0500
476 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
478 + * Copyright (C) 1997 University of Chicago.
479 + * See COPYRIGHT notice in top-level directory.
481 + * Copyright (C) 2007 Oak Ridge National Laboratory
484 +#include "ad_lustre.h"
486 +void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
487 + MPI_Datatype datatype, int file_ptr_type,
488 + ADIO_Offset offset, ADIO_Status *status, int
491 + ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type,
492 + offset, status, error_code);
494 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_rwcontig.c romio-ornl/adio/ad_lustre/ad_lustre_rwcontig.c
495 --- romio-orig/adio/ad_lustre/ad_lustre_rwcontig.c 1969-12-31 19:00:00.000000000 -0500
496 +++ romio-ornl/adio/ad_lustre/ad_lustre_rwcontig.c 2007-11-10 07:13:32.581814000 -0500
498 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
500 + * Copyright (C) 1997 University of Chicago.
501 + * See COPYRIGHT notice in top-level directory.
503 + * Copyright (C) 2007 Oak Ridge National Laboratory
506 +#include "ad_lustre.h"
508 +static void ADIOI_LUSTRE_IOContig(ADIO_File fd, void *buf, int count,
509 + MPI_Datatype datatype, int file_ptr_type,
510 + ADIO_Offset offset, ADIO_Status *status,
511 + int io_mode, int *error_code);
513 +static void ADIOI_LUSTRE_IOContig(ADIO_File fd, void *buf, int count,
514 + MPI_Datatype datatype, int file_ptr_type,
515 + ADIO_Offset offset, ADIO_Status *status,
516 + int io_mode, int *error_code)
518 + int err=-1, datatype_size, len;
519 +#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
520 + static char myname[] = "ADIOI_LUSTRE_IOCONTIG";
523 + MPI_Type_size(datatype, &datatype_size);
524 + len = datatype_size * count;
526 + if (file_ptr_type == ADIO_INDIVIDUAL) {
527 + offset = fd->fp_ind;
530 + if (fd->fp_sys_posn != offset) {
531 + err = lseek(fd->fd_sys, offset, SEEK_SET);
532 + if (err == -1) goto ioerr;
536 + err = write(fd->fd_sys, buf, len);
538 + err = read(fd->fd_sys, buf, len);
540 + if (err == -1) goto ioerr;
541 + fd->fp_sys_posn = offset + err;
543 + if (file_ptr_type == ADIO_INDIVIDUAL) {
547 +#ifdef HAVE_STATUS_SET_BYTES
548 + if (status) MPIR_Status_set_bytes(status, datatype, err);
550 + *error_code = MPI_SUCCESS;
553 + /* --BEGIN ERROR HANDLING-- */
555 + *error_code = MPIO_Err_create_code(MPI_SUCCESS,
556 + MPIR_ERR_RECOVERABLE,
558 + MPI_ERR_IO, "**io",
559 + "**io %s", strerror(errno));
560 + fd->fp_sys_posn = -1;
563 + /* --END ERROR HANDLING-- */
566 +void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count,
567 + MPI_Datatype datatype, int file_ptr_type,
568 + ADIO_Offset offset, ADIO_Status *status, int *error_code)
570 + ADIOI_LUSTRE_IOContig(fd, buf, count,
571 + datatype, file_ptr_type,
572 + offset, status, 1, error_code);
575 +void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count,
576 + MPI_Datatype datatype, int file_ptr_type,
577 + ADIO_Offset offset, ADIO_Status *status, int *error_code)
579 + ADIOI_LUSTRE_IOContig(fd, buf, count,
580 + datatype, file_ptr_type,
581 + offset, status, 0, error_code);
583 diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c romio-ornl/adio/ad_lustre/ad_lustre_wrcoll.c
584 --- romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c 1969-12-31 19:00:00.000000000 -0500
585 +++ romio-ornl/adio/ad_lustre/ad_lustre_wrcoll.c 2007-11-10 07:13:32.585808000 -0500
587 +/* -*- Mode: C; c-basic-offset:4 ; -*- */
589 + * Copyright (C) 1997 University of Chicago.
590 + * See COPYRIGHT notice in top-level directory.
592 + * Copyright (C) 2007 Oak Ridge National Laboratory
595 +#include "ad_lustre.h"
597 +void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
598 + MPI_Datatype datatype, int file_ptr_type,
599 + ADIO_Offset offset, ADIO_Status *status, int
602 + ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type,
603 + offset, status, error_code);
605 diff -ruNp romio-orig/adio/ad_lustre/Makefile.in romio-ornl/adio/ad_lustre/Makefile.in
606 --- romio-orig/adio/ad_lustre/Makefile.in 1969-12-31 19:00:00.000000000 -0500
607 +++ romio-ornl/adio/ad_lustre/Makefile.in 2007-11-10 07:13:32.589807000 -0500
615 +SHLIBNAME = @SHLIBNAME@
617 +INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -I../../include -I${srcdir}/../../../../include -I../../../../include
618 +CFLAGS = @CPPFLAGS@ @CFLAGS@ $(INCLUDE_DIR)
620 +top_builddir = @master_topbuild_dir@
622 +C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR)
626 +AD_LUSTRE_OBJECTS = ad_lustre.o ad_lustre_open.o \
627 + ad_lustre_rwcontig.o \
628 + ad_lustre_wrcoll.o ad_lustre_rdcoll.o \
629 + ad_lustre_fcntl.o ad_lustre_hints.o ad_lustre_close.o
632 + @if [ "@ENABLE_SHLIB@" != "none" ] ; then \
633 + $(MAKE) $(SHLIBNAME).la ;\
636 +.SUFFIXES: $(SUFFIXES) .p .lo
639 + $(CC) $(CFLAGS) -c $<
641 + $(C_COMPILE_SHL) -c $< -o _s$*.o
642 + @mv -f _s$*.o $*.lo
644 +$(LIBNAME): $(AD_LUSTRE_OBJECTS)
645 + $(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS)
646 + $(RANLIB) $(LIBNAME)
648 +AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo)
649 +$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS)
650 + $(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS)
653 + -@for file in ${AD_LUSTRE_OBJECTS:.o=.c} ; do \
654 + gcov -b -f $$file ; done
658 diff -ruNp romio-orig/adio/ad_lustre/README romio-ornl/adio/ad_lustre/README
659 --- romio-orig/adio/ad_lustre/README 1969-12-31 19:00:00.000000000 -0500
660 +++ romio-ornl/adio/ad_lustre/README 2007-11-10 08:41:15.992364000 -0500
662 +-----------------------------------------------------
664 +-----------------------------------------------------
665 + o Correct detection of fs_type when lustre: prefix is not given
666 + o Further fix on stripe alignment
667 + o Tested/Enabled striping hints over Cray XT (Catamount and CNL)
669 +-----------------------------------------------------
671 +-----------------------------------------------------
672 +The Lustre ADIO driver has been cleaned up quite a lot. Compared
673 +to the intital posting, here are the changes:
674 + o Removal of dead/redundant code
675 + o Removal of asynchronous IO piece as it appears outdated
676 + o Bug fixes for setting Lustre Hints
677 + o Bug fixes for data sieving
678 + o Improved Setsize operation with one process calling ftruncate
679 + o Improved collective IO with domain partitioning on
680 + Lustre stripe boundary
683 + o You may contribute via many different ways, such as
684 + testing results, bug reports, and new feature patches.
685 + o We appreciate any courtesy reference of this work.
686 + o Disclaimer: you are welcome to try the code, but at your own risk.
689 + For more info, visit http://ft.ornl.gov/projects/io/
691 diff -ruNp romio-orig/adio/common/ad_aggregate.c romio-ornl/adio/common/ad_aggregate.c
692 --- romio-orig/adio/common/ad_aggregate.c 2007-11-10 07:12:18.105362000 -0500
693 +++ romio-ornl/adio/common/ad_aggregate.c 2007-11-10 07:30:02.418363000 -0500
696 * Copyright (C) 1997-2001 University of Chicago.
697 * See COPYRIGHT notice in top-level directory.
699 + * Copyright (C) 2007 Oak Ridge National Laboratory
707 +#define ALIGNDOWN(sz, al) ((sz)/al*al)
709 /* This file contains four functions:
711 * ADIOI_Calc_aggregator()
712 @@ -87,7 +91,12 @@ int ADIOI_Calc_aggregator(ADIO_File fd,
715 /* get an index into our array of aggregators */
716 - rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1);
717 + if (fd->file_system == ADIO_LUSTRE)
718 + rank_index = (int) ((off - ALIGNDOWN(min_off, fd_size) + fd_size)/
721 + rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1);
724 /* we index into fd_end with rank_index, and fd_end was allocated to be no
725 * bigger than fd->hins->cb_nodes. If we ever violate that, we're
726 @@ -130,6 +139,7 @@ void ADIOI_Calc_file_domains(ADIO_Offset
727 * do that, but this routine would be the place for it */
729 ADIO_Offset min_st_offset, max_end_offset, *fd_start, *fd_end, fd_size;
730 + int alignment = *fd_size_ptr;
734 @@ -154,6 +164,10 @@ void ADIOI_Calc_file_domains(ADIO_Offset
736 fd_size = ((max_end_offset - min_st_offset + 1) + nprocs_for_coll -
739 + fd_size = (fd_size + alignment -1 ) / alignment * alignment;
742 /* ceiling division as in HPF block distribution */
744 *fd_start_ptr = (ADIO_Offset *)
745 @@ -165,7 +179,10 @@ void ADIOI_Calc_file_domains(ADIO_Offset
746 fd_end = *fd_end_ptr;
748 fd_start[0] = min_st_offset;
749 - fd_end[0] = min_st_offset + fd_size - 1;
751 + fd_end[0] = ALIGNDOWN(min_st_offset, fd_size) + fd_size - 1;
753 + fd_end[0] = min_st_offset + fd_size - 1;
755 for (i=1; i<nprocs_for_coll; i++) {
756 fd_start[i] = fd_end[i-1] + 1;
757 diff -ruNp romio-orig/adio/common/ad_fstype.c romio-ornl/adio/common/ad_fstype.c
758 --- romio-orig/adio/common/ad_fstype.c 2007-11-10 07:12:18.128343000 -0500
759 +++ romio-ornl/adio/common/ad_fstype.c 2007-11-10 08:21:48.329637000 -0500
760 @@ -317,6 +317,15 @@ static void ADIO_FileSysType_fncall(char
764 +/*#if defined(LINUX) && defined(ROMIO_LUSTRE)*/
766 +#define LL_SUPER_MAGIC 0x0BD00BD0
767 + if (fsbuf.f_type == LL_SUPER_MAGIC) {
768 + *fstype = ADIO_LUSTRE;
773 # ifdef PAN_KERNEL_FS_CLIENT_SUPER_MAGIC
774 if (fsbuf.f_type == PAN_KERNEL_FS_CLIENT_SUPER_MAGIC) {
775 *fstype = ADIO_PANFS;
776 @@ -467,6 +476,11 @@ static void ADIO_FileSysType_prefix(char
778 *fstype = ADIO_GRIDFTP;
780 + else if (!strncmp(filename, "lustre:", 7)
781 + || !strncmp(filename, "LUSTRE:", 7))
783 + *fstype = ADIO_LUSTRE;
788 @@ -681,6 +695,14 @@ void ADIO_ResolveFileType(MPI_Comm comm,
789 *ops = &ADIO_GRIDFTP_operations;
792 + if (file_system == ADIO_LUSTRE) {
793 +#ifndef ROMIO_LUSTRE
794 + *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0);
797 + *ops = &ADIO_LUSTRE_operations;
800 *error_code = MPI_SUCCESS;
801 *fstype = file_system;
803 diff -ruNp romio-orig/adio/common/ad_read_coll.c romio-ornl/adio/common/ad_read_coll.c
804 --- romio-orig/adio/common/ad_read_coll.c 2007-11-10 07:12:18.174296000 -0500
805 +++ romio-ornl/adio/common/ad_read_coll.c 2007-11-10 07:37:15.747604000 -0500
808 * Copyright (C) 1997 University of Chicago.
809 * See COPYRIGHT notice in top-level directory.
811 + * Copyright (C) 2007 Oak Ridge National Laboratory
815 @@ -67,7 +69,7 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
816 int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank;
817 int contig_access_count=0, interleave_count = 0, buftype_is_contig;
818 int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs;
819 - ADIO_Offset start_offset, end_offset, orig_fp, fd_size, min_st_offset, off;
820 + ADIO_Offset start_offset, end_offset, orig_fp, fd_size=0, min_st_offset, off;
821 ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL,
822 *fd_end = NULL, *end_offsets = NULL;
823 int *len_list = NULL, *buf_idx = NULL;
824 @@ -126,6 +128,8 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
825 if (fd->hints->cb_read == ADIOI_HINT_DISABLE
826 || (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO)))
828 + int filerange_is_contig = 0;
830 /* don't do aggregation */
831 if (fd->hints->cb_read != ADIOI_HINT_DISABLE) {
832 ADIOI_Free(offset_list);
833 @@ -136,8 +140,13 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
835 fd->fp_ind = orig_fp;
836 ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
837 + if (!filetype_is_contig)
838 + ADIOI_Filetype_range_iscontig(fd, offset, file_ptr_type,
839 + datatype, count, &filerange_is_contig);
841 + if (buftype_is_contig && (filetype_is_contig ||
842 + filerange_is_contig)) {
844 - if (buftype_is_contig && filetype_is_contig) {
845 if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
846 off = fd->disp + (fd->etype_size) * offset;
847 ADIO_ReadContig(fd, buf, count, datatype, ADIO_EXPLICIT_OFFSET,
848 @@ -168,6 +177,19 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
849 * needs to be mapped to an actual rank in the communicator later.
852 + if (fd->file_system == ADIO_LUSTRE) {
855 + value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
856 + MPI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL,
859 + fd_size = atoi(value);
861 + fd_size = ADIOI_LUSTRE_STRIPE_DFLT;
865 ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs,
866 nprocs_for_coll, &min_st_offset,
867 &fd_start, &fd_end, &fd_size);
868 diff -ruNp romio-orig/adio/common/ad_write_coll.c romio-ornl/adio/common/ad_write_coll.c
869 --- romio-orig/adio/common/ad_write_coll.c 2007-11-10 07:12:18.203267000 -0500
870 +++ romio-ornl/adio/common/ad_write_coll.c 2007-11-10 07:38:00.351958000 -0500
873 * Copyright (C) 1997 University of Chicago.
874 * See COPYRIGHT notice in top-level directory.
876 + * Copyright (C) 2007 Oak Ridge National Laboratory
880 @@ -69,7 +71,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
881 int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank;
882 int contig_access_count=0, interleave_count = 0, buftype_is_contig;
883 int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs;
884 - ADIO_Offset orig_fp, start_offset, end_offset, fd_size, min_st_offset, off;
885 + ADIO_Offset orig_fp, start_offset, end_offset, fd_size=0, min_st_offset, off;
886 ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL,
887 *fd_end = NULL, *end_offsets = NULL;
888 int *buf_idx = NULL, *len_list = NULL;
889 @@ -123,6 +125,8 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
890 if (fd->hints->cb_write == ADIOI_HINT_DISABLE ||
891 (!interleave_count && (fd->hints->cb_write == ADIOI_HINT_AUTO)))
893 + int filerange_is_contig = 0;
895 /* use independent accesses */
896 if (fd->hints->cb_write != ADIOI_HINT_DISABLE) {
897 ADIOI_Free(offset_list);
898 @@ -133,8 +137,12 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
900 fd->fp_ind = orig_fp;
901 ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
902 + if (!filetype_is_contig)
903 + ADIOI_Filetype_range_iscontig(fd, offset, file_ptr_type,
904 + datatype, count, &filerange_is_contig);
906 - if (buftype_is_contig && filetype_is_contig) {
907 + if (buftype_is_contig && (filetype_is_contig ||
908 + filerange_is_contig)) {
909 if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
910 off = fd->disp + (fd->etype_size) * offset;
911 ADIO_WriteContig(fd, buf, count, datatype,
912 @@ -154,6 +162,19 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
913 done by (logically) dividing the file into file domains (FDs); each
914 process may directly access only its own file domain. */
916 + if (fd->file_system == ADIO_LUSTRE) {
919 + value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
920 + MPI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL,
923 + fd_size = atoi(value);
925 + fd_size = ADIOI_LUSTRE_STRIPE_DFLT;
929 ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs,
930 nprocs_for_coll, &min_st_offset,
931 &fd_start, &fd_end, &fd_size);
932 diff -ruNp romio-orig/adio/common/iscontig.c romio-ornl/adio/common/iscontig.c
933 --- romio-orig/adio/common/iscontig.c 2007-11-10 07:12:18.258209000 -0500
934 +++ romio-ornl/adio/common/iscontig.c 2007-11-10 07:13:32.648745000 -0500
937 * Copyright (C) 1997 University of Chicago.
938 * See COPYRIGHT notice in top-level directory.
940 + * Copyright (C) 2007 Oak Ridge National Laboratory
944 +#include "adio_extern.h"
948 @@ -101,3 +104,85 @@ void ADIOI_Datatype_iscontig(MPI_Datatyp
949 in other cases as well.*/
953 +void ADIOI_Filetype_range_start(ADIO_File fd, ADIO_Offset offset, int file_ptr_type,
954 + int *start_index, int *start_ftype, int *start_offset, int *start_io_size)
956 + ADIOI_Flatlist_node *flat_file;
957 + ADIO_Offset disp, abs_off_in_filetype=0;
958 + MPI_Aint filetype_extent;
960 + int i, st_io_size=0, st_index=0;
961 + int sum, n_etypes_in_filetype, size_in_filetype;
962 + int n_filetypes, etype_in_filetype;
963 + int flag, filetype_size, etype_size;
965 + flat_file = ADIOI_Flatlist;
966 + while (flat_file->type != fd->filetype) flat_file = flat_file->next;
969 + MPI_Type_size(fd->filetype, &filetype_size);
970 + MPI_Type_extent(fd->filetype, &filetype_extent);
971 + etype_size = fd->etype_size;
973 + if (file_ptr_type == ADIO_INDIVIDUAL) {
974 + offset = fd->fp_ind; /* in bytes */
979 + for (i=0; i<flat_file->count; i++) {
980 + if (disp + flat_file->indices[i] +
981 + (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i]
984 + st_io_size = (int) (disp + flat_file->indices[i] +
985 + (ADIO_Offset) n_filetypes*filetype_extent
986 + + flat_file->blocklens[i] - offset);
993 + n_etypes_in_filetype = filetype_size/etype_size;
994 + n_filetypes = (int) (offset / n_etypes_in_filetype);
995 + etype_in_filetype = (int) (offset % n_etypes_in_filetype);
996 + size_in_filetype = etype_in_filetype * etype_size;
999 + for (i=0; i<flat_file->count; i++) {
1000 + sum += flat_file->blocklens[i];
1001 + if (sum > size_in_filetype) {
1003 + st_io_size = sum - size_in_filetype;
1004 + abs_off_in_filetype = flat_file->indices[i] +
1005 + size_in_filetype - (sum - flat_file->blocklens[i]);
1010 + /* abs. offset in bytes in the file */
1011 + offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype;
1014 + *start_index = st_index;
1015 + *start_io_size = st_io_size;
1016 + *start_offset = offset;
1017 + *start_ftype = n_filetypes;
1020 +void ADIOI_Filetype_range_iscontig(ADIO_File fd, ADIO_Offset offset,
1021 + int file_ptr_type, MPI_Datatype datatype, int count, int *flag)
1023 + int srclen, datatype_size;
1024 + int st_index, st_ftype, st_offset, st_io_size;
1026 + MPI_Type_size(datatype, &datatype_size);
1027 + srclen = datatype_size * count;
1029 + ADIOI_Filetype_range_start(fd, offset, file_ptr_type,
1030 + &st_index, &st_ftype, &st_offset, &st_io_size);
1031 + *flag = st_io_size >= srclen ? 1 : 0;
1034 diff -ruNp romio-orig/adio/include/adio.h romio-ornl/adio/include/adio.h
1035 --- romio-orig/adio/include/adio.h 2007-11-10 07:12:18.302169000 -0500
1036 +++ romio-ornl/adio/include/adio.h 2007-11-10 07:13:32.654738000 -0500
1037 @@ -289,6 +289,7 @@ typedef struct {
1038 #define ADIO_PVFS2 160 /* PVFS2: 2nd generation PVFS */
1039 #define ADIO_PANFS 161 /* Panasas FS */
1040 #define ADIO_GRIDFTP 162 /* Globus GridFTP */
1041 +#define ADIO_LUSTRE 163 /* Lustre */
1043 #define ADIO_SEEK_SET SEEK_SET
1044 #define ADIO_SEEK_CUR SEEK_CUR
1045 diff -ruNp romio-orig/adio/include/adioi_fs_proto.h romio-ornl/adio/include/adioi_fs_proto.h
1046 --- romio-orig/adio/include/adioi_fs_proto.h 2007-11-10 07:12:18.318156000 -0500
1047 +++ romio-ornl/adio/include/adioi_fs_proto.h 2007-11-10 07:13:32.658735000 -0500
1048 @@ -49,6 +49,32 @@ extern struct ADIOI_Fns_struct ADIO_SFS_
1049 /* prototypes are in adio/ad_sfs/ad_sfs.h */
1052 +#ifdef ROMIO_LUSTRE
1053 +extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations;
1055 +void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);
1056 +void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);
1057 +void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count,
1058 + MPI_Datatype datatype, int file_ptr_type,
1059 + ADIO_Offset offset, ADIO_Status *status, int
1061 +void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count,
1062 + MPI_Datatype datatype, int file_ptr_type,
1063 + ADIO_Offset offset, ADIO_Status *status, int
1065 +void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
1066 + MPI_Datatype datatype, int file_ptr_type,
1067 + ADIO_Offset offset, ADIO_Status *status, int
1069 +void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
1070 + MPI_Datatype datatype, int file_ptr_type,
1071 + ADIO_Offset offset, ADIO_Status *status, int
1073 +void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
1075 +void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
1079 extern struct ADIOI_Fns_struct ADIO_NTFS_operations;
1080 /* prototypes are in adio/ad_ntfs/ad_ntfs.h */
1081 diff -ruNp romio-orig/adio/include/adioi.h romio-ornl/adio/include/adioi.h
1082 --- romio-orig/adio/include/adioi.h 2007-11-10 07:12:18.310161000 -0500
1083 +++ romio-ornl/adio/include/adioi.h 2007-11-10 07:36:19.895514000 -0500
1086 * Copyright (C) 1997 University of Chicago.
1087 * See COPYRIGHT notice in top-level directory.
1089 + * Copyright (C) 2007 Oak Ridge National Laboratory
1093 @@ -184,6 +186,7 @@ struct ADIOI_Fns_struct {
1094 #define ADIOI_PREALLOC_BUFSZ 16777216 /* buffer size used to
1095 preallocate disk space */
1097 +#define ADIOI_LUSTRE_STRIPE_DFLT (1<<20)
1099 /* default values for some hints */
1100 /* buffer size for collective I/O = 16 MB */
1101 @@ -295,6 +298,10 @@ void *ADIOI_Calloc_fn(size_t nelem, size
1102 void *ADIOI_Realloc_fn(void *ptr, size_t size, int lineno, char *fname);
1103 void ADIOI_Free_fn(void *ptr, int lineno, char *fname);
1104 void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag);
1105 +void ADIOI_Filetype_range_iscontig(ADIO_File fd, ADIO_Offset offset,
1106 + int file_ptr_type, MPI_Datatype datatype, int count, int *flag);
1107 +void ADIOI_Filetype_range_start(ADIO_File fd, ADIO_Offset offset, int file_ptr_type,
1108 + int *start_index, int *start_ftype, int *start_offset, int *start_io_size);
1109 void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset);
1110 void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset);
1111 void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset,
1112 diff -ruNp romio-orig/adio/include/mpio_error.h romio-ornl/adio/include/mpio_error.h
1113 --- romio-orig/adio/include/mpio_error.h 2007-11-10 07:12:18.321147000 -0500
1114 +++ romio-ornl/adio/include/mpio_error.h 2007-11-10 07:13:32.669723000 -0500
1116 #define MPIR_ERR_FILETYPE 33
1117 #define MPIR_ERR_NO_NTFS 35
1118 #define MPIR_ERR_NO_TESTFS 36
1119 +#define MPIR_ERR_NO_LUSTRE 37
1122 #ifndef MPIR_ERR_COMM_NULL
1123 diff -ruNp romio-orig/adio/include/romioconf.h.in romio-ornl/adio/include/romioconf.h.in
1124 --- romio-orig/adio/include/romioconf.h.in 2007-11-10 07:12:18.331143000 -0500
1125 +++ romio-ornl/adio/include/romioconf.h.in 2007-11-10 07:13:32.675717000 -0500
1127 /* Define for ROMIO with PVFS2 */
1130 +/* Define for ROMIO with LUSTRE */
1131 +#undef ROMIO_LUSTRE
1133 /* Define if int64_t must be defined for PVFS */
1134 #undef ROMIO_PVFS_NEEDS_INT64_DEFINITION
1136 diff -ruNp romio-orig/configure romio-ornl/configure
1137 --- romio-orig/configure 2007-11-10 07:12:19.455013000 -0500
1138 +++ romio-ornl/configure 2007-11-10 07:15:22.506785000 -0500
1139 @@ -1402,7 +1402,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai
1143 -known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"
1144 +known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre"
1145 known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
1148 @@ -7630,6 +7630,14 @@ _ACEOF
1152 +if test -n "$file_system_lustre"; then
1154 +cat >>confdefs.h <<\_ACEOF
1155 +#define ROMIO_LUSTRE 1
1161 # Check for presence and characteristics of async. I/O calls if
1163 @@ -12139,7 +12147,7 @@ rm -f adio/include/romioconf.h ${use_top
1164 # are active will be called by the top level ROMIO make
1165 ac_config_commands="$ac_config_commands default-1"
1167 - ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile common/dataloop/Makefile"
1168 + ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile adio/ad_lustre/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile common/dataloop/Makefile"
1169 cat >confcache <<\_ACEOF
1170 # This file is a shell script that caches the results of configure
1171 # tests run on this system so they can be shared between configure
1172 @@ -12697,6 +12705,7 @@ do
1173 "adio/ad_pvfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs/Makefile" ;;
1174 "adio/ad_pvfs2/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs2/Makefile" ;;
1175 "adio/ad_gridftp/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_gridftp/Makefile" ;;
1176 + "adio/ad_lustre/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_lustre/Makefile" ;;
1177 "mpi-io/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi-io/fortran/Makefile" ;;
1178 "mpi2-other/info/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/info/fortran/Makefile" ;;
1179 "mpi2-other/array/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/array/fortran/Makefile" ;;
1180 diff -ruNp romio-orig/configure.in romio-ornl/configure.in
1181 --- romio-orig/configure.in 2007-11-10 07:12:18.367105000 -0500
1182 +++ romio-ornl/configure.in 2007-11-10 07:13:32.707687000 -0500
1183 @@ -93,7 +93,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai
1187 -known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"
1188 +known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre"
1189 known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
1192 @@ -1097,6 +1097,9 @@ fi
1193 if test -n "$file_system_testfs"; then
1194 AC_DEFINE(ROMIO_TESTFS,1,[Define for ROMIO with TESTFS])
1196 +if test -n "$file_system_lustre"; then
1197 + AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE])
1200 if test -n "$file_system_xfs"; then
1201 AC_DEFINE(ROMIO_XFS,1,[Define for ROMIO with XFS])
1202 @@ -2101,6 +2104,7 @@ AC_OUTPUT(Makefile localdefs mpi-io/Make
1203 adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \
1204 adio/ad_pvfs2/Makefile \
1205 adio/ad_gridftp/Makefile \
1206 + adio/ad_lustre/Makefile \
1207 mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \
1208 mpi2-other/array/fortran/Makefile test/fmisc.f \
1209 test/fcoll_test.f test/pfcoll_test.f test/fperf.f \
1210 diff -ruNp romio-orig/Makefile.in romio-ornl/Makefile.in
1211 --- romio-orig/Makefile.in 2007-11-10 07:12:18.357110000 -0500
1212 +++ romio-ornl/Makefile.in 2007-11-10 07:13:32.712681000 -0500
1213 @@ -15,7 +15,7 @@ DIRS = mpi-io adio/common @GLUE_D
1215 EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@
1216 FILE_SYS_DIRS = @FILE_SYS_DIRS@
1217 -ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp test mpi-io/glue/default mpi-io/glue/mpich1 mpi-io/glue/mpich2
1218 +ALL_DIRS = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp adio/ad_lustre test mpi-io/glue/default mpi-io/glue/mpich1 mpi-io/glue/mpich2