Skip to content

Commit 067545a

Browse files
authored
Merge pull request #12361 from jtronge/io-framework-bigcount
Prepare ompio frameworks for bigcount
2 parents 4b5fad4 + 03d8ba8 commit 067545a

File tree

121 files changed

+979
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+979
-627
lines changed

ompi/file/file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2016 University of Houston. All rights reserved.
1818
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
19-
* Copyright (c) 2018 Triad National Security, LLC. All rights
19+
* Copyright (c) 2024 Triad National Security, LLC. All rights
2020
* reserved.
2121
* $COPYRIGHT$
2222
*
@@ -289,8 +289,8 @@ static void file_destructor(ompi_file_t *file)
289289
/* Finalize the module */
290290

291291
switch (file->f_io_version) {
292-
case MCA_IO_BASE_V_2_0_0:
293-
file->f_io_selected_module.v2_0_0.io_module_file_close(file);
292+
case MCA_IO_BASE_V_3_0_0:
293+
file->f_io_selected_module.v3_0_0.io_module_file_close(file);
294294
break;
295295
default:
296296
/* Should never get here */

ompi/mca/common/ompio/common_ompio.h

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* and Technology (RIST). All rights reserved.
1616
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
1717
* Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.
18+
* Copyright (c) 2024 Triad National Security, LLC. All rights
19+
* reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -249,34 +251,34 @@ typedef struct mca_common_ompio_data_t mca_common_ompio_data_t;
249251
#include "common_ompio_print_queue.h"
250252
#include "common_ompio_aggregators.h"
251253

252-
OMPI_DECLSPEC int mca_common_ompio_file_write (ompio_file_t *fh, const void *buf, int count,
254+
OMPI_DECLSPEC int mca_common_ompio_file_write (ompio_file_t *fh, const void *buf, size_t count,
253255
struct ompi_datatype_t *datatype,
254256
ompi_status_public_t *status);
255257

256258
OMPI_DECLSPEC int mca_common_ompio_file_write_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
257-
int count, struct ompi_datatype_t *datatype,
259+
size_t count, struct ompi_datatype_t *datatype,
258260
ompi_status_public_t *status);
259261

260-
OMPI_DECLSPEC int mca_common_ompio_file_iwrite (ompio_file_t *fh, const void *buf, int count,
262+
OMPI_DECLSPEC int mca_common_ompio_file_iwrite (ompio_file_t *fh, const void *buf, size_t count,
261263
struct ompi_datatype_t *datatype, ompi_request_t **request);
262264

263265
OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
264-
const void *buf, int count, struct ompi_datatype_t *datatype,
266+
const void *buf, size_t count, struct ompi_datatype_t *datatype,
265267
ompi_request_t **request);
266268

267269
OMPI_DECLSPEC int mca_common_ompio_file_write_all (ompio_file_t *fh, const void *buf,
268-
int count, struct ompi_datatype_t *datatype,
270+
size_t count, struct ompi_datatype_t *datatype,
269271
ompi_status_public_t *status);
270272

271273
OMPI_DECLSPEC int mca_common_ompio_file_write_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
272-
int count, struct ompi_datatype_t *datatype,
274+
size_t count, struct ompi_datatype_t *datatype,
273275
ompi_status_public_t *status);
274276

275277
OMPI_DECLSPEC int mca_common_ompio_file_iwrite_all (ompio_file_t *fp, const void *buf,
276-
int count, struct ompi_datatype_t *datatype, ompi_request_t **request);
278+
size_t count, struct ompi_datatype_t *datatype, ompi_request_t **request);
277279

278280
OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
279-
int count, struct ompi_datatype_t *datatype, ompi_request_t **request);
281+
size_t count, struct ompi_datatype_t *datatype, ompi_request_t **request);
280282

281283
OMPI_DECLSPEC int mca_common_ompio_build_io_array ( ompio_fview_t *fview, int index, int cycles,
282284
size_t bytes_per_cycle, size_t max_data, uint32_t iov_count,
@@ -285,32 +287,32 @@ OMPI_DECLSPEC int mca_common_ompio_build_io_array ( ompio_fview_t *fview, int in
285287
int *num_io_entries );
286288

287289

288-
OMPI_DECLSPEC int mca_common_ompio_file_read (ompio_file_t *fh, void *buf, int count,
290+
OMPI_DECLSPEC int mca_common_ompio_file_read (ompio_file_t *fh, void *buf, size_t count,
289291
struct ompi_datatype_t *datatype, ompi_status_public_t *status);
290292

291293
OMPI_DECLSPEC int mca_common_ompio_file_read_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf,
292-
int count, struct ompi_datatype_t *datatype,
294+
size_t count, struct ompi_datatype_t *datatype,
293295
ompi_status_public_t * status);
294296

295-
OMPI_DECLSPEC int mca_common_ompio_file_iread (ompio_file_t *fh, void *buf, int count,
297+
OMPI_DECLSPEC int mca_common_ompio_file_iread (ompio_file_t *fh, void *buf, size_t count,
296298
struct ompi_datatype_t *datatype, ompi_request_t **request);
297299

298300
OMPI_DECLSPEC int mca_common_ompio_file_iread_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
299-
void *buf, int count, struct ompi_datatype_t *datatype,
301+
void *buf, size_t count, struct ompi_datatype_t *datatype,
300302
ompi_request_t **request);
301303

302-
OMPI_DECLSPEC int mca_common_ompio_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype,
304+
OMPI_DECLSPEC int mca_common_ompio_file_read_all (ompio_file_t *fh, void *buf, size_t count, struct ompi_datatype_t *datatype,
303305
ompi_status_public_t * status);
304306

305307
OMPI_DECLSPEC int mca_common_ompio_file_read_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
306-
void *buf, int count, struct ompi_datatype_t *datatype,
308+
void *buf, size_t count, struct ompi_datatype_t *datatype,
307309
ompi_status_public_t * status);
308310

