Skip to content

Commit cd76e53

Browse files
XuanWang1982edgargabriel
authored andcommitted
Changed parameter name from siox to gpfs
Adding get_info function for gpfs module annotate printf information Signed-off-by: Edgar Gabriel <[email protected]>
1 parent d3c1139 commit cd76e53

File tree

6 files changed

+337
-303
lines changed

6 files changed

+337
-303
lines changed

ompi/mca/fs/gpfs/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ fs_gpfs_sources = \
3838
fs_gpfs_file_get_size.c \
3939
fs_gpfs_file_open.c \
4040
fs_gpfs_file_set_info.c\
41+
fs_gpfs_file_get_info.c\
4142
fs_gpfs_file_set_size.c \
4243
fs_gpfs_file_sync.c \
4344
fs_gpfs.c \

ompi/mca/fs/gpfs/fs_gpfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ static mca_fs_base_module_1_0_0_t gpfs = { mca_fs_gpfs_module_init, /* initializ
4848
mca_fs_gpfs_module_finalize, /* close a module on a communicator */
4949
mca_fs_gpfs_file_open, mca_fs_gpfs_file_close, mca_fs_gpfs_file_delete,
5050
mca_fs_gpfs_file_set_size, mca_fs_gpfs_file_get_size,
51-
mca_fs_gpfs_file_set_info, mca_fs_gpfs_file_sync };
51+
mca_fs_gpfs_file_set_info, mca_fs_gpfs_file_sync,
52+
mca_fs_gpfs_file_get_info};
5253
/*
5354
* *******************************************************************
5455
* ************************* structure ends **************************

ompi/mca/fs/gpfs/fs_gpfs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ int mca_fs_gpfs_file_get_size(struct mca_io_ompio_file_t *fh,
5959
int mca_fs_gpfs_file_get_amode(struct ompi_file_t *fh, int *amode);
6060
int mca_fs_gpfs_file_set_info(struct mca_io_ompio_file_t *fh,
6161
struct ompi_info_t *info);
62-
//int mca_fs_gpfs_file_get_info(struct ompi_file_t *fh,
63-
//struct ompi_info_t **info_used);
62+
int mca_fs_gpfs_file_get_info(struct mca_io_ompio_file_t *fh,
63+
struct ompi_info_t **info_used);
6464
int mca_fs_gpfs_prefetch_hints(int access_mode,
6565
mca_io_ompio_file_t *fh, struct ompi_info_t *info);
6666
int mca_fs_gpfs_io_selection(mca_io_ompio_file_t *fh,

ompi/mca/fs/gpfs/fs_gpfs_file_close.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
int
3939
mca_fs_gpfs_file_close (mca_io_ompio_file_t *fh)
4040
{
41-
printf("Using mca_fs_gpfs_file_close to close a file.\n");
41+
//DEBUG printf("Using mca_fs_gpfs_file_close to close a file.\n");
4242

4343
fh->f_comm->c_coll.coll_barrier (fh->f_comm,
4444
fh->f_comm->c_coll.coll_barrier_module);
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
42+
int mca_fs_gpfs_file_get_info(mca_io_ompio_file_t *fh,
43+
ompi_info_t **info_used) {
44+
fprintf(stderr, "GPFS GET INFO\n");
45+
int ret = OMPI_SUCCESS;
46+
ret = MPI_Info_dup(fh->f_info, *info_used);
47+
return ret;
48+
}

0 commit comments

Comments
 (0)