Skip to content

Commit cc21928

Browse files
committed
checkpoint of the current work, since I need to resync wioth master to fix the compilation problems
1 parent 100515e commit cc21928

File tree

9 files changed

+172
-96
lines changed

9 files changed

+172
-96
lines changed

ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,8 @@ static mca_fcoll_base_module_1_0_0_t dynamic = {
3737
mca_fcoll_dynamic_module_finalize,
3838
mca_fcoll_dynamic_file_read_all,
3939
NULL, /* iread_all */
40-
<<<<<<< HEAD
4140
mca_fcoll_dynamic_file_write_all,
4241
NULL, /*iwrite_all */
43-
=======
44-
mca_fcoll_dynamic_file_read_all_begin,
45-
mca_fcoll_dynamic_file_read_all_end,
46-
mca_fcoll_dynamic_file_write_all,
47-
NULL, /*iwrite_all */
48-
mca_fcoll_dynamic_file_write_all_begin,
49-
mca_fcoll_dynamic_file_write_all_end,
50-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
5142
NULL, /* progress */
5243
NULL /* request_free */
5344
};

ompi/mca/fcoll/fcoll.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,6 @@ typedef int (*mca_fcoll_base_module_file_read_all_fn_t)
118118
ompi_status_public_t *status);
119119

120120
typedef int (*mca_fcoll_base_module_file_iread_all_fn_t)
121-
<<<<<<< HEAD
122-
=======
123-
(struct mca_io_ompio_file_t *fh,
124-
void *buf,
125-
int count,
126-
struct ompi_datatype_t *datatype,
127-
ompi_request_t **request);
128-
129-
typedef int (*mca_fcoll_base_module_file_read_all_begin_fn_t)
130-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
131121
(struct mca_io_ompio_file_t *fh,
132122
void *buf,
133123
int count,
@@ -142,16 +132,6 @@ typedef int (*mca_fcoll_base_module_file_write_all_fn_t)
142132
ompi_status_public_t *status);
143133

