Skip to content

Commit f910b55

Browse files
committed
1. Code cleanup.
2. Fix for #7 issue. 3. Readme update.
1 parent 27b7580 commit f910b55

File tree

10 files changed

+229
-219
lines changed

10 files changed

+229
-219
lines changed

README.md

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,30 @@ What's New
6565
New in Intel(R) MPI Benchmarks 2019
6666
----------------------------------------
6767
- New IMB-MT benchmarks.
68-
The benchmarks implement the multithreaded version of some of the IMB-MPI1
69-
benchmarks using the OpenMP* paradigm.
68+
The benchmarks implement the multi-threaded version of IMB-MPI1 benchmarks
69+
using the OpenMP* paradigm.
7070
- New benchmarks infrastructure implemented in C++.
71-
The IMB-MPI1, IMB-RMA and IMB-MT implementation is now based on the new C++
72-
infrastructure (IMB-NBC, IMB-EXT and IMB-IO still use the legacy one).
73-
The legacy infrastructure is preserved in src_c subdirectory.
74-
- Changes in syntax for the -include and -exclude options.
71+
The IMB-MPI1, IMB-RMA, IMB-NBC, IMB-EXT, IMB-IO, and IMB-MT implementation
72+
is now based on the new C++ infrastructure.
73+
The legacy infrastructure is preserved in the src_c subdirectory.
74+
- Syntax changes for the -include and -exclude options.
7575
Benchmarks to include and exclude now must be separated by a comma rather
7676
than a space. Benchmarks to launch can be separated by a comma or a space.
77-
- Iteration policy can no longer be set with the -iter option. Use -iter_policy
78-
instead.
79-
- Added a new option -noheader for IMB-MT to disable printing of benchmark headers.
77+
- Iteration policy can no longer be set with the -iter option. Use the
78+
-iter_policy instead.
8079
- Added a new benchmark BarrierMT for IMB-MT.
80+
- Added new options:
81+
- -noheader for IMB-MT disables printing of benchmark headers.
82+
- -data_type for IMB-MPI1 specifies the type to be used for communication.
83+
- -red_data_type for IMB-MPI1 specifies the type to be used for reduction.
84+
- -contig_type for IMB-MPI1 specifies the type to be used.
85+
- -zero_size for IMB-MPI1 disable runs with message size 0.
86+
- Bug fixes.
87+
- Code cleanup.
8188

8289
New in Intel(R) MPI Benchmarks 2018 Update 1
8390
--------------------------------------------
84-
- Support for the Microsoft* Visual Studio* 2017. Microsoft* Visual Studio* 2012
91+
- Support for the Microsoft* Visual Studio* 2017. Microsoft* Visual Studio* 2012
8592
support is removed.
8693

8794
New in Intel(R) MPI Benchmarks 2018
@@ -94,15 +101,16 @@ New in Intel(R) MPI Benchmarks 2018
94101
New in Intel(R) MPI Benchmarks 2017 Update 1
95102
--------------------------------------------
96103
- Added a new option -imb_barrier.
97-
- The PingPong and PingPing benchmarks are now equivalent to PingPongSpecificSource
98-
and PingPingSpecificSource, respectively. Their old behavior (with MPI_ANY_SOURCE)
99-
is available in PingPongAnySource and PingPingAnySource.
104+
- The PingPong and PingPing benchmarks are now equivalent to
105+
PingPongSpecificSource and PingPingSpecificSource, respectively. Their old
106+
behavior (with MPI_ANY_SOURCE) is available in PingPongAnySource and
107+
PingPingAnySource.
100108

101109
New in Intel(R) MPI Benchmarks 2017
102110
-------------------------------------------
103111
- Changed default values for the -sync and -root_shift options.
104112
- Support for the Microsoft* Visual Studio* 2015. Microsoft* Visual Studio* 2010
105-
support is removed.
113+
support is removed.
106114
- Bug fixes.
107115

