10
10
* University of Stuttgart. All rights reserved.
11
11
* Copyright (c) 2004-2005 The Regents of the University of California.
12
12
* All rights reserved.
13
- * Copyright (c) 2008-2018 University of Houston. All rights reserved.
13
+ * Copyright (c) 2008-2020 University of Houston. All rights reserved.
14
14
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
15
15
* reserved.
16
16
* $COPYRIGHT$
@@ -37,6 +37,15 @@ const char *mca_fbtl_posix_component_version_string =
37
37
"OMPI/MPI posix FBTL MCA component version " OMPI_VERSION ;
38
38
39
39
int mca_fbtl_posix_priority = 10 ;
40
+ bool mca_fbtl_posix_read_datasieving = true;
41
+ bool mca_fbtl_posix_write_datasieving = true;
42
+ size_t mca_fbtl_posix_max_block_size = 1048576 ; // 1MB
43
+ size_t mca_fbtl_posix_max_gap_size = 4096 ; // Size of a block in many linux fs
44
+ size_t mca_fbtl_posix_max_tmpbuf_size = 67108864 ; // 64 MB
45
+ /*
46
+ * Private functions
47
+ */
48
+ static int register_component (void );
40
49
41
50
/*
42
51
* Instantiate the public struct with all of our public information
@@ -54,6 +63,7 @@ mca_fbtl_base_component_2_0_0_t mca_fbtl_posix_component = {
54
63
.mca_component_name = "posix" ,
55
64
MCA_BASE_MAKE_VERSION (component , OMPI_MAJOR_VERSION , OMPI_MINOR_VERSION ,
56
65
OMPI_RELEASE_VERSION ),
66
+ .mca_register_component_params = register_component ,
57
67
},
58
68
.fbtlm_data = {
59
69
/* This component is checkpointable */
@@ -63,3 +73,62 @@ mca_fbtl_base_component_2_0_0_t mca_fbtl_posix_component = {
63
73
.fbtlm_file_query = mca_fbtl_posix_component_file_query , /* get priority and actions */
64
74
.fbtlm_file_unquery = mca_fbtl_posix_component_file_unquery , /* undo what was done by previous function */
65
75
};
76
+
77
+ static int register_component (void )
78
+ {
79
+ mca_fbtl_posix_priority = 10 ;
80
+ (void ) mca_base_component_var_register (& mca_fbtl_posix_component .fbtlm_version ,
81
+ "priority" , "Priority of the fbtl posix component" ,
82
+ MCA_BASE_VAR_TYPE_INT , NULL , 0 , 0 ,
83
+ OPAL_INFO_LVL_9 ,
84
+ MCA_BASE_VAR_SCOPE_READONLY ,
85
+ & mca_fbtl_posix_priority );
86
+
87
+ mca_fbtl_posix_max_block_size = 1048576 ;
88
+ (void ) mca_base_component_var_register (& mca_fbtl_posix_component .fbtlm_version ,
89
+ "max_block_size" , "Maximum average size in bytes of a data block in an iovec for data sieving. "
90
+ "An average block size larger than this parameter will disable data sieving. Default: 1048576 bytes." ,
91
+ MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
92
+ OPAL_INFO_LVL_9 ,
93
+ MCA_BASE_VAR_SCOPE_READONLY ,
94
+ & mca_fbtl_posix_max_block_size );
95
+
96
+ mca_fbtl_posix_max_gap_size = 4096 ;
97
+ (void ) mca_base_component_var_register (& mca_fbtl_posix_component .fbtlm_version ,
98
+ "max_gap_size" , "Maximum average gap size between two blocks in an iovec for data sieving. "
99
+ "An average gap size larger than this parameter will disable data sieving. Default: 4096 bytes. " ,
100
+ MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
101
+ OPAL_INFO_LVL_9 ,
102
+ MCA_BASE_VAR_SCOPE_READONLY ,
103
+ & mca_fbtl_posix_max_gap_size );
104
+
105
+ mca_fbtl_posix_max_tmpbuf_size = 67108864 ;
106
+ (void ) mca_base_component_var_register (& mca_fbtl_posix_component .fbtlm_version ,
107
+ "max_tmpbuf_size" , "Maximum size of the temporary buffer used for data sieving in bytes. "
108
+ "Default: 67108864 (64MB). " ,
109
+ MCA_BASE_VAR_TYPE_SIZE_T , NULL , 0 , 0 ,
110
+ OPAL_INFO_LVL_9 ,
111
+ MCA_BASE_VAR_SCOPE_READONLY ,
112
+ & mca_fbtl_posix_max_tmpbuf_size );
113
+
114
+ mca_fbtl_posix_read_datasieving = true;
115
+ (void ) mca_base_component_var_register (& mca_fbtl_posix_component .fbtlm_version ,
116
+ "read_datasieving" , "Parameter indicating whether to perform data sieving for read operations. "
117
+ "Default: true." ,
118
+ MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 ,
119
+ OPAL_INFO_LVL_9 ,
120
+ MCA_BASE_VAR_SCOPE_READONLY ,
121
+ & mca_fbtl_posix_read_datasieving );
122
+
123
+ mca_fbtl_posix_write_datasieving = true;
124
+ (void ) mca_base_component_var_register (& mca_fbtl_posix_component .fbtlm_version ,
125
+ "write_datasieving" , "Parameter indicating whether to perform data sieving for write operations. "
126
+ "Default: true." ,
127
+ MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 ,
128
+ OPAL_INFO_LVL_9 ,
129
+ MCA_BASE_VAR_SCOPE_READONLY ,
130
+ & mca_fbtl_posix_write_datasieving );
131
+
132
+
133
+ return OMPI_SUCCESS ;
134
+ }
0 commit comments