1 /* 2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 3 * University Research and Technology 4 * Corporation. All rights reserved. 5 * Copyright (c) 2004-2006 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 9 * University of Stuttgart. All rights reserved. 10 * Copyright (c) 2004-2005 The Regents of the University of California. 11 * All rights reserved. 12 * Copyright (c) 2008-2018 University of Houston. All rights reserved. 13 * Copyright (c) 2018 Research Organization for Information Science 14 * and Technology (RIST). All rights reserved. 15 * $COPYRIGHT$ 16 * 17 * Additional copyrights may follow 18 * 19 * $HEADER$ 20 * 21 * These symbols are in a file by themselves to provide nice linker 22 * semantics. Since linkers generally pull in symbols by object fules, 23 * keeping these symbols as the only symbols in this file prevents 24 * utility programs such as "ompi_info" from having to import entire 25 * modules just to query their version and parameters 26 */ 27 28 29 #include "ompi_config.h" 30 #include "mpi.h" 31 #include "ompi/mca/fs/fs.h" 32 #include "ompi/mca/fs/ufs/fs_ufs.h" 33 #include "ompi/mca/fs/base/base.h" 34 35 /* 36 * ******************************************************************* 37 * ************************ actions structure ************************ 38 * ******************************************************************* 39 */ 40 static mca_fs_base_module_1_0_0_t ufs = { 41 mca_fs_ufs_module_init, /* initalise after being selected */ 42 mca_fs_ufs_module_finalize, /* close a module on a communicator */ 43 mca_fs_ufs_file_open, 44 mca_fs_base_file_close, 45 mca_fs_base_file_delete, 46 mca_fs_base_file_set_size, 47 mca_fs_base_file_get_size, 48 mca_fs_base_file_sync 49 }; 50 /* 51 * ******************************************************************* 52 * ************************* structure ends ************************** 53 * ******************************************************************* 54 */ 55 56 int mca_fs_ufs_component_init_query(bool enable_progress_threads, 57 bool enable_mpi_threads) 58 { 59 /* Nothing to do */ 60 61 return OMPI_SUCCESS; 62 } 63 64 struct mca_fs_base_module_1_0_0_t * 65 mca_fs_ufs_component_file_query (ompio_file_t *fh, int *priority) 66 { 67 /* UFS can always be used, will however have a low priority */ 68 69 *priority = mca_fs_ufs_priority; 70 if (0 == fh->f_fstype ) { 71 fh->f_fstype = UFS; 72 } 73 74 return &ufs; 75 } 76 77 int mca_fs_ufs_component_file_unquery (ompio_file_t *file) 78 { 79 /* This function might be needed for some purposes later. for now it 80 * does not have anything to do since there are no steps which need 81 * to be undone if this module is not selected */ 82 83 return OMPI_SUCCESS; 84 } 85 86 int mca_fs_ufs_module_init (ompio_file_t *file) 87 { 88 /* Make sure the file type is not overwritten by the last queried 89 * component */ 90 file->f_fstype = UFS; 91 return OMPI_SUCCESS; 92 } 93 94 95 int mca_fs_ufs_module_finalize (ompio_file_t *file) 96 { 97 return OMPI_SUCCESS; 98 }