Skip to content

Commit 7eeb306

Browse files
committed
fs/ime: fix an abstraction violation
close IME when the fs/ime component is closed, and not in io/ompio since that would be an abstraction violation. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1 parent 819b0ac commit 7eeb306

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

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)