144134
typedef int (*mca_fcoll_base_module_file_iwrite_all_fn_t)
145-
<<<<<<< HEAD
146-
=======
147-
(struct mca_io_ompio_file_t *fh,
148-
void *buf,
149-
int count,
150-
struct ompi_datatype_t *datatype,
151-
ompi_request_t **request);
152-
153-
typedef int (*mca_fcoll_base_module_file_write_all_begin_fn_t)
154-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
155135
(struct mca_io_ompio_file_t *fh,
156136
void *buf,
157137
int count,
@@ -189,17 +169,8 @@ struct mca_fcoll_base_module_1_0_0_t {
189169
/* FCOLL function pointers */
190170
mca_fcoll_base_module_file_read_all_fn_t fcoll_file_read_all;
191171
mca_fcoll_base_module_file_iread_all_fn_t fcoll_file_iread_all;
192-
<<<<<<< HEAD
193-
mca_fcoll_base_module_file_write_all_fn_t fcoll_file_write_all;
194-
mca_fcoll_base_module_file_iwrite_all_fn_t fcoll_file_iwrite_all;
195-
=======
196-
mca_fcoll_base_module_file_read_all_begin_fn_t fcoll_file_read_all_begin;
197-
mca_fcoll_base_module_file_read_all_end_fn_t fcoll_file_read_all_end;
198172
mca_fcoll_base_module_file_write_all_fn_t fcoll_file_write_all;
199173
mca_fcoll_base_module_file_iwrite_all_fn_t fcoll_file_iwrite_all;
200-
mca_fcoll_base_module_file_write_all_begin_fn_t fcoll_file_write_all_begin;
201-
mca_fcoll_base_module_file_write_all_end_fn_t fcoll_file_write_all_end;
202-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
203174
mca_fcoll_base_module_progress_fn_t fcoll_progress;
204175
mca_fcoll_base_module_request_free_fn_t fcoll_request_free;
205176

ompi/mca/fcoll/individual/fcoll_individual_module.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,8 @@ static mca_fcoll_base_module_1_0_0_t individual = {
3737
mca_fcoll_individual_module_finalize,
3838
mca_fcoll_individual_file_read_all,
3939
NULL, /* iread_all */
40-
<<<<<<< HEAD
4140
mca_fcoll_individual_file_write_all,
4241
NULL, /* iwrite_all */
43-
=======
44-
mca_fcoll_individual_file_read_all_begin,
45-
mca_fcoll_individual_file_read_all_end,
46-
mca_fcoll_individual_file_write_all,
47-
NULL, /* iwrite_all */
48-
mca_fcoll_individual_file_write_all_begin,
49-
mca_fcoll_individual_file_write_all_end,
50-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
5142
NULL, /* progress */
5243
NULL /* request_free */
5344
};

ompi/mca/fcoll/static/fcoll_static_module.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,8 @@ static mca_fcoll_base_module_1_0_0_t static_t = {
3737
mca_fcoll_static_module_finalize,
3838
mca_fcoll_static_file_read_all,
3939
NULL, /* iread_all */
40-
<<<<<<< HEAD
4140
mca_fcoll_static_file_write_all,
4241
NULL, /* iwrite_all */
43-
=======
44-
mca_fcoll_static_file_read_all_begin,
45-
mca_fcoll_static_file_read_all_end,
46-
mca_fcoll_static_file_write_all,
47-
NULL, /* iwrite_all */
48-
mca_fcoll_static_file_write_all_begin,
49-
mca_fcoll_static_file_write_all_end,
50-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
5142
NULL, /* progress */
5243
NULL /* request_free */
5344
};

ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,9 @@ static mca_fcoll_base_module_1_0_0_t two_phase = {
3636
mca_fcoll_two_phase_module_init,
3737
mca_fcoll_two_phase_module_finalize,
3838
mca_fcoll_two_phase_file_read_all,
39-
<<<<<<< HEAD
4039
NULL, /* iread_all */
4140
mca_fcoll_two_phase_file_write_all,
4241
NULL, /* iwrite_all */
43-
=======
44-
NULL,
45-
mca_fcoll_two_phase_file_read_all_begin,
46-
mca_fcoll_two_phase_file_read_all_end,
47-
mca_fcoll_two_phase_file_write_all,
48-
NULL,
49-
mca_fcoll_two_phase_file_write_all_begin,
50-
mca_fcoll_two_phase_file_write_all_end,
51-
>>>>>>> ff02f765b276ffd0dfd12ba50e85e70fa3db7aca
5242
NULL, /* progress */
5343
NULL /* request_free */
5444
};

ompi/mca/io/ompio/io_ompio.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2008-2014 University of Houston. All rights reserved.
13+
* Copyright (c) 2008-2015 University of Houston. All rights reserved.
1414
* $COPYRIGHT$
1515
*
1616
* Additional copyrights may follow
@@ -50,13 +50,13 @@ OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info;
5050
/*
5151
* Flags
5252
*/
53-
#define OMPIO_CONTIGUOUS_MEMORY 0x00000001
54-
#define OMPIO_UNIFORM_FVIEW 0x00000002
55-
#define OMPIO_FILE_IS_OPEN 0x00000004
56-
#define OMPIO_FILE_VIEW_IS_SET 0x00000008
57-
#define OMPIO_CONTIGUOUS_FVIEW 0x00000010
58-
#define OMPIO_AGGREGATOR_IS_SET 0x00000020
59-
#define OMPIO_SHAREDFP_IS_SET 0x00000040
53+
#define OMPIO_CONTIGUOUS_MEMORY 0x00000001
54+
#define OMPIO_UNIFORM_FVIEW 0x00000002
55+
#define OMPIO_FILE_IS_OPEN 0x00000004
56+
#define OMPIO_FILE_VIEW_IS_SET 0x00000008
57+
#define OMPIO_CONTIGUOUS_FVIEW 0x00000010
58+
#define OMPIO_AGGREGATOR_IS_SET 0x00000020
59+
#define OMPIO_SHAREDFP_IS_SET 0x00000040
6060
#define QUEUESIZE 2048
6161

6262
#define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b))
@@ -297,7 +297,8 @@ struct mca_io_ompio_file_t {
297297
size_t f_cc_size;
298298
int f_bytes_per_agg;
299299
enum ompio_fs_type f_fstype;
300-
300+
ompi_request_t *f_split_coll_req;
301+
bool f_split_coll_in_use;
301302
/* Place for selected sharedfp module to hang it's data.
302303
Note: Neither f_sharedfp nor f_sharedfp_component seemed appropriate for this.
303304
*/
@@ -350,7 +351,8 @@ struct mca_io_ompio_file_t {
350351
int *f_init_procs_in_group;
351352

352353
int f_final_num_aggrs;
353-
354+
355+
/* internal ompio functions required by fbtl and fcoll */
354356
mca_io_ompio_decode_datatype_fn_t f_decode_datatype;
355357
mca_io_ompio_generate_current_file_view_fn_t f_generate_current_file_view;
356358

ompi/mca/io/ompio/io_ompio_file_open.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm,
122122
ompi_io_ompio_set_file_defaults (ompio_fh);
123123
ompio_fh->f_filename = filename;
124124

125+
ompio_fh->f_split_coll_req = NULL;
126+
ompio_fh->f_split_in_use = false;
127+
125128
/*Initialize the print_queues queues here!*/
126129
coll_write_time = (print_queue *) malloc (sizeof(print_queue));
127130
coll_read_time = (print_queue *) malloc (sizeof(print_queue));

ompi/mca/io/ompio/io_ompio_file_read.c

Lines changed: 90 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2014 University of Houston. All rights reserved.
12+
* Copyright (c) 2008-2015 University of Houston. All rights reserved.
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -379,6 +379,36 @@ int mca_io_ompio_file_read_all (ompi_file_t *fh,
379379
return ret;
380380
}
381381

382+
int mca_io_ompio_file_iread_all (ompi_file_t *fh,
383+
void *buf,
384+
int count,
385+
struct ompi_datatype_t *datatype,
386+
ompi_request_t **request)
387+
{
388+
int ret = OMPI_SUCCESS;
389+
mca_io_ompio_data_t *data=NULL;
390+
mca_io_ompio_file_t *fp=NULL;
391+
392+
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
393+
fp = &data->ompio_fh;
394+
395+
if ( NULL != fp->f_fcoll->fcoll_file_iread_all ) {
396+
ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh,
397+
buf,
398+
count,
399+
datatype,
400+
request);
401+
}
402+
else {
403+
/* this fcoll component does not support non-blocking
404+
collective I/O operations. WE fake it with
405+
individual non-blocking I/O operations. */
406+
ret = ompio_io_ompio_file_iread ( fp, buf, count, datatype, request );
407+
}
408+
409+
return ret;
410+
}
411+
382412

383413
int mca_io_ompio_file_read_at_all (ompi_file_t *fh,
384414
OMPI_MPI_OFFSET_TYPE offset,
@@ -418,6 +448,41 @@ int ompio_io_ompio_file_read_at_all (mca_io_ompio_file_t *fh,
418448
return ret;
419449
}
420450

451+
int mca_io_ompio_file_iread_at_all (ompi_file_t *fh,
452+
OMPI_MPI_OFFSET_TYPE offset,
453+
void *buf,
454+
int count,
455+
struct ompi_datatype_t *datatype,
456+
ompi_request_t **request)
457+
{
458+
int ret = OMPI_SUCCESS;
459+
mca_io_ompio_data_t *data;
460+
mca_io_ompio_file_t *fp=NULL;
461+
OMPI_MPI_OFFSET_TYPE prev_offset;
462+
ompio_io_ompio_file_get_position (fh, &prev_offset );
463+
464+
ompi_io_ompio_set_explicit_offset (fh, offset);
465+
466+
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
467+
fp = &data->fh_ompio;
468+
if ( NULL != fp->f_fcoll->fcoll_file_iread_all ) {
469+
ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh,
470+
buf,
471+
count,
472+
datatype,
473+
request);
474+
}
475+
else {
476+
/* this fcoll component does not support non-blocking
477+
collective I/O operations. WE fake it with
478+
individual non-blocking I/O operations. */
479+
ret = ompio_io_ompio_file_iread ( fp, buf, count, datatype, request );
480+
}
481+
482+
483+
ompi_io_ompio_set_explicit_offset (fh, prev_offset);
484+
return ret;
485+
}
421486

422487
/* Infrastructure for shared file pointer operations
423488
** (individual and ordered)*/
@@ -553,10 +618,15 @@ int mca_io_ompio_file_read_all_begin (ompi_file_t *fh,
553618
struct ompi_datatype_t *datatype)
554619
{
555620
int ret = OMPI_SUCCESS;
556-
mca_io_ompio_data_t *data;
557-
558-
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
621+
mca_io_ompio_file_t *fp;
559622

623+
fp = (mca_io_ompio_file_t *) &fh->f_io_selected_data->fh_ompio;
624+
if ( true == fp->f_split_coll_in_use ) {
625+
printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n");
626+
return MPI_ERR_OTHER;
627+
}
628+
ret = mca_io_ompio_file_iread_all ( fh, buf, count, datatype, &fp->f_split_coll_req );
629+
fp->f_split_coll_in_use = true;
560630

561631
return ret;
562632
}
@@ -566,10 +636,13 @@ int mca_io_ompio_file_read_all_end (ompi_file_t *fh,
566636
ompi_status_public_t * status)
567637
{
568638
int ret = OMPI_SUCCESS;
569-
mca_io_ompio_data_t *data;
639+
mca_io_ompio_file_t *fp;
570640

571-
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
641+
fp = (mca_io_ompio_file_t *) &fh->f_io_selected_data->fh_ompio;
642+
ret = ompi_mpi_wait ( &fp->f_split_coll_req, status );
572643

644+
/* remove the flag again */
645+
fp->f_split_coll_in_use = false;
573646
return ret;
574647
}
575648

@@ -583,7 +656,7 @@ int mca_io_ompio_file_read_at_all_begin (ompi_file_t *fh,
583656
mca_io_ompio_data_t *data;
584657

585658
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
586-
659+
ret = ompio_io_ompio_file_read_at_all_begin ( &data->fh_ompio, offset, buf, count, datatype );
587660
return ret;
588661
}
589662

@@ -594,17 +667,13 @@ int ompio_io_ompio_file_read_at_all_begin (mca_io_ompio_file_t *fh,
594667
struct ompi_datatype_t *datatype)
595668
{
596669
int ret = OMPI_SUCCESS;
597-
OMPI_MPI_OFFSET_TYPE prev_offset;
598-
ompio_io_ompio_file_get_position (fh, &prev_offset );
599670

600-
ompi_io_ompio_set_explicit_offset (fh, offset);
601-
/* It is OK to reset the position already here, althgouth
602-
** the operation might still be pending/ongoing, since
603-
** the entire array of <offset, length, memaddress> have
604-
** already been constructed in the file_read_all_begin operation
605-
*/
606-
607-
ompi_io_ompio_set_explicit_offset (fh, prev_offset);
671+
if ( true == fh->f_split_coll_in_use ) {
672+
printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n");
673+
return MPI_ERR_REQUEST;
674+
}
675+
ret = mca_io_ompio_file_iread_at_all ( fh, offset, buf, count, datatype, &fh->f_split_coll_req );
676+
fh->f_split_coll_in_use = true;
608677
return ret;
609678
}
610679

@@ -616,7 +685,7 @@ int mca_io_ompio_file_read_at_all_end (ompi_file_t *fh,
616685
mca_io_ompio_data_t *data;
617686

618687
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
619-
688+
ret = ompio_io_ompio_file_read_at_all_end ( &data->fh_ompio, but, status );
620689
return ret;
621690
}
622691

@@ -625,7 +694,9 @@ int ompio_io_ompio_file_read_at_all_end (mca_io_ompio_file_t *ompio_fh,
625694
ompi_status_public_t * status)
626695
{
627696
int ret = OMPI_SUCCESS;
697+
ret = ompi_mpi_wait ( &ompio_fh->f_split_coll_req, status );
628698

629-
699+
/* remove the flag again */
700+
fp->f_split_coll_in_use = false;
630701
return ret;
631702
}

0 commit comments

Comments
 (0)