Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 2412f5d

Browse files
committed
Merge pull request #513 from edgargabriel/pr/commits-of-week-33
Pr/commits of week 33
2 parents b672e5c + f9a689f commit 2412f5d

35 files changed

+1167
-416
lines changed

ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c

Lines changed: 12 additions & 13 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
@@ -29,7 +29,6 @@
2929
#include "ompi/mca/pml/pml.h"
3030
#include <unistd.h>
3131

32-
#define TIME_BREAKDOWN 1
3332
#define DEBUG_ON 0
3433

3534
/*Used for loading file-offsets per aggregator*/
@@ -97,11 +96,11 @@
9796
MPI_Request *send_req=NULL, *recv_req=NULL;
9897

9998

100-
#if TIME_BREAKDOWN
99+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
101100
double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0;
102101
double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0;
103102
double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0;
104-
print_entry nentry;
103+
mca_io_ompio_print_entry nentry;
105104
#endif
106105

107106

@@ -333,7 +332,7 @@
333332
current_index = 0;
334333

335334

336-
#if TIME_BREAKDOWN
335+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
337336
start_rexch = MPI_Wtime();
338337
#endif
339338
for (index = 0; index < cycles; index++) {
@@ -612,7 +611,7 @@
612611
}
613612

614613

615-
#if TIME_BREAKDOWN
614+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
616615
start_read_time = MPI_Wtime();
617616
#endif
618617

@@ -624,7 +623,7 @@
624623
}
625624
}
626625

627-
#if TIME_BREAKDOWN
626+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
628627
end_read_time = MPI_Wtime();
629628
read_time += end_read_time - start_read_time;
630629
#endif
@@ -664,7 +663,7 @@
664663
ret = OMPI_ERR_OUT_OF_RESOURCE;
665664
goto exit;
666665
}
667-
#if TIME_BREAKDOWN
666+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
668667
start_rcomm_time = MPI_Wtime();
669668
#endif
670669
for (i=0;i<fh->f_procs_per_group;i++){
@@ -686,7 +685,7 @@
686685
goto exit;
687686
}
688687
}
689-
#if TIME_BREAKDOWN
688+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
690689
end_rcomm_time = MPI_Wtime();
691690
rcomm_time += end_rcomm_time - start_rcomm_time;
692691
#endif
@@ -710,7 +709,7 @@
710709
}
711710
}
712711

713-
#if TIME_BREAKDOWN
712+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
714713
start_rcomm_time = MPI_Wtime();
715714
#endif
716715
recv_req = (MPI_Request *) malloc (sizeof (MPI_Request));
@@ -786,7 +785,7 @@
786785
receive_buf = NULL;
787786
}
788787
}
789-
#if TIME_BREAKDOWN
788+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
790789
end_rcomm_time = MPI_Wtime();
791790
rcomm_time += end_rcomm_time - start_rcomm_time;
792791
#endif
@@ -833,8 +832,8 @@
833832
}
834833
}
835834
}
836-
837-
#if TIME_BREAKDOWN
835+
836+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
838837
end_rexch = MPI_Wtime();
839838
read_exch += end_rexch - start_rexch;
840839
nentry.time[0] = read_time;

ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232

3333
#define DEBUG_ON 0
34-
#define TIME_BREAKDOWN 0
3534

3635
/*Used for loading file-offsets per aggregator*/
3736
typedef struct local_io_array{
@@ -99,11 +98,11 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
9998
int recv_req_count=0;
10099

101100

102-
#if TIME_BREAKDOWN
101+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
103102
double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0;
104103
double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0;
105104
double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0;
106-
print_entry nentry;
105+
mca_io_ompio_print_entry nentry;
107106
#endif
108107

109108

@@ -352,7 +351,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
352351

353352

354353

355-
#if TIME_BREAKDOWN
354+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
356355
start_exch = MPI_Wtime();
357356
#endif
358357

@@ -699,7 +698,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
699698
printf("%d : global_count : %ld, bytes_sent : %d\n",
700699
fh->f_rank,global_count, bytes_sent);
701700
#endif
702-
#if TIME_BREAKDOWN
701+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
703702
start_comm_time = MPI_Wtime();
704703
#endif
705704

@@ -855,7 +854,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
855854
}
856855
}
857856

858-
#if TIME_BREAKDOWN
857+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
859858
end_comm_time = MPI_Wtime();
860859
comm_time += (end_comm_time - start_comm_time);
861860
#endif
@@ -871,7 +870,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
871870

872871
if (fh->f_procs_in_group[fh->f_aggregator_index] == fh->f_rank) {
873872

874-
#if TIME_BREAKDOWN
873+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
875874
start_write_time = MPI_Wtime();
876875
#endif
877876

@@ -933,7 +932,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
933932
goto exit;
934933
}
935934
}
936-
#if TIME_BREAKDOWN
935+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
937936
end_write_time = MPI_Wtime();
938937
write_time += end_write_time - start_write_time;
939938
#endif
@@ -973,7 +972,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
973972

974973
}
975974

976-
#if TIME_BREAKDOWN
975+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
977976
end_exch = MPI_Wtime();
978977
exch_write += end_exch - start_exch;
979978
nentry.time[0] = write_time;

ompi/mca/fcoll/static/fcoll_static_file_read_all.c

Lines changed: 11 additions & 13 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 (c) 2015 Los Alamos National Security, LLC. All rights reserved.
1414
*
1515
* $COPYRIGHT$
@@ -33,7 +33,6 @@
3333
#include <unistd.h>
3434

3535
#define DEBUG_ON 0
36-
#define TIME_BREAKDOWN 0
3736

