Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare ompio frameworks for bigcount #12361

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ompi/file/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 University of Houston. All rights reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* Copyright (c) 2024 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -289,8 +289,8 @@ static void file_destructor(ompi_file_t *file)
/* Finalize the module */

switch (file->f_io_version) {
case MCA_IO_BASE_V_2_0_0:
file->f_io_selected_module.v2_0_0.io_module_file_close(file);
case MCA_IO_BASE_V_3_0_0:
file->f_io_selected_module.v3_0_0.io_module_file_close(file);
break;
default:
/* Should never get here */
Expand Down
38 changes: 20 additions & 18 deletions ompi/mca/common/ompio/common_ompio.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
* Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2024 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -249,34 +251,34 @@ typedef struct mca_common_ompio_data_t mca_common_ompio_data_t;
#include "common_ompio_print_queue.h"
#include "common_ompio_aggregators.h"

OMPI_DECLSPEC int mca_common_ompio_file_write (ompio_file_t *fh, const void *buf, int count,
OMPI_DECLSPEC int mca_common_ompio_file_write (ompio_file_t *fh, const void *buf, size_t count,
struct ompi_datatype_t *datatype,
ompi_status_public_t *status);

OMPI_DECLSPEC int mca_common_ompio_file_write_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status);

OMPI_DECLSPEC int mca_common_ompio_file_iwrite (ompio_file_t *fh, const void *buf, int count,
OMPI_DECLSPEC int mca_common_ompio_file_iwrite (ompio_file_t *fh, const void *buf, size_t count,
struct ompi_datatype_t *datatype, ompi_request_t **request);

OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
const void *buf, int count, struct ompi_datatype_t *datatype,
const void *buf, size_t count, struct ompi_datatype_t *datatype,
ompi_request_t **request);

OMPI_DECLSPEC int mca_common_ompio_file_write_all (ompio_file_t *fh, const void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status);

OMPI_DECLSPEC int mca_common_ompio_file_write_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status);

OMPI_DECLSPEC int mca_common_ompio_file_iwrite_all (ompio_file_t *fp, const void *buf,
int count, struct ompi_datatype_t *datatype, ompi_request_t **request);
size_t count, struct ompi_datatype_t *datatype, ompi_request_t **request);

OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, const void *buf,
int count, struct ompi_datatype_t *datatype, ompi_request_t **request);
size_t count, struct ompi_datatype_t *datatype, ompi_request_t **request);

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


OMPI_DECLSPEC int mca_common_ompio_file_read (ompio_file_t *fh, void *buf, int count,
OMPI_DECLSPEC int mca_common_ompio_file_read (ompio_file_t *fh, void *buf, size_t count,
struct ompi_datatype_t *datatype, ompi_status_public_t *status);

OMPI_DECLSPEC int mca_common_ompio_file_read_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t * status);

OMPI_DECLSPEC int mca_common_ompio_file_iread (ompio_file_t *fh, void *buf, int count,
OMPI_DECLSPEC int mca_common_ompio_file_iread (ompio_file_t *fh, void *buf, size_t count,
struct ompi_datatype_t *datatype, ompi_request_t **request);

OMPI_DECLSPEC int mca_common_ompio_file_iread_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
void *buf, int count, struct ompi_datatype_t *datatype,
void *buf, size_t count, struct ompi_datatype_t *datatype,
ompi_request_t **request);

OMPI_DECLSPEC int mca_common_ompio_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype,
OMPI_DECLSPEC int mca_common_ompio_file_read_all (ompio_file_t *fh, void *buf, size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t * status);

OMPI_DECLSPEC int mca_common_ompio_file_read_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset,
void *buf, int count, struct ompi_datatype_t *datatype,
void *buf, size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t * status);

OMPI_DECLSPEC int mca_common_ompio_file_iread_all (ompio_file_t *fp, void *buf, int count, struct ompi_datatype_t *datatype,
OMPI_DECLSPEC int mca_common_ompio_file_iread_all (ompio_file_t *fp, void *buf, size_t count, struct ompi_datatype_t *datatype,
ompi_request_t **request);

OMPI_DECLSPEC int mca_common_ompio_file_iread_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset,
void *buf, int count, struct ompi_datatype_t *datatype,
void *buf, size_t count, struct ompi_datatype_t *datatype,
ompi_request_t **request);

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


