Skip to content

Commit bb73962

Browse files
committed
romio341: patch ROMIO 3.4.1 for Open MPI
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 7d1dce8 commit bb73962

28 files changed

+500
-1189
lines changed

3rd-party/romio341/.config_params

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ __sgi_mpi
3636
__hp_mpi
3737
__cray_mpi
3838
__lam_mpi
39+
__open_mpi

3rd-party/romio341/Makefile.am

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
1+
## Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
2+
## University Research and Technology
3+
## Corporation. All rights reserved.
4+
## Copyright (c) 2004-2005 The University of Tennessee and The University
5+
## of Tennessee Research Foundation. All rights
6+
## reserved.
7+
## Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
## University of Stuttgart. All rights reserved.
9+
## Copyright (c) 2004-2005 The Regents of the University of California.
10+
## All rights reserved.
11+
## Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
12+
## Copyright (c) 2020 Research Organization for Information Science
13+
## and Technology (RIST). All rights reserved.
14+
# $COPYRIGHT$
15+
#
16+
# Additional copyrights may follow
17+
#
18+
# $HEADER$
119
##
220
## Copyright (C) by Argonne National Laboratory
321
## See COPYRIGHT in top-level directory
422
##
523

24+
# OMPI: include a top level makefile with some options
25+
include $(top_srcdir)/Makefile.options
26+
627
## TODO: need to write an automakefile that handles two primary cases:
728
## 1) that ROMIO is being embedded within the MPI library, as in MPICH or Open
829
## MPI
@@ -17,7 +38,6 @@ include_HEADERS =
1738
nodist_include_HEADERS =
1839
noinst_HEADERS =
1940
AM_CFLAGS = @VISIBILITY_CFLAGS@
20-
AM_CPPFLAGS =
2141
EXTRA_DIST =
2242
SUFFIXES =
2343
doc1_src_txt =
@@ -52,7 +72,9 @@ AM_CPPFLAGS += $(MPI_H_INCLUDE)
5272
# handle the "include" directory here
5373
AM_CPPFLAGS += -I$(top_builddir)/include -I$(top_srcdir)/include $(external_includes)
5474
# nodist_ b/c these are created by config.status and should not be distributed
55-
nodist_include_HEADERS += include/mpio.h include/mpiof.h
75+
# Open MPI: do not install mpio.h
76+
noinst_HEADERS += include/mpio.h
77+
noinst_HEADERS += include/io_romio_conv.h
5678

5779
# ------------------------------------------------------------------------
5880

@@ -69,8 +91,8 @@ EXTRA_DIST += autogen.sh
6991
if BUILD_ROMIO_EMBEDDED
7092
# Build a libtool convenience library that the enclosing MPI implementation can
7193
# use by adding it to the right _LIBADD variable.
72-
noinst_LTLIBRARIES = libromio.la
73-
libromio_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources)
94+
noinst_LTLIBRARIES = libromio_dist.la
95+
libromio_dist_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources)
7496

7597
## NOTE: ROMIO's old build system builds a bunch of _foo.o objects that contain
7698
## PMPI_ implementations as well as calls to only other PMPI routines. In
@@ -92,8 +114,8 @@ libpromio_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPIO_BUILD_PROFILING
92114
libpromio_la_LDFLAGS = $(external_ldflags)
93115
libpromio_la_LIBADD = $(external_libs)
94116
else !BUILD_PROFILING_LIB
95-
libromio_la_LDFLAGS = $(external_ldflags)
96-
libromio_la_LIBADD = $(external_libs)
117+
libromio_dist_la_LDFLAGS = $(external_ldflags)
118+
libromio_dist_la_LIBADD = $(external_libs)
97119
endif !BUILD_PROFILING_LIB
98120

99121
else !BUILD_ROMIO_EMBEDDED

3rd-party/romio341/Makefile.options

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- makefile -*-
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-2005 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$
14+
#
15+
# Additional copyrights may follow
16+
#
17+
# $HEADER$
18+
#
19+
20+
AUTOMAKE_OPTIONS = foreign dist-bzip2
21+
22+
# $(OMPI_TOP_SRCDIR) - mca_base_param.h
23+
# $(OMPI_TOP_SRCDIR)/opal/include - opal_config_bottom.h
24+
# $(OMPI_TOP_BUILDDIR)/opal/include - opal_config.h
25+
# $(OMPI_TOP_BUILDDIR)/ompi/include - mpi.h
26+
# $(top_srcdir)/include - vpath support
27+
# $(top_srcdir)/adio/include - vpath support
28+
29+
AM_CPPFLAGS = \
30+
-DOMPI_BUILDING=1 \
31+
-I$(OMPI_TOP_SRCDIR) \
32+
-I$(OMPI_TOP_SRCDIR)/opal/include \
33+
-I$(OMPI_TOP_BUILDDIR)/opal/include \
34+
-I$(OMPI_TOP_BUILDDIR)/ompi/include \
35+
-I$(top_srcdir)/include \
36+
-I$(top_srcdir)/adio/include

3rd-party/romio341/adio/Makefile.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ noinst_HEADERS += \
1313
adio/include/adioi_errmsg.h \
1414
adio/include/adioi_error.h \
1515
adio/include/adioi_fs_proto.h \
16+
adio/include/ad_tuning.h \
1617
adio/include/heap_sort.h \
1718
adio/include/lock_internal.h \
1819
adio/include/mpio_error.h \
1920
adio/include/mpipr.h \
2021
adio/include/mpiu_greq.h \
2122
adio/include/nopackage.h \
23+
adio/include/romioconf-undefs.h \
2224
adio/include/mpiu_external32.h \
2325
adio/include/hint_fns.h
2426

3rd-party/romio341/adio/ad_lustre/ad_lustre.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
/* temp*/
1010
#define HAVE_ASM_TYPES_H 1
1111

12+
#define _GNU_SOURCE 1
13+
#include <stdlib.h>
14+
#include <sys/types.h>
15+
#include <sys/stat.h>
16+
#include <fcntl.h>
17+
1218
#include <unistd.h>
1319
#include <linux/types.h>
1420

3rd-party/romio341/adio/ad_lustre/ad_lustre_rwcontig.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* See COPYRIGHT in top-level directory
44
*/
55

6+
#include "ad_lustre.h"
7+
68
#include <unistd.h>
79

810
#include <stdlib.h>
911
#include <malloc.h>
10-
#include "ad_lustre.h"
1112

1213
#define LUSTRE_MEMALIGN (1<<12) /* to use page_shift */
1314

3rd-party/romio341/adio/common/ad_end.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ void ADIO_End(int *error_code)
1414

1515
/* if a default errhandler was set on MPI_FILE_NULL then we need to ensure
1616
* that our reference to that errhandler is released */
17+
/* Open MPI: The call to PMPI_File_set_errhandler has to be done in romio/src/io_romio_file_open.c
18+
in routine mca_io_romio_file_close()
19+
*/
20+
#if 0
1721
PMPI_File_set_errhandler(MPI_FILE_NULL, MPI_ERRORS_RETURN);
22+
#endif
1823

1924
/* free file and info tables used for Fortran interface */
2025
if (ADIOI_Ftable)

3rd-party/romio341/adio/common/ad_iread_coll.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include "mpe.h"
1616
#endif
1717

18+
#ifdef HAVE_MPI_GREQUEST_EXTENSIONS
19+
1820
/* ADIOI_GEN_IreadStridedColl */
1921
struct ADIOI_GEN_IreadStridedColl_vars {
2022
/* requests */
@@ -1299,3 +1301,5 @@ static int ADIOI_GEN_irc_wait_fn(int count, void **array_of_states,
12991301
fn_exit:
13001302
return errcode;
13011303
}
1304+
1305+
#endif /* HAVE_MPI_GREQUEST_EXTENSIONS */

3rd-party/romio341/adio/common/ad_iwrite_coll.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "mpe.h"
1313
#endif
1414

15+
#ifdef HAVE_MPI_GREQUEST_EXTENSIONS
16+
1517
/* ADIOI_GEN_IwriteStridedColl */
1618
struct ADIOI_GEN_IwriteStridedColl_vars {
1719
/* requests */
@@ -1496,3 +1498,5 @@ static int ADIOI_GEN_iwc_wait_fn(int count, void **array_of_states,
14961498
fn_exit:
14971499
return errcode;
14981500
}
1501+
1502+
#endif /* HAVE_MPI_GREQUEST_EXTENSIONS */

3rd-party/romio341/adio/include/adioi.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,16 +444,24 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count,
444444
MPI_Datatype datatype, int file_ptr_type,
445445
ADIO_Offset offset, ADIO_Status * status, int
446446
*error_code);
447+
#ifdef HAVE_MPI_GREQUEST_EXTENSIONS
447448
void ADIOI_GEN_IreadStridedColl(ADIO_File fd, void *buf, int count,
448449
MPI_Datatype datatype, int file_ptr_type,
449450
ADIO_Offset offset, MPI_Request * request, int *error_code);
451+
#else
452+
#define ADIOI_GEN_IreadStridedColl NULL
453+
#endif
450454
void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count,
451455
MPI_Datatype datatype, int file_ptr_type,
452456
ADIO_Offset offset, ADIO_Status * status, int
453457
*error_code);
458+
#ifdef HAVE_MPI_GREQUEST_EXTENSIONS
454459
void ADIOI_GEN_IwriteStridedColl(ADIO_File fd, const void *buf, int count,
455460
MPI_Datatype datatype, int file_ptr_type,
456461
ADIO_Offset offset, MPI_Request * request, int *error_code);
462+
#else
463+
#define ADIOI_GEN_IwriteStridedColl NULL
464+
#endif
457465
void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype
458466
datatype, int file_ptr_type, ADIO_Offset
459467
offset, ADIO_Offset ** offset_list_ptr, ADIO_Offset

0 commit comments

Comments
 (0)