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

Commit 843b6b1

Browse files
committed
Merge pull request #669 from ggouaillardet/topic/v2.x/pmpi_vs_mpi
Topic/v2.x/pmpi vs mpi
2 parents 0a49255 + 2632718 commit 843b6b1

File tree

796 files changed

+4497
-3756
lines changed

Some content is hidden

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

796 files changed

+4497
-3756
lines changed

config/ompi_configure_options.m4

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,6 @@ case "x$enable_mpi_fortran" in
166166
;;
167167
esac
168168

169-
#
170-
# MPI profiling
171-
#
172-
173-
AC_MSG_CHECKING([if want PMPI])
174-
AC_ARG_ENABLE(mpi-profile,
175-
AC_HELP_STRING([--enable-mpi-profile],
176-
[enable MPI profiling (default: enabled)]))
177-
if test "$enable_mpi_profile" != "no"; then
178-
AC_MSG_RESULT([yes])
179-
WANT_MPI_PROFILING=1
180-
MPIF_H_PMPI_W_FUNCS=", PMPI_WTICK, PMPI_WTIME"
181-
else
182-
AC_MSG_RESULT([no])
183-
WANT_MPI_PROFILING=0
184-
MPIF_H_PMPI_W_FUNCS=
185-
fi
186-
AC_SUBST(MPIF_H_PMPI_W_FUNCS)
187-
AM_CONDITIONAL(WANT_MPI_PROFILING, test "$WANT_MPI_PROFILING" = 1)
188-
189-
190169
#
191170
# C++
192171
#

config/ompi_setup_mpi_fortran.m4

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
367367

368368
# We need to have ignore TKR functionality to build the mpi_f08
369369
# module
370-
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS &&
370+
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
371371
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
372372
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
373373
OMPI_FORTRAN_F08_PREDECL=$OMPI_FORTRAN_IGNORE_TKR_PREDECL
@@ -635,11 +635,10 @@ end type test_mpi_handle],
635635
# these layers need to be built or NOT
636636

637637
AM_CONDITIONAL(BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER,
638-
[( test $WANT_MPI_PROFILING -eq 0 || test $OMPI_PROFILING_COMPILE_SEPARATELY -eq 1 ) && \
638+
[test $OMPI_PROFILING_COMPILE_SEPARATELY -eq 1 && \
639639
test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
640640
AM_CONDITIONAL(BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER,
641-
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS && \
642-
test $WANT_MPI_PROFILING -eq 1])
641+
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
643642
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS,
644643
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
645644

config/ompi_setup_mpi_profiling.m4

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
1616
# reserved.
1717
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
18+
# Copyright (c) 2015 Research Organization for Information Science
19+
# and Technology (RIST). All rights reserved.
1820
# $COPYRIGHT$
1921
#
2022
# Additional copyrights may follow
@@ -39,14 +41,10 @@ AC_DEFUN([OMPI_SETUP_MPI_PROFILING],[
3941
#
4042

4143
AM_CONDITIONAL(BUILD_MPI_BINDINGS_LAYER,
42-
test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
44+
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
4345

44-
AM_CONDITIONAL(BUILD_PMPI_BINDINGS_LAYER,
45-
test "$WANT_MPI_PROFILING" = 1)
4646
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
4747
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
48-
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING,
49-
[Whether we want MPI profiling or not])
5048
AC_DEFINE_UNQUOTED(OPAL_HAVE_WEAK_SYMBOLS, $OPAL_C_HAVE_WEAK_SYMBOLS,
5149
[Whether we have weak symbols or not])
5250
])

configure.ac

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,10 @@ fi
495495
if test "$WANT_WEAK_SYMBOLS" = "0"; then
496496
OPAL_C_HAVE_WEAK_SYMBOLS=0
497497
fi
498-
if test "$WANT_MPI_PROFILING" = "1"; then
499-
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
500-
OMPI_PROFILING_COMPILE_SEPARATELY=0
501-
else
502-
OMPI_PROFILING_COMPILE_SEPARATELY=1
503-
fi
504-
else
498+
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
505499
OMPI_PROFILING_COMPILE_SEPARATELY=0
500+
else
501+
OMPI_PROFILING_COMPILE_SEPARATELY=1
506502
fi
507503

508504
# Check if we support the offsetof compiler directive
@@ -547,13 +543,7 @@ m4_ifdef([project_ompi], [OMPI_SETUP_JAVA_BINDINGS])
547543
##################################
548544

549545
# Setup profiling bindings (if we're building the relevant projects).
550-
# Note that opal_wrapper.c has a hard-coded use of the
551-
# OMPI_ENABLE_MPI_PROFILING macro, so we need to define it (to 0) even
552-
# if we're not building the OMPI project.
553-
554-
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_PROFILING],
555-
[AC_DEFINE([OMPI_ENABLE_MPI_PROFILING], [0],
556-
[We are not building OMPI, so no profiling])])
546+
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_PROFILING])
557547
m4_ifdef([project_oshmem], [OSHMEM_SETUP_PROFILING])
558548