Expand All @@ -341,7 +343,7 @@ OMPI_DECLSPEC int mca_common_ompio_base_file_read_all (struct ompio_file_t *fh,
*/
OMPI_DECLSPEC int mca_common_ompio_decode_datatype (struct ompio_file_t *fh,
struct ompi_datatype_t *datatype,
int count,
size_t count,
const void *buf,
size_t *max_data,
opal_convertor_t *convertor,
Expand Down
4 changes: 3 additions & 1 deletion ompi/mca/common/ompio/common_ompio_file_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2018 DataDirect Networks. All rights reserved.
* Copyright (c) 2024 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -591,7 +593,7 @@ int mca_common_ompio_create_incomplete_file_handle (const char *filename,

int mca_common_ompio_decode_datatype (struct ompio_file_t *fh,
ompi_datatype_t *datatype,
int count,
size_t count,
const void *buf,
size_t *max_data,
opal_convertor_t *conv,
Expand Down
26 changes: 14 additions & 12 deletions ompi/mca/common/ompio/common_ompio_file_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2024 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -55,16 +57,16 @@
*/

static int mca_common_ompio_file_read_default (ompio_file_t *fh, void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status);

static int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status);

int mca_common_ompio_file_read (ompio_file_t *fh,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_status_public_t *status)
{
Expand Down Expand Up @@ -109,7 +111,7 @@ int mca_common_ompio_file_read (ompio_file_t *fh,
}

int mca_common_ompio_file_read_default (ompio_file_t *fh, void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status)
{
size_t total_bytes_read = 0; /* total bytes that have been read*/
Expand Down Expand Up @@ -171,7 +173,7 @@ int mca_common_ompio_file_read_default (ompio_file_t *fh, void *buf,
}

int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
int count, struct ompi_datatype_t *datatype,
size_t count, struct ompi_datatype_t *datatype,
ompi_status_public_t *status)
{
size_t tbr = 0; /* total bytes that have been read*/
Expand Down Expand Up @@ -322,7 +324,7 @@ int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
int mca_common_ompio_file_read_at (ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_status_public_t * status)
{
Expand Down Expand Up @@ -403,7 +405,7 @@ static void mca_common_ompio_post_next_read_subreq(struct mca_ompio_request_t *r

int mca_common_ompio_file_iread (ompio_file_t *fh,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
Expand Down Expand Up @@ -531,7 +533,7 @@ int mca_common_ompio_file_iread (ompio_file_t *fh,
int mca_common_ompio_file_iread_at (ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
Expand Down Expand Up @@ -563,7 +565,7 @@ int mca_common_ompio_file_iread_at (ompio_file_t *fh,
/* Infrastructure for collective operations */
int mca_common_ompio_file_read_all (ompio_file_t *fh,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_status_public_t * status)
{
Expand Down Expand Up @@ -617,7 +619,7 @@ int mca_common_ompio_file_read_all (ompio_file_t *fh,
int mca_common_ompio_file_read_at_all (ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_status_public_t * status)
{
Expand All @@ -638,7 +640,7 @@ int mca_common_ompio_file_read_at_all (ompio_file_t *fh,

int mca_common_ompio_file_iread_all (ompio_file_t *fp,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
Expand All @@ -664,7 +666,7 @@ int mca_common_ompio_file_iread_all (ompio_file_t *fp,
int mca_common_ompio_file_iread_at_all (ompio_file_t *fp,
OMPI_MPI_OFFSET_TYPE offset,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
Expand Down
4 changes: 3 additions & 1 deletion ompi/mca/common/ompio/common_ompio_file_read_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* Copyright (c) 2017-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
* Copyright (c) 2024 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -54,7 +56,7 @@ static int read_heap_sort (mca_io_ompio_local_io_array *io_array,
int
mca_common_ompio_base_file_read_all (struct ompio_file_t *fh,
void *buf,
int count,
size_t count,
struct ompi_datatype_t *datatype,
ompi_status_public_t *status)
{
Expand Down
Loading
Loading