108116
New in Intel(R) MPI Benchmarks 4.1 Update 1
@@ -112,11 +120,13 @@ New in Intel(R) MPI Benchmarks 4.1 Update 1
112120
New in Intel(R) MPI Benchmarks 4.1
113121
-------------------------------------------
114122
- Introduced two new benchmarks: uniband and biband.
115-
- Introduced two new command-line options for collective benchmarks: -sync and -root_shift.
123+
- Introduced two new command-line options for collective benchmarks: -sync and
124+
-root_shift.
116125

117126
New in Intel(R) MPI Benchmarks 4.0 Update 2
118127
-------------------------------------------
119-
- Fix of a bug where benchmarking was failing on certain message lengths with -DCHECK.
128+
- Fix of a bug where benchmarking was failing on certain message lengths with
129+
-DCHECK.
120130

121131
New in Intel(R) MPI Benchmarks 4.0 Update 1
122132
-------------------------------------------
@@ -125,19 +135,20 @@ New in Intel(R) MPI Benchmarks 4.0 Update 1
125135
New in Intel(R) MPI Benchmarks 4.0
126136
-------------------------------------------
127137
- Introduced new components IMB-NBC and IMB-RMA that conform to the MPI-3.0
128-
standard.
129-
Note: These components can only be built and used with MPI libraries that conform
130-
to the MPI-3 standard.
138+
standard.
139+
Note: These components can only be built and used with MPI libraries that
140+
conform to the MPI-3 standard.
131141
- Added new targets to the Linux* OS Makefiles:
132142
- NBC for building IMB-NBC
133143
- RMA for building IMB-RMA
134-
- Updated Microsoft* Visual Studio* solutions to include the IMB-NBC and
135-
IMB-RMA targets.
144+
- Updated Microsoft* Visual Studio* solutions to include the IMB-NBC and IMB-RMA
145+
targets.
136146
- Consolidated all first-use documents in ReadMe_IMB.txt to improve usability.
137-
- Introduced a new feature to set the appropriate algorithm for automatic calculation
138-
of iterations. The algorithm can be set through the -iter and -iter_policy options.
147+
- Introduced a new feature to set the appropriate algorithm for automatic
148+
calculation of iterations. The algorithm can be set through the -iter and
149+
-iter_policy options.
139150
- Support for the Microsoft* Visual Studio* 2013. Microsoft* Visual Studio* 2008
140-
support is removed.
151+
support is removed.
141152

142153
--------------------
143154
Command-Line Control
@@ -154,17 +165,18 @@ command-line parameters.
154165
-----------------------------------------
155166
Building Instructions for Linux* OS
156167
-----------------------------------------
157-
1) Set the CC variable to point to the appropriate compiler wrapper, mpiicc or mpicc.
168+
1) Set the CC variable to point to the appropriate compiler wrapper, mpiicc or
169+
mpicc.
158170
2) Run one or more Makefile commands below:
159171

160172
make clean - remove legacy binary object files and executable files
161-
make MPI1 - build the executable file for the IMB-MPI1 component
162-
make EXT - build the executable file for one-sided communications benchmarks
163-
make IO - build the executable file for I/O benchmarks
164-
make NBC - build the executable file for IMB-NBC benchmarks
165-
make RMA - build the executable file for IMB-RMA benchmarks
173+
make IMB-MPI1 - build the executable file for the IMB-MPI1 component
174+
make IMB-EXT - build the executable file for one-sided communications benchmarks
175+
make IMB-IO - build the executable file for I/O benchmarks
176+
make IMB-NBC - build the executable file for IMB-NBC benchmarks
177+
make IMB-RMA - build the executable file for IMB-RMA benchmarks
166178
make all - build all executable files available
167-
179+
168180
3) Run the benchmarks as follows:
169181

170182
mpirun -n <number_of_processes> IMB-<component> [arguments]