559549

ompi/Makefile.am

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
1616
# reserved.
1717
# Copyright (c) 2015 Intel, Inc. All rights reserved.
18+
# Copyright (c) 2015 Research Organization for Information Science
19+
# and Technology (RIST). All rights reserved.
1820
# $COPYRIGHT$
1921
#
2022
# Additional copyrights may follow
@@ -29,11 +31,7 @@ c_mpi_lib = mpi/c/libmpi_c_mpi.la mpi/tool/libmpi_mpit.la
2931
else
3032
c_mpi_lib =
3133
endif
32-
if BUILD_PMPI_BINDINGS_LAYER
3334
c_pmpi_lib = mpi/c/profile/libmpi_c_pmpi.la mpi/tool/profile/libmpi_pmpit.la
34-
else
35-
c_pmpi_lib =
36-
endif
3735

3836
# See if we have Fortran mpif.h MPI bindings
3937

ompi/mca/coll/libnbc/nbc_iallgather.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype
5858
rank = ompi_comm_rank (comm);
5959
p = ompi_comm_size (comm);
6060

61-
res = MPI_Type_extent(recvtype, &rcvext);
61+
res = ompi_datatype_type_extent(recvtype, &rcvext);
6262
if (MPI_SUCCESS != res) {
6363
return res;
6464
}
@@ -175,9 +175,9 @@ int ompi_coll_libnbc_iallgather_inter(const void* sendbuf, int sendcount, MPI_Da
175175
NBC_Handle *handle;
176176
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
177177

178-
res = MPI_Type_extent(recvtype, &rcvext);
178+
res = ompi_datatype_type_extent(recvtype, &rcvext);
179179
if (MPI_SUCCESS != res) {
180-
NBC_Error ("MPI Error in MPI_Type_extent() (%i)", res);
180+
NBC_Error ("MPI Error in ompi_datatype_type_extent() (%i)", res);
181181
return res;
182182
}
183183

ompi/mca/coll/libnbc/nbc_iallgatherv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ int ompi_coll_libnbc_iallgatherv(const void* sendbuf, int sendcount, MPI_Datatyp
4545
rank = ompi_comm_rank (comm);
4646
p = ompi_comm_size (comm);
4747

48-
res = MPI_Type_extent (recvtype, &rcvext);
48+
res = ompi_datatype_type_extent (recvtype, &rcvext);
4949
if (OPAL_UNLIKELY(MPI_SUCCESS != res)) {
50-
NBC_Error ("MPI Error in MPI_Type_extent() (%i)", res);
50+
NBC_Error ("MPI Error in ompi_datatype_type_extent() (%i)", res);
5151
return res;
5252
}
5353

@@ -124,9 +124,9 @@ int ompi_coll_libnbc_iallgatherv_inter(const void* sendbuf, int sendcount, MPI_D
124124

125125
rsize = ompi_comm_remote_size (comm);
126126

127-
res = MPI_Type_extent(recvtype, &rcvext);
127+
res = ompi_datatype_type_extent(recvtype, &rcvext);
128128
if (OPAL_UNLIKELY(MPI_SUCCESS != res)) {
129-
NBC_Error ("MPI Error in MPI_Type_extent() (%i)", res);
129+
NBC_Error ("MPI Error in ompi_datatype_type_extent() (%i)", res);
130130
return res;
131131
}
132132

ompi/mca/coll/libnbc/nbc_iallreduce.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ int ompi_coll_libnbc_iallreduce(const void* sendbuf, void* recvbuf, int count, M
7070

7171
res = ompi_datatype_get_extent(datatype, &lb, &ext);
7272
if (OMPI_SUCCESS != res) {
73-
NBC_Error ("MPI Error in MPI_Type_extent() (%i)", res);
73+
NBC_Error ("MPI Error in ompi_datatype_type_extent() (%i)", res);
7474
return res;
7575
}
7676

7777
res = ompi_datatype_type_size (datatype, &size);
7878
if (OMPI_SUCCESS != res) {
79-
NBC_Error ("MPI Error in MPI_Type_size() (%i)", res);
79+
NBC_Error ("MPI Error in ompi_datatype_type_size() (%i)", res);
8080
return res;
8181
}
8282

@@ -193,7 +193,8 @@ int ompi_coll_libnbc_iallreduce_inter(const void* sendbuf, void* recvbuf, int co
193193
struct ompi_communicator_t *comm, ompi_request_t ** request,
194194
struct mca_coll_base_module_2_1_0_t *module)
195195
{
196-
int rank, res, size, rsize;
196+
int rank, res, rsize;
197+
size_t size;
197198
MPI_Aint ext;
198199
NBC_Schedule *schedule;
199200
NBC_Handle *handle;
@@ -202,15 +203,15 @@ int ompi_coll_libnbc_iallreduce_inter(const void* sendbuf, void* recvbuf, int co
202203
rank = ompi_comm_rank (comm);
203204
rsize = ompi_comm_remote_size (comm);
204205

205-
res = MPI_Type_extent(datatype, &ext);
206+
res = ompi_datatype_type_extent(datatype, &ext);
206207
if (MPI_SUCCESS != res) {
207-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
208+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
208209
return res;
209210
}
210211

211-
res = MPI_Type_size(datatype, &size);
212+
res = ompi_datatype_type_size(datatype, &size);
212213
if (MPI_SUCCESS != res) {
213-
NBC_Error("MPI Error in MPI_Type_size() (%i)", res);
214+
NBC_Error("MPI Error in ompi_datatype_type_size() (%i)", res);
214215
return res;
215216
}
216217

ompi/mca/coll/libnbc/nbc_ialltoall.c

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
5151
MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request,
5252
struct mca_coll_base_module_2_1_0_t *module)
5353
{
54-
int rank, p, res, a2asize, sndsize, datasize;
54+
int rank, p, res, datasize;
55+
size_t a2asize, sndsize;
5556
NBC_Schedule *schedule;
5657
MPI_Aint rcvext, sndext;
5758
#ifdef NBC_CACHE_SCHEDULE
@@ -67,21 +68,21 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
6768
rank = ompi_comm_rank (comm);
6869
p = ompi_comm_size (comm);
6970

70-
res = MPI_Type_extent(sendtype, &sndext);
71+
res = ompi_datatype_type_extent(sendtype, &sndext);
7172
if (MPI_SUCCESS != res) {
72-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
73+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
7374
return res;
7475
}
7576

76-
res = MPI_Type_extent(recvtype, &rcvext);
77+
res = ompi_datatype_type_extent(recvtype, &rcvext);
7778
if (MPI_SUCCESS != res) {
78-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
79+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
7980
return res;
8081
}
8182

82-
res = MPI_Type_size(sendtype, &sndsize);
83+
res = ompi_datatype_type_size(sendtype, &sndsize);
8384
if (MPI_SUCCESS != res) {
84-
NBC_Error("MPI Error in MPI_Type_size() (%i)", res);
85+
NBC_Error("MPI Error in ompi_datatype_type_size() (%i)", res);
8586
return res;
8687
}
8788

@@ -93,7 +94,7 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
9394
* total communicated size is smaller than 1<<17 *and* if we don't
9495
* have eager messages (msgsize < 1<<13) */
9596
alg = NBC_A2A_LINEAR;
96-
} else if(a2asize < (1<<12)*p) {
97+
} else if(a2asize < (1<<12)*(unsigned int)p) {
9798
/*alg = NBC_A2A_DISS;*/
9899
alg = NBC_A2A_LINEAR;
99100
} else
@@ -120,9 +121,9 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
120121
if(NBC_Type_intrinsic(sendtype)) {
121122
datasize = sndext * sendcount;
122123
} else {
123-
res = MPI_Pack_size (sendcount, sendtype, comm, &datasize);
124+
res = PMPI_Pack_size (sendcount, sendtype, comm, &datasize);
124125
if (MPI_SUCCESS != res) {
125-
NBC_Error("MPI Error in MPI_Pack_size() (%i)", res);
126+
NBC_Error("MPI Error in PMPI_Pack_size() (%i)", res);
126127
NBC_Return_handle (handle);
127128
return res;
128129
}
@@ -156,20 +157,20 @@ int ompi_coll_libnbc_ialltoall(const void* sendbuf, int sendcount, MPI_Datatype
156157
int pos=0;
157158

158159
/* non-contiguous - pack */
159-
res = MPI_Pack ((char *) sendbuf + rank * sendcount * sndext, (p - rank) * sendcount, sendtype, handle->tmpbuf,
160+
res = PMPI_Pack ((char *) sendbuf + rank * sendcount * sndext, (p - rank) * sendcount, sendtype, handle->tmpbuf,
160161
(p - rank) * datasize, &pos, comm);
161162
if (OPAL_UNLIKELY(MPI_SUCCESS != res)) {
162-
NBC_Error("MPI Error in MPI_Pack() (%i)", res);
163+
NBC_Error("MPI Error in PMPI_Pack() (%i)", res);
163164
NBC_Return_handle (handle);
164165
return res;
165166
}
166167

167168
if (rank != 0) {
168169
pos = 0;
169-
res = MPI_Pack(sendbuf, rank * sendcount, sendtype, (char *) handle->tmpbuf + datasize * (p - rank),
170+
res = PMPI_Pack(sendbuf, rank * sendcount, sendtype, (char *) handle->tmpbuf + datasize * (p - rank),
170171
rank * datasize, &pos, comm);
171172
if (OPAL_UNLIKELY(MPI_SUCCESS != res)) {
172-
NBC_Error("MPI Error in MPI_Pack() (%i)", res);
173+
NBC_Error("MPI Error in PMPI_Pack() (%i)", res);
173174
NBC_Return_handle (handle);
174175
return res;
175176
}
@@ -277,15 +278,15 @@ int ompi_coll_libnbc_ialltoall_inter (const void* sendbuf, int sendcount, MPI_Da
277278

278279
rsize = ompi_comm_remote_size (comm);
279280

280-
res = MPI_Type_extent (sendtype, &sndext);
281+
res = ompi_datatype_type_extent (sendtype, &sndext);
281282
if (MPI_SUCCESS != res) {
282-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
283+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
283284
return res;
284285
}
285286

286-
res = MPI_Type_extent (recvtype, &rcvext);
287+
res = ompi_datatype_type_extent (recvtype, &rcvext);
287288
if (MPI_SUCCESS != res) {
288-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
289+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
289290
return res;
290291
}
291292

@@ -415,9 +416,9 @@ static inline int a2a_sched_diss(int rank, int p, MPI_Aint sndext, MPI_Aint rcve
415416
if(NBC_Type_intrinsic(sendtype)) {
416417
datasize = sndext*sendcount;
417418
} else {
418-
res = MPI_Pack_size(sendcount, sendtype, comm, &datasize);
419+
res = PMPI_Pack_size(sendcount, sendtype, comm, &datasize);
419420
if (MPI_SUCCESS != res) {
420-
NBC_Error("MPI Error in MPI_Pack_size() (%i)", res);
421+
NBC_Error("MPI Error in PMPI_Pack_size() (%i)", res);
421422
return res;
422423
}
423424
}

ompi/mca/coll/libnbc/nbc_ialltoallv.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ int ompi_coll_libnbc_ialltoallv(const void* sendbuf, const int *sendcounts, cons
3737
rank = ompi_comm_rank (comm);
3838
p = ompi_comm_size (comm);
3939

40-
res = MPI_Type_extent (sendtype, &sndext);
40+
res = ompi_datatype_type_extent (sendtype, &sndext);
4141
if (MPI_SUCCESS != res) {
42-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
42+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
4343
return res;
4444
}
4545

46-
res = MPI_Type_extent (recvtype, &rcvext);
46+
res = ompi_datatype_type_extent (recvtype, &rcvext);
4747
if (MPI_SUCCESS != res) {
48-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
48+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
4949
return res;
5050
}
5151

@@ -128,15 +128,15 @@ int ompi_coll_libnbc_ialltoallv_inter (const void* sendbuf, const int *sendcount
128128
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
129129

130130

131-
res = MPI_Type_extent(sendtype, &sndext);
131+
res = ompi_datatype_type_extent(sendtype, &sndext);
132132
if (MPI_SUCCESS != res) {
133-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
133+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
134134
return res;
135135
}
136136

137-
res = MPI_Type_extent(recvtype, &rcvext);
137+
res = ompi_datatype_type_extent(recvtype, &rcvext);
138138
if (MPI_SUCCESS != res) {
139-
NBC_Error("MPI Error in MPI_Type_extent() (%i)", res);
139+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
140140
return res;
141141
}
142142

0 commit comments

Comments
 (0)