Skip to content

Commit 160d9a7

Browse files
authored
Merge pull request #1886 from edgargabriel/pr/ompio-reorg
io/ompio: move io/ompio functionality to common/ompio
2 parents 62fd6b9 + b0fa1fd commit 160d9a7

File tree

73 files changed

+1950
-1820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1950
-1820
lines changed

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ liboshmem_so_version=0:0:0
9898
# components-don't-affect-the-build-system abstraction.
9999

100100
# OMPI layer
101+
libmca_ompi_common_ompio_so_version=0:0:0
101102

102103
# ORTE layer
103104
libmca_orte_common_alps_so_version=0:0:0

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ AC_SUBST(libmca_opal_common_sm_so_version)
151151
AC_SUBST(libmca_opal_common_ugni_so_version)
152152
AC_SUBST(libmca_opal_common_verbs_so_version)
153153
AC_SUBST(libmca_orte_common_alps_so_version)
154+
AC_SUBST(libmca_ompi_common_ompio_so_version)
154155

155156
#
156157
# Get the versions of the autotools that were used to bootstrap us

ompi/mca/common/ompio/Makefile.am

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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-2007 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-2016 University of Houston. All rights reserved.
13+
#
14+
# $COPYRIGHT$
15+
#
16+
# Additional copyrights may follow
17+
#
18+
# $HEADER$
19+
#
20+
21+
headers = \
22+
common_ompio_print_queue.h \
23+
common_ompio.h
24+
25+
sources = \
26+
common_ompio_print_queue.c \
27+
common_ompio_file_open.c \
28+
common_ompio_file_read.c \
29+
common_ompio_file_write.c
30+
31+
32+
# To simplify components that link to this library, we will *always*
33+
# have an output libtool library named libmca_<type>_<name>.la -- even
34+
# for case 2) described above (i.e., so there's no conditional logic
35+
# necessary in component Makefile.am's that link to this library).
36+
# Hence, if we're creating a noinst version of this library (i.e.,
37+
# case 2), we sym link it to the libmca_<type>_<name>.la name
38+
# (libtool will do the Right Things under the covers). See the
39+
# all-local and clean-local rules, below, for how this is effected.
40+
41+
lib_LTLIBRARIES =
42+
noinst_LTLIBRARIES =
43+
comp_inst = lib@OPAL_LIB_PREFIX@mca_common_ompio.la
44+
comp_noinst = lib@OPAL_LIB_PREFIX@mca_common_ompio_noinst.la
45+
46+
if MCA_BUILD_ompi_common_ompio_DSO
47+
lib_LTLIBRARIES += $(comp_inst)
48+
else
49+
noinst_LTLIBRARIES += $(comp_noinst)
50+
endif
51+
52+
lib@OPAL_LIB_PREFIX@mca_common_ompio_la_SOURCES = $(headers) $(sources)
53+
lib@OPAL_LIB_PREFIX@mca_common_ompio_la_CPPFLAGS = $(common_ompio_CPPFLAGS)
54+
lib@OPAL_LIB_PREFIX@mca_common_ompio_la_LDFLAGS = \
55+
-version-info $(libmca_ompi_common_ompio_so_version) \
56+
$(common_ompio_LDFLAGS)
57+
lib@OPAL_LIB_PREFIX@mca_common_ompio_la_LIBADD = $(common_ompio_LIBS)
58+
lib@OPAL_LIB_PREFIX@mca_common_ompio_noinst_la_SOURCES = $(headers) $(sources)
59+
60+
# Conditionally install the header files
61+
62+
if WANT_INSTALL_HEADERS
63+
ompidir = $(ompiincludedir)/ompi/mca/common/ompio
64+
ompi_HEADERS = $(headers)
65+
else
66+
ompidir = $(includedir)
67+
endif
68+
69+
# These two rules will sym link the "noinst" libtool library filename
70+
# to the installable libtool library filename in the case where we are
71+
# compiling this component statically (case 2), described above).
72+
V=0
73+
OMPI_V_LN_SCOMP = $(ompi__v_LN_SCOMP_$V)
74+
ompi__v_LN_SCOMP_ = $(ompi__v_LN_SCOMP_$AM_DEFAULT_VERBOSITY)
75+
ompi__v_LN_SCOMP_0 = @echo " LN_S " `basename $(comp_inst)`;
76+
77+
all-local:
78+
$(OMPI_V_LN_SCOMP) if test -z "$(lib_LTLIBRARIES)"; then \
79+
rm -f "$(comp_inst)"; \
80+
$(LN_S) "$(comp_noinst)" "$(comp_inst)"; \
81+
fi
82+
83+
clean-local:
84+
if test -z "$(lib_LTLIBRARIES)"; then \
85+
rm -f "$(comp_inst)"; \
86+
fi
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/* -*- Mode: C; c-basic-offset:4 ; -*- */
2+
/*
3+
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4+
* University Research and Technology
5+
* Corporation. All rights reserved.
6+
* Copyright (c) 2004-2007 The University of Tennessee and The University
7+
* of Tennessee Research Foundation. All rights
8+
* reserved.
9+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10+
* University of Stuttgart. All rights reserved.
11+
* Copyright (c) 2004-2005 The Regents of the University of California.
12+
* All rights reserved.
13+
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
14+
* $COPYRIGHT$
15+
*
16+
* Additional copyrights may follow
17+
*
18+
* $HEADER$
19+
*/
20+
21+
#ifndef MCA_COMMON_OMPIO_H
22+
#define MCA_COMMON_OMPIO_H
23+
24+
#include "ompi/mca/common/ompio/common_ompio_print_queue.h"
25+
#include "ompi/mca/io/ompio/io_ompio.h"
26+
27+
OMPI_DECLSPEC int mca_common_ompio_file_write (mca_io_ompio_file_t *fh, const void *buf, int count,
28+
struct ompi_datatype_t *datatype,
29+
ompi_status_public_t *status);
30+
31+
OMPI_DECLSPEC int mca_common_ompio_file_write_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
32+
int count, struct ompi_datatype_t *datatype,
33+
ompi_status_public_t *status);
34+
35+
OMPI_DECLSPEC int mca_common_ompio_file_iwrite (mca_io_ompio_file_t *fh, const void *buf, int count,
36+
struct ompi_datatype_t *datatype, ompi_request_t **request);
37+
38+
OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
39+
const void *buf, int count, struct ompi_datatype_t *datatype,
40+
ompi_request_t **request);
41+
42+
OMPI_DECLSPEC int mca_common_ompio_file_write_at_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
43+
int count, struct ompi_datatype_t *datatype,
44+
ompi_status_public_t *status);
45+
46+
47+
OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
48+
int count, struct ompi_datatype_t *datatype, ompi_request_t **request);
49+
50+
OMPI_DECLSPEC int mca_common_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles,
51+
size_t bytes_per_cycle, int max_data, uint32_t iov_count,
52+
struct iovec *decoded_iov, int *ii, int *jj, size_t *tbw );
53+
54+
55+
OMPI_DECLSPEC int mca_common_ompio_file_read (mca_io_ompio_file_t *fh, void *buf, int count,
56+
struct ompi_datatype_t *datatype, ompi_status_public_t *status);
57+
58+
OMPI_DECLSPEC int mca_common_ompio_file_read_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf,
59+
int count, struct ompi_datatype_t *datatype,
60+
ompi_status_public_t * status);
61+
62+
OMPI_DECLSPEC int mca_common_ompio_file_iread (mca_io_ompio_file_t *fh, void *buf, int count,
63+
struct ompi_datatype_t *datatype, ompi_request_t **request);
64+
65+
OMPI_DECLSPEC int mca_common_ompio_file_iread_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
66+
void *buf, int count, struct ompi_datatype_t *datatype,
67+
ompi_request_t **request);
68+
69+
OMPI_DECLSPEC int mca_common_ompio_file_read_at_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
70+
void *buf, int count, struct ompi_datatype_t *datatype,
71+
ompi_status_public_t * status);
72+
73+
OMPI_DECLSPEC int mca_common_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset,
74+
void *buf, int count, struct ompi_datatype_t *datatype,
75+
ompi_request_t **request);
76+
77+
OMPI_DECLSPEC int mca_common_ompio_file_open (ompi_communicator_t *comm, const char *filename,
78+
int amode, ompi_info_t *info,
79+
mca_io_ompio_file_t *ompio_fh, bool use_sharedfp);
80+
81+
OMPI_DECLSPEC int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh);
82+
OMPI_DECLSPEC int mca_common_ompio_file_get_size (mca_io_ompio_file_t *ompio_fh, OMPI_MPI_OFFSET_TYPE *size);
83+
OMPI_DECLSPEC int mca_common_ompio_file_get_position (mca_io_ompio_file_t *fh,OMPI_MPI_OFFSET_TYPE *offset);
84+
OMPI_DECLSPEC int mca_common_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset);
85+
86+
87+
88+
#endif /* MCA_COMMON_OMPIO_H */

0 commit comments

Comments
 (0)