Skip to content

Commit 301d939

Browse files
authored
Merge pull request #11356 from edgargabriel/pr/revert-pipelined-iwrite-iread
Revert "common/ompio: implement pipelined file_iwrite and iread"
2 parents 5acae55 + 6de069c commit 301d939

File tree

8 files changed

+276
-352
lines changed

8 files changed

+276
-352
lines changed

ompi/mca/common/ompio/common_ompio.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* Copyright (c) 2018 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
1616
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
17-
* Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
1817
* $COPYRIGHT$
1918
*
2019
* Additional copyrights may follow
@@ -102,8 +101,6 @@
102101
#define OMPIO_PERM_NULL -1
103102
#define OMPIO_IOVEC_INITIAL_SIZE 100
104103

105-
extern opal_mutex_t mca_common_ompio_mutex;
106-
107104
enum ompio_fs_type
108105
{
109106
NONE = 0,
@@ -277,7 +274,7 @@ OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at_all (ompio_file_t *fp, OMPI_MP
277274

278275
OMPI_DECLSPEC int mca_common_ompio_build_io_array ( ompio_file_t *fh, int index, int cycles,
279276
size_t bytes_per_cycle, size_t max_data, uint32_t iov_count,
280-
struct iovec *decoded_iov, int *ii, size_t *tbw,
277+
struct iovec *decoded_iov, int *ii, int *jj, size_t *tbw,
281278
size_t *spc, mca_common_ompio_io_array_t **io_array,
282279
int *num_io_entries );
283280

ompi/mca/common/ompio/common_ompio_buffer.h

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@
3131
opal_output(1, "common_ompio: error allocating memory\n"); \
3232
return OMPI_ERR_OUT_OF_RESOURCE; \
3333
} \
34-
if (NULL != _decoded_iov) { \
35-
((struct iovec*)_decoded_iov)->iov_base = _tbuf; \
36-
((struct iovec*)_decoded_iov)->iov_len = _max_data; \
37-
_iov_count=1;}}
34+
_decoded_iov = (struct iovec *) malloc ( sizeof ( struct iovec )); \
35+
if ( NULL == _decoded_iov ) { \
36+
opal_output(1, "common_ompio: could not allocate memory.\n"); \
37+
return OMPI_ERR_OUT_OF_RESOURCE; \
38+
} \
39+
_decoded_iov->iov_base = _tbuf; \
40+
_decoded_iov->iov_len = _max_data; \
41+
_iov_count=1;}
3842

3943
#define OMPIO_PREPARE_READ_BUF(_fh,_buf,_count,_datatype,_tbuf,_convertor,_max_data,_tmp_buf_size,_decoded_iov,_iov_count){ \
4044
OBJ_CONSTRUCT( _convertor, opal_convertor_t); \
@@ -45,10 +49,14 @@
4549
opal_output(1, "common_ompio: error allocating memory\n"); \
4650
return OMPI_ERR_OUT_OF_RESOURCE; \
4751
} \
48-
if (NULL != _decoded_iov) { \
49-
((struct iovec*)_decoded_iov)->iov_base = _tbuf; \
50-
((struct iovec*)_decoded_iov)->iov_len = _max_data; \
51-
_iov_count=1;}}
52+
_decoded_iov = (struct iovec *) malloc ( sizeof ( struct iovec )); \
53+
if ( NULL == _decoded_iov ) { \
54+
opal_output(1, "common_ompio: could not allocate memory.\n"); \
55+
return OMPI_ERR_OUT_OF_RESOURCE; \
56+
} \
57+
_decoded_iov->iov_base = _tbuf; \
58+
_decoded_iov->iov_len = _max_data; \
59+
_iov_count=1;}
5260

5361
void mca_common_ompio_check_gpu_buf ( ompio_file_t *fh, const void *buf,
5462
int *is_gpu, int *is_managed);

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@
4848
static mca_common_ompio_generate_current_file_view_fn_t generate_current_file_view_fn;
4949
static mca_common_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value_fn;
5050

51-
/*
52-
* Global, component-wide OMPIO mutex
53-
*/
54-
opal_mutex_t mca_common_ompio_mutex = {{0}};
55-
56-
5751
int mca_common_ompio_file_open (ompi_communicator_t *comm,
5852
const char *filename,
5953
int amode,

0 commit comments

Comments
 (0)