⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpich-1.2.6-lustre.patch

📁 lustre 1.6.5 source code
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
+    MPI_Type_size(datatype, &datatype_size);+    len = datatype_size * count;++    if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {+	if (fd->fp_sys_posn != offset)+	    lseek(fd->fd_sys, offset, SEEK_SET);+	err = write(fd->fd_sys, buf, len);+	fd->fp_sys_posn = offset + err;+	/* individual file pointer not updated */        +    }+    else { /* write from curr. location of ind. file pointer */+	if (fd->fp_sys_posn != fd->fp_ind)+	    lseek(fd->fd_sys, fd->fp_ind, SEEK_SET);+	err = write(fd->fd_sys, buf, len);+	fd->fp_ind += err;+	fd->fp_sys_posn = fd->fp_ind;+    }++#ifdef HAVE_STATUS_SET_BYTES+    if (err != -1 && status) MPIR_Status_set_bytes(status, datatype, err);+#endif++    if (err == -1) {+#ifdef MPICH2+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",+	    "**io %s", strerror(errno));+#elif defined(PRINT_ERR_MSG)+			*error_code = MPI_ERR_UNKNOWN;+#else+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,+			      myname, "I/O Error", "%s", strerror(errno));+	ADIOI_Error(fd, *error_code, myname);+#endif+    }+    else *error_code = MPI_SUCCESS;+}++++void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,+                       MPI_Datatype datatype, int file_ptr_type,+                       ADIO_Offset offset, ADIO_Status *status, int+                       *error_code)+{+    ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type,+                        offset, status, error_code);+}diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/Makefile.in mpich-1.2.6/romio/adio/ad_lustre/Makefile.in--- mpich-1.2.6/romio/adio/ad_lustre/Makefile.in	1969-12-31 19:00:00.000000000 -0500+++ mpich-1.2.6/romio/adio/ad_lustre/Makefile.in	2005-12-06 11:54:37.883130927 -0500@@ -0,0 +1,47 @@+CC          = @CC@+AR          = @AR@+LIBNAME     = @LIBNAME@+srcdir      = @srcdir@+CC_SHL      = @CC_SHL@+SHLIBNAME   = @SHLIBNAME@++INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include+CFLAGS      = @CFLAGS@ $(INCLUDE_DIR)++C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR)++@VPATH@++AD_LUSTRE_OBJECTS = ad_lustre_close.o ad_lustre_read.o \+      ad_lustre_open.o ad_lustre_write.o ad_lustre_done.o \+      ad_lustre_fcntl.o ad_lustre_iread.o ad_lustre_iwrite.o ad_lustre_wait.o \+      ad_lustre_resize.o ad_lustre_hints.o \+      ad_lustre.o+++default: $(LIBNAME)+	@if [ "@ENABLE_SHLIB@" != "none" ] ; then \+	    $(MAKE) $(SHLIBNAME).la ;\+	fi++.SUFFIXES: $(SUFFIXES) .p .lo++.c.o:+	$(CC) $(CFLAGS) -c $<+.c.lo:+	$(C_COMPILE_SHL) -c $<+	@mv -f $*.o $*.lo++$(LIBNAME): $(AD_LUSTRE_OBJECTS)+	$(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS)++AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo)+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS)+	$(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS)++coverage:+	-@for file in  ${AD_LUSTRE_OBJECTS:.o=.c} ; do \+		gcov -b -f $$file ; done++clean:+	@rm -f *.o *.lo--- mpich-1.2.6/romio/Makefile.in	2004-01-27 18:27:35.000000000 -0500+++ mpich-1.2.6/romio/Makefile.in	2005-12-06 11:54:38.000000000 -0500@@ -14,7 +14,7 @@ DIRS        = mpi-io adio/common MPIO_DIRS   = mpi-io EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@ FILE_SYS_DIRS = @FILE_SYS_DIRS@-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 test+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_lustre test SHELL       = /bin/sh  @VPATH@--- mpich-1.2.6/romio/configure.in	2004-08-02 09:37:31.000000000 -0400+++ mpich-1.2.6/romio/configure.in	2005-12-06 11:54:38.000000000 -0500@@ -90,7 +90,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai # have_aio=no #-known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs"+known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs lustre" known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" # # Defaults@@ -1270,6 +1270,9 @@ fi if test -n "$file_system_testfs"; then     AC_DEFINE(ROMIO_TESTFS,1,[Define for TESTFS]) fi+if test -n "$file_system_lustre"; then+    AC_DEFINE(ROMIO_LUSTRE,1,[Define for LUSTRE])+fi if test -n "$file_system_piofs"; then     AC_DEFINE(PIOFS,1,[Define for PIOFS])     USER_CFLAGS="$USER_CFLAGS -bI:/usr/include/piofs/piofs.exp"@@ -1634,7 +1637,7 @@ AC_OUTPUT(Makefile localdefs mpi-io/Make 		   adio/ad_nfs/Makefile adio/ad_ufs/Makefile \ 		   adio/ad_xfs/Makefile adio/ad_hfs/Makefile \ 		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \-		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \+		   adio/ad_testfs/Makefile adio/ad_lustre/Makefile adio/ad_pvfs/Makefile \ 		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \                    mpi2-other/array/fortran/Makefile test/fmisc.f \--- mpich-1.2.6/romio/configure	2004-08-04 12:08:28.000000000 -0400+++ mpich-1.2.6/romio/configure	2005-12-06 11:54:38.000000000 -0500@@ -623,7 +623,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai # have_aio=no #-known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs"+known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs lustre xfs hfs sfs" known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi" # # Defaults@@ -4022,6 +4022,13 @@ if test -n "$file_system_testfs"; then EOF  fi+if test -n "$file_system_lustre"; then+    cat >> confdefs.h <<\EOF+#define LUSTRE 1+EOF++fi+ if test -n "$file_system_piofs"; then     cat >> confdefs.h <<\EOF #define PIOFS 1@@ -4746,7 +4753,7 @@ trap 'rm -fr `echo "Makefile localdefs m 		   adio/ad_xfs/Makefile adio/ad_hfs/Makefile \ 		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \ 		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \-		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \+		   adio/ad_pvfs2/Makefile adio/ad_piofs/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  adio/include/romioconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15@@ -4912,7 +4919,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile l 		   adio/ad_nfs/Makefile adio/ad_ufs/Makefile \ 		   adio/ad_xfs/Makefile adio/ad_hfs/Makefile \ 		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \-		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \+		   adio/ad_testfs/Makefile adio/ad_lustre/Makefile adio/ad_pvfs/Makefile \ 		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \                    mpi2-other/array/fortran/Makefile test/fmisc.f \--- mpich-1.2.6/romio/adio/include/romioconf.h.in	2004-08-04 12:08:28.000000000 -0400+++ mpich-1.2.6/romio/adio/include/romioconf.h.in	2005-12-06 11:54:38.000000000 -0500@@ -192,6 +192,9 @@ /* Define for TESTFS */ #undef ROMIO_TESTFS +/* Define for LUSTRE */+#undef LUSTRE+ /* Define for PIOFS */ #undef PIOFS --- mpich-1.2.6/romio/adio/include/mpio_error.h	2002-11-15 11:26:23.000000000 -0500+++ mpich-1.2.6/romio/adio/include/mpio_error.h	2005-12-06 11:54:38.000000000 -0500@@ -62,6 +62,7 @@ #define MPIR_ERR_FILETYPE 33  #define MPIR_ERR_NO_NTFS 35 #define MPIR_ERR_NO_TESTFS 36+#define MPIR_ERR_NO_LUSTRE 37  /* MPI_ERR_COMM */ #ifndef MPIR_ERR_COMM_NULL--- mpich-1.2.6/romio/adio/include/adioi_fs_proto.h	2003-06-24 18:48:23.000000000 -0400+++ mpich-1.2.6/romio/adio/include/adioi_fs_proto.h	2005-12-06 11:54:38.000000000 -0500@@ -261,6 +261,68 @@ ADIO_Offset ADIOI_UFS_SeekIndividual(ADI void ADIOI_UFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); #endif +#ifdef LUSTRE+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations;++void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, +                      MPI_Datatype datatype, int file_ptr_type,+                     ADIO_Offset offset, ADIO_Status *status, int+		     *error_code);+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, +                      MPI_Datatype datatype, int file_ptr_type,+                      ADIO_Offset offset, ADIO_Status *status, int+		      *error_code);   +void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, +                      MPI_Datatype datatype, int file_ptr_type,+                      ADIO_Offset offset, ADIO_Request *request, int+		      *error_code);   +void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, +                      MPI_Datatype datatype, int file_ptr_type,+                      ADIO_Offset offset, ADIO_Request *request, int+		      *error_code);   +int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int+		       *error_code);+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int+		       *error_code);+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int+		       *error_code); +void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status,+			int *error_code); +void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int+		*error_code); +void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,+		       MPI_Datatype datatype, int file_ptr_type,+		       ADIO_Offset offset, ADIO_Status *status, int+		       *error_code);+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,+		       MPI_Datatype datatype, int file_ptr_type,+		       ADIO_Offset offset, ADIO_Status *status, int+		       *error_code);+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,+		       MPI_Datatype datatype, int file_ptr_type,+		       ADIO_Offset offset, ADIO_Status *status, int+		       *error_code);+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,+		       MPI_Datatype datatype, int file_ptr_type,+		       ADIO_Offset offset, ADIO_Status *status, int+		       *error_code);+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count,+		       MPI_Datatype datatype, int file_ptr_type,+		       ADIO_Offset offset, ADIO_Request *request, int+		       *error_code);+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count,+		       MPI_Datatype datatype, int file_ptr_type,+		       ADIO_Offset offset, ADIO_Request *request, int+		       *error_code);+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code);+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, +                       int whence, int *error_code);+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);+#endif+ #ifdef ROMIO_NTFS extern struct ADIOI_Fns_struct ADIO_NTFS_operations; --- mpich-1.2.6/romio/adio/include/adio.h	2004-06-07 13:59:57.000000000 -0400+++ mpich-1.2.6/romio/adio/include/adio.h	2005-12-06 11:54:38.000000000 -0500@@ -276,6 +276,7 @@ typedef struct { #define ADIO_NTFS                158   /* NTFS for Windows NT */ #define ADIO_TESTFS              159   /* fake file system for testing */ #define ADIO_PVFS2               160   /* PVFS2: 2nd generation PVFS */+#define ADIO_LUSTRE              161   /* Lustre */  #define ADIO_SEEK_SET            SEEK_SET #define ADIO_SEEK_CUR            SEEK_CUR--- mpich-1.2.6/romio/adio/common/setfn.c	2003-06-24 18:48:18.000000000 -0400+++ mpich-1.2.6/romio/adio/common/setfn.c	2005-12-06 11:54:38.000000000 -0500@@ -114,6 +114,16 @@ void ADIOI_SetFunctions(ADIO_File fd) #endif 	break; +    case ADIO_LUSTRE:+#ifdef LUSTRE +        *(fd->fns) = ADIO_LUSTRE_operations;+#else   +        FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the LUSTRE file system\n");+        MPI_Abort(MPI_COMM_WORLD, 1);+#endif +        break;++     default: 	FPRINTF(stderr, "ADIOI_SetFunctions: Unsupported file system type\n");         MPI_Abort(MPI_COMM_WORLD, 1);--- mpich-1.2.6/romio/adio/common/ad_fstype.c	2003-09-04 16:24:44.000000000 -0400+++ mpich-1.2.6/romio/adio/common/ad_fstype.c	2005-12-06 11:54:38.000000000 -0500@@ -204,6 +204,11 @@ static void ADIO_FileSysType_fncall(char 	}     } #elif defined(LINUX)+#warning use correct include+# if defined (LUSTRE)+#define LL_SUPER_MAGIC 0x0BD00BD0+# endif+     do { 	err = statfs(filename, &fsbuf);     } while (err && (errno == ESTALE));@@ -218,6 +223,9 @@ static void ADIO_FileSysType_fncall(char     else { 	/* FPRINTF(stderr, "%d\n", fsbuf.f_type);*/ 	if (fsbuf.f_type == NFS_SUPER_MAGIC) *fstype = ADIO_NFS;+# if defined (LUSTRE)+	else if (fsbuf.f_type == LL_SUPER_MAGIC) *fstype = ADIO_LUSTRE;+#endif # if defined(ROMIO_PVFS) 	else if (fsbuf.f_type == PVFS_SUPER_MAGIC) *fstype = ADIO_PVFS; # endif@@ -359,6 +367,11 @@ static void ADIO_FileSysType_prefix(char     { 	*fstype = ADIO_TESTFS;     }+    else if (!strncmp(filename, "lustre:", 7) +	     || !strncmp(filename, "LUSTRE:", 7))+    {+	*fstype = ADIO_LUSTRE;+    }     else { #ifdef ROMIO_NTFS 	*fstype = ADIO_NTFS;@@ -644,6 +657,24 @@ void ADIO_ResolveFileType(MPI_Comm comm, 	*ops = &ADIO_TESTFS_operations; #endif     }+    if (file_system == ADIO_LUSTRE) {+#ifndef LUSTRE +# ifdef MPICH2+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0);+	return;+# elif defined(PRINT_ERR_MSG)+	FPRINTF(stderr, "ADIO_ResolveFileType: ROMIO has not been configured to use the LUSTRE file system\n");+	MPI_Abort(MPI_COMM_WORLD, 1);+# else /* MPICH-1 */+	myerrcode = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ERR_NO_LUSTRE,+				     myname, (char *) 0, (char *) 0);+	*error_code = ADIOI_Error(MPI_FILE_NULL, myerrcode, myname);+# endif+	return;+#else+	*ops = &ADIO_LUSTRE_operations;+#endif+    }     *error_code = MPI_SUCCESS;     *fstype = file_system;     return;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -