Skip to content

Commit 17e3b48

Browse files
authored
Merge pull request #6389 from ggouaillardet/topic/configury_misc_fixes
configury: misc fixes
2 parents 7ff59f6 + 7eeb306 commit 17e3b48

File tree

7 files changed

+62
-115
lines changed

7 files changed

+62
-115
lines changed

config/ompi_check_ime.m4

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
dnl -*- shell-script -*-
22
dnl
33
dnl Copyright (c) 2018 DataDirect Networks. All rights reserved.
4+
dnl Copyright (c) 2021 Research Organization for Information Science
5+
dnl and Technology (RIST). All rights reserved.
46
dnl $COPYRIGHT$
57
dnl
68
dnl Additional copyrights may follow
@@ -15,13 +17,7 @@ dnl
1517
# support, otherwise executes action-if-not-found
1618
AC_DEFUN([OMPI_CHECK_IME],[
1719

18-
check_ime_CPPFLAGS=
19-
check_ime_LDFLAGS=
20-
check_ime_LIBS=
21-
22-
check_ime_configuration="none"
23-
ompi_check_ime_happy="yes"
24-
20+
OPAL_VAR_SCOPE_PUSH([ompi_check_ime_happy ompi_check_ime_dir])
2521

2622
# Get some configuration information
2723
AC_ARG_WITH([ime],
@@ -30,33 +26,21 @@ AC_DEFUN([OMPI_CHECK_IME],[
3026
OPAL_CHECK_WITHDIR([ime], [$with_ime], [include/ime_native.h])
3127

3228
AS_IF([test "$with_ime" = "no"],
33-
[ompi_check_ime_happy="no"],
34-
[AS_IF([test -z "$with_ime"],
35-
[ompi_check_ime_dir="/usr/local"],
36-
[ompi_check_ime_dir=$with_ime])
37-
38-
if test -e "$ompi_check_ime_dir/lib64" ; then
39-
ompi_check_ime_libdir="$ompi_check_ime_dir/lib64"
40-
else
41-
ompi_check_ime_libdir="$ompi_check_ime_dir/lib"
42-
fi
43-
44-
# Add correct -I and -L flags
45-
OPAL_CHECK_PACKAGE([$1], [ime_native.h], [im_client], [ime_client_native2_init], [],
46-
[$ompi_check_ime_dir], [$ompi_check_ime_libdir],
47-
[ompi_check_ime_happy="yes"],
48-
[OPAL_CHECK_PACKAGE([$1], [ime_native.h], [im_client], [ime_native_init], [],
49-
[$ompi_check_ime_dir], [$ompi_check_ime_libdir],
50-
[ompi_check_ime_happy="yes"],
51-
[ompi_check_ime_happy="no"])
52-
])
53-
])
29+
[ompi_check_ime_happy="no"],
30+
[AS_IF([test -n "$with_ime" && test "$with_ime" != "yes"],
31+
[ompi_check_ime_dir=$with_ime])
32+
33+
OPAL_CHECK_PACKAGE([$1], [ime_native.h], [im_client], [ime_client_native2_init],
34+
[], [$ompi_check_ime_dir], [],
35+
[ompi_check_ime_happy="yes"],
36+
[ompi_check_ime_happy="no"])])
5437

5538
AS_IF([test "$ompi_check_ime_happy" = "yes"],
56-
[$2],
57-
[AS_IF([test ! -z "$with_ime" && test "$with_ime" != "no"],
58-
[echo IME support not found])
59-
$3])
60-
61-
])
39+
[$2],
40+
[AS_IF([test ! -z "$with_ime" && test "$with_ime" != "no"],
41+
[AC_MSG_ERROR([IME support requested but not found. Aborting])])
42+
$3])
43+
44+
OPAL_VAR_SCOPE_POP
45+
])
6246

config/ompi_check_lustre.m4

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2006 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1414
dnl Copyright (c) 2008-2018 University of Houston. All rights reserved.
15-
dnl Copyright (c) 2015-2018 Research Organization for Information Science
15+
dnl Copyright (c) 2015-2021 Research Organization for Information Science
1616
dnl and Technology (RIST). All rights reserved.
1717
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
1818
dnl reserved.
@@ -30,15 +30,7 @@ dnl
3030
# support, otherwise executes action-if-not-found
3131
AC_DEFUN([OMPI_CHECK_LUSTRE],[
3232

33-
check_lustre_CPPFLAGS=
34-
check_lustre_LDFLAGS=
35-
check_lustre_LIBS=
36-
37-
check_lustre_save_LIBS="$LIBS"
38-
check_lustre_save_LDFLAGS="$LDFLAGS"
39-
check_lustre_save_CPPFLAGS="$CPPFLAGS"
40-
41-
ompi_check_lustre_happy="yes"
33+
OPAL_VAR_SCOPE_PUSH([ompi_check_lustre_happy ompi_check_lustre_dir])
4234

4335
# Get some configuration information
4436
AC_ARG_WITH([lustre],
@@ -47,25 +39,15 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
4739
OPAL_CHECK_WITHDIR([lustre], [$with_lustre], [include/lustre/lustreapi.h])
4840

4941
AS_IF([test "$with_lustre" = "no"],
50-
[ompi_check_lustre_happy=no])
42+
[ompi_check_lustre_happy="no"],
43+
[AS_IF([test -n "$with_lustre" && test "$with_lustre" != "yes"],
44+
[ompi_check_lustre_dir=$with_lustre])
5145

52-
AS_IF([test "$ompi_check_lustre_happy" != "no" ],
53-
[AC_MSG_CHECKING([looking for lustre libraries and header files in])
54-
AS_IF([test "$with_lustre" != "yes"],
55-
[ompi_check_lustre_dir=$with_lustre
56-
AC_MSG_RESULT([($ompi_check_lustre_dir)])],
57-
[AC_MSG_RESULT([(default search paths)])])
58-
AS_IF([test -n "$with_lustre_libdir" && \
59-
test "$with_lustre_libdir" != "yes"],
60-
[ompi_check_lustre_libdir=$with_lustre_libdir])
61-
])
46+
OPAL_CHECK_PACKAGE([$1], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
47+
[], [$ompi_check_lustre_dir], [],
48+
[ompi_check_lustre_happy="yes"],
49+
[ompi_check_lustre_happy="no"])])
6250

63-
AS_IF([test "$ompi_check_lustre_happy" != "no" ],
64-
[OPAL_CHECK_PACKAGE([$1], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
65-
[], [$ompi_check_lustre_dir], [$ompi_check_lustre_libdir],
66-
[ompi_check_lustre_happy="yes"],
67-
[ompi_check_lustre_happy="no"])])
68-
6951
AS_IF([test "$ompi_check_lustre_happy" = "yes"],
7052
[AC_MSG_CHECKING([for required lustre data structures])
7153
cat > conftest.c <<EOF
@@ -81,18 +63,16 @@ void alloc_lum()
8163
EOF
8264

8365
# Try the compile
84-
OPAL_LOG_COMMAND(
85-
[$CC $CFLAGS -I$ompi_check_lustre_dir/include -c conftest.c],
86-
[ompi_check_lustre_struct_happy="yes"],
87-
[ompi_check_lustre_struct_happy="no"
88-
ompi_check_lustre_happy="no"]
89-
)
90-
rm -f conftest.c conftest.o
91-
AC_MSG_RESULT([$ompi_check_lustre_struct_happy])])
66+
OPAL_LOG_COMMAND([$CC $CFLAGS $$1_CPPFLAGS -c conftest.c],
67+
[], [ompi_check_lustre_happy="no"])
68+
rm -f conftest.c conftest.o
69+
AC_MSG_RESULT([$ompi_check_lustre_happy])])
9270

9371
AS_IF([test "$ompi_check_lustre_happy" = "yes"],
9472
[$2],
9573
[AS_IF([test -n "$with_lustre" && test "$with_lustre" != "no"],
9674
[AC_MSG_ERROR([Lustre support requested but not found. Aborting])])
97-
$3])
75+
$3])
76+
77+
OPAL_VAR_SCOPE_POP
9878
])

config/ompi_check_pvfs2.m4

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ dnl Copyright (c) 2004-2006 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1414
dnl Copyright (c) 2008-2018 University of Houston. All rights reserved.
15-
dnl Copyright (c) 2015 Research Organization for Information Science
16-
dnl and Technology (RIST). All rights reserved.
15+
dnl Copyright (c) 2015-2021 Research Organization for Information Science
16+
dnl and Technology (RIST). All rights reserved.
1717
dnl $COPYRIGHT$
1818
dnl
1919
dnl Additional copyrights may follow
@@ -28,13 +28,7 @@ dnl
2828
# support, otherwise executes action-if-not-found
2929
AC_DEFUN([OMPI_CHECK_PVFS2],[
3030

31-
check_pvfs2_CPPFLAGS=
32-
check_pvfs2_LDFLAGS=
33-
check_pvfs2_LIBS=
34-
35-
check_pvfs2_configuration="none"
36-
ompi_check_pvfs2_happy="yes"
37-
31+
OPAL_VAR_SCOPE_PUSH([ompi_check_pvfs2_happy ompi_check_pvfs2_dir])
3832

3933
# Get some configuration information
4034
AC_ARG_WITH([pvfs2],
@@ -43,29 +37,21 @@ AC_DEFUN([OMPI_CHECK_PVFS2],[
4337
OPAL_CHECK_WITHDIR([pvfs2], [$with_pvfs2], [include/pvfs2.h])
4438

4539
AS_IF([test "$with_pvfs2" = "no"],
46-
[ompi_check_pvfs2_happy="no"],
47-
[AS_IF([test -z "$with_pvfs2"],
48-
[ompi_check_pvfs2_dir="/usr/local"],
49-
[ompi_check_pvfs2_dir=$with_pvfs2])
50-
51-
if test -e "$ompi_check_pvfs2_dir/lib64" ; then
52-
ompi_check_pvfs2_libdir="$ompi_check_pvfs2_dir/lib64"
53-
else
54-
ompi_check_pvfs2_libdir="$ompi_check_pvfs2_dir/lib"
55-
fi
56-
57-
# Add correct -I and -L flags
58-
OPAL_CHECK_PACKAGE([$1], [pvfs2.h], [pvfs2], [PVFS_util_resolve], [],
59-
[$ompi_check_pvfs2_dir], [$ompi_check_pvfs2_libdir],
60-
[ompi_check_pvfs2_happy="yes"],
61-
[ompi_check_pvfs2_happy="no"])
40+
[ompi_check_pvfs2_happy="no"],
41+
[AS_IF([test -n "$with_pvfs2" && test "$with_pvfs2" != "yes"],
42+
[ompi_check_pvfs2_dir=$with_pvfs2])
43+
OPAL_CHECK_PACKAGE([$1], [pvfs2.h], [pvfs2], [PVFS_util_resolve],
44+
[], [$ompi_check_pvfs2_dir], [],
45+
[ompi_check_pvfs2_happy="yes"],
46+
[ompi_check_pvfs2_happy="no"])
6247
])
6348

6449
AS_IF([test "$ompi_check_pvfs2_happy" = "yes"],
65-
[$2],
66-
[AS_IF([test ! -z "$with_pvfs2" && test "$with_pvfs2" != "no"],
67-
[echo PVFS2 support not found])
68-
$3])
69-
70-
])
50+
[$2],
51+
[AS_IF([test ! -z "$with_pvfs2" && test "$with_pvfs2" != "no"],
52+
[AC_MSG_ERROR([PVFS2 support requested but not found. Aborting])])
53+
$3])
54+
55+
OPAL_VAR_SCOPE_POP
56+
])
7157

config/opal_check_package.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ dnl All rights reserved.
1313
dnl Copyright (c) 2012-2017 Cisco Systems, Inc. All rights reserved.
1414
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
1515
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
16-
dnl Copyright (c) 2015-2016 Research Organization for Information Science
17-
dnl and Technology (RIST). All rights reserved.
16+
dnl Copyright (c) 2015-2021 Research Organization for Information Science
17+
dnl and Technology (RIST). All rights reserved.
1818
dnl $COPYRIGHT$
1919
dnl
2020
dnl Additional copyrights may follow
@@ -185,6 +185,7 @@ dnl * header_filename: the foo.h file to check for
185185
dnl * library_name / function_name: check for function function_name in
186186
dnl -llibrary_name. Specifically, for library_name, use the "foo" form,
187187
dnl as opposed to "libfoo".
188+
dnl * function: the function to check for existence
188189
dnl * extra_libraries: if the library_name you are checking for requires
189190
dnl additional -l arguments to link successfully, list them here.
190191
dnl * dir_prefix: if the header/library is located in a non-standard

ompi/mca/fs/ime/fs_ime.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
3+
* Copyright (c) 2021 Research Organization for Information Science
4+
* and Technology (RIST). All rights reserved.
35
* $COPYRIGHT$
46
*
57
* Additional copyrights may follow
@@ -33,7 +35,7 @@ int mca_fs_ime_component_file_unquery (ompio_file_t *file);
3335
int mca_fs_ime_module_init (ompio_file_t *file);
3436
int mca_fs_ime_module_finalize (ompio_file_t *file);
3537

36-
int mca_fs_ime_native_fini();
38+
int mca_fs_ime_native_fini(void);
3739

3840
OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_ime_component;
3941
/*

ompi/mca/fs/ime/fs_ime_component.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
4+
* Copyright (c) 2021 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -44,6 +46,7 @@ mca_fs_base_component_2_0_0_t mca_fs_ime_component = {
4446
MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
4547
OMPI_RELEASE_VERSION),
4648
.mca_register_component_params = register_component,
49+
.mca_close_component = mca_fs_ime_native_fini,
4750
},
4851
.fsm_data = {
4952
/* This component is checkpointable */

ompi/mca/io/ompio/io_ompio_component.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* Copyright (c) 2008-2020 University of Houston. All rights reserved.
1414
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
16-
* Copyright (c) 2015-2018 Research Organization for Information Science
17-
* and Technology (RIST). All rights reserved.
16+
* Copyright (c) 2015-2019 Research Organization for Information Science
17+
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
1919
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
2020
* $COPYRIGHT$
@@ -36,11 +36,6 @@
3636
#include "ompi/mca/common/ompio/common_ompio_request.h"
3737
#include "ompi/mca/common/ompio/common_ompio_buffer.h"
3838

39-
#ifdef HAVE_IME_NATIVE_H
40-
#include "ompi/mca/fs/ime/fs_ime.h"
41-
#endif
42-
43-
4439
int mca_io_ompio_cycle_buffer_size = OMPIO_DEFAULT_CYCLE_BUF_SIZE;
4540
int mca_io_ompio_bytes_per_agg = OMPIO_PREALLOC_MAX_BUF_SIZE;
4641
int mca_io_ompio_num_aggregators = -1;
@@ -281,10 +276,6 @@ static int close_component(void)
281276
mca_common_ompio_buffer_alloc_fini();
282277
OBJ_DESTRUCT(&mca_io_ompio_mutex);
283278

284-
#ifdef HAVE_IME_NATIVE_H
285-
mca_fs_ime_native_fini();
286-
#endif
287-
288279
return OMPI_SUCCESS;
289280
}
290281

0 commit comments

Comments
 (0)