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-2011 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2015 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-2011 University of Houston. All rights reserved. 13 * $COPYRIGHT$ 14 * 15 * Additional copyrights may follow 16 * 17 * $HEADER$ 18 */ 19 20 #include "ompi_config.h" 21 #include "fs_gpfs.h" 22 #include "mpi.h" 23 #include "ompi/constants.h" 24 #include "ompi/mca/fs/fs.h" 25 26 #include <unistd.h> 27 #include <string.h> 28 29 #include <gpfs.h> 30 #include <fcntl.h> 31 #include <errno.h> 32 #include <gpfs_fcntl.h> 33 34 /* 35 * file_get_info_gpfs 36 * 37 * Function: - get_info of a file 38 * Accepts: - same arguments as MPI_File_get_info() 39 * Returns: - new info object 40 */ 41 mca_fs_gpfs_file_get_info(ompio_file_t * fh,ompi_info_t ** info_used)42int mca_fs_gpfs_file_get_info(ompio_file_t *fh, 43 ompi_info_t **info_used) 44 { 45 int ret = OMPI_SUCCESS; 46 47 *info_used = OBJ_NEW(ompi_info_t); 48 if (NULL == *info_used) { 49 return OMPI_ERR_OUT_OF_RESOURCE; 50 } 51 52 ret = ompi_info_dup ((ompi_info_t *)fh->f_info, info_used); 53 54 return ret; 55 } 56