309-
OMPI_DECLSPEC int mca_common_ompio_file_iread_all (ompio_file_t *fp, void *buf, int count, struct ompi_datatype_t *datatype,
311+
OMPI_DECLSPEC int mca_common_ompio_file_iread_all (ompio_file_t *fp, void *buf, size_t count, struct ompi_datatype_t *datatype,
310312
ompi_request_t **request);
311313

312314
OMPI_DECLSPEC int mca_common_ompio_file_iread_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset,
313-
void *buf, int count, struct ompi_datatype_t *datatype,
315+
void *buf, size_t count, struct ompi_datatype_t *datatype,
314316
ompi_request_t **request);
315317

316318
OMPI_DECLSPEC int mca_common_ompio_file_open (ompi_communicator_t *comm, const char *filename,
@@ -330,7 +332,7 @@ OMPI_DECLSPEC int mca_common_ompio_set_file_defaults (ompio_file_t *fh);
330332
OMPI_DECLSPEC int mca_common_ompio_set_view (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE disp,
331333
ompi_datatype_t *etype, ompi_datatype_t *filetype, const char *datarep,
332334
opal_info_t *info);
333-
OMPI_DECLSPEC int mca_common_ompio_base_file_read_all (struct ompio_file_t *fh, void *buf, int count,
335+
OMPI_DECLSPEC int mca_common_ompio_base_file_read_all (struct ompio_file_t *fh, void *buf, size_t count,
334336
struct ompi_datatype_t *datatype, ompi_status_public_t *status);
335337

336338

@@ -341,7 +343,7 @@ OMPI_DECLSPEC int mca_common_ompio_base_file_read_all (struct ompio_file_t *fh,
341343
*/
342344
OMPI_DECLSPEC int mca_common_ompio_decode_datatype (struct ompio_file_t *fh,
343345
struct ompi_datatype_t *datatype,
344-
int count,
346+
size_t count,
345347
const void *buf,
346348
size_t *max_data,
347349
opal_convertor_t *convertor,

ompi/mca/common/ompio/common_ompio_aggregators.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1919
* Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
20+
* Copyright (c) 2024 Triad National Security, LLC. All rights
21+
* reserved.
2022
* $COPYRIGHT$
2123
*
2224
* Additional copyrights may follow
@@ -1048,19 +1050,19 @@ int mca_common_ompio_merge_groups(ompio_file_t *fh,
10481050
int num_merge_aggrs)
10491051
{
10501052
int i = 0;
1051-
int *sizes_old_group;
1053+
size_t *sizes_old_group;
10521054
int ret;
1053-
int *displs = NULL;
1055+
ptrdiff_t *displs = NULL;
10541056

1055-
sizes_old_group = (int*)malloc(num_merge_aggrs * sizeof(int));
1057+
sizes_old_group = (size_t *)malloc(num_merge_aggrs * sizeof(size_t));
10561058
if (NULL == sizes_old_group) {
10571059
opal_output (1, "OUT OF MEMORY\n");
10581060
ret = OMPI_ERR_OUT_OF_RESOURCE;
10591061
goto exit;
10601062
}
10611063

10621064

1063-
displs = (int*)malloc(num_merge_aggrs * sizeof(int));
1065+
displs = (ptrdiff_t *)malloc(num_merge_aggrs * sizeof(ptrdiff_t));
10641066
if (NULL == displs) {
10651067
opal_output (1, "OUT OF MEMORY\n");
10661068
ret = OMPI_ERR_OUT_OF_RESOURCE;

ompi/mca/common/ompio/common_ompio_file_open.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
1616
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1717
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
18+
* Copyright (c) 2024 Triad National Security, LLC. All rights
19+
* reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -591,7 +593,7 @@ int mca_common_ompio_create_incomplete_file_handle (const char *filename,
591593

592594
int mca_common_ompio_decode_datatype (struct ompio_file_t *fh,
593595
ompi_datatype_t *datatype,
594-
int count,
596+
size_t count,
595597
const void *buf,
596598
size_t *max_data,
597599
opal_convertor_t *conv,

ompi/mca/common/ompio/common_ompio_file_read.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Copyright (c) 2018 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.
16+
* Copyright (c) 2024 Triad National Security, LLC. All rights
17+
* reserved.
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow
@@ -55,16 +57,16 @@
5557
*/
5658

5759
static int mca_common_ompio_file_read_default (ompio_file_t *fh, void *buf,
58-
int count, struct ompi_datatype_t *datatype,
60+
size_t count, struct ompi_datatype_t *datatype,
5961
ompi_status_public_t *status);
6062

6163
static int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
62-
int count, struct ompi_datatype_t *datatype,
64+
size_t count, struct ompi_datatype_t *datatype,
6365
ompi_status_public_t *status);
6466

6567
int mca_common_ompio_file_read (ompio_file_t *fh,
6668
void *buf,
67-
int count,
69+
size_t count,
6870
struct ompi_datatype_t *datatype,
6971
ompi_status_public_t *status)
7072
{
@@ -109,7 +111,7 @@ int mca_common_ompio_file_read (ompio_file_t *fh,
109111
}
110112

111113
int mca_common_ompio_file_read_default (ompio_file_t *fh, void *buf,
112-
int count, struct ompi_datatype_t *datatype,
114+
size_t count, struct ompi_datatype_t *datatype,
113115
ompi_status_public_t *status)
114116
{
115117
size_t total_bytes_read = 0; /* total bytes that have been read*/
@@ -171,7 +173,7 @@ int mca_common_ompio_file_read_default (ompio_file_t *fh, void *buf,
171173
}
172174

173175
int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
174-
int count, struct ompi_datatype_t *datatype,
176+
size_t count, struct ompi_datatype_t *datatype,
175177
ompi_status_public_t *status)
176178
{
177179
size_t tbr = 0; /* total bytes that have been read*/
@@ -322,7 +324,7 @@ int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
322324
int mca_common_ompio_file_read_at (ompio_file_t *fh,
323325
OMPI_MPI_OFFSET_TYPE offset,
324326
void *buf,
325-
int count,
327+
size_t count,
326328
struct ompi_datatype_t *datatype,
327329
ompi_status_public_t * status)
328330
{
@@ -403,7 +405,7 @@ static void mca_common_ompio_post_next_read_subreq(struct mca_ompio_request_t *r
403405

404406
int mca_common_ompio_file_iread (ompio_file_t *fh,
405407
void *buf,
406-
int count,
408+
size_t count,
407409
struct ompi_datatype_t *datatype,
408410
ompi_request_t **request)
409411
{
@@ -531,7 +533,7 @@ int mca_common_ompio_file_iread (ompio_file_t *fh,
531533
int mca_common_ompio_file_iread_at (ompio_file_t *fh,
532534
OMPI_MPI_OFFSET_TYPE offset,
533535
void *buf,
534-
int count,
536+
size_t count,
535537
struct ompi_datatype_t *datatype,
536538
ompi_request_t **request)
537539
{
@@ -563,7 +565,7 @@ int mca_common_ompio_file_iread_at (ompio_file_t *fh,
563565
/* Infrastructure for collective operations */
564566
int mca_common_ompio_file_read_all (ompio_file_t *fh,
565567
void *buf,
566-
int count,
568+
size_t count,
567569
struct ompi_datatype_t *datatype,
568570
ompi_status_public_t * status)
569571
{
@@ -617,7 +619,7 @@ int mca_common_ompio_file_read_all (ompio_file_t *fh,
617619
int mca_common_ompio_file_read_at_all (ompio_file_t *fh,
618620
OMPI_MPI_OFFSET_TYPE offset,
619621
void *buf,
620-
int count,
622+
size_t count,
621623
struct ompi_datatype_t *datatype,
622624
ompi_status_public_t * status)
623625
{
@@ -638,7 +640,7 @@ int mca_common_ompio_file_read_at_all (ompio_file_t *fh,
638640

639641
int mca_common_ompio_file_iread_all (ompio_file_t *fp,
640642
void *buf,
641-
int count,
643+
size_t count,
642644
struct ompi_datatype_t *datatype,
643645
ompi_request_t **request)
644646
{
@@ -664,7 +666,7 @@ int mca_common_ompio_file_iread_all (ompio_file_t *fp,
664666
int mca_common_ompio_file_iread_at_all (ompio_file_t *fp,
665667
OMPI_MPI_OFFSET_TYPE offset,
666668
void *buf,
667-
int count,
669+
size_t count,
668670
struct ompi_datatype_t *datatype,
669671
ompi_request_t **request)
670672
{

0 commit comments

Comments
 (0)