3837

3938
typedef struct local_io_array {
@@ -96,11 +95,11 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
9695
MPI_Request *send_req=NULL, *recv_req=NULL;
9796
/* MPI_Request *grecv_req=NULL, *gsend_req=NULL; */
9897

99-
#if TIME_BREAKDOWN
98+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
10099
double read_time = 0.0, start_read_time = 0.0, end_read_time = 0.0;
101100
double rcomm_time = 0.0, start_rcomm_time = 0.0, end_rcomm_time = 0.0;
102101
double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0;
103-
print_entry nentry;
102+
mca_io_ompio_print_entry nentry;
104103
#endif
105104
#if DEBUG_ON
106105
MPI_Aint gc_in;
@@ -359,8 +358,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
359358
}
360359
}
361360
#endif
362-
363-
#if TIME_BREAKDOWN
361+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
364362
start_rexch = MPI_Wtime();
365363
#endif
366364

@@ -456,7 +454,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
456454
goto exit;
457455
}
458456

459-
#if TIME_BREAKDOWN
457+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
460458
start_rcomm_time = MPI_Wtime();
461459
#endif
462460

@@ -471,7 +469,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
471469
goto exit;
472470
}
473471

474-
#if TIME_BREAKDOWN
472+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
475473
end_rcomm_time = MPI_Wtime();
476474
rcomm_time += end_rcomm_time - start_rcomm_time;
477475
#endif
@@ -708,7 +706,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
708706
fh->f_io_array[i].length);
709707
}
710708
#endif
711-
#if TIME_BREAKDOWN
709+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
712710
start_read_time = MPI_Wtime();
713711
#endif
714712

@@ -720,7 +718,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
720718
}
721719
}
722720

723-
#if TIME_BREAKDOWN
721+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
724722
end_read_time = MPI_Wtime();
725723
read_time += end_read_time - start_read_time;
726724
#endif
@@ -768,7 +766,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
768766
ret = OMPI_ERR_OUT_OF_RESOURCE;
769767
goto exit;
770768
}
771-
#if TIME_BREAKDOWN
769+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
772770
start_rcomm_time = MPI_Wtime();
773771
#endif
774772

@@ -805,7 +803,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
805803
goto exit;
806804
}
807805

808-
#if TIME_BREAKDOWN
806+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
809807
end_rcomm_time = MPI_Wtime();
810808
rcomm_time += end_rcomm_time - start_rcomm_time;
811809
#endif
@@ -894,7 +892,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
894892
}
895893
}
896894
}
897-
#if TIME_BREAKDOWN
895+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
898896
end_rexch = MPI_Wtime();
899897
read_exch += end_rexch - start_rexch;
900898
nentry.time[0] = read_time;

ompi/mca/fcoll/static/fcoll_static_file_write_all.c

Lines changed: 12 additions & 13 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 (c) 2015 Los Alamos National Security, LLC. All rights reserved.
1414
*
1515
* $COPYRIGHT$
@@ -32,7 +32,6 @@
3232
#include <unistd.h>
3333

3434
#define DEBUG_ON 0
35-
#define TIME_BREAKDOWN 0
3635

3736
typedef struct local_io_array{
3837
OMPI_MPI_OFFSET_TYPE offset;
@@ -93,11 +92,11 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
9392
ompi_datatype_t *types[3];
9493
ompi_datatype_t *io_array_type=MPI_DATATYPE_NULL;
9594
/*----------------------------------------------*/
96-
#if TIME_BREAKDOWN
95+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
9796
double write_time = 0.0, start_write_time = 0.0, end_write_time = 0.0;
9897
double comm_time = 0.0, start_comm_time = 0.0, end_comm_time = 0.0;
9998
double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0;
100-
print_entry nentry;
99+
mca_io_ompio_print_entry nentry;
101100
#endif
102101

103102

@@ -349,7 +348,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
349348
}
350349
#endif
351350

352-
#if TIME_BREAKDOWN
351+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
353352
start_exch = MPI_Wtime();
354353
#endif
355354

@@ -673,7 +672,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
673672
bytes_to_write_in_cycle,
674673
fh->f_procs_per_group);
675674
#endif
676-
#if TIME_BREAKDOWN
675+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
677676
start_comm_time = MPI_Wtime();
678677
#endif
679678
global_buf = (char *) malloc (global_count);
@@ -800,7 +799,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
800799
}
801800
#endif
802801
}
803-
#if TIME_BREAKDOWN
802+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
804803
end_comm_time = MPI_Wtime();
805804
comm_time += end_comm_time - start_comm_time;
806805
#endif
@@ -850,8 +849,8 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
850849
fh->f_io_array[i].length);
851850
}
852851
#endif
853-
854-
#if TIME_BREAKDOWN
852+
853+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
855854
start_write_time = MPI_Wtime();
856855
#endif
857856

@@ -861,9 +860,9 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
861860
ret = OMPI_ERROR;
862861
goto exit;
863862
}
864-
}
865-
866-
#if TIME_BREAKDOWN
863+
}
864+
865+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
867866
end_write_time = MPI_Wtime();
868867
write_time += end_write_time - start_write_time;
869868
#endif
@@ -897,7 +896,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
897896
}
898897
}
899898

900-
#if TIME_BREAKDOWN
899+
#if OMPIO_FCOLL_WANT_TIME_BREAKDOWN
901900
end_exch = MPI_Wtime();
902901
exch_write += end_exch - start_exch;
903902
nentry.time[0] = write_time;

0 commit comments

Comments
 (0)