00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "adio.h"
00010
00011 void ADIOI_SetFunctions(ADIO_File fd)
00012 {
00013
00014
00015
00016 fd->fns = (ADIOI_Fns *) ADIOI_Malloc(sizeof(ADIOI_Fns));
00017 switch(fd->file_system) {
00018 case ADIO_PFS:
00019 #ifdef PFS
00020 *(fd->fns) = ADIO_PFS_operations;
00021 #else
00022 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the PFS file system\n");
00023 MPI_Abort(MPI_COMM_WORLD, 1);
00024 #endif
00025 break;
00026
00027 case ADIO_PIOFS:
00028 #ifdef PIOFS
00029 *(fd->fns) = ADIO_PIOFS_operations;
00030 #else
00031 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the PIOFS file system\n");
00032 MPI_Abort(MPI_COMM_WORLD, 1);
00033 #endif
00034 break;
00035
00036 case ADIO_UFS:
00037 #ifdef UFS
00038 *(fd->fns) = ADIO_UFS_operations;
00039 #else
00040 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the UFS file system\n");
00041 MPI_Abort(MPI_COMM_WORLD, 1);
00042 #endif
00043 break;
00044
00045 case ADIO_NTFS:
00046 #ifdef ROMIO_NTFS
00047 *(fd->fns) = ADIO_NTFS_operations;
00048 #else
00049 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the NTFS file system\n");
00050 MPI_Abort(MPI_COMM_WORLD, 1);
00051 #endif
00052 break;
00053
00054 case ADIO_NFS:
00055 #ifdef NFS
00056 *(fd->fns) = ADIO_NFS_operations;
00057 #else
00058 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the NFS file system\n");
00059 MPI_Abort(MPI_COMM_WORLD, 1);
00060 #endif
00061 break;
00062
00063 case ADIO_HFS:
00064 #ifdef HFS
00065 *(fd->fns) = ADIO_HFS_operations;
00066 #else
00067 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the HFS file system\n");
00068 MPI_Abort(MPI_COMM_WORLD, 1);
00069 #endif
00070 break;
00071
00072 case ADIO_XFS:
00073 #ifdef XFS
00074 *(fd->fns) = ADIO_XFS_operations;
00075 #else
00076 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the XFS file system\n");
00077 MPI_Abort(MPI_COMM_WORLD, 1);
00078 #endif
00079 break;
00080
00081 case ADIO_SFS:
00082 #ifdef SFS
00083 *(fd->fns) = ADIO_SFS_operations;
00084 #else
00085 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the SFS file system\n");
00086 MPI_Abort(MPI_COMM_WORLD, 1);
00087 #endif
00088 break;
00089
00090 case ADIO_PVFS:
00091 #ifdef ROMIO_PVFS
00092 *(fd->fns) = ADIO_PVFS_operations;
00093 #else
00094 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the PVFS file system\n");
00095 MPI_Abort(MPI_COMM_WORLD, 1);
00096 #endif
00097 break;
00098
00099 case ADIO_TESTFS:
00100 #ifdef ROMIO_TESTFS
00101 *(fd->fns) = ADIO_TESTFS_operations;
00102 #else
00103 FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the TESTFS file system\n");
00104 MPI_Abort(MPI_COMM_WORLD, 1);
00105 #endif
00106 break;
00107
00108 default:
00109 FPRINTF(stderr, "ADIOI_SetFunctions: Unsupported file system type\n");
00110 MPI_Abort(MPI_COMM_WORLD, 1);
00111 break;
00112 }
00113 }