ReadMe_IMB.txt

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -62,30 +62,29 @@ files and folders appear on your system:
6262
----------
6363
What's New
6464
----------
65-
New in Intel(R) MPI Benchmarks 2019 Beta
65+
New in Intel(R) MPI Benchmarks 2019
6666
----------------------------------------
67-
- Intel(R) MPI Benchmarks 2019 (Beta) are now available for Windows*.
68-
- Added a new option -noheader for IMB-MT to disable printing of benchmark headers.
69-
- Added a new benchmark BarrierMT for IMB-MT.
70-
- Bug fixes.
71-
72-
New in Intel(R) MPI Benchmarks 2019 Technical Preview
73-
-----------------------------------------------------
7467
- New IMB-MT benchmarks.
75-
The benchmarks implement the multithreaded version of some of the IMB-MPI1
76-
benchmarks using the OpenMP* paradigm.
77-
68+
The benchmarks implement the multi-threaded version of IMB-MPI1 benchmarks
69+
using the OpenMP* paradigm.
7870
- New benchmarks infrastructure implemented in C++.
79-
The IMB-MPI1, IMB-RMA and IMB-MT implementation is now based on the new C++
80-
infrastructure (IMB-NBC, IMB-EXT and IMB-IO still use the legacy one).
81-
The legacy infrastructure is preserved in legacy subdirectory.
82-
83-
- Changes in syntax for the -include and -exclude options.
71+
The IMB-MPI1, IMB-RMA, IMB-NBC, IMB-EXT, IMB-IO, and IMB-MT implementation
72+
is now based on the new C++ infrastructure.
73+
The legacy infrastructure is preserved in the src_c subdirectory.
74+
- Syntax changes for the -include and -exclude options.
8475
Benchmarks to include and exclude now must be separated by a comma rather
8576
than a space. Benchmarks to launch can be separated by a comma or a space.
86-
87-
- Iteration policy can no longer be set with the -iter option. Use -iter_policy
88-
instead.
77+
- Iteration policy can no longer be set with the -iter option. Use the
78+
-iter_policy instead.
79+
- Added a new benchmark BarrierMT for IMB-MT.
80+
- Added new options:
81+
- -noheader for IMB-MT disables printing of benchmark headers.
82+
- -data_type for IMB-MPI1 specifies the type to be used for communication.
83+
- -red_data_type for IMB-MPI1 specifies the type to be used for reduction.
84+
- -contig_type for IMB-MPI1 specifies the type to be used.
85+
- -zero_size for IMB-MPI1 disable runs with message size 0.
86+
- Bug fixes.
87+
- Code cleanup.
8988

9089
New in Intel(R) MPI Benchmarks 2018 Update 1
9190
--------------------------------------------
@@ -102,15 +101,16 @@ New in Intel(R) MPI Benchmarks 2018
102101
New in Intel(R) MPI Benchmarks 2017 Update 1
103102
--------------------------------------------
104103
- Added a new option -imb_barrier.
105-
- The PingPong and PingPing benchmarks are now equivalent to PingPongSpecificSource
106-
and PingPingSpecificSource, respectively. Their old behavior (with MPI_ANY_SOURCE)
107-
is available in PingPongAnySource and PingPingAnySource.
104+
- The PingPong and PingPing benchmarks are now equivalent to
105+
PingPongSpecificSource and PingPingSpecificSource, respectively. Their old
106+
behavior (with MPI_ANY_SOURCE) is available in PingPongAnySource and
107+
PingPingAnySource.
108108

109109
New in Intel(R) MPI Benchmarks 2017
110110
-------------------------------------------
111111
- Changed default values for the -sync and -root_shift options.
112112
- Support for the Microsoft* Visual Studio* 2015. Microsoft* Visual Studio* 2010
113-
support is removed.
113+
support is removed.
114114
- Bug fixes.
115115

116116
New in Intel(R) MPI Benchmarks 4.1 Update 1
@@ -120,11 +120,13 @@ New in Intel(R) MPI Benchmarks 4.1 Update 1
120120
New in Intel(R) MPI Benchmarks 4.1
121121
-------------------------------------------
122122
- Introduced two new benchmarks: uniband and biband.
123-
- Introduced two new command-line options for collective benchmarks: -sync and -root_shift.
123+
- Introduced two new command-line options for collective benchmarks: -sync and
124+
-root_shift.
124125

125126
New in Intel(R) MPI Benchmarks 4.0 Update 2
126127
-------------------------------------------
127-
- Fix of a bug where benchmarking was failing on certain message lengths with -DCHECK.
128+
- Fix of a bug where benchmarking was failing on certain message lengths with
129+
-DCHECK.
128130

129131
New in Intel(R) MPI Benchmarks 4.0 Update 1
130132
-------------------------------------------
@@ -133,19 +135,20 @@ New in Intel(R) MPI Benchmarks 4.0 Update 1
133135
New in Intel(R) MPI Benchmarks 4.0
134136
-------------------------------------------
135137
- Introduced new components IMB-NBC and IMB-RMA that conform to the MPI-3.0
136-
standard.
137-
Note: These components can only be built and used with MPI libraries that conform
138-
to the MPI-3 standard.
138+
standard.
139+
Note: These components can only be built and used with MPI libraries that
140+
conform to the MPI-3 standard.
139141
- Added new targets to the Linux* OS Makefiles:
140142
- NBC for building IMB-NBC
141143
- RMA for building IMB-RMA
142-
- Updated Microsoft* Visual Studio* solutions to include the IMB-NBC and
143-
IMB-RMA targets.
144+
- Updated Microsoft* Visual Studio* solutions to include the IMB-NBC and IMB-RMA
145+
targets.
144146
- Consolidated all first-use documents in ReadMe_IMB.txt to improve usability.
145-
- Introduced a new feature to set the appropriate algorithm for automatic calculation
146-
of iterations. The algorithm can be set through the -iter and -iter_policy options.
147+
- Introduced a new feature to set the appropriate algorithm for automatic
148+
calculation of iterations. The algorithm can be set through the -iter and
149+
-iter_policy options.
147150
- Support for the Microsoft* Visual Studio* 2013. Microsoft* Visual Studio* 2008
148-
support is removed.
151+
support is removed.
149152

150153
--------------------
151154
Command-Line Control
@@ -162,15 +165,16 @@ command-line parameters.
162165
-----------------------------------------
163166
Building Instructions for Linux* OS
164167
-----------------------------------------
165-
1) Set the CC variable to point to the appropriate compiler wrapper, mpiicc or mpicc.
168+
1) Set the CC variable to point to the appropriate compiler wrapper, mpiicc or
169+
mpicc.
166170
2) Run one or more Makefile commands below:
167171

168172
make clean - remove legacy binary object files and executable files
169-
make MPI1 - build the executable file for the IMB-MPI1 component
170-
make EXT - build the executable file for one-sided communications benchmarks
171-
make IO - build the executable file for I/O benchmarks
172-
make NBC - build the executable file for IMB-NBC benchmarks
173-
make RMA - build the executable file for IMB-RMA benchmarks
173+
make IMB-MPI1 - build the executable file for the IMB-MPI1 component
174+
make IMB-EXT - build the executable file for one-sided communications benchmarks
175+
make IMB-IO - build the executable file for I/O benchmarks
176+
make IMB-NBC - build the executable file for IMB-NBC benchmarks
177+
make IMB-RMA - build the executable file for IMB-RMA benchmarks
174178
make all - build all executable files available
175179

176180
3) Run the benchmarks as follows:

src_c/IMB_init_transfer.c

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,31 +150,33 @@ In/out variables:
150150

151151
if (Bmark->fpointer == indv_block || Bmark->fpointer == shared ||
152152
Bmark->fpointer == explic) {
153-
int bllen[3];
153+
int bllen[1];
154154

155-
MPI_Aint displ[3];
156-
MPI_Datatype types[3];
155+
MPI_Aint displ[1];
156+
MPI_Datatype types[1];
157157

158-
bllen[0] = 1;
159-
displ[0] = 0;
160-
types[0] = MPI_LB;
161-
162-
bllen[1] = baslen;
163-
displ[1] = pos1;
164-
types[1] = c_info->etype;
165-
166-
bllen[2] = 1;
167-
displ[2] = size;
168-
types[2] = MPI_UB;
158+
bllen[0] = baslen;
159+
displ[0] = pos1;
160+
types[0] = c_info->etype;
169161

170162
if (Bmark->fpointer == indv_block) {
171163
/* July 2002 fix V2.2.1: handle empty view case separately */
172164
if (baslen > 0) {
165+
MPI_Datatype new_type;
173166
/* end change */
174-
ierr = MPI_Type_create_struct(3, bllen, displ, types, &c_info->view);
167+
ierr = MPI_Type_create_struct(1, bllen, displ, types, &new_type);
168+
IMB_err_hand(1, ierr);
169+
ierr = MPI_Type_commit(&new_type);
170+
IMB_err_hand(1, ierr);
171+
172+
ierr = MPI_Type_create_resized(new_type, 0, size, &c_info->view);
175173
IMB_err_hand(1, ierr);
176174
ierr = MPI_Type_commit(&c_info->view);
177175
IMB_err_hand(1, ierr);
176+
177+
ierr = MPI_Type_free(&new_type);
178+
IMB_err_hand(1, ierr);
179+
178180
c_info->filetype = c_info->view;
179181

180182
/* July 2002 fix V2.2.1: handle empty case */
@@ -189,7 +191,7 @@ In/out variables:
189191
if (Bmark->access == get)
190192
IMB_set_buf(c_info, c_info->File_rank, 1, 0, 0, (baslen > 0) ? baslen - 1 : 0);
191193

192-
c_info->split.Locsize = bllen[1];
194+
c_info->split.Locsize = bllen[0];
193195
c_info->split.Offset = pos1;
194196
c_info->split.Totalsize = size;
195197
}

src_c/IMB_mem_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ In/out variables:
155155

156156

157157
/***************************************************************************/
158-
void IMB_alloc_buf(struct comm_info* c_info, char* where, size_t s_len,
158+
void IMB_alloc_buf(struct comm_info* c_info, char* where, size_t s_len,
159159
size_t r_len) {
160160
/*
161161

src_c/IMB_reduce.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ Output variables:
147147

148148
for (i = 0; i < ITERATIONS->n_sample; i++) {
149149
t1 = MPI_Wtime();
150-
ierr = MPI_Reduce((char*)c_info->s_buffer + i%ITERATIONS->s_cache_iter*ITERATIONS->s_offs,
151-
(char*)c_info->r_buffer + i%ITERATIONS->r_cache_iter*ITERATIONS->r_offs,
150+
ierr = MPI_Reduce((char*)c_info->s_buffer + i % ITERATIONS->s_cache_iter * ITERATIONS->s_offs,
151+
(char*)c_info->r_buffer + i % ITERATIONS->r_cache_iter * ITERATIONS->r_offs,
152152
s_num,
153153
c_info->red_data_type, c_info->op_type,
154154
root,
@@ -159,7 +159,7 @@ Output variables:
159159

160160
#ifdef CHECK
161161
if (c_info->rank == root) {
162-
CHK_DIFF("Reduce", c_info, (char*)c_info->r_buffer + i%ITERATIONS->r_cache_iter*ITERATIONS->r_offs, 0,
162+
CHK_DIFF("Reduce", c_info, (char*)c_info->r_buffer + i % ITERATIONS->r_cache_iter*ITERATIONS->r_offs, 0,
163163
size, size, asize,
164164
put, 0, ITERATIONS->n_sample, i,
165165
-1, &defect);

0 commit comments

Comments
 (0)