commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
April 2015
- 1 participants
- 54 discussions
[mpich] MPICH primary repository branch, master, updated. v3.2b2-26-gb1820e5
by noreply@mpich.org 30 Apr '15
by noreply@mpich.org 30 Apr '15
30 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via b1820e5527045e5ea9c2b11d088615bdbf87dcfa (commit)
via 8f1763f994443106397ec72dc74195d61e03103d (commit)
from 66b5407abfad38afd96cb3c71c1c99aaad2bd648 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/b1820e5527045e5ea9c2b11d088615bdb…
commit b1820e5527045e5ea9c2b11d088615bdbf87dcfa
Author: Jeff Hammond <jeff.science(a)gmail.com>
Date: Wed Apr 22 09:12:48 2015 -0700
add comments and double precision cases
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/test/mpi/f90/f90types/createf90types.c b/test/mpi/f90/f90types/createf90types.c
index 641b63a..7fdf1ab 100644
--- a/test/mpi/f90/f90types/createf90types.c
+++ b/test/mpi/f90/f90types/createf90types.c
@@ -11,7 +11,8 @@
#include <string.h>
#include "mpitest.h"
-static int cases[3][2] = {{3,10},{3,MPI_UNDEFINED},{MPI_UNDEFINED,10}};
+static int cases[6][2] = {{3,10},{3,MPI_UNDEFINED},{MPI_UNDEFINED,10},
+ {7,30},{7,MPI_UNDEFINED},{MPI_UNDEFINED,30}};
/*
static char MTEST_Descrip[] = "Test the routines to access the Fortran 90 datatypes from C";
@@ -149,16 +150,16 @@ int main( int argc, char *argv[] )
for (i=0; i<nLoop; i++) {
- /* These should be a valid type similar to MPI_REAL */
- for (j=0; j<3; j++) {
+ /* These should be a valid type similar to MPI_REAL and MPI_REAL8 */
+ for (j=0; j<6; j++) {
p = cases[j][0];
r = cases[j][1];
err = MPI_Type_create_f90_real( p, r, &newtype );
errs += checkType( "REAL", p, r, MPI_COMBINER_F90_REAL, err, newtype );
}
- /* These should be a valid type similar to MPI_COMPLEX */
- for (j=0; j<3; j++) {
+ /* These should be a valid type similar to MPI_COMPLEX and MPI_COMPLEX8 */
+ for (j=0; j<6; j++) {
p = cases[j][0];
r = cases[j][1];
err = MPI_Type_create_f90_complex( p, r, &newtype );
http://git.mpich.org/mpich.git/commitdiff/8f1763f994443106397ec72dc74195d61…
commit 8f1763f994443106397ec72dc74195d61e03103d
Author: Jeff Hammond <jeff.science(a)gmail.com>
Date: Wed Apr 22 09:09:53 2015 -0700
compress test cases with loop
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/test/mpi/f90/f90types/createf90types.c b/test/mpi/f90/f90types/createf90types.c
index 864e40f..641b63a 100644
--- a/test/mpi/f90/f90types/createf90types.c
+++ b/test/mpi/f90/f90types/createf90types.c
@@ -11,6 +11,8 @@
#include <string.h>
#include "mpitest.h"
+static int cases[3][2] = {{3,10},{3,MPI_UNDEFINED},{MPI_UNDEFINED,10}};
+
/*
static char MTEST_Descrip[] = "Test the routines to access the Fortran 90 datatypes from C";
*/
@@ -132,7 +134,7 @@ int main( int argc, char *argv[] )
int p, r;
int errs = 0;
int err;
- int i, nLoop = 1;
+ int i, j, nLoop = 1;
MPI_Datatype newtype;
MTest_Init(0,0);
@@ -146,42 +148,27 @@ int main( int argc, char *argv[] )
MPI_Comm_set_errhandler( MPI_COMM_WORLD, MPI_ERRORS_RETURN );
for (i=0; i<nLoop; i++) {
- /* printf( "+" );fflush(stdout); */
- /* This should be a valid type similar to MPI_REAL */
- p = 3;
- r = 10;
- err = MPI_Type_create_f90_real( p, r, &newtype );
- errs += checkType( "REAL", p, r, MPI_COMBINER_F90_REAL, err, newtype );
-
- r = MPI_UNDEFINED;
- err = MPI_Type_create_f90_real( p, r, &newtype );
- errs += checkType( "REAL", p, r, MPI_COMBINER_F90_REAL, err, newtype );
-
- p = MPI_UNDEFINED;
- r = 10;
- err = MPI_Type_create_f90_real( p, r, &newtype );
- errs += checkType( "REAL", p, r, MPI_COMBINER_F90_REAL, err, newtype );
+
+ /* These should be a valid type similar to MPI_REAL */
+ for (j=0; j<3; j++) {
+ p = cases[j][0];
+ r = cases[j][1];
+ err = MPI_Type_create_f90_real( p, r, &newtype );
+ errs += checkType( "REAL", p, r, MPI_COMBINER_F90_REAL, err, newtype );
+ }
- /* This should be a valid type similar to MPI_COMPLEX */
- p = 3;
- r = 10;
- err = MPI_Type_create_f90_complex( p, r, &newtype );
- errs += checkType( "COMPLEX", p, r, MPI_COMBINER_F90_COMPLEX,
- err, newtype );
-
- r = MPI_UNDEFINED;
- err = MPI_Type_create_f90_complex( p, r, &newtype );
- errs += checkType( "COMPLEX", p, r, MPI_COMBINER_F90_COMPLEX,
- err, newtype );
-
- p = MPI_UNDEFINED;
- r = 10;
- err = MPI_Type_create_f90_complex( p, r, &newtype );
- errs += checkType( "COMPLEX", p, r, MPI_COMBINER_F90_COMPLEX,
- err, newtype );
+ /* These should be a valid type similar to MPI_COMPLEX */
+ for (j=0; j<3; j++) {
+ p = cases[j][0];
+ r = cases[j][1];
+ err = MPI_Type_create_f90_complex( p, r, &newtype );
+ errs += checkType( "COMPLEX", p, r, MPI_COMBINER_F90_COMPLEX,
+ err, newtype );
+ }
/* This should be a valid type similar to MPI_INTEGER */
p = 3;
+ r = 10;
err = MPI_Type_create_f90_integer( p, &newtype );
errs += checkType( "INTEGER", p, r, MPI_COMBINER_F90_INTEGER,
err, newtype );
-----------------------------------------------------------------------
Summary of changes:
test/mpi/f90/f90types/createf90types.c | 54 ++++++++++++-------------------
1 files changed, 21 insertions(+), 33 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-24-g66b5407
by noreply@mpich.org 29 Apr '15
by noreply@mpich.org 29 Apr '15
29 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 66b5407abfad38afd96cb3c71c1c99aaad2bd648 (commit)
from cdf23c555a25d30b795896280b259d15d8ea0bdc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/66b5407abfad38afd96cb3c71c1c99aaa…
commit 66b5407abfad38afd96cb3c71c1c99aaad2bd648
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Apr 28 13:24:57 2015 -0500
fixup: correctly const-ify hint processing routine
No reviewer
diff --git a/src/mpi/romio/test/syshints.c b/src/mpi/romio/test/syshints.c
index e9952aa..52d503d 100755
--- a/src/mpi/romio/test/syshints.c
+++ b/src/mpi/romio/test/syshints.c
@@ -14,7 +14,7 @@ static void handle_error(int errcode, const char *str)
#define CHECK(fn) {int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); }
-static int hint_check(MPI_Info info_used, char * key, char *expected) {
+static int hint_check(MPI_Info info_used, const char * key, const char *expected) {
char value[MPI_MAX_INFO_VAL+1];
int flag;
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/test/syshints.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-23-gcdf23c5
by noreply@mpich.org 29 Apr '15
by noreply@mpich.org 29 Apr '15
29 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via cdf23c555a25d30b795896280b259d15d8ea0bdc (commit)
from d14132727ec37ec61bb22cc1f7f80fd8bf41e447 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/cdf23c555a25d30b795896280b259d15d…
commit cdf23c555a25d30b795896280b259d15d8ea0bdc
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Apr 28 14:19:15 2015 -0500
test case for large gather
see #1767
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 5c3bd05..6cfaa34 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -575,6 +575,7 @@
/coll/bcastzerotype
/coll/gather
/coll/gather2
+/coll/gather_big
/coll/iallred
/coll/ibarrier
/coll/icalltoallv
diff --git a/test/mpi/coll/Makefile.am b/test/mpi/coll/Makefile.am
index 0ab3079..6c7a2ed 100644
--- a/test/mpi/coll/Makefile.am
+++ b/test/mpi/coll/Makefile.am
@@ -52,6 +52,7 @@ noinst_PROGRAMS = \
exscan2 \
gather \
gather2 \
+ gather_big \
iallred \
ibarrier \
icallgather \
diff --git a/test/mpi/coll/gather_big.c b/test/mpi/coll/gather_big.c
new file mode 100644
index 0000000..58d15d3
--- /dev/null
+++ b/test/mpi/coll/gather_big.c
@@ -0,0 +1,84 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2015 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "mpi.h"
+#include "mpitest.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define ROOT 7
+#if 0
+/* Following should always work for -n 8 256, -N 32, using longs */
+#define COUNT 1048576*32
+#endif
+#if 1
+/* Following will fail always work for -n 8 unless gather path is 64 bit clean */
+#define COUNT 1048576*32+1
+#endif
+#define VERIFY_CONST 100000000L
+
+int
+main(int argc, char *argv[])
+{
+ int rank, size;
+ int i, j;
+ long *sendbuf;
+ long *recvbuf;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+ sendbuf = malloc(COUNT * sizeof(long));
+ if (sendbuf == NULL) {
+ fprintf(stderr, "PE %d:ERROR: malloc of sendbuf failed\n", rank);
+ }
+ for (i = 0; i < COUNT; i++) {
+ sendbuf[i] = (long) i + (long) rank * VERIFY_CONST;
+ }
+
+ if (rank == ROOT) {
+ recvbuf = malloc(COUNT * sizeof(long) * size);
+ if (recvbuf == NULL) {
+ fprintf(stderr, "PE %d:ERROR: malloc of recvbuf failed\n", rank);
+ }
+ for (i = 0; i < COUNT * size; i++) {
+ recvbuf[i] = -456789L;
+ }
+ }
+
+ MPI_Gather(sendbuf, COUNT, MPI_LONG, recvbuf, COUNT, MPI_LONG,
+ ROOT, MPI_COMM_WORLD);
+
+ int lerr = 0;
+ if (rank == ROOT) {
+ for (i = 0; i < size; i++) {
+ for (j = 0; j < COUNT; j++) {
+ if (recvbuf[i * COUNT + j] != i * VERIFY_CONST + j) {
+ printf("PE 0: mis-match error");
+ printf(" recbuf[%d * %d + %d] = ", i, COUNT, j);
+ printf(" %ld,", recvbuf[i * COUNT + j]);
+ printf(" should be %ld\n", i * VERIFY_CONST + j);
+ lerr++;
+ if (lerr > 10) {
+ j = COUNT;
+ }
+ }
+ }
+ }
+ MTest_Finalize(lerr);
+ free(recvbuf);
+ } else {
+ MTest_Finalize(lerr);
+ }
+
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Finalize();
+
+ free(sendbuf);
+ return 0;
+}
+
diff --git a/test/mpi/coll/testlist b/test/mpi/coll/testlist
index 2c8d5fe..765ca7a 100644
--- a/test/mpi/coll/testlist
+++ b/test/mpi/coll/testlist
@@ -78,6 +78,7 @@ exscan 10
exscan2 5
gather 4
gather2 4
+gather_big 8 xfail=ticket1767
scattern 4
scatter2 4
scatter3 4
-----------------------------------------------------------------------
Summary of changes:
test/mpi/.gitignore | 1 +
test/mpi/coll/Makefile.am | 1 +
test/mpi/coll/gather_big.c | 84 ++++++++++++++++++++++++++++++++++++++++++++
test/mpi/coll/testlist | 1 +
4 files changed, 87 insertions(+), 0 deletions(-)
create mode 100644 test/mpi/coll/gather_big.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-22-gd141327
by noreply@mpich.org 29 Apr '15
by noreply@mpich.org 29 Apr '15
29 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via d14132727ec37ec61bb22cc1f7f80fd8bf41e447 (commit)
via 90100837742c4c8700cc919e9b3234f957e48666 (commit)
via 4d93cefa8f2fb06fdc47d8f73ed46c3623b8dfd6 (commit)
from 9fee068ca22d54d4c0b6d205f6214cfdb4174e14 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/d14132727ec37ec61bb22cc1f7f80fd8b…
commit d14132727ec37ec61bb22cc1f7f80fd8bf41e447
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Sat Apr 25 19:15:48 2015 -0500
Added support for static compilation.
If the user passes the -static flag, we disable interlibrary
dependencies, since the linker would pick the static versions of the
libraries in that case.
We are still making an assumption that the default mode of the linker
is shared, and the user can specify static library builds with
-static. However, this is not always true. On BG/Q, for example, the
default is static.
Fixes #2190.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in
index 6d0cb7f..a817989 100644
--- a/src/env/mpicc.bash.in
+++ b/src/env/mpicc.bash.in
@@ -86,6 +86,7 @@ fi
linking=yes
allargs=("$@")
argno=0
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -99,6 +100,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpicc (e.g., -show,
# -cc=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -208,7 +212,7 @@ final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICC_LDFLAGS@"
final_libs="@MPICH_MPICC_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in
index a4886ee..7b88647 100644
--- a/src/env/mpicc.sh.in
+++ b/src/env/mpicc.sh.in
@@ -85,6 +85,7 @@ fi
linking=yes
allargs=""
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -99,6 +100,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpicc (e.g., -show,
# -cc=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -217,7 +221,7 @@ final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICC_LDFLAGS@"
final_libs="@MPICH_MPICC_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in
index 8bf93cd..865fc7f 100644
--- a/src/env/mpicxx.bash.in
+++ b/src/env/mpicxx.bash.in
@@ -83,6 +83,7 @@ fi
linking=yes
allargs=("$@")
argno=0
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -96,6 +97,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpicxx (e.g., -show,
# -cxx=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -214,7 +218,7 @@ final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICXX_LDFLAGS@"
final_libs="@MPICH_MPICXX_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in
index 41cc21a..d3dff0f 100644
--- a/src/env/mpicxx.sh.in
+++ b/src/env/mpicxx.sh.in
@@ -82,6 +82,7 @@ fi
linking=yes
allargs=""
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -96,6 +97,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpicxx (e.g., -show,
# -cxx=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -223,7 +227,7 @@ final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
final_ldflags="@MPICH_MPICXX_LDFLAGS@"
final_libs="@MPICH_MPICXX_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpif77.bash.in b/src/env/mpif77.bash.in
index e9d63cd..d3a9e95 100644
--- a/src/env/mpif77.bash.in
+++ b/src/env/mpif77.bash.in
@@ -90,6 +90,7 @@ linking=yes
allargs=("$@")
argno=0
cppflags=()
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -103,6 +104,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpif77 (e.g., -show,
# -f77=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -265,7 +269,7 @@ fi
final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
final_ldflags="@MPICH_MPIF77_LDFLAGS@"
final_libs="@MPICH_MPIF77_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpif77.sh.in b/src/env/mpif77.sh.in
index 6b9edf2..7e347bc 100644
--- a/src/env/mpif77.sh.in
+++ b/src/env/mpif77.sh.in
@@ -88,6 +88,7 @@ fi
linking=yes
allargs=""
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -102,6 +103,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpif77 (e.g., -show,
# -f77=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -287,7 +291,7 @@ fi
final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
final_ldflags="@MPICH_MPIF77_LDFLAGS@"
final_libs="@MPICH_MPIF77_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpifort.bash.in b/src/env/mpifort.bash.in
index 89ccf36..af006ee 100644
--- a/src/env/mpifort.bash.in
+++ b/src/env/mpifort.bash.in
@@ -103,6 +103,7 @@ linking=yes
allargs=("$@")
argno=0
cppflags=()
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -116,6 +117,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpifort (e.g., -show,
# -fc=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -306,7 +310,7 @@ fi
final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
final_libs="@MPICH_MPIFORT_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
diff --git a/src/env/mpifort.sh.in b/src/env/mpifort.sh.in
index 3f89f8b..0cf8e8e 100644
--- a/src/env/mpifort.sh.in
+++ b/src/env/mpifort.sh.in
@@ -101,6 +101,7 @@ fi
#
linking=yes
allargs=""
+interlib_deps=yes
for arg in "$@" ; do
# Set addarg to no if this arg should be ignored by the C compiler
addarg=yes
@@ -115,6 +116,9 @@ for arg in "$@" ; do
# ----------------------------------------------------------------
# Options that control how we use mpifort (e.g., -show,
# -fc=* -config=*
+ -static)
+ interlib_deps=no
+ ;;
-echo)
addarg=no
set -x
@@ -323,7 +327,7 @@ fi
final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
final_libs="@MPICH_MPIFORT_LIBS@"
-if test "@INTERLIB_DEPS@" = "no" ; then
+if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
fi
http://git.mpich.org/mpich.git/commitdiff/90100837742c4c8700cc919e9b3234f95…
commit 90100837742c4c8700cc919e9b3234f957e48666
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Sat Apr 25 15:47:41 2015 -0500
Cleaned up the management of wrapper flags in MPICH.
This includes several changes:
1. Merged WRAPPER and EXTERNAL LIBS. There is no reason to maintain
two names for these flags. These are eventually appended and added to
the compiler wrappers anyway.
2. Updated mpicc and friend to add the necessary flags directly
instead of trying to merge these flags in configure.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/Makefile.am b/Makefile.am
index 463bfe4..e1c7077 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,7 @@ errnames_txt_files =
external_subdirs = @mplsrcdir@ @opasrcdir@
external_ldflags = @mpllibdir@ @opalibdir@
-external_libs = @EXTERNAL_LIBS@
+external_libs = @WRAPPER_LIBS@
mpi_convenience_libs =
pmpi_convenience_libs = @mpllib@ @opalib@
diff --git a/README.vin b/README.vin
index d9dcfb6..61c147a 100644
--- a/README.vin
+++ b/README.vin
@@ -297,11 +297,11 @@ them. This is a temporary hack for certain cases that advanced
developers might be interested in, but which break existing configure
tests (e.g., -Werror). These are NOT recommended for regular users.
-(d) MPICH_MPICC_FLAGS, MPICH_MPICPP_FLAGS, MPICH_MPICXX_FLAGS,
-MPICH_MPIFC_FLAGS, MPICH_LDFLAGS and MPICH_LIBS (abbreviated as
-MPICH_MPIX_FLAGS): These flags do *not* affect the compilation of the
-MPICH library itself, but will be internally used by mpicc and
-friends.
+(d) MPICH_MPICC_CFLAGS, MPICH_MPICC_CPPFLAGS, MPICH_MPICC_LDFLAGS,
+MPICH_MPICC_LIBS, and so on for MPICXX, MPIF77 and MPIFORT
+(abbreviated as MPICH_MPIX_FLAGS): These flags do *not* affect the
+compilation of the MPICH library itself, but will be internally used
+by mpicc and friends.
+--------------------------------------------------------------------+
diff --git a/configure.ac b/configure.ac
index a576e09..54b2910 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,21 +269,39 @@ PAC_PREFIX_ALL_FLAGS(USER)
# as include paths).
#
# All libraries that are detected by MPICH as needed for some of its
-# functionality (such as -lpthread) should be added to EXTERNAL_LIBS
+# functionality (such as -lpthread) should be added to WRAPPER_LIBS
# so executables built within MPICH use them. If inter-library
# dependencies are not supported on the platform, these libraries are
# added to the MPICH wrappers (mpicc and friends) as well.
-PAC_PREFIX_ALL_FLAGS(WRAPPER)
-WRAPPER_CFLAGS="$CFLAGS $MPICH_MPICC_FLAGS"
-WRAPPER_CPPFLAGS="$CPPFLAGS $MPICH_MPICPP_FLAGS"
-WRAPPER_CXXFLAGS="$CXXFLAGS $MPICH_MPICXX_FLAGS"
-WRAPPER_FFLAGS="$FFLAGS $MPICH_MPIF77_FLAGS"
-WRAPPER_FCFLAGS="$FCFLAGS $MPICH_MPIFC_FLAGS"
-WRAPPER_LDFLAGS="$MPICH_LDFLAGS"
-WRAPPER_LIBS="$MPICH_LIBS"
-EXTERNAL_LIBS=""
-export EXTERNAL_LIBS
-AC_SUBST(EXTERNAL_LIBS)
+AC_SUBST(WRAPPER_CFLAGS)
+AC_SUBST(WRAPPER_CPPFLAGS)
+AC_SUBST(WRAPPER_CXXFLAGS)
+AC_SUBST(WRAPPER_FFLAGS)
+AC_SUBST(WRAPPER_FCFLAGS)
+AC_SUBST(WRAPPER_LDFLAGS)
+AC_SUBST(WRAPPER_LIBS)
+
+# MPICH_MPIx_FLAGS are used by mpicc and friends. They are like
+# WRAPPER flags, but these are provided by the user.
+AC_SUBST(MPICH_MPICC_CPPFLAGS)
+AC_SUBST(MPICH_MPICC_CFLAGS)
+AC_SUBST(MPICH_MPICC_LDFLAGS)
+AC_SUBST(MPICH_MPICC_LIBS)
+
+AC_SUBST(MPICH_MPICXX_CPPFLAGS)
+AC_SUBST(MPICH_MPICXX_CXXFLAGS)
+AC_SUBST(MPICH_MPICXX_LDFLAGS)
+AC_SUBST(MPICH_MPICXX_LIBS)
+
+AC_SUBST(MPICH_MPIF77_CPPFLAGS)
+AC_SUBST(MPICH_MPIF77_FFLAGS)
+AC_SUBST(MPICH_MPIF77_LDFLAGS)
+AC_SUBST(MPICH_MPIF77_LIBS)
+
+AC_SUBST(MPICH_MPIFORT_CPPFLAGS)
+AC_SUBST(MPICH_MPIFORT_FCFLAGS)
+AC_SUBST(MPICH_MPIFORT_LDFLAGS)
+AC_SUBST(MPICH_MPIFORT_LIBS)
# Add MPICHLIB_* to the appropriate flags
AC_ARG_VAR(MPICHLIB_CFLAGS,
@@ -1171,7 +1189,7 @@ else
AS_IF([test -s "${with_mpl_prefix}/include/mplconfig.h"],
[:],[AC_MSG_ERROR([the MPL installation in "${with_mpl_prefix}" appears broken])])
PAC_APPEND_FLAG([-I${with_mpl_prefix}/include],[CPPFLAGS])
- PAC_PREPEND_FLAG([-l${MPLLIBNAME}],[EXTERNAL_LIBS])
+ PAC_PREPEND_FLAG([-l${MPLLIBNAME}],[WRAPPER_LIBS])
PAC_APPEND_FLAG([-L${with_mpl_prefix}/lib],[WRAPPER_LDFLAGS])
mpllibdir="-L${with_mpl_prefix}/lib"
fi
@@ -1235,7 +1253,7 @@ if test "$with_openpa_prefix" = "embedded" ; then
AC_MSG_WARN([Attempted to use the embedded OpenPA source tree in "src/openpa", but it is missing. Configuration or compilation may fail later.])
fi
elif test "$with_openpa_prefix" = "system" ; then
- PAC_PREPEND_FLAG([-l${OPALIBNAME}],[EXTERNAL_LIBS])
+ PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
elif test "$with_openpa_prefix" = "no" ; then
# The user doesn't want to use OPA. This may or may not cause MPICH to
# fail to configure/build, depending on many other factors.
@@ -1246,7 +1264,7 @@ else
AS_IF([test -s "${with_openpa_prefix}/include/opa_primitives.h" -a -s "${with_openpa_prefix}/include/opa_config.h"],
[:],[AC_MSG_ERROR([the OpenPA installation in "${with_openpa_prefix}" appears broken])])
PAC_APPEND_FLAG([-I${with_openpa_prefix}/include],[CPPFLAGS])
- PAC_PREPEND_FLAG([-l${OPALIBNAME}],[EXTERNAL_LIBS])
+ PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
if test -d ${with_openpa_prefix}/lib64 ; then
PAC_APPEND_FLAG([-L${with_openpa_prefix}/lib64],[WRAPPER_LDFLAGS])
opalibdir="-L${with_openpa_prefix}/lib64"
@@ -5331,7 +5349,6 @@ case $with_thread_package in
AC_CHECK_LIB([pthread],[pthread_key_create],have_pthreads=yes)
if test "$have_pthreads" = "yes" ; then
PAC_PREPEND_FLAG([-lpthread],[LIBS])
- PAC_PREPEND_FLAG([-lpthread],[EXTERNAL_LIBS])
fi
AC_CHECK_FUNCS(pthread_yield)
@@ -5555,7 +5572,7 @@ AC_ARG_ENABLE(checkpointing,
PAC_SET_HEADER_LIB_PATH(blcr)
PAC_PUSH_FLAG([LIBS])
PAC_CHECK_HEADER_LIB_FATAL(blcr, libcr.h, cr, cr_init)
- PAC_APPEND_FLAG([-lblcr],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lblcr],[WRAPPER_LIBS])
PAC_POP_FLAG([LIBS])
AC_DEFINE(ENABLE_CHECKPOINTING,1,[Application checkpointing enabled])
fi ],
@@ -6021,13 +6038,6 @@ AC_OUTPUT_COMMANDS([chmod a+x test/commands/cmdtests])
AC_DEFINE(HAVE_MPICHCONF,1,[Define so that we can test whether the mpichconf.h file has been included])
-# If the platform does not support inter-library dependencies,
-# add the LDFLAGS/LIBS we got so far to WRAPPERs
-if test "$INTERLIB_DEPS" = "no" ; then
- WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS $LDFLAGS"
- WRAPPER_LIBS="$WRAPPER_LIBS $EXTERNAL_LIBS"
-fi
-
if test "$USE_PMI2_API" = "yes" ; then
AC_DEFINE(USE_PMI2_API, 1, [Define if PMI2 API must be used])
fi
diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in
index eaceecc..6d0cb7f 100644
--- a/src/env/mpicc.bash.in
+++ b/src/env/mpicc.bash.in
@@ -204,6 +204,15 @@ if [ -n "$profConf" ] ; then
fi
fi
+final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
+final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICC_LDFLAGS@"
+final_libs="@MPICH_MPICC_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# -----------------------------------------------------------------------
#
# A temporary statement to invoke the compiler
@@ -229,14 +238,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir
rc=$?
else
- $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
rc=$?
fi
else
- $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ "${allargs[@]}" -I$includedir
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} "${allargs[@]}" -I$includedir
rc=$?
fi
diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in
index 51bbfb4..a4886ee 100644
--- a/src/env/mpicc.sh.in
+++ b/src/env/mpicc.sh.in
@@ -213,6 +213,15 @@ if [ -n "$profConf" ] ; then
fi
fi
+final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
+final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICC_LDFLAGS@"
+final_libs="@MPICH_MPICC_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# -----------------------------------------------------------------------
#
# A temporary statement to invoke the compiler
@@ -238,14 +247,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} $allargs -I$includedir
rc=$?
else
- $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
rc=$?
fi
else
- $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ $allargs -I$includedir
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} $allargs -I$includedir
rc=$?
fi
diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in
index 25179dd..8bf93cd 100644
--- a/src/env/mpicxx.bash.in
+++ b/src/env/mpicxx.bash.in
@@ -210,6 +210,15 @@ if [ -n "$profConf" ] ; then
fi
fi
+final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
+final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICXX_LDFLAGS@"
+final_libs="@MPICH_MPICXX_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# A temporary statement to invoke the compiler
# Place the -L before any args incase there are any mpi libraries in there.
# Eventually, we'll want to move this after any non-MPI implementation
@@ -227,14 +236,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir
rc=$?
else
- $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
rc=$?
fi
else
- $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ "${allargs[@]}" -I$includedir
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} "${allargs[@]}" -I$includedir
rc=$?
fi
diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in
index 36b9330..41cc21a 100644
--- a/src/env/mpicxx.sh.in
+++ b/src/env/mpicxx.sh.in
@@ -219,6 +219,15 @@ if [ -n "$profConf" ] ; then
fi
fi
+final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
+final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
+final_ldflags="@MPICH_MPICXX_LDFLAGS@"
+final_libs="@MPICH_MPICXX_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# A temporary statement to invoke the compiler
# Place the -L before any args incase there are any mpi libraries in there.
# Eventually, we'll want to move this after any non-MPI implementation
@@ -236,14 +245,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} $allargs -I$includedir
rc=$?
else
- $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs}
rc=$?
fi
else
- $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ $allargs -I$includedir
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} $allargs -I$includedir
rc=$?
fi
diff --git a/src/env/mpif77.bash.in b/src/env/mpif77.bash.in
index 8d2a602..e9d63cd 100644
--- a/src/env/mpif77.bash.in
+++ b/src/env/mpif77.bash.in
@@ -262,6 +262,14 @@ if [ -n "$profConf" ] ; then
fi
fi
+final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
+final_ldflags="@MPICH_MPIF77_LDFLAGS@"
+final_libs="@MPICH_MPIF77_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# A temporary statement to invoke the compiler
# Place the -L before any args incase there are any mpi libraries in there.
# Eventually, we'll want to move this after any non-MPI implementation
@@ -280,14 +288,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
+ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir
rc=$?
else
- $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@
+ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@
rc=$?
fi
else
- $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ "${allargs[@]}" -I$includedir
+ $Show $F77 $PROFILE_INCPATHS ${final_fflags} "${allargs[@]}" -I$includedir
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpif77.sh.in b/src/env/mpif77.sh.in
index 1fd760d..6b9edf2 100644
--- a/src/env/mpif77.sh.in
+++ b/src/env/mpif77.sh.in
@@ -284,6 +284,14 @@ if [ -n "$profConf" ] ; then
fi
fi
+final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
+final_ldflags="@MPICH_MPIF77_LDFLAGS@"
+final_libs="@MPICH_MPIF77_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# A temporary statement to invoke the compiler
# Place the -L before any args incase there are any mpi libraries in there.
# Eventually, we'll want to move this after any non-MPI implementation
@@ -302,14 +310,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
+ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} $allargs -I$includedir
rc=$?
else
- $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@
+ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} $allargs -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@
rc=$?
fi
else
- $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ $allargs -I$includedir
+ $Show $F77 $PROFILE_INCPATHS ${final_fflags} $allargs -I$includedir
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpifort.bash.in b/src/env/mpifort.bash.in
index 45a191d..89ccf36 100644
--- a/src/env/mpifort.bash.in
+++ b/src/env/mpifort.bash.in
@@ -303,11 +303,18 @@ elif [ -n "$FCMODINC" ] ; then
FCMODDIRS="${FCMODINC}$modincdir"
fi
+final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
+final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
+final_libs="@MPICH_MPIFORT_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# A temporary statement to invoke the compiler
# Place the -L before any args incase there are any mpi libraries in there.
# Eventually, we'll want to move this after any non-MPI implementation
# libraries
-
if [ "$linking" = yes ] ; then
# Attempt to encode rpath info into the executable if the user has not
# disabled rpath usage and some flavor of rpath makes sense on this
@@ -322,14 +329,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}"
+ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}"
rc=$?
else
- $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@
+ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@
rc=$?
fi
else
- $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS
+ $Show $FC $PROFILE_INCPATHS ${final_fcflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpifort.sh.in b/src/env/mpifort.sh.in
index 263e696..3f89f8b 100644
--- a/src/env/mpifort.sh.in
+++ b/src/env/mpifort.sh.in
@@ -320,11 +320,18 @@ elif [ -n "$FCMODINC" ] ; then
FCMODDIRS="${FCMODINC}$modincdir"
fi
+final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
+final_ldflags="@MPICH_MPIFORT_LDFLAGS@"
+final_libs="@MPICH_MPIFORT_LIBS@"
+if test "@INTERLIB_DEPS@" = "no" ; then
+ final_ldflags="$ldflags @LDFLAGS@ @WRAPPER_LDFLAGS@"
+ final_libs="$libs @LIBS@ @WRAPPER_LIBS@"
+fi
+
# A temporary statement to invoke the compiler
# Place the -L before any args incase there are any mpi libraries in there.
# Eventually, we'll want to move this after any non-MPI implementation
# libraries
-
if [ "$linking" = yes ] ; then
# Attempt to encode rpath info into the executable if the user has not
# disabled rpath usage and some flavor of rpath makes sense on this
@@ -338,14 +345,14 @@ if [ "$linking" = yes ] ; then
fi
if [ "$nativelinking" = yes ] ; then
- $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs
+ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} $allargs
rc=$?
else
- $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@
+ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} $allargs $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@
rc=$?
fi
else
- $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ $allargs $FCINCDIRS $FCMODDIRS
+ $Show $FC $PROFILE_INCPATHS ${final_fcflags} $allargs $FCINCDIRS $FCMODDIRS
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/mpi/romio/localdefs.in b/src/mpi/romio/localdefs.in
index bf057d1..94fd950 100644
--- a/src/mpi/romio/localdefs.in
+++ b/src/mpi/romio/localdefs.in
@@ -1,7 +1,7 @@
#! /bin/sh
# Append ROMIO library dependencies to the global list
-EXTERNAL_LIBS="$EXTERNAL_LIBS @LIBS@"
+WRAPPER_LIBS="$WRAPPER_LIBS @LIBS@"
MPI_OFFSET_TYPE="@MPI_OFFSET_TYPE@"
FORTRAN_MPI_OFFSET="@FORTRAN_MPI_OFFSET@"
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4
index adee81b..505746f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/subconfigure.m4
@@ -23,14 +23,14 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_IB],[
PAC_POP_FLAG(LIBS)
if test "${dcfa_found}" = "yes" ; then
AC_MSG_NOTICE([libdcfa is going to be linked.])
- PAC_APPEND_FLAG([-ldcfa],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-ldcfa],[WRAPPER_LIBS])
else
PAC_PUSH_FLAG(LIBS)
PAC_CHECK_HEADER_LIB([infiniband/verbs.h],ibverbs,ibv_open_device,ibverbs_found=yes,ibverbs_found=no)
PAC_POP_FLAG(LIBS)
if test "${ibverbs_found}" = "yes" ; then
AC_MSG_NOTICE([libibverbs is going to be linked.])
- PAC_APPEND_FLAG([-libverbs],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-libverbs],[WRAPPER_LIBS])
else
AC_MSG_ERROR([Internal error: neither ibverbs nor dcfa was found])
fi
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4
index 29f829a..3751b72 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4
@@ -37,7 +37,7 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_MXM],[
AC_MSG_ERROR(['MXM API version Problem. Are you running a recent version of MXM (at least 3.1)?'])
fi;
AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions])
- PAC_APPEND_FLAG([-lmxm],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lmxm],[WRAPPER_LIBS])
])dnl end AM_COND_IF(BUILD_NEMESIS_NETMOD_MXM,...)
])dnl end _BODY
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4
index 5705baf..093b621 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4
@@ -17,7 +17,7 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_OFI],[
PAC_SET_HEADER_LIB_PATH(ofi)
PAC_PUSH_FLAG(LIBS)
PAC_CHECK_HEADER_LIB_FATAL(ofi, rdma/fabric.h, fabric, fi_getinfo)
- PAC_APPEND_FLAG([-lfabric],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lfabric],[WRAPPER_LIBS])
PAC_POP_FLAG(LIBS)
AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions])
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4 b/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4
index 1b4db86..65d1373 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4
@@ -19,7 +19,7 @@ AM_COND_IF([BUILD_NEMESIS_NETMOD_PORTALS4],[
PAC_SET_HEADER_LIB_PATH(portals4)
PAC_PUSH_FLAG(LIBS)
PAC_CHECK_HEADER_LIB_FATAL(portals4, portals4.h, portals, PtlInit)
- PAC_APPEND_FLAG([-lportals],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lportals],[WRAPPER_LIBS])
PAC_POP_FLAG(LIBS)
AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions])
diff --git a/src/mpid/ch3/subconfigure.m4 b/src/mpid/ch3/subconfigure.m4
index 132fe59..4439a3c 100644
--- a/src/mpid/ch3/subconfigure.m4
+++ b/src/mpid/ch3/subconfigure.m4
@@ -78,7 +78,7 @@ AC_ARG_ENABLE([ftb],
PAC_SET_HEADER_LIB_PATH([ftb])
PAC_PUSH_FLAG(LIBS)
PAC_CHECK_HEADER_LIB_FATAL([ftb], [libftb.h], [ftb], [FTB_Connect])
- PAC_APPEND_FLAG([-lftb],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lftb],[WRAPPER_LIBS])
PAC_POP_FLAG(LIBS)]
)
diff --git a/src/mpid/common/hcoll/subconfigure.m4 b/src/mpid/common/hcoll/subconfigure.m4
index 0050aa9..8d7c624 100644
--- a/src/mpid/common/hcoll/subconfigure.m4
+++ b/src/mpid/common/hcoll/subconfigure.m4
@@ -5,7 +5,7 @@ AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
PAC_PUSH_FLAG(LIBS)
PAC_CHECK_HEADER_LIB([hcoll/api/hcoll_api.h],[hcoll],[hcoll_init],[have_hcoll=yes],[have_hcoll=no])
if test "$have_hcoll" = "yes" ; then
- PAC_APPEND_FLAG([-lhcoll],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lhcoll],[WRAPPER_LIBS])
fi
PAC_POP_FLAG(LIBS)
AM_CONDITIONAL([BUILD_HCOLL],[test "$have_hcoll" = "yes"])
diff --git a/src/pm/hydra/Makefile.am b/src/pm/hydra/Makefile.am
index 2958098..5a0b91b 100644
--- a/src/pm/hydra/Makefile.am
+++ b/src/pm/hydra/Makefile.am
@@ -7,7 +7,7 @@
external_subdirs = @mpl_srcdir@
external_dist_subdirs = @mpl_dist_srcdir@
external_ldflags = -L$(top_builddir)/@mpl_srcdir@
-external_libs = -lmpl @EXTERNAL_LIBS@
+external_libs = -lmpl @WRAPPER_LIBS@
bin_PROGRAMS =
noinst_HEADERS =
diff --git a/src/pm/hydra/configure.ac b/src/pm/hydra/configure.ac
index 94b7ba0..2024f9d 100644
--- a/src/pm/hydra/configure.ac
+++ b/src/pm/hydra/configure.ac
@@ -44,9 +44,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Reset link flags
PAC_RESET_LINK_FLAGS()
-EXTERNAL_LIBS=""
-export EXTERNAL_LIBS
-AC_SUBST(EXTERNAL_LIBS)
+WRAPPER_LIBS=""
+export WRAPPER_LIBS
+AC_SUBST(WRAPPER_LIBS)
PAC_ARG_STRICT
@@ -277,7 +277,7 @@ for hydra_bss_name in ${hydra_bss_names}; do
PAC_POP_FLAG(LIBS)
if test "$have_pbs_launcher" = "yes" ; then
available_launchers="$available_launchers pbs"
- PAC_APPEND_FLAG([-ltorque],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-ltorque],[WRAPPER_LIBS])
fi
available_rmks="$available_rmks pbs"
;;
@@ -518,7 +518,7 @@ for hydra_ckpointlib in ${hydra_ckpointlibs}; do
if test "$have_blcr" = "yes" ; then
AC_DEFINE(HAVE_BLCR,1,[Define if blcr is available])
available_ckpointlibs="$available_ckpointlibs blcr"
- PAC_APPEND_FLAG([-lcr],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lcr],[WRAPPER_LIBS])
fi
;;
*)
@@ -691,7 +691,7 @@ if test "$have_ftb" = "yes" ; then
# FIXME: We need to test to make sure FTB works correctly
PAC_APPEND_FLAG([-lpthread],[LIBS])
AC_DEFINE(ENABLE_FTB,1,[Define if FTB is enabled])
- PAC_APPEND_FLAG([-lftb],[EXTERNAL_LIBS])
+ PAC_APPEND_FLAG([-lftb],[WRAPPER_LIBS])
fi
AM_CONDITIONAL([hydra_have_ftb], [test "${have_ftb}" = "yes"])
http://git.mpich.org/mpich.git/commitdiff/4d93cefa8f2fb06fdc47d8f73ed46c362…
commit 4d93cefa8f2fb06fdc47d8f73ed46c3623b8dfd6
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Sat Apr 25 15:27:45 2015 -0500
Remove MPICHLIB_LDFLAGS/LIBS
It does not make sense for the user to specify LDFLAGS/LIBS that would
only be used to build the MPICH library, but not the user application.
Doing do will create a false dependency of the MPICH library on these
external libraries resulting in weird interactions with the user
application in cases where interlibrary dependencies are not
supported. We were anyway silently modifying the WRAPPER LDFLAGS/LIBS
to include these anyway, so the flags themselves were weirdly screwed
up.
This patch simply removes them instead of pretending to allow them,
but not really allowing them.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/README.vin b/README.vin
index b1ad747..d9dcfb6 100644
--- a/README.vin
+++ b/README.vin
@@ -286,10 +286,10 @@ MPICH library being compiled/linked with these flags and the flags
internally being used in mpicc and friends.
(b) MPICHLIB_CFLAGS, MPICHLIB_CPPFLAGS, MPICHLIB_CXXFLAGS,
-MPICHLIB_FFLAGS, MPICHLIB_FCFLAGS, MPICHLIB_LDFLAGS and
-MPICHLIB_LIBS (abbreviated as MPICHLIB_xFLAGS): Setting these flags
-would result in the MPICH library being compiled/linked with these
-flags. However, these flags will *not* be used by mpicc and friends.
+MPICHLIB_FFLAGS, and MPICHLIB_FCFLAGS (abbreviated as
+MPICHLIB_xFLAGS): Setting these flags would result in the MPICH
+library being compiled with these flags. However, these flags will
+*not* be used by mpicc and friends.
(c) MPICH_MAKE_CFLAGS: Setting these flags would result in MPICH's
configure tests to not use these flags, but the makefile's to use
diff --git a/configure.ac b/configure.ac
index 7a5c461..a576e09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,17 +296,11 @@ AC_ARG_VAR(MPICHLIB_FFLAGS,
[extra FFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_FCFLAGS,
[extra FCFLAGS used in building MPICH libraries])
-AC_ARG_VAR(MPICHLIB_LDFLAGS,
- [extra LDFLAGS used in building MPICH libraries])
-AC_ARG_VAR(MPICHLIB_LIBS,
- [extra LIBS used in building MPICH libraries])
CFLAGS="$CFLAGS $MPICHLIB_CFLAGS"
CPPFLAGS="$CPPFLAGS $MPICHLIB_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $MPICHLIB_CXXFLAGS"
FFLAGS="$FFLAGS $MPICHLIB_FFLAGS"
FCFLAGS="$FCFLAGS $MPICHLIB_FCFLAGS"
-LDFLAGS="$LDFLAGS $MPICHLIB_LDFLAGS"
-LIBS="$LIBS $MPICHLIB_LIBS"
dnl include all subsystem m4 fragments now that the core autoconf functionality
dnl has been setup. No fragment should do anything except define
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 2 +-
README.vin | 18 +++---
configure.ac | 64 ++++++++++---------
src/env/mpicc.bash.in | 19 +++++-
src/env/mpicc.sh.in | 19 +++++-
src/env/mpicxx.bash.in | 19 +++++-
src/env/mpicxx.sh.in | 19 +++++-
src/env/mpif77.bash.in | 18 +++++-
src/env/mpif77.sh.in | 18 +++++-
src/env/mpifort.bash.in | 19 +++++-
src/env/mpifort.sh.in | 19 +++++-
src/mpi/romio/localdefs.in | 2 +-
.../ch3/channels/nemesis/netmod/ib/subconfigure.m4 | 4 +-
.../channels/nemesis/netmod/mxm/subconfigure.m4 | 2 +-
.../channels/nemesis/netmod/ofi/subconfigure.m4 | 2 +-
.../nemesis/netmod/portals4/subconfigure.m4 | 2 +-
src/mpid/ch3/subconfigure.m4 | 2 +-
src/mpid/common/hcoll/subconfigure.m4 | 2 +-
src/pm/hydra/Makefile.am | 2 +-
src/pm/hydra/configure.ac | 12 ++--
20 files changed, 183 insertions(+), 81 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-19-g9fee068
by noreply@mpich.org 28 Apr '15
by noreply@mpich.org 28 Apr '15
28 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 9fee068ca22d54d4c0b6d205f6214cfdb4174e14 (commit)
from 7c0f2967f758e25000bbaba9181726cbf8864357 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/9fee068ca22d54d4c0b6d205f6214cfdb…
commit 9fee068ca22d54d4c0b6d205f6214cfdb4174e14
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Apr 28 09:56:24 2015 -0500
tsuite: disable namepub tests when not configured
The random configuration tests revealed that MPI name publishing
features could be disabled at configure time, but the test suite
would still run tests for them.
Signed-off-by: Sangmin Seo <sseo(a)anl.gov>
diff --git a/configure.ac b/configure.ac
index 1dd4e30..7a5c461 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2747,6 +2747,7 @@ fi
if test -n "$nameserv_name" ; then
AC_DEFINE(HAVE_NAMEPUB_SERVICE,1,[Define if a name publishing service is available])
fi
+export nameserv_name
AM_CONDITIONAL([BUILD_NAMEPUB_FILE],[test "X$nameserv_name" = "Xfile"])
AM_CONDITIONAL([BUILD_NAMEPUB_PMI],[test "X$nameserv_name" = "Xpmi"])
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index d1c2967..5c3bd05 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -187,6 +187,7 @@
/cxx/io/writeatallbenosx
/cxx/io/writeallbenosx
/cxx/pt2pt/bsend1cxx
+/cxx/spawn/testlist
/cxx/spawn/namepubx
/cxx/spawn/spawnintrax
/cxx/spawn/spawnintrax
@@ -231,6 +232,7 @@
/errors/pt2pt/proberank
/errors/pt2pt/truncmsg2
/errors/spawn/badport
+/errors/spawn/testlist
/errors/topo/cartsmall
/f77/testlist
/f77/attr/baseattr
@@ -451,6 +453,7 @@
/f08/datatype/get_elem_d
/f08/datatype/get_elem_u
/f08/rma/testlist
+/f08/spawn/testlist
/f08/io/iwriteatallf90.f90
/f08/io/iwriteatallf90
/f08/io/i_fcoll_test
@@ -1030,6 +1033,7 @@
/rma/win_shared_noncontig_put
/rma/wincall
/rma/window_creation
+/spawn/testlist
/spawn/concurrent_spawns
/spawn/disconnect
/spawn/disconnect2
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 02ea53c..4e9f418 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -415,6 +415,11 @@ if test "$FROM_MPICH" = yes ; then
if test -n "$MPICH_ENABLE_CXX" ; then
enable_cxx=$MPICH_ENABLE_CXX
fi
+ namepub_tests="#"
+ if test -n "$nameserv_name" ; then
+ namepub_tests=""
+ fi
+ AC_SUBST(namepub_tests)
fi
# Some MPI-2 implementations (including some of the MPICH shared-memory
@@ -1521,6 +1526,7 @@ AC_OUTPUT(maint/testmerge \
rma/Makefile \
rma/testlist \
spawn/Makefile \
+ spawn/testlist \
topo/Makefile \
io/Makefile \
io/testlist \
@@ -1587,6 +1593,7 @@ AC_OUTPUT(maint/testmerge \
f08/init/Makefile \
f08/info/Makefile \
f08/spawn/Makefile \
+ f08/spawn/testlist \
f08/timer/Makefile \
f08/ext/Makefile \
f08/misc/Makefile \
@@ -1604,6 +1611,7 @@ AC_OUTPUT(maint/testmerge \
cxx/init/Makefile \
cxx/rma/Makefile \
cxx/spawn/Makefile \
+ cxx/spawn/testlist \
cxx/topo/Makefile \
threads/Makefile \
threads/pt2pt/Makefile \
@@ -1624,6 +1632,7 @@ AC_OUTPUT(maint/testmerge \
errors/pt2pt/Makefile \
errors/rma/Makefile \
errors/spawn/Makefile \
+ errors/spawn/testlist \
errors/topo/Makefile \
errors/io/Makefile \
errors/cxx/Makefile \
diff --git a/test/mpi/cxx/spawn/testlist b/test/mpi/cxx/spawn/testlist.in
similarity index 68%
rename from test/mpi/cxx/spawn/testlist
rename to test/mpi/cxx/spawn/testlist.in
index 449fc1d..1dac780 100644
--- a/test/mpi/cxx/spawn/testlist
+++ b/test/mpi/cxx/spawn/testlist.in
@@ -1,4 +1,4 @@
-namepubx 2
+@namepub_tests@namepubx 2
spawnintrax 1
spawnintrax 2
spawnargvx 1
diff --git a/test/mpi/errors/spawn/testlist b/test/mpi/errors/spawn/testlist
deleted file mode 100644
index 42e6293..0000000
--- a/test/mpi/errors/spawn/testlist
+++ /dev/null
@@ -1,3 +0,0 @@
-badport 2
-unpub 1
-lookup_name 1
diff --git a/test/mpi/errors/spawn/testlist.in b/test/mpi/errors/spawn/testlist.in
new file mode 100644
index 0000000..e8ba5e3
--- /dev/null
+++ b/test/mpi/errors/spawn/testlist.in
@@ -0,0 +1,3 @@
+badport 2
+@namepub_tests@unpub 1
+@namepub_tests@lookup_name 1
diff --git a/test/mpi/f08/spawn/testlist b/test/mpi/f08/spawn/testlist.in
similarity index 60%
rename from test/mpi/f08/spawn/testlist
rename to test/mpi/f08/spawn/testlist.in
index 6bc64d0..8232e91 100644
--- a/test/mpi/f08/spawn/testlist
+++ b/test/mpi/f08/spawn/testlist.in
@@ -1,7 +1,7 @@
-namepubf90 2
+@namepub_tests@namepubf90 2
spawnf90 1
spawnargvf90 1
-connaccf90 2
+@namepub_tests@connaccf90 2
spawnmultf90 1
spawnmult2f90 2
spawnargvf03 1
diff --git a/test/mpi/f77/spawn/testlist.in b/test/mpi/f77/spawn/testlist.in
index 251c4d0..c521a92 100644
--- a/test/mpi/f77/spawn/testlist.in
+++ b/test/mpi/f77/spawn/testlist.in
@@ -1,6 +1,6 @@
-namepubf 2
+@namepub_tests@namepubf 2
spawnf 1
@F77SPAWNARGTEST@spawnargvf 1
-connaccf 2
+@namepub_tests@connaccf 2
@F77SPAWNARGTEST@spawnmultf 1
spawnmult2f 2
diff --git a/test/mpi/spawn/testlist b/test/mpi/spawn/testlist.in
similarity index 94%
rename from test/mpi/spawn/testlist
rename to test/mpi/spawn/testlist.in
index 799162a..94c4d5b 100644
--- a/test/mpi/spawn/testlist
+++ b/test/mpi/spawn/testlist.in
@@ -1,4 +1,4 @@
-namepub 2
+@namepub_tests@namepub 2
spawn1 1
spawn2 1
spawninfo1 1
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 1 +
test/mpi/.gitignore | 4 ++++
test/mpi/configure.ac | 9 +++++++++
test/mpi/cxx/spawn/{testlist => testlist.in} | 2 +-
test/mpi/errors/spawn/testlist | 3 ---
test/mpi/errors/spawn/testlist.in | 3 +++
test/mpi/f08/spawn/{testlist => testlist.in} | 4 ++--
test/mpi/f77/spawn/testlist.in | 4 ++--
test/mpi/spawn/{testlist => testlist.in} | 2 +-
9 files changed, 23 insertions(+), 9 deletions(-)
rename test/mpi/cxx/spawn/{testlist => testlist.in} (68%)
delete mode 100644 test/mpi/errors/spawn/testlist
create mode 100644 test/mpi/errors/spawn/testlist.in
rename test/mpi/f08/spawn/{testlist => testlist.in} (60%)
rename test/mpi/spawn/{testlist => testlist.in} (94%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-18-g7c0f296
by noreply@mpich.org 28 Apr '15
by noreply@mpich.org 28 Apr '15
28 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 7c0f2967f758e25000bbaba9181726cbf8864357 (commit)
via ab9f633ce90d13a51a7dc830e293b7fbe63b36a5 (commit)
via 6de3fab02b1904d52f5a935d387646b8bd9c7036 (commit)
from 2069c15edcf2aba2abfeb2ceb10033e7f8c99e14 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7c0f2967f758e25000bbaba9181726cbf…
commit 7c0f2967f758e25000bbaba9181726cbf8864357
Author: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
Date: Mon Apr 27 13:07:37 2015 -0500
Patched libtool for inter-library dependency on FreeBSD.
The latest FreeBSD production release (10.1-RELEASE) does not support
inter-library dependency but libtool cannot detect it correctly. This
patch sets the deplibs_check_method to unknown for FreeBSD, thus all
dependent shared liraries (i.e. -lpthread) can be added in mpicc.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/autogen.sh b/autogen.sh
index 5370dbf..5bdf317 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -925,12 +925,12 @@ if [ "$do_build_configure" = "yes" ] ; then
# Newer versions should have this patch already included.
if [ -f $amdir/confdb/libtool.m4 ] ; then
# There is no need to patch if we're not going to use Fortran.
- ifort_patch_requires_rebuild=no
+ libtool_patch_requires_rebuild=no
if [ $do_bindings = "yes" ] ; then
echo_n "Patching libtool.m4 for compatibility with ifort on OSX... "
patch -N -s -l $amdir/confdb/libtool.m4 maint/darwin-ifort.patch
if [ $? -eq 0 ] ; then
- ifort_patch_requires_rebuild=yes
+ libtool_patch_requires_rebuild=yes
# Remove possible leftovers, which don't imply a failure
rm -f $amdir/confdb/libtool.m4.orig
echo "done"
@@ -939,7 +939,22 @@ if [ "$do_build_configure" = "yes" ] ; then
fi
fi
- if [ $ifort_patch_requires_rebuild = "yes" ] ; then
+ # Set deplibs_check_method to unknown instead of pass_all on FreeBSD.
+ # Because the inter-library dependency is broken on the latest
+ # FreeBSD production release (10.1-RELEASE), but libtool cannot detect
+ # it correctly.
+ echo_n "Patching libtool.m4 for compatibility with inter-library dependency on FreeBSD... "
+ patch -N -s -l $amdir/confdb/libtool.m4 maint/freebsd.patch
+ if [ $? -eq 0 ] ; then
+ libtool_patch_requires_rebuild=yes
+ # Remove possible leftovers, which don't imply a failure
+ rm -f $amdir/confdb/libtool.m4.orig
+ echo "done"
+ else
+ echo "failed"
+ fi
+
+ if [ $libtool_patch_requires_rebuild = "yes" ] ; then
# Rebuild configure
(cd $amdir && $autoconf -f) || exit 1
# Reset libtool.m4 timestamps to avoid confusing make
diff --git a/maint/freebsd.patch b/maint/freebsd.patch
new file mode 100644
index 0000000..45afb60
--- /dev/null
+++ b/maint/freebsd.patch
@@ -0,0 +1,11 @@
+--- ../confdb/libtool.m4~ 2015-04-25 09:07:47.000000000 -0500
++++ ../confdb/libtool.m4 2015-04-25 09:08:17.000000000 -0500
+@@ -3503,7 +3503,7 @@
+ ;;
+ esac
+ else
+- lt_cv_deplibs_check_method=pass_all
++ lt_cv_deplibs_check_method=unknown
+ fi
+ ;;
+
http://git.mpich.org/mpich.git/commitdiff/ab9f633ce90d13a51a7dc830e293b7fbe…
commit ab9f633ce90d13a51a7dc830e293b7fbe63b36a5
Author: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
Date: Sun Apr 26 21:31:13 2015 -0500
Added function check and declaration for hstrerror.
On FreeBSD-10.1, function hstrerror is implemented in libc but its
declaration is disabled in netdb.h by default. Thus error "implicit
declaration of function hstrerrori" was reported when compiling hydra.
This patch adds two steps in hydra configure in order to transparently
fix this issue:
1. Check if function hstrerror exists (in libc).
2. Add the declaration of hstrerror if it exists in libc but the
declaration is disabled.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/pm/hydra/configure.ac b/src/pm/hydra/configure.ac
index 99aee91..94b7ba0 100644
--- a/src/pm/hydra/configure.ac
+++ b/src/pm/hydra/configure.ac
@@ -169,7 +169,11 @@ AC_SEARCH_LIBS(hstrerror, resolv,)
# Check for necessary functions
AC_CHECK_FUNCS(gettimeofday time strdup sigaction signal usleep alloca unsetenv \
strerror strsignal stat fcntl alarm isatty inet_ntop getpgid \
- setsid killpg)
+ setsid killpg hstrerror)
+
+if test "$ac_cv_func_hstrerror" = "yes" ; then
+ PAC_FUNC_NEEDS_DECL([#include <netdb.h>],hstrerror)
+fi
if test "$ac_cv_func_gettimeofday" = "yes" ; then
PAC_FUNC_NEEDS_DECL([#include <sys/time.h>],gettimeofday)
diff --git a/src/pm/hydra/include/hydra.h b/src/pm/hydra/include/hydra.h
index c14de0a..393c1de 100644
--- a/src/pm/hydra/include/hydra.h
+++ b/src/pm/hydra/include/hydra.h
@@ -157,6 +157,10 @@ extern char *HYD_dbg_prefix;
extern char **environ;
#endif /* MANUAL_EXTERN_ENVIRON */
+#if defined NEEDS_HSTRERROR_DECL
+const char * hstrerror(int err);
+#endif /* NEEDS_HSTRERROR_DECL */
+
#if defined NEEDS_GETTIMEOFDAY_DECL
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif /* NEEDS_GETTIMEOFDAY_DECL */
http://git.mpich.org/mpich.git/commitdiff/6de3fab02b1904d52f5a935d387646b8b…
commit 6de3fab02b1904d52f5a935d387646b8bd9c7036
Author: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
Date: Sun Apr 26 21:05:20 2015 -0500
Removed duplicate header check in src/pm/hydra/configure.ac.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/pm/hydra/configure.ac b/src/pm/hydra/configure.ac
index bb290c4..99aee91 100644
--- a/src/pm/hydra/configure.ac
+++ b/src/pm/hydra/configure.ac
@@ -157,7 +157,7 @@ PAC_ENABLE_COVERAGE
# Check if the necessary headers are available
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h strings.h sys/types.h sys/socket.h sched.h sys/stat.h sys/param.h \
- netinet/in.h netinet/tcp.h sys/un.h netdb.h sys/time.h time.h ifaddrs.h arpa/inet.h \
+ netinet/in.h netinet/tcp.h sys/un.h sys/time.h time.h ifaddrs.h arpa/inet.h \
poll.h fcntl.h netdb.h winsock2.h windows.h)
# These functions are in additional libraries on some platforms (like Solaris).
-----------------------------------------------------------------------
Summary of changes:
autogen.sh | 21 ++++++++++++++++++---
maint/freebsd.patch | 11 +++++++++++
src/pm/hydra/configure.ac | 8 ++++++--
src/pm/hydra/include/hydra.h | 4 ++++
4 files changed, 39 insertions(+), 5 deletions(-)
create mode 100644 maint/freebsd.patch
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-15-g2069c15
by noreply@mpich.org 27 Apr '15
by noreply@mpich.org 27 Apr '15
27 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 2069c15edcf2aba2abfeb2ceb10033e7f8c99e14 (commit)
via 34e57aa8061a911f0657997fdd522913ca8deac8 (commit)
via 4131f0fb817eb6cf579633fd889fdeb078e3b62e (commit)
via 2df00d453288a94ea759cbd381a70a8eb8d6c575 (commit)
via ec920e5f097727e72e00c37a805db45e053d2c79 (commit)
from eb69611ecdb0cd2f65dd4076a50c13d3fbc4531c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/2069c15edcf2aba2abfeb2ceb10033e7f…
commit 2069c15edcf2aba2abfeb2ceb10033e7f8c99e14
Author: Valentin Petrov <valentin.petrov(a)intel.com>
Date: Mon Apr 6 14:19:33 2015 +0400
OFI: Bug fix for RTS/CTS/DATA protocol.
MPID_nem_ofi_data_callback used to check sreq->cc in order to track progress of
the RTS/CTS/DATA protocol. The was an implicit assumption that fi_tsend with RTS
completes first. However this would cause a hang if fi_trecv completed earlier.
The fix is: don't rely on the cc but rather check the tag bits explicitly.
Note, the RTS/CTS/DATA bits are no longer accumulated (i.e., no more
"wc->tag | CTS/DATA").
Signed-off-by: Charles J Archer <charles.j.archer(a)intel.com>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
index b6a78f0..e3302ae 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
@@ -233,7 +233,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
REQ_OFI(new_rreq)->pack_buffer_size,
gl_data.mr,
VC_OFI(vc)->direct_addr,
- wc->tag | MPID_MSG_DATA, 0, &(REQ_OFI(new_rreq)->ofi_context)), trecv);
+ MPID_MSG_DATA, 0, &(REQ_OFI(new_rreq)->ofi_context)), trecv);
MPID_nem_ofi_create_req(&sreq, 1);
sreq->dev.OnDataAvail = NULL;
@@ -245,7 +245,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
0,
gl_data.mr,
VC_OFI(vc)->direct_addr,
- wc->tag | MPID_MSG_CTS, &(REQ_OFI(sreq)->ofi_context)), tsend);
+ MPID_MSG_CTS, &(REQ_OFI(sreq)->ofi_context)), tsend);
MPIU_Assert(gl_data.persistent_req == rreq);
rreq->dev.user_count = 0;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index 074b537..9352936 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -73,18 +73,18 @@
REQ_OFI(sreq)->vc = vc; \
REQ_OFI(sreq)->tag = match_bits; \
\
- MPID_nem_ofi_create_req(&cts_req, 1); \
- cts_req->dev.OnDataAvail = NULL; \
- cts_req->dev.next = NULL; \
- REQ_OFI(cts_req)->event_callback = MPID_nem_ofi_cts_recv_callback; \
- REQ_OFI(cts_req)->parent = sreq; \
+ MPID_nem_ofi_create_req(&cts_req, 1); \
+ cts_req->dev.OnDataAvail = NULL; \
+ cts_req->dev.next = NULL; \
+ REQ_OFI(cts_req)->event_callback = MPID_nem_ofi_cts_recv_callback; \
+ REQ_OFI(cts_req)->parent = sreq; \
\
- FI_RC(fi_trecv(gl_data.endpoint, \
+ FI_RC(fi_trecv(gl_data.endpoint, \
NULL, \
0, \
gl_data.mr, \
VC_OFI(vc)->direct_addr, \
- match_bits | MPID_MSG_CTS, \
+ MPID_MSG_CTS, \
0, /* Exact tag match, no ignore bits */ \
&(REQ_OFI(cts_req)->ofi_context)),trecv); \
if (gl_data.api_set == API_SET_1){ \
@@ -122,15 +122,16 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
req_fn reqFn;
uint64_t tag = 0;
BEGIN_FUNC(FCNAME);
- if (MPID_cc_get(sreq->cc) == 2) {
+ switch (wc->tag & MPID_PROTOCOL_MASK) {
+ case MPID_MSG_CTS:
vc = REQ_OFI(sreq)->vc;
- REQ_OFI(sreq)->tag = tag | MPID_MSG_DATA;
FI_RC(fi_tsend(gl_data.endpoint,
REQ_OFI(sreq)->pack_buffer,
REQ_OFI(sreq)->pack_buffer_size,
gl_data.mr,
VC_OFI(vc)->direct_addr,
MPID_MSG_DATA, (void *) &(REQ_OFI(sreq)->ofi_context)), tsend);
+ MPIDI_CH3U_Request_complete(sreq);
break;
case MPID_MSG_DATA:
if (REQ_OFI(sreq)->pack_buffer)
@@ -148,6 +149,7 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
break;
case MPID_MSG_RTS:
MPIDI_CH3U_Request_complete(sreq);
+ break;
}
END_FUNC_RC(FCNAME);
}
http://git.mpich.org/mpich.git/commitdiff/34e57aa8061a911f0657997fdd522913c…
commit 34e57aa8061a911f0657997fdd522913ca8deac8
Author: Valentin Petrov <valentin.petrov(a)intel.com>
Date: Mon Apr 6 14:24:31 2015 +0400
OFI: MPIR_Barrier_impl should not be called from MPID_nem_ofi_finalize.
It uses nemesis shared memory which is already cleaned up at this stage.
However, w/o any synchronization a hang in the close protocol is possible
since rts/cts/data messages may be on the fly. This change fixes the issue.
Signed-off-by: Charles J Archer <charles.j.archer(a)intel.com>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 619e6ff..5cab470 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -57,6 +57,7 @@ typedef struct {
MPID_Request *persistent_req; /* Unexpected request queue */
MPID_Request *conn_req; /* Connection request */
MPIDI_Comm_ops_t comm_ops;
+ int rts_cts_in_flight;
int api_set;
} MPID_nem_ofi_global_t;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
index 390d76a..40e6759 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
@@ -235,6 +235,7 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* Wait for all the ranks to publish */
/* their business card */
/* --------------------------------- */
+ gl_data.rts_cts_in_flight = 0;
PMI_Barrier();
/* --------------------------------- */
@@ -307,12 +308,9 @@ int MPID_nem_ofi_finalize(void)
mpir_errflag_t ret = MPIR_ERR_NONE;
BEGIN_FUNC(FCNAME);
- /* --------------------------------------------- */
- /* Syncronization */
- /* Barrier across all ranks in this world */
- /* --------------------------------------------- */
- MPIR_Barrier_impl(MPIR_Process.comm_world, &ret);
-
+ while(gl_data.rts_cts_in_flight) {
+ MPID_nem_ofi_poll(0);
+ }
/* --------------------------------------------- */
/* Finalize connection management routines */
/* Cancels any persistent/global requests and */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index c314946..074b537 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -60,17 +60,18 @@
/* v v */
/* ------------------------------------------------------------------------ */
#define START_COMM() \
- ({ \
- GET_PGID_AND_SET_MATCH(); \
- VC_READY_CHECK(vc); \
- c = 1; \
- MPID_cc_incr(sreq->cc_ptr, &c); \
- MPID_cc_incr(sreq->cc_ptr, &c); \
- REQ_OFI(sreq)->event_callback = MPID_nem_ofi_data_callback; \
- REQ_OFI(sreq)->pack_buffer = pack_buffer; \
- REQ_OFI(sreq)->pack_buffer_size = pkt_len; \
- REQ_OFI(sreq)->vc = vc; \
- REQ_OFI(sreq)->tag = match_bits; \
+ ({ \
+ gl_data.rts_cts_in_flight++; \
+ GET_PGID_AND_SET_MATCH(); \
+ VC_READY_CHECK(vc); \
+ c = 1; \
+ MPID_cc_incr(sreq->cc_ptr, &c); \
+ MPID_cc_incr(sreq->cc_ptr, &c); \
+ REQ_OFI(sreq)->event_callback = MPID_nem_ofi_data_callback; \
+ REQ_OFI(sreq)->pack_buffer = pack_buffer; \
+ REQ_OFI(sreq)->pack_buffer_size = pkt_len; \
+ REQ_OFI(sreq)->vc = vc; \
+ REQ_OFI(sreq)->tag = match_bits; \
\
MPID_nem_ofi_create_req(&cts_req, 1); \
cts_req->dev.OnDataAvail = NULL; \
@@ -143,8 +144,9 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
vc = REQ_OFI(sreq)->vc;
MPI_RC(reqFn(vc, sreq, &complete));
}
- }
- else {
+ gl_data.rts_cts_in_flight--;
+ break;
+ case MPID_MSG_RTS:
MPIDI_CH3U_Request_complete(sreq);
}
END_FUNC_RC(FCNAME);
http://git.mpich.org/mpich.git/commitdiff/4131f0fb817eb6cf579633fd889fdeb07…
commit 4131f0fb817eb6cf579633fd889fdeb078e3b62e
Author: Valentin Petrov <valentin.petrov(a)intel.com>
Date: Wed Apr 15 17:57:14 2015 +0400
OFI: Remove unnecessary DYNAMIC_MR capability
Signed-off-by: Charles J Archer <charles.j.archer(a)intel.com>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
index 4e0ffee..390d76a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
@@ -81,7 +81,6 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
hints->mode = FI_CONTEXT;
hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */
hints->caps = FI_TAGGED; /* Tag matching interface */
- hints->caps |= FI_DYNAMIC_MR; /* Global dynamic mem region */
hints->ep_attr->mem_tag_format = MEM_TAG_FORMAT;
MPIU_Assert(pg_p->size < ((1 << MPID_RANK_BITS) - 1));
@@ -161,21 +160,11 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* The objects include: */
/* * completion queue for events */
/* * address vector of other endpoint addresses */
- /* * dynamic memory-spanning memory region */
/* Other objects could be created (for example), but are unused in netmod */
/* * counters for incoming writes */
/* * completion counters for put and get */
/* ------------------------------------------------------------------------ */
- FI_RC(fi_mr_reg(gl_data.domain, /* In: Domain Object */
- 0, /* In: Lower memory address */
- UINTPTR_MAX, /* In: Upper memory address */
- FI_SEND | FI_RECV, /* In: Expose MR for read/write */
- 0ULL, /* In: base MR offset */
- 0ULL, /* In: requested key */
- 0ULL, /* In: No flags */
- &gl_data.mr, /* Out: memregion object */
- NULL), mr_reg); /* Context: memregion events */
-
+ gl_data.mr = NULL;
memset(&cq_attr, 0, sizeof(cq_attr));
cq_attr.format = FI_CQ_FORMAT_TAGGED;
FI_RC(fi_cq_open(gl_data.domain, /* In: Domain Object */
@@ -193,7 +182,6 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* --------------------------------------------- */
/* Bind the MR, CQ and AV to the endpoint object */
/* --------------------------------------------- */
- FI_RC(fi_ep_bind(gl_data.endpoint, (fid_t) gl_data.mr, 0), bind);
FI_RC(fi_ep_bind(gl_data.endpoint, (fid_t) gl_data.cq, FI_SEND | FI_RECV), bind);
FI_RC(fi_ep_bind(gl_data.endpoint, (fid_t) gl_data.av, 0), bind);
@@ -332,7 +320,6 @@ int MPID_nem_ofi_finalize(void)
/* --------------------------------------------- */
MPI_RC(MPID_nem_ofi_cm_finalize());
- FI_RC(fi_close((fid_t) gl_data.mr), mrclose);
FI_RC(fi_close((fid_t) gl_data.endpoint), epclose);
FI_RC(fi_close((fid_t) gl_data.av), avclose);
FI_RC(fi_close((fid_t) gl_data.cq), cqclose);
http://git.mpich.org/mpich.git/commitdiff/2df00d453288a94ea759cbd381a70a8eb…
commit 2df00d453288a94ea759cbd381a70a8eb8d6c575
Author: Valentin Petrov <valentin.petrov(a)intel.com>
Date: Fri Mar 27 11:48:28 2015 +0400
OFI: Fix memory leak in anysource cancel path
Signed-off-by: Charles J Archer <charles.j.archer(a)intel.com>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
index b0ab745..cab6c11 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
@@ -102,7 +102,7 @@ int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPI
#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_matched)
int MPID_nem_ofi_anysource_matched(MPID_Request * rreq)
{
- int mpi_errno = TRUE;
+ int matched = FALSE;
int ret;
BEGIN_FUNC(FCNAME);
/* ----------------------------------------------------- */
@@ -112,11 +112,23 @@ int MPID_nem_ofi_anysource_matched(MPID_Request * rreq)
/* ----------------------------------------------------- */
ret = fi_cancel((fid_t) gl_data.endpoint, &(REQ_OFI(rreq)->ofi_context));
if (ret == 0) {
- /* --------------------------------------------------- */
- /* Request cancelled: cancel and complete the request */
- /* --------------------------------------------------- */
- mpi_errno = FALSE;
+ /* Cancel succeded. This means that the actual message has been
+ * received via nemesis shared memory. We need to return
+ * matched=False. The request will be completed at the nemesis level.
+ *
+ * If anysource was posted for non-contig dtype then don't forget
+ * to clean up tmp space.
+ */
+ if (REQ_OFI(rreq)->pack_buffer) {
+ MPIU_Free(REQ_OFI(rreq)->pack_buffer);
+ }
+ matched = FALSE;
+ }else{
+ /* Cancel failed. We can only fail in the case of the message
+ * being already actually received via ofi fabric. return TRUE.
+ */
+ matched = TRUE;
}
END_FUNC(FCNAME);
- return mpi_errno;
+ return matched;
}
http://git.mpich.org/mpich.git/commitdiff/ec920e5f097727e72e00c37a805db45e0…
commit ec920e5f097727e72e00c37a805db45e053d2c79
Author: Valentin Petrov <valentin.petrov(a)intel.com>
Date: Fri Apr 3 18:17:35 2015 +0400
OFI: Add support for large tags using immediate data and OFI tag layouts
This patch modifies the OFI netmod to support large tag layouts, while preserving the old
tag layout. OFI defines a 64 bit tag, but also provides for a 64 bit tag and immediate data.
In some OFI providers, we may want to select different tag layouts. This patch currently
does not query for the proper tag layout or attempt to make a choice of the optimal layout,
it provides macro/templatized support for different tag formats. Additional selection
criteria will be added in subsequent patches.
* Tag layout is moved to a separate file.
Added init_sendtag_M2, init_recvtag_M2 (M2 stands for MODE #2, i.e. the mode
that uses fi_tsenddata and does not pack source into tag).
* Created a template file for ofi_tagged.c
Moved do_isend into template file which is included twice into ofi_tagged.c thus providing for the two
versions of do_isend and do_isend_2 corresponding to the two API sets.
* All send functions are available in two versions.
Added macro that declares a function for the two API sets. The first set has the namings inherited from
the previous netmod version. The functions of the second API set have the "_2" suffix.
* Recv_posted, anysource_posted, recv_callback, ofi_probe are templatized.
* ofi_tag_to_vc renamed ofi_wc_to_vc
Note, for the API_SET_2 the pgid is stored in the imm data while
psource and port will be packed the same way as in API_SET_1.
* Adds api_set member in gl_data struct. Initialize routines based on api_set
* Added RCD (RtsCtsData) protocol identifiers
* Added support for OFI MEM_TAG_FORMAT
* PGID placement modified
Signed-off-by: Charles J Archer <charles.j.archer(a)intel.com>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
index 5f12566..b6a78f0 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
@@ -22,14 +22,21 @@
/* ------------------------------------------------------------------------ */
#undef FCNAME
#define FCNAME DECL_FUNC(ofi_tag_to_vc)
-static inline MPIDI_VC_t *ofi_tag_to_vc(uint64_t match_bits)
+static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc)
{
int pgid = 0, port = 0;
MPIDI_VC_t *vc = NULL;
MPIDI_PG_t *pg = NULL;
-
+ uint64_t match_bits = wc->tag;
+ int wc_pgid;
BEGIN_FUNC(FCNAME);
- if (NO_PGID == get_pgid(match_bits)) {
+ if (gl_data.api_set == API_SET_1) {
+ wc_pgid = get_pgid(match_bits);
+ } else {
+ wc_pgid = wc->data;
+ }
+
+ if (NO_PGID == wc_pgid) {
/* -------------------------------------------------------------------- */
/* Dynamic path -- This uses a linear search, but number of cm vc's is */
/* a small number, and they should be ephemeral. This lookup should */
@@ -53,7 +60,7 @@ static inline MPIDI_VC_t *ofi_tag_to_vc(uint64_t match_bits)
pg = gl_data.pg_p;
while (pg) {
MPIDI_PG_IdToNum(pg, &pgid);
- if (get_pgid(match_bits) == pgid) {
+ if (wc_pgid == pgid) {
break;
}
pg = pg->next;
@@ -102,13 +109,13 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Re
bc[wc->len] = '\0';
MPIU_Assert(gl_data.conn_req == rreq);
FI_RC(fi_trecv(gl_data.endpoint,
- gl_data.conn_req->dev.user_buf,
- OFI_KVSAPPSTRLEN,
- gl_data.mr,
- FI_ADDR_UNSPEC,
- MPID_CONN_REQ,
- ~MPID_PROTOCOL_MASK,
- (void *) &(REQ_OFI(gl_data.conn_req)->ofi_context)), trecv);
+ gl_data.conn_req->dev.user_buf,
+ OFI_KVSAPPSTRLEN,
+ gl_data.mr,
+ FI_ADDR_UNSPEC,
+ MPID_CONN_REQ,
+ GET_RCD_IGNORE_MASK(),
+ (void *) &(REQ_OFI(gl_data.conn_req)->ofi_context)), trecv);
addr = MPIU_Malloc(gl_data.bound_addrlen);
MPIU_Assertp(addr);
@@ -204,7 +211,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
MPID_Request *new_rreq, *sreq;
BEGIN_FUNC(FCNAME);
- vc = ofi_tag_to_vc(wc->tag);
+ vc = ofi_wc_to_vc(wc);
MPIU_Assert(vc);
VC_READY_CHECK(vc);
@@ -243,12 +250,13 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
rreq->dev.user_count = 0;
FI_RC(fi_trecv(gl_data.endpoint,
- &rreq->dev.user_count,
- sizeof rreq->dev.user_count,
- gl_data.mr,
- FI_ADDR_UNSPEC,
- MPID_MSG_RTS,
- ~MPID_PROTOCOL_MASK, &(REQ_OFI(rreq)->ofi_context)), trecv);
+ &rreq->dev.user_count,
+ sizeof rreq->dev.user_count,
+ gl_data.mr,
+ FI_ADDR_UNSPEC,
+ MPID_MSG_RTS,
+ GET_RCD_IGNORE_MASK(),
+ &(REQ_OFI(rreq)->ofi_context)), trecv);
END_FUNC_RC(FCNAME);
}
@@ -289,10 +297,17 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
/* ------------------------------------- */
/* Set up CH3 and netmod data structures */
/* ------------------------------------- */
- MPI_RC(MPIDI_CH3I_Register_anysource_notification(MPID_nem_ofi_anysource_posted,
- MPID_nem_ofi_anysource_matched));
- MPIDI_Anysource_iprobe_fn = MPID_nem_ofi_anysource_iprobe;
- MPIDI_Anysource_improbe_fn = MPID_nem_ofi_anysource_improbe;
+ if (gl_data.api_set == API_SET_1) {
+ MPI_RC(MPIDI_CH3I_Register_anysource_notification(MPID_nem_ofi_anysource_posted,
+ MPID_nem_ofi_anysource_matched));
+ MPIDI_Anysource_iprobe_fn = MPID_nem_ofi_anysource_iprobe;
+ MPIDI_Anysource_improbe_fn = MPID_nem_ofi_anysource_improbe;
+ } else {
+ MPI_RC(MPIDI_CH3I_Register_anysource_notification(MPID_nem_ofi_anysource_posted_2,
+ MPID_nem_ofi_anysource_matched));
+ MPIDI_Anysource_iprobe_fn = MPID_nem_ofi_anysource_iprobe_2;
+ MPIDI_Anysource_improbe_fn = MPID_nem_ofi_anysource_improbe_2;
+ }
gl_data.pg_p = pg_p;
/* ----------------------------------- */
@@ -304,13 +319,13 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
REQ_OFI(persistent_req)->vc = NULL;
REQ_OFI(persistent_req)->event_callback = MPID_nem_ofi_preposted_callback;
FI_RC(fi_trecv(gl_data.endpoint,
- &persistent_req->dev.user_count,
- sizeof persistent_req->dev.user_count,
- gl_data.mr,
- FI_ADDR_UNSPEC,
- MPID_MSG_RTS,
- ~MPID_PROTOCOL_MASK,
- (void *) &(REQ_OFI(persistent_req)->ofi_context)), trecv);
+ &persistent_req->dev.user_count,
+ sizeof persistent_req->dev.user_count,
+ gl_data.mr,
+ FI_ADDR_UNSPEC,
+ MPID_MSG_RTS,
+ GET_RCD_IGNORE_MASK(),
+ (void *) &(REQ_OFI(persistent_req)->ofi_context)), trecv);
gl_data.persistent_req = persistent_req;
/* --------------------------------- */
@@ -323,12 +338,13 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
REQ_OFI(conn_req)->vc = NULL; /* We don't know the source yet */
REQ_OFI(conn_req)->event_callback = MPID_nem_ofi_conn_req_callback;
FI_RC(fi_trecv(gl_data.endpoint,
- conn_req->dev.user_buf,
- OFI_KVSAPPSTRLEN,
- gl_data.mr,
- FI_ADDR_UNSPEC,
- MPID_CONN_REQ,
- ~MPID_PROTOCOL_MASK, (void *) &(REQ_OFI(conn_req)->ofi_context)), trecv);
+ conn_req->dev.user_buf,
+ OFI_KVSAPPSTRLEN,
+ gl_data.mr,
+ FI_ADDR_UNSPEC,
+ MPID_CONN_REQ,
+ GET_RCD_IGNORE_MASK(),
+ (void *) &(REQ_OFI(conn_req)->ofi_context)), trecv);
gl_data.conn_req = conn_req;
@@ -536,13 +552,24 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc)
sreq->dev.next = NULL;
REQ_OFI(sreq)->event_callback = MPID_nem_ofi_connect_to_root_callback;
REQ_OFI(sreq)->pack_buffer = my_bc;
- conn_req_send_bits = init_sendtag(0, MPIR_Process.comm_world->rank, 0, MPID_CONN_REQ);
- FI_RC(fi_tsend(gl_data.endpoint,
- REQ_OFI(sreq)->pack_buffer,
- my_bc_len,
- gl_data.mr,
- VC_OFI(new_vc)->direct_addr,
- conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend);
+ if (gl_data.api_set == API_SET_1) {
+ conn_req_send_bits = init_sendtag(0, MPIR_Process.comm_world->rank, 0, MPID_CONN_REQ);
+ FI_RC(fi_tsend(gl_data.endpoint,
+ REQ_OFI(sreq)->pack_buffer,
+ my_bc_len,
+ gl_data.mr,
+ VC_OFI(new_vc)->direct_addr,
+ conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend);
+ } else {
+ conn_req_send_bits = init_sendtag_2(0, 0, MPID_CONN_REQ);
+ FI_RC(fi_tsenddata(gl_data.endpoint,
+ REQ_OFI(sreq)->pack_buffer,
+ my_bc_len,
+ gl_data.mr,
+ MPIR_Process.comm_world->rank,
+ VC_OFI(new_vc)->direct_addr,
+ conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend);
+ }
MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL);
VC_OFI(new_vc)->is_cmvc = 1;
VC_OFI(new_vc)->next = gl_data.cm_vcs;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 065920a..619e6ff 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -21,6 +21,7 @@
#include <rdma/fi_cm.h>
#include <netdb.h>
+#include "ofi_tag_layout.h"
/* ************************************************************************** */
/* Type Definitions */
/* ************************************************************************** */
@@ -56,6 +57,7 @@ typedef struct {
MPID_Request *persistent_req; /* Unexpected request queue */
MPID_Request *conn_req; /* Connection request */
MPIDI_Comm_ops_t comm_ops;
+ int api_set;
} MPID_nem_ofi_global_t;
/* ******************************** */
@@ -173,37 +175,11 @@ fn_fail: \
#define NO_PGID 0
-/* **************************************************************************
- * match/ignore bit manipulation
- * **************************************************************************
- * 0123 4567 01234567 0123 4567 01234567 0123 4567 01234567 01234567 01234567
- * | | |
- * ^ | context id | source | message tag
- * | | | |
- * +---- protocol
- * ************************************************************************** */
-#define MPID_PROTOCOL_MASK (0xF000000000000000ULL)
-#define MPID_CONTEXT_MASK (0x0FFFF00000000000ULL)
-#define MPID_SOURCE_MASK (0x00000FFFF0000000ULL)
-#define MPID_TAG_MASK (0x000000000FFFFFFFULL)
-#define MPID_PGID_MASK (0x00000000FFFFFFFFULL)
-#define MPID_PSOURCE_MASK (0x0000FFFF00000000ULL)
-#define MPID_PORT_NAME_MASK (0x0FFF000000000000ULL)
-#define MPID_SYNC_SEND (0x1000000000000000ULL)
-#define MPID_SYNC_SEND_ACK (0x2000000000000000ULL)
-#define MPID_MSG_RTS (0x3000000000000000ULL)
-#define MPID_MSG_CTS (0x4000000000000000ULL)
-#define MPID_MSG_DATA (0x5000000000000000ULL)
-#define MPID_CONN_REQ (0x6000000000000000ULL)
-#define MPID_SOURCE_SHIFT (16)
-#define MPID_TAG_SHIFT (28)
-#define MPID_PSOURCE_SHIFT (16)
-#define MPID_PORT_SHIFT (32)
-#define OFI_KVSAPPSTRLEN 1024
#define PEEK_INIT 0
#define PEEK_FOUND 1
+#define MEM_TAG_FORMAT (0xFFFF00000000LLU)
/* ******************************** */
/* Request manipulation inlines */
/* ******************************** */
@@ -224,97 +200,42 @@ static inline int MPID_nem_ofi_create_req(MPID_Request ** request, int refcnt)
return mpi_errno;
}
-/* ******************************** */
-/* Tag Manipulation inlines */
-/* ******************************** */
-static inline uint64_t init_sendtag(MPIR_Context_id_t contextid, int source, int tag, uint64_t type)
-{
- uint64_t match_bits;
- match_bits = contextid;
- match_bits = (match_bits << MPID_SOURCE_SHIFT);
- match_bits |= source;
- match_bits = (match_bits << MPID_TAG_SHIFT);
- match_bits |= (MPID_TAG_MASK & tag) | type;
- return match_bits;
-}
-
-/* receive posting */
-static inline uint64_t init_recvtag(uint64_t * mask_bits,
- MPIR_Context_id_t contextid, int source, int tag)
-{
- uint64_t match_bits = 0;
- *mask_bits = MPID_SYNC_SEND;
- match_bits = contextid;
- match_bits = (match_bits << MPID_SOURCE_SHIFT);
- if (MPI_ANY_SOURCE == source) {
- match_bits = (match_bits << MPID_TAG_SHIFT);
- *mask_bits |= MPID_SOURCE_MASK;
- }
- else {
- match_bits |= source;
- match_bits = (match_bits << MPID_TAG_SHIFT);
- }
- if (MPI_ANY_TAG == tag)
- *mask_bits |= MPID_TAG_MASK;
- else
- match_bits |= (MPID_TAG_MASK & tag);
-
- return match_bits;
-}
-
-static inline int get_tag(uint64_t match_bits)
-{
- return ((int) (match_bits & MPID_TAG_MASK));
-}
-
-static inline int get_source(uint64_t match_bits)
-{
- return ((int) ((match_bits & MPID_SOURCE_MASK) >> (MPID_TAG_SHIFT)));
-}
-
-static inline int get_psource(uint64_t match_bits)
-{
- return ((int) ((match_bits & MPID_PSOURCE_MASK) >> (MPID_PORT_SHIFT)));
-}
-
-static inline int get_pgid(uint64_t match_bits)
-{
- return ((int) (match_bits & MPID_PGID_MASK));
-}
-
-static inline int get_port(uint64_t match_bits)
-{
- return ((int) ((match_bits & MPID_PORT_NAME_MASK) >> MPID_TAG_SHIFT));
-}
/* ************************************************************************** */
/* MPICH Comm Override and Netmod functions */
/* ************************************************************************** */
-int MPID_nem_ofi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
-int MPID_nem_ofi_send(struct MPIDI_VC *vc, const void *buf, int count,
- MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
- int context_offset, struct MPID_Request **request);
-int MPID_nem_ofi_isend(struct MPIDI_VC *vc, const void *buf, int count,
- MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
- int context_offset, struct MPID_Request **request);
-int MPID_nem_ofi_ssend(struct MPIDI_VC *vc, const void *buf, int count,
- MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
- int context_offset, struct MPID_Request **request);
-int MPID_nem_ofi_issend(struct MPIDI_VC *vc, const void *buf, int count,
- MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
- int context_offset, struct MPID_Request **request);
+#define DECLARE_TWO_API_SETS(_ret, _fc_name, ...) \
+ _ret _fc_name(__VA_ARGS__); \
+ _ret _fc_name##_2(__VA_ARGS__);
+
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_recv_posted, struct MPIDI_VC *vc, struct MPID_Request *req);
+
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_send, struct MPIDI_VC *vc, const void *buf, int count,\
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,\
+ int context_offset, struct MPID_Request **request);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_isend, struct MPIDI_VC *vc, const void *buf, int count,\
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,\
+ int context_offset, struct MPID_Request **request);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_ssend, struct MPIDI_VC *vc, const void *buf, int count,\
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_issend, struct MPIDI_VC *vc, const void *buf, int count,\
+ MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,\
+ int context_offset, struct MPID_Request **request);
int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc, struct MPID_Request *sreq);
int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *rreq);
-int MPID_nem_ofi_iprobe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
- int context_offset, int *flag, MPI_Status * status);
-int MPID_nem_ofi_improbe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
- int context_offset, int *flag, MPID_Request ** message,
- MPI_Status * status);
-int MPID_nem_ofi_anysource_iprobe(int tag, MPID_Comm * comm, int context_offset,
- int *flag, MPI_Status * status);
-int MPID_nem_ofi_anysource_improbe(int tag, MPID_Comm * comm, int context_offset,
- int *flag, MPID_Request ** message, MPI_Status * status);
-void MPID_nem_ofi_anysource_posted(MPID_Request * rreq);
+
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_iprobe, struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
+ int context_offset, int *flag, MPI_Status * status);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_improbe,struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
+ int context_offset, int *flag, MPID_Request ** message,
+ MPI_Status * status);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_iprobe,int tag, MPID_Comm * comm, int context_offset,
+ int *flag, MPI_Status * status);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_improbe,int tag, MPID_Comm * comm, int context_offset,
+ int *flag, MPID_Request ** message, MPI_Status * status);
+DECLARE_TWO_API_SETS(void, MPID_nem_ofi_anysource_posted, MPID_Request * rreq);
+
int MPID_nem_ofi_anysource_matched(MPID_Request * rreq);
int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
index 91576f6..4e0ffee 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
@@ -83,6 +83,9 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
hints->caps = FI_TAGGED; /* Tag matching interface */
hints->caps |= FI_DYNAMIC_MR; /* Global dynamic mem region */
+ hints->ep_attr->mem_tag_format = MEM_TAG_FORMAT;
+ MPIU_Assert(pg_p->size < ((1 << MPID_RANK_BITS) - 1));
+
/* ------------------------------------------------------------------------ */
/* FI_VERSION provides binary backward and forward compatibility support */
/* Specify the version of OFI is coded to, the provider will select struct */
@@ -124,6 +127,8 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
&gl_data.fabric, /* Out: Fabric descriptor */
NULL), openfabric); /* Context: fabric events */
+ gl_data.api_set = API_SET_1;
+
/* ------------------------------------------------------------------------ */
/* Create the access domain, which is the physical or virtual network or */
/* hardware port/collection of ports. Returns a domain object that can be */
@@ -236,7 +241,7 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* -------------------------------- */
/* Set the MPI maximum tag value */
/* -------------------------------- */
- MPIR_Process.attrs.tag_ub = (1 << MPID_TAG_SHIFT) - 1;
+ MPIR_Process.attrs.tag_ub = (1 << MPID_TAG_BITS) - 1;
/* --------------------------------- */
/* Wait for all the ranks to publish */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index fece219..c314946 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -24,13 +24,18 @@
} else { \
pgid = NO_PGID; \
} \
- match_bits = (uint64_t)MPIR_Process.comm_world->rank << \
- (MPID_PORT_SHIFT); \
- if (0 == pgid) { \
+ if (gl_data.api_set == API_SET_1){ \
+ match_bits = ((uint64_t)pgid << MPID_PGID_SHIFT); \
+ }else{ \
+ match_bits = 0; \
+ } \
+ if (NO_PGID == pgid) { \
match_bits |= (uint64_t)vc->port_name_tag<< \
- (MPID_PORT_SHIFT+MPID_PSOURCE_SHIFT); \
+ (MPID_PORT_SHIFT); \
+ }else{ \
+ match_bits |= (uint64_t)MPIR_Process.comm_world->rank << \
+ (MPID_PSOURCE_SHIFT); \
} \
- match_bits |= pgid; \
match_bits |= MPID_MSG_RTS; \
})
@@ -80,15 +85,26 @@
VC_OFI(vc)->direct_addr, \
match_bits | MPID_MSG_CTS, \
0, /* Exact tag match, no ignore bits */ \
- &(REQ_OFI(cts_req)->ofi_context)),trecv); \
- FI_RC(fi_tsend(gl_data.endpoint, \
- &REQ_OFI(sreq)->pack_buffer_size, \
- sizeof(REQ_OFI(sreq)->pack_buffer_size), \
- gl_data.mr, \
- VC_OFI(vc)->direct_addr, \
- match_bits, \
- &(REQ_OFI(sreq)->ofi_context)),tsend); \
- })
+ &(REQ_OFI(cts_req)->ofi_context)),trecv); \
+ if (gl_data.api_set == API_SET_1){ \
+ FI_RC(fi_tsend(gl_data.endpoint, \
+ &REQ_OFI(sreq)->pack_buffer_size, \
+ sizeof(REQ_OFI(sreq)->pack_buffer_size), \
+ gl_data.mr, \
+ VC_OFI(vc)->direct_addr, \
+ match_bits, \
+ &(REQ_OFI(sreq)->ofi_context)),tsend); \
+ }else{ \
+ FI_RC(fi_tsenddata(gl_data.endpoint, \
+ &REQ_OFI(sreq)->pack_buffer_size, \
+ sizeof(REQ_OFI(sreq)->pack_buffer_size), \
+ gl_data.mr, \
+ pgid, \
+ VC_OFI(vc)->direct_addr, \
+ match_bits, \
+ &(REQ_OFI(sreq)->ofi_context)),tsend); \
+ } \
+ })
/* ------------------------------------------------------------------------ */
@@ -109,13 +125,13 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
vc = REQ_OFI(sreq)->vc;
REQ_OFI(sreq)->tag = tag | MPID_MSG_DATA;
FI_RC(fi_tsend(gl_data.endpoint,
- REQ_OFI(sreq)->pack_buffer,
- REQ_OFI(sreq)->pack_buffer_size,
- gl_data.mr,
- VC_OFI(vc)->direct_addr,
- wc->tag | MPID_MSG_DATA, (void *) &(REQ_OFI(sreq)->ofi_context)), tsend);
- }
- if (MPID_cc_get(sreq->cc) == 1) {
+ REQ_OFI(sreq)->pack_buffer,
+ REQ_OFI(sreq)->pack_buffer_size,
+ gl_data.mr,
+ VC_OFI(vc)->direct_addr,
+ MPID_MSG_DATA, (void *) &(REQ_OFI(sreq)->ofi_context)), tsend);
+ break;
+ case MPID_MSG_DATA:
if (REQ_OFI(sreq)->pack_buffer)
MPIU_Free(REQ_OFI(sreq)->pack_buffer);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
new file mode 100644
index 0000000..58a619a
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
@@ -0,0 +1,176 @@
+#if (API_SET != API_SET_1) && (API_SET != API_SET_2)
+#error Undefined API SET
+#endif
+
+/* ------------------------------------------------------------------------ */
+/* peek_callback called when a successful peek is completed */
+/* ------------------------------------------------------------------------ */
+#undef FCNAME
+#define FCNAME DECL_FUNC(peek_callback)
+static int
+ADD_SUFFIX(peek_callback)(cq_tagged_entry_t * wc, MPID_Request * rreq)
+{
+ int mpi_errno = MPI_SUCCESS;
+ BEGIN_FUNC(FCNAME);
+ REQ_OFI(rreq)->match_state = PEEK_FOUND;
+#if API_SET == API_SET_1
+ rreq->status.MPI_SOURCE = get_source(wc->tag);
+#elif API_SET == API_SET_2
+ rreq->status.MPI_SOURCE = wc->data;
+#endif
+ rreq->status.MPI_TAG = get_tag(wc->tag);
+ MPIR_STATUS_SET_COUNT(rreq->status, wc->len);
+ rreq->status.MPI_ERROR = MPI_SUCCESS;
+ END_FUNC(FCNAME);
+ return mpi_errno;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_ofi_iprobe_impl)
+int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
+ int source,
+ int tag,
+ MPID_Comm * comm,
+ int context_offset,
+ int *flag, MPI_Status * status, MPID_Request ** rreq_ptr)
+{
+ int ret, mpi_errno = MPI_SUCCESS;
+ fi_addr_t remote_proc = 0;
+ uint64_t match_bits, mask_bits;
+ size_t len;
+ MPID_Request rreq_s, *rreq;
+
+ BEGIN_FUNC(FCNAME);
+ if (rreq_ptr) {
+ MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_exit);
+ *rreq_ptr = rreq;
+ rreq->comm = comm;
+ rreq->dev.match.parts.rank = source;
+ rreq->dev.match.parts.tag = tag;
+ rreq->dev.match.parts.context_id = comm->context_id;
+ MPIR_Comm_add_ref(comm);
+ }
+ else {
+ rreq = &rreq_s;
+ rreq->dev.OnDataAvail = NULL;
+ }
+ REQ_OFI(rreq)->event_callback = ADD_SUFFIX(peek_callback);
+ REQ_OFI(rreq)->match_state = PEEK_INIT;
+ OFI_ADDR_INIT(source, vc, remote_proc);
+#if API_SET == API_SET_1
+ match_bits = init_recvtag(&mask_bits, comm->context_id + context_offset, source, tag);
+#elif API_SET == API_SET_2
+ match_bits = init_recvtag_2(&mask_bits, comm->context_id + context_offset, tag);
+#endif
+
+ /* ------------------------------------------------------------------------- */
+ /* fi_recvmsg with FI_PEEK: */
+ /* Initiate a search for a match in the hardware or software queue. */
+ /* The search can complete immediately with -ENOMSG. */
+ /* I successful, libfabric will enqueue a context entry into the completion */
+ /* queue to make the search nonblocking. This code will poll until the */
+ /* entry is enqueued. */
+ /* ------------------------------------------------------------------------- */
+ msg_tagged_t msg;
+ uint64_t msgflags = FI_PEEK;
+ msg.msg_iov = NULL;
+ msg.desc = NULL;
+ msg.iov_count = 0;
+ msg.addr = remote_proc;
+ msg.tag = match_bits;
+ msg.ignore = mask_bits;
+ msg.context = (void *) &(REQ_OFI(rreq)->ofi_context);
+ msg.data = 0;
+ if(*flag == CLAIM_PEEK)
+ msgflags|=FI_CLAIM;
+ ret = fi_trecvmsg(gl_data.endpoint,&msg,msgflags);
+ if(ret == -ENOMSG) {
+ if (rreq_ptr) {
+ MPIDI_CH3_Request_destroy(rreq);
+ *rreq_ptr = NULL;
+ *flag = 0;
+ }
+ MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL);
+ goto fn_exit;
+ }
+ MPIU_ERR_CHKANDJUMP4((ret < 0), mpi_errno, MPI_ERR_OTHER,
+ "**ofi_peek", "**ofi_peek %s %d %s %s",
+ __SHORT_FILE__, __LINE__, FCNAME, fi_strerror(-ret));
+
+ while (PEEK_INIT == REQ_OFI(rreq)->match_state)
+ MPID_nem_ofi_poll(MPID_BLOCKING_POLL);
+ *status = rreq->status;
+ *flag = 1;
+ END_FUNC_RC(FCNAME);
+}
+
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_ofi_iprobe)
+int ADD_SUFFIX(MPID_nem_ofi_iprobe)(struct MPIDI_VC *vc,
+ int source,
+ int tag,
+ MPID_Comm * comm, int context_offset, int *flag, MPI_Status * status)
+{
+ int rc;
+ BEGIN_FUNC(FCNAME);
+ *flag = 0;
+ rc = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(vc, source,
+ tag, comm, context_offset, flag, status, NULL);
+ END_FUNC(FCNAME);
+ return rc;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_ofi_improbe)
+int ADD_SUFFIX(MPID_nem_ofi_improbe)(struct MPIDI_VC *vc,
+ int source,
+ int tag,
+ MPID_Comm * comm,
+ int context_offset,
+ int *flag, MPID_Request ** message, MPI_Status * status)
+{
+ int old_error = status->MPI_ERROR;
+ int s;
+ BEGIN_FUNC(FCNAME);
+ *flag = NORMAL_PEEK;
+ s = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(vc, source,
+ tag, comm, context_offset, flag, status, message);
+ if (*flag) {
+ status->MPI_ERROR = old_error;
+ (*message)->kind = MPID_REQUEST_MPROBE;
+ }
+ END_FUNC(FCNAME);
+ return s;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_iprobe)
+int ADD_SUFFIX(MPID_nem_ofi_anysource_iprobe)(int tag,
+ MPID_Comm * comm,
+ int context_offset, int *flag, MPI_Status * status)
+{
+ int rc;
+ BEGIN_FUNC(FCNAME);
+ *flag = NORMAL_PEEK;
+ rc = ADD_SUFFIX(MPID_nem_ofi_iprobe)(NULL, MPI_ANY_SOURCE,
+ tag, comm, context_offset, flag, status);
+ END_FUNC(FCNAME);
+ return rc;
+}
+
+#undef FCNAME
+#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_improbe)
+int ADD_SUFFIX(MPID_nem_ofi_anysource_improbe)(int tag,
+ MPID_Comm * comm,
+ int context_offset,
+ int *flag, MPID_Request ** message, MPI_Status * status)
+{
+ int rc;
+ BEGIN_FUNC(FCNAME);
+ *flag = CLAIM_PEEK;
+ rc = ADD_SUFFIX(MPID_nem_ofi_improbe)(NULL, MPI_ANY_SOURCE, tag, comm,
+ context_offset, flag, message, status);
+ END_FUNC(FCNAME);
+ return rc;
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
index cdf5535..34d85ec 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
@@ -20,165 +20,16 @@ static inline MPID_Request *context_to_req(void *ofi_context)
return (MPID_Request *) container_of(ofi_context, MPID_Request, ch.netmod_area.padding);
}
-/* ------------------------------------------------------------------------ */
-/* peek_callback called when a successful peek is completed */
-/* ------------------------------------------------------------------------ */
-#undef FCNAME
-#define FCNAME DECL_FUNC(peek_callback)
-static int peek_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
-{
- int mpi_errno = MPI_SUCCESS;
- BEGIN_FUNC(FCNAME);
- REQ_OFI(rreq)->match_state = PEEK_FOUND;
- rreq->status.MPI_SOURCE = get_source(wc->tag);
- rreq->status.MPI_TAG = get_tag(wc->tag);
- MPIR_STATUS_SET_COUNT(rreq->status, wc->len);
- rreq->status.MPI_ERROR = MPI_SUCCESS;
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_iprobe_impl)
-int MPID_nem_ofi_iprobe_impl(struct MPIDI_VC *vc,
- int source,
- int tag,
- MPID_Comm * comm,
- int context_offset,
- int *flag, MPI_Status * status, MPID_Request ** rreq_ptr)
-{
- int ret, mpi_errno = MPI_SUCCESS;
- fi_addr_t remote_proc = 0;
- uint64_t match_bits, mask_bits;
- size_t len;
- MPID_Request rreq_s, *rreq;
-
- BEGIN_FUNC(FCNAME);
- if (rreq_ptr) {
- MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_exit);
- *rreq_ptr = rreq;
- rreq->comm = comm;
- rreq->dev.match.parts.rank = source;
- rreq->dev.match.parts.tag = tag;
- rreq->dev.match.parts.context_id = comm->context_id;
- MPIR_Comm_add_ref(comm);
- }
- else {
- rreq = &rreq_s;
- rreq->dev.OnDataAvail = NULL;
- }
- REQ_OFI(rreq)->event_callback = peek_callback;
- REQ_OFI(rreq)->match_state = PEEK_INIT;
- OFI_ADDR_INIT(source, vc, remote_proc);
- match_bits = init_recvtag(&mask_bits, comm->context_id + context_offset, source, tag);
-
- /* ------------------------------------------------------------------------- */
- /* fi_recvmsg with FI_PEEK: */
- /* Initiate a search for a match in the hardware or software queue. */
- /* The search can complete immediately with -ENOMSG. */
- /* I successful, libfabric will enqueue a context entry into the completion */
- /* queue to make the search nonblocking. This code will poll until the */
- /* entry is enqueued. */
- /* ------------------------------------------------------------------------- */
- msg_tagged_t msg;
- uint64_t msgflags = FI_PEEK;
- msg.msg_iov = NULL;
- msg.desc = NULL;
- msg.iov_count = 0;
- msg.addr = remote_proc;
- msg.tag = match_bits;
- msg.ignore = mask_bits;
- msg.context = (void *) &(REQ_OFI(rreq)->ofi_context);
- msg.data = 0;
- if(*flag == CLAIM_PEEK)
- msgflags|=FI_CLAIM;
- ret = fi_trecvmsg(gl_data.endpoint,&msg,msgflags);
- if(ret == -ENOMSG) {
- if (rreq_ptr) {
- MPIDI_CH3_Request_destroy(rreq);
- *rreq_ptr = NULL;
- }
- MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL);
- *flag = 0;
- goto fn_exit;
- }
- MPIU_ERR_CHKANDJUMP4((ret < 0), mpi_errno, MPI_ERR_OTHER,
- "**ofi_peek", "**ofi_peek %s %d %s %s",
- __SHORT_FILE__, __LINE__, FCNAME, fi_strerror(-ret));
-
- while (PEEK_INIT == REQ_OFI(rreq)->match_state)
- MPID_nem_ofi_poll(MPID_BLOCKING_POLL);
- *status = rreq->status;
- *flag = 1;
- END_FUNC_RC(FCNAME);
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_iprobe)
-int MPID_nem_ofi_iprobe(struct MPIDI_VC *vc,
- int source,
- int tag,
- MPID_Comm * comm, int context_offset, int *flag, MPI_Status * status)
-{
- int rc;
- BEGIN_FUNC(FCNAME);
- *flag = 0;
- rc = MPID_nem_ofi_iprobe_impl(vc, source, tag, comm, context_offset, flag, status, NULL);
- END_FUNC(FCNAME);
- return rc;
-}
+#define ADD_SUFFIX(name) name
+#undef API_SET
+#define API_SET API_SET_1
+#include "ofi_probe_template.c"
+#undef ADD_SUFFIX
+#define ADD_SUFFIX(name) name##_2
+#undef API_SET
+#define API_SET API_SET_2
+#include "ofi_probe_template.c"
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_improbe)
-int MPID_nem_ofi_improbe(struct MPIDI_VC *vc,
- int source,
- int tag,
- MPID_Comm * comm,
- int context_offset,
- int *flag, MPID_Request ** message, MPI_Status * status)
-{
- int old_error = status->MPI_ERROR;
- int s;
- BEGIN_FUNC(FCNAME);
- *flag = NORMAL_PEEK;
- s = MPID_nem_ofi_iprobe_impl(vc, source, tag, comm, context_offset, flag, status, message);
- if (*flag) {
- status->MPI_ERROR = old_error;
- (*message)->kind = MPID_REQUEST_MPROBE;
- }
- END_FUNC(FCNAME);
- return s;
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_iprobe)
-int MPID_nem_ofi_anysource_iprobe(int tag,
- MPID_Comm * comm,
- int context_offset, int *flag, MPI_Status * status)
-{
- int rc;
- BEGIN_FUNC(FCNAME);
- *flag = NORMAL_PEEK;
- rc = MPID_nem_ofi_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status);
- END_FUNC(FCNAME);
- return rc;
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_improbe)
-int MPID_nem_ofi_anysource_improbe(int tag,
- MPID_Comm * comm,
- int context_offset,
- int *flag, MPID_Request ** message, MPI_Status * status)
-{
- int rc;
- BEGIN_FUNC(FCNAME);
- *flag = CLAIM_PEEK;
- rc = MPID_nem_ofi_improbe(NULL, MPI_ANY_SOURCE, tag, comm,
- context_offset, flag, message, status);
- END_FUNC(FCNAME);
- return rc;
-}
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_poll)
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h
new file mode 100644
index 0000000..e6492d5
--- /dev/null
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h
@@ -0,0 +1,144 @@
+#ifndef OFI_TAG_LAYOUT_H
+#define OFI_TAG_LAYOUT_H
+
+
+
+
+/* *******************************************************************************
+ * match/ignore bit manipulation
+ * *******************************************************************************
+ * 01234567 01234567 | 01234567 01234567 | 0123 | 4567 01234567 01234567 01234567
+ * | | proto| |
+ * source | ctxid | col | message tag |
+ *
+ *********************************************************************************/
+#define MPID_PROTOCOL_MASK (0x00000000F0000000ULL)
+#define MPID_CONTEXT_MASK (0x0000FFFF00000000ULL)
+#define MPID_SOURCE_MASK (0xFFFF000000000000ULL)
+#define MPID_TAG_MASK (0x000000000FFFFFFFULL)
+#define MPID_PGID_MASK (0xFFFFFFFF00000000ULL)
+#define MPID_PSOURCE_MASK (0x000000000000FFFFULL)
+#define MPID_PORT_NAME_MASK (0x000000000000FFFFULL)
+#define MPID_SYNC_SEND (0x0000000010000000ULL)
+#define MPID_SYNC_SEND_ACK (0x0000000020000000ULL)
+#define MPID_MSG_RTS (0x0000000030000000ULL)
+#define MPID_MSG_CTS (0x0000000040000000ULL)
+#define MPID_MSG_DATA (0x0000000050000000ULL)
+#define MPID_CONN_REQ (0x0000000060000000ULL)
+#define MPID_SOURCE_SHIFT (48)
+#define MPID_CTXID_SHIFT (32)
+#define MPID_PGID_SHIFT (32)
+#define MPID_PSOURCE_SHIFT (0)
+#define MPID_PORT_SHIFT (0)
+#define MPID_TAG_BITS (28)
+#define MPID_RANK_BITS (16)
+#define MPID_RCD_IGNORE_MASK (0xFFFFFFFF0FFFFFFFULL)
+#define OFI_KVSAPPSTRLEN 1024
+
+
+/* ******************************** */
+/* Tag Manipulation inlines */
+/* ******************************** */
+static inline uint64_t init_sendtag(MPIR_Context_id_t contextid, int source, int tag, uint64_t type)
+{
+ uint64_t match_bits = 0;
+ match_bits |= ((uint64_t)source) << MPID_SOURCE_SHIFT;
+ match_bits |= ((uint64_t)contextid) << MPID_CTXID_SHIFT;
+ match_bits |= (MPID_TAG_MASK & tag) | type;
+ return match_bits;
+}
+
+/* receive posting */
+static inline uint64_t init_recvtag(uint64_t * mask_bits,
+ MPIR_Context_id_t contextid, int source, int tag)
+{
+ uint64_t match_bits = 0;
+ *mask_bits = MPID_SYNC_SEND;
+ match_bits |= ((uint64_t)contextid) << MPID_CTXID_SHIFT;
+
+ if (MPI_ANY_SOURCE == source) {
+ *mask_bits |= MPID_SOURCE_MASK;
+ }
+ else {
+ match_bits |= ((uint64_t)source) << MPID_SOURCE_SHIFT;
+ }
+ if (MPI_ANY_TAG == tag)
+ *mask_bits |= MPID_TAG_MASK;
+ else
+ match_bits |= (MPID_TAG_MASK & tag);
+
+ return match_bits;
+}
+
+static inline int get_tag(uint64_t match_bits)
+{
+ return ((int) (match_bits & MPID_TAG_MASK));
+}
+
+static inline int get_source(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_SOURCE_MASK) >> (MPID_SOURCE_SHIFT)));
+}
+
+static inline int get_psource(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_PSOURCE_MASK) >> (MPID_PSOURCE_SHIFT)));
+}
+
+static inline int get_pgid(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_PGID_MASK) >> MPID_PGID_SHIFT));
+}
+
+static inline int get_port(uint64_t match_bits)
+{
+ return ((int) ((match_bits & MPID_PORT_NAME_MASK) >> MPID_PORT_SHIFT));
+}
+
+
+/*********************************************************************************
+ * SECOND MODE TAG LAUOUT MACROS *
+ *********************************************************************************/
+
+/*********************************************************************************
+ * 01234567 01234567 | 01234567 01234567 | 0123 | 4567 01234567 01234567 01234567
+ * | | proto| |
+ * Not used | ctxid | col | message tag |
+ *
+ *********************************************************************************/
+#define MPID_RCD_IGNORE_MASK_M2 (0x000000000FFFFFFFULL)
+
+
+/* ******************************** */
+/* Tag Manipulation inlines */
+/* ******************************** */
+static inline uint64_t init_sendtag_2(MPIR_Context_id_t contextid, int tag, uint64_t type)
+{
+ uint64_t match_bits = 0;
+ match_bits |= ((uint64_t)contextid) << MPID_CTXID_SHIFT;
+ match_bits |= (MPID_TAG_MASK & tag) | type;
+ return match_bits;
+}
+
+/* receive posting */
+static inline uint64_t init_recvtag_2(uint64_t * mask_bits,
+ MPIR_Context_id_t contextid, int tag)
+{
+ uint64_t match_bits = 0;
+ *mask_bits = MPID_SYNC_SEND;
+ match_bits |= ((uint64_t)contextid) << MPID_CTXID_SHIFT;
+
+ if (MPI_ANY_TAG == tag)
+ *mask_bits |= MPID_TAG_MASK;
+ else
+ match_bits |= (MPID_TAG_MASK & tag);
+
+ return match_bits;
+}
+
+#define GET_RCD_IGNORE_MASK() (gl_data.api_set == API_SET_1 ? \
+ MPID_RCD_IGNORE_MASK : MPID_RCD_IGNORE_MASK_M2)
+#define API_SET_1 1
+#define API_SET_2 2
+
+#endif /*OFI_TAG_LAYOUT_H*/
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
index 66b9130..b0ab745 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
@@ -10,6 +10,23 @@
#include "ofi_impl.h"
#define MPID_NORMAL_SEND 0
+static inline int
+MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
+ MPID_Request * rreq);
+
+static inline int
+MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
+ MPID_Request * sreq);
+
+#define ADD_SUFFIX(name) name
+#undef API_SET
+#define API_SET API_SET_1
+#include "ofi_tagged_template.c"
+#undef ADD_SUFFIX
+#define ADD_SUFFIX(name) name##_2
+#undef API_SET
+#define API_SET API_SET_2
+#include "ofi_tagged_template.c"
/* ------------------------------------------------------------------------ */
/* Receive callback called after sending a syncronous send acknowledgement. */
@@ -49,298 +66,6 @@ static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((u
return mpi_errno;
}
-/* ------------------------------------------------------------------------ */
-/* Receive done callback */
-/* Handle an incoming receive completion event */
-/* ------------------------------------------------------------------------ */
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_recv_callback)
-static inline int MPID_nem_ofi_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
-{
- int err0, err1, src, mpi_errno = MPI_SUCCESS;
- uint64_t ssend_bits;
- MPIDI_msg_sz_t sz;
- MPIDI_VC_t *vc;
- MPID_Request *sync_req;
- BEGIN_FUNC(FCNAME);
- /* ---------------------------------------------------- */
- /* Populate the MPI Status and unpack noncontig buffer */
- /* ---------------------------------------------------- */
- rreq->status.MPI_ERROR = MPI_SUCCESS;
- rreq->status.MPI_SOURCE = get_source(wc->tag);
- rreq->status.MPI_TAG = get_tag(wc->tag);
- REQ_OFI(rreq)->req_started = 1;
- MPIR_STATUS_SET_COUNT(rreq->status, wc->len);
- if (REQ_OFI(rreq)->pack_buffer) {
- MPIDI_CH3U_Buffer_copy(REQ_OFI(rreq)->pack_buffer,
- MPIR_STATUS_GET_COUNT(rreq->status),
- MPI_BYTE, &err0, rreq->dev.user_buf,
- rreq->dev.user_count, rreq->dev.datatype, &sz, &err1);
- MPIR_STATUS_SET_COUNT(rreq->status, sz);
- MPIU_Free(REQ_OFI(rreq)->pack_buffer);
- if (err0 || err1) {
- rreq->status.MPI_ERROR = MPI_ERR_TYPE;
- }
- }
-
- if ((wc->tag & MPID_PROTOCOL_MASK) == MPID_SYNC_SEND) {
- /* ---------------------------------------------------- */
- /* Ack the sync send and wait for the send request */
- /* completion(when callback executed. A protocol bit */
- /* MPID_SYNC_SEND_ACK is set in the tag bits to provide */
- /* separation of MPI messages and protocol messages */
- /* ---------------------------------------------------- */
- vc = REQ_OFI(rreq)->vc;
- if (!vc) { /* MPI_ANY_SOURCE -- Post message from status, complete the VC */
- src = get_source(wc->tag);
- vc = rreq->comm->vcr[src];
- MPIU_Assert(vc);
- }
- ssend_bits = init_sendtag(rreq->dev.match.parts.context_id,
- rreq->comm->rank, rreq->status.MPI_TAG, MPID_SYNC_SEND_ACK);
- MPID_nem_ofi_create_req(&sync_req, 1);
- sync_req->dev.OnDataAvail = NULL;
- sync_req->dev.next = NULL;
- REQ_OFI(sync_req)->event_callback = MPID_nem_ofi_sync_recv_callback;
- REQ_OFI(sync_req)->parent = rreq;
- FI_RC(fi_tsend(gl_data.endpoint,
- NULL,
- 0,
- gl_data.mr,
- VC_OFI(vc)->direct_addr,
- ssend_bits, &(REQ_OFI(sync_req)->ofi_context)), tsend);
- }
- else {
- /* ---------------------------------------------------- */
- /* Non-syncronous send, complete normally */
- /* by removing from the CH3 queue and completing the */
- /* request object */
- /* ---------------------------------------------------- */
- MPIDI_CH3U_Recvq_DP(rreq);
- MPIDI_CH3U_Request_complete(rreq);
- }
- END_FUNC_RC(FCNAME);
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(do_isend)
-static inline int do_isend(struct MPIDI_VC *vc,
- const void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPID_Comm * comm,
- int context_offset, struct MPID_Request **request, uint64_t type)
-{
- int err0, err1, dt_contig, mpi_errno = MPI_SUCCESS;
- char *send_buffer;
- uint64_t match_bits, ssend_match, ssend_mask;
- MPI_Aint dt_true_lb;
- MPID_Request *sreq = NULL, *sync_req = NULL;
- MPIDI_msg_sz_t data_sz;
- MPID_Datatype *dt_ptr;
- BEGIN_FUNC(FCNAME);
- VC_READY_CHECK(vc);
-
- /* ---------------------------------------------------- */
- /* Create the MPI request */
- /* ---------------------------------------------------- */
- MPID_nem_ofi_create_req(&sreq, 2);
- sreq->kind = MPID_REQUEST_SEND;
- sreq->dev.OnDataAvail = NULL;
- REQ_OFI(sreq)->event_callback = MPID_nem_ofi_send_callback;
- REQ_OFI(sreq)->vc = vc;
-
- /* ---------------------------------------------------- */
- /* Create the pack buffer (if required), and allocate */
- /* a send request */
- /* ---------------------------------------------------- */
- match_bits = init_sendtag(comm->context_id + context_offset, comm->rank, tag, type);
- sreq->dev.match.parts.tag = match_bits;
- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
- send_buffer = (char *) buf + dt_true_lb;
- if (!dt_contig) {
- send_buffer = (char *) MPIU_Malloc(data_sz);
- MPIU_ERR_CHKANDJUMP1(send_buffer == NULL, mpi_errno,
- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send buffer alloc");
- MPIDI_CH3U_Buffer_copy(buf, count, datatype, &err0,
- send_buffer, data_sz, MPI_BYTE, &data_sz, &err1);
- REQ_OFI(sreq)->pack_buffer = send_buffer;
- }
-
- if (type == MPID_SYNC_SEND) {
- /* ---------------------------------------------------- */
- /* For syncronous send, we post a receive to catch the */
- /* match ack, but use the tag protocol bits to avoid */
- /* matching with MPI level messages. */
- /* ---------------------------------------------------- */
- int c = 1;
- MPID_cc_incr(sreq->cc_ptr, &c);
- MPID_nem_ofi_create_req(&sync_req, 1);
- sync_req->dev.OnDataAvail = NULL;
- sync_req->dev.next = NULL;
- REQ_OFI(sync_req)->event_callback = MPID_nem_ofi_sync_recv_callback;
- REQ_OFI(sync_req)->parent = sreq;
- ssend_match = init_recvtag(&ssend_mask, comm->context_id + context_offset, dest, tag);
- ssend_match |= MPID_SYNC_SEND_ACK;
- FI_RC(fi_trecv(gl_data.endpoint, /* endpoint */
- NULL, /* recvbuf */
- 0, /* data sz */
- gl_data.mr, /* dynamic mr */
- VC_OFI(vc)->direct_addr, /* remote proc */
- ssend_match, /* match bits */
- 0ULL, /* mask bits */
- &(REQ_OFI(sync_req)->ofi_context)), trecv);
- }
- FI_RC(fi_tsend(gl_data.endpoint, /* Endpoint */
- send_buffer, /* Send buffer(packed or user) */
- data_sz, /* Size of the send */
- gl_data.mr, /* Dynamic memory region */
- VC_OFI(vc)->direct_addr, /* Use the address of this VC */
- match_bits, /* Match bits */
- &(REQ_OFI(sreq)->ofi_context)), tsend);
- *request = sreq;
- END_FUNC_RC(FCNAME);
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_recv_posted)
-int MPID_nem_ofi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *rreq)
-{
- int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
- uint64_t match_bits = 0, mask_bits = 0;
- fi_addr_t remote_proc = 0;
- MPIDI_msg_sz_t data_sz;
- MPI_Aint dt_true_lb;
- MPID_Datatype *dt_ptr;
- MPIR_Context_id_t context_id;
- char *recv_buffer;
- BEGIN_FUNC(FCNAME);
-
- /* ------------------------ */
- /* Initialize the request */
- /* ------------------------ */
- MPID_nem_ofi_init_req(rreq);
- REQ_OFI(rreq)->event_callback = MPID_nem_ofi_recv_callback;
- REQ_OFI(rreq)->vc = vc;
-
- /* ---------------------------------------------------- */
- /* Fill out the match info, and allocate the pack buffer */
- /* a send request */
- /* ---------------------------------------------------- */
- src = rreq->dev.match.parts.rank;
- tag = rreq->dev.match.parts.tag;
- context_id = rreq->dev.match.parts.context_id;
- match_bits = init_recvtag(&mask_bits, context_id, src, tag);
- OFI_ADDR_INIT(src, vc, remote_proc);
- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype,
- dt_contig, data_sz, dt_ptr, dt_true_lb);
- if (dt_contig) {
- recv_buffer = (char *) rreq->dev.user_buf + dt_true_lb;
- }
- else {
- recv_buffer = (char *) MPIU_Malloc(data_sz);
- MPIU_ERR_CHKANDJUMP1(recv_buffer == NULL, mpi_errno, MPI_ERR_OTHER,
- "**nomem", "**nomem %s", "Recv Pack Buffer alloc");
- REQ_OFI(rreq)->pack_buffer = recv_buffer;
- }
-
- /* ---------------- */
- /* Post the receive */
- /* ---------------- */
- uint64_t msgflags;
- iovec_t iov;
- msg_tagged_t msg;
- iov.iov_base = recv_buffer;
- iov.iov_len = data_sz;
- if(REQ_OFI(rreq)->match_state == PEEK_FOUND)
- msgflags = FI_CLAIM;
- else
- msgflags = 0ULL;
-
- msg.msg_iov = &iov;
- msg.desc = NULL;
- msg.iov_count = 1;
- msg.addr = remote_proc;
- msg.tag = match_bits;
- msg.ignore = mask_bits;
- msg.context = (void *) &(REQ_OFI(rreq)->ofi_context);
- msg.data = 0;
- FI_RC(fi_trecvmsg(gl_data.endpoint,&msg,msgflags), trecv);
- END_FUNC_RC(FCNAME);
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_send)
-int MPID_nem_ofi_send(struct MPIDI_VC *vc,
- const void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag, MPID_Comm * comm, int context_offset, struct MPID_Request **request)
-{
- int mpi_errno = MPI_SUCCESS;
-
- BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest, tag,
- comm, context_offset, request, MPID_NORMAL_SEND);
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_isend)
-int MPID_nem_ofi_isend(struct MPIDI_VC *vc,
- const void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag, MPID_Comm * comm, int context_offset, struct MPID_Request **request)
-{
- int mpi_errno = MPI_SUCCESS;
- BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest,
- tag, comm, context_offset, request, MPID_NORMAL_SEND);
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_ssend)
-int MPID_nem_ofi_ssend(struct MPIDI_VC *vc,
- const void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag, MPID_Comm * comm, int context_offset, struct MPID_Request **request)
-{
- int mpi_errno = MPI_SUCCESS;
- BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest,
- tag, comm, context_offset, request, MPID_SYNC_SEND);
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_issend)
-int MPID_nem_ofi_issend(struct MPIDI_VC *vc,
- const void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPID_Comm * comm, int context_offset, struct MPID_Request **request)
-{
- int mpi_errno = MPI_SUCCESS;
- BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest,
- tag, comm, context_offset, request, MPID_SYNC_SEND);
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-
#define DO_CANCEL(req) \
({ \
int mpi_errno = MPI_SUCCESS; \
@@ -372,16 +97,6 @@ int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPI
DO_CANCEL(rreq);
}
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_posted)
-void MPID_nem_ofi_anysource_posted(MPID_Request * rreq)
-{
- int mpi_errno = MPI_SUCCESS;
- BEGIN_FUNC(FCNAME);
- mpi_errno = MPID_nem_ofi_recv_posted(NULL, rreq);
- MPIU_Assert(mpi_errno == MPI_SUCCESS);
- END_FUNC(FCNAME);
-}
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_matched)
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
similarity index 65%
copy from src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
copy to src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index 66b9130..3c6140b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -1,53 +1,7 @@
-/*
- * (C) 2006 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- *
- * Portions of this code were written by Intel Corporation.
- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
- * to Argonne National Laboratory subject to Software Grant and Corporate
- * Contributor License Agreement dated February 8, 2012.
- */
-#include "ofi_impl.h"
+#if (API_SET != API_SET_1) && (API_SET != API_SET_2)
+#error Undefined API SET
+#endif
-#define MPID_NORMAL_SEND 0
-
-/* ------------------------------------------------------------------------ */
-/* Receive callback called after sending a syncronous send acknowledgement. */
-/* ------------------------------------------------------------------------ */
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_sync_recv_callback)
-static inline int MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
- MPID_Request * rreq)
-{
- int mpi_errno = MPI_SUCCESS;
-
- BEGIN_FUNC(FCNAME);
-
- MPIDI_CH3U_Recvq_DP(REQ_OFI(rreq)->parent);
- MPIDI_CH3U_Request_complete(REQ_OFI(rreq)->parent);
- MPIDI_CH3U_Request_complete(rreq);
-
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-
-/* ------------------------------------------------------------------------ */
-/* Send done callback */
-/* Free any temporary/pack buffers and complete the send request */
-/* ------------------------------------------------------------------------ */
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_send_callback)
-static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
- MPID_Request * sreq)
-{
- int mpi_errno = MPI_SUCCESS;
- BEGIN_FUNC(FCNAME);
- if (REQ_OFI(sreq)->pack_buffer)
- MPIU_Free(REQ_OFI(sreq)->pack_buffer);
- MPIDI_CH3U_Request_complete(sreq);
- END_FUNC(FCNAME);
- return mpi_errno;
-}
/* ------------------------------------------------------------------------ */
/* Receive done callback */
@@ -55,7 +9,8 @@ static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((u
/* ------------------------------------------------------------------------ */
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_recv_callback)
-static inline int MPID_nem_ofi_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+static inline
+int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPID_Request * rreq)
{
int err0, err1, src, mpi_errno = MPI_SUCCESS;
uint64_t ssend_bits;
@@ -67,10 +22,17 @@ static inline int MPID_nem_ofi_recv_callback(cq_tagged_entry_t * wc, MPID_Reques
/* Populate the MPI Status and unpack noncontig buffer */
/* ---------------------------------------------------- */
rreq->status.MPI_ERROR = MPI_SUCCESS;
+#if API_SET == API_SET_1
rreq->status.MPI_SOURCE = get_source(wc->tag);
- rreq->status.MPI_TAG = get_tag(wc->tag);
+#elif API_SET == API_SET_2
+ rreq->status.MPI_SOURCE = wc->data;
+#endif
+ src = rreq->status.MPI_SOURCE;
+ rreq->status.MPI_TAG = get_tag(wc->tag);
+
REQ_OFI(rreq)->req_started = 1;
MPIR_STATUS_SET_COUNT(rreq->status, wc->len);
+
if (REQ_OFI(rreq)->pack_buffer) {
MPIDI_CH3U_Buffer_copy(REQ_OFI(rreq)->pack_buffer,
MPIR_STATUS_GET_COUNT(rreq->status),
@@ -92,21 +54,32 @@ static inline int MPID_nem_ofi_recv_callback(cq_tagged_entry_t * wc, MPID_Reques
/* ---------------------------------------------------- */
vc = REQ_OFI(rreq)->vc;
if (!vc) { /* MPI_ANY_SOURCE -- Post message from status, complete the VC */
- src = get_source(wc->tag);
vc = rreq->comm->vcr[src];
MPIU_Assert(vc);
}
+#if API_SET == API_SET_1
ssend_bits = init_sendtag(rreq->dev.match.parts.context_id,
rreq->comm->rank, rreq->status.MPI_TAG, MPID_SYNC_SEND_ACK);
+#elif API_SET == API_SET_2
+ ssend_bits = init_sendtag_2(rreq->dev.match.parts.context_id,
+ rreq->status.MPI_TAG, MPID_SYNC_SEND_ACK);
+#endif
MPID_nem_ofi_create_req(&sync_req, 1);
sync_req->dev.OnDataAvail = NULL;
sync_req->dev.next = NULL;
REQ_OFI(sync_req)->event_callback = MPID_nem_ofi_sync_recv_callback;
REQ_OFI(sync_req)->parent = rreq;
+#if API_SET == API_SET_1
FI_RC(fi_tsend(gl_data.endpoint,
+#elif API_SET == API_SET_2
+ FI_RC(fi_tsenddata(gl_data.endpoint,
+#endif
NULL,
0,
gl_data.mr,
+#if API_SET == API_SET_2
+ rreq->comm->rank,
+#endif
VC_OFI(vc)->direct_addr,
ssend_bits, &(REQ_OFI(sync_req)->ofi_context)), tsend);
}
@@ -122,16 +95,18 @@ static inline int MPID_nem_ofi_recv_callback(cq_tagged_entry_t * wc, MPID_Reques
END_FUNC_RC(FCNAME);
}
+
#undef FCNAME
#define FCNAME DECL_FUNC(do_isend)
-static inline int do_isend(struct MPIDI_VC *vc,
- const void *buf,
- int count,
- MPI_Datatype datatype,
- int dest,
- int tag,
- MPID_Comm * comm,
- int context_offset, struct MPID_Request **request, uint64_t type)
+static inline int
+ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc,
+ const void *buf,
+ int count,
+ MPI_Datatype datatype,
+ int dest,
+ int tag,
+ MPID_Comm * comm,
+ int context_offset, struct MPID_Request **request, uint64_t type)
{
int err0, err1, dt_contig, mpi_errno = MPI_SUCCESS;
char *send_buffer;
@@ -156,7 +131,12 @@ static inline int do_isend(struct MPIDI_VC *vc,
/* Create the pack buffer (if required), and allocate */
/* a send request */
/* ---------------------------------------------------- */
+#if API_SET == API_SET_1
match_bits = init_sendtag(comm->context_id + context_offset, comm->rank, tag, type);
+#elif API_SET == API_SET_2
+ match_bits = init_sendtag_2(comm->context_id + context_offset, tag, type);
+#endif
+
sreq->dev.match.parts.tag = match_bits;
MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
send_buffer = (char *) buf + dt_true_lb;
@@ -182,7 +162,11 @@ static inline int do_isend(struct MPIDI_VC *vc,
sync_req->dev.next = NULL;
REQ_OFI(sync_req)->event_callback = MPID_nem_ofi_sync_recv_callback;
REQ_OFI(sync_req)->parent = sreq;
+#if API_SET == API_SET_1
ssend_match = init_recvtag(&ssend_mask, comm->context_id + context_offset, dest, tag);
+#elif API_SET == API_SET_2
+ ssend_match = init_recvtag_2(&ssend_mask, comm->context_id + context_offset, tag);
+#endif
ssend_match |= MPID_SYNC_SEND_ACK;
FI_RC(fi_trecv(gl_data.endpoint, /* endpoint */
NULL, /* recvbuf */
@@ -193,87 +177,27 @@ static inline int do_isend(struct MPIDI_VC *vc,
0ULL, /* mask bits */
&(REQ_OFI(sync_req)->ofi_context)), trecv);
}
+#if API_SET == API_SET_1
FI_RC(fi_tsend(gl_data.endpoint, /* Endpoint */
- send_buffer, /* Send buffer(packed or user) */
- data_sz, /* Size of the send */
- gl_data.mr, /* Dynamic memory region */
- VC_OFI(vc)->direct_addr, /* Use the address of this VC */
- match_bits, /* Match bits */
- &(REQ_OFI(sreq)->ofi_context)), tsend);
+#elif API_SET == API_SET_2
+ FI_RC(fi_tsenddata(gl_data.endpoint, /* Endpoint */
+#endif
+ send_buffer, /* Send buffer(packed or user) */
+ data_sz, /* Size of the send */
+ gl_data.mr, /* Dynamic memory region */
+#if API_SET == API_SET_2
+ comm->rank,
+#endif
+ VC_OFI(vc)->direct_addr, /* Use the address of this VC */
+ match_bits, /* Match bits */
+ &(REQ_OFI(sreq)->ofi_context)), tsend);
*request = sreq;
END_FUNC_RC(FCNAME);
}
#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_recv_posted)
-int MPID_nem_ofi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *rreq)
-{
- int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
- uint64_t match_bits = 0, mask_bits = 0;
- fi_addr_t remote_proc = 0;
- MPIDI_msg_sz_t data_sz;
- MPI_Aint dt_true_lb;
- MPID_Datatype *dt_ptr;
- MPIR_Context_id_t context_id;
- char *recv_buffer;
- BEGIN_FUNC(FCNAME);
-
- /* ------------------------ */
- /* Initialize the request */
- /* ------------------------ */
- MPID_nem_ofi_init_req(rreq);
- REQ_OFI(rreq)->event_callback = MPID_nem_ofi_recv_callback;
- REQ_OFI(rreq)->vc = vc;
-
- /* ---------------------------------------------------- */
- /* Fill out the match info, and allocate the pack buffer */
- /* a send request */
- /* ---------------------------------------------------- */
- src = rreq->dev.match.parts.rank;
- tag = rreq->dev.match.parts.tag;
- context_id = rreq->dev.match.parts.context_id;
- match_bits = init_recvtag(&mask_bits, context_id, src, tag);
- OFI_ADDR_INIT(src, vc, remote_proc);
- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype,
- dt_contig, data_sz, dt_ptr, dt_true_lb);
- if (dt_contig) {
- recv_buffer = (char *) rreq->dev.user_buf + dt_true_lb;
- }
- else {
- recv_buffer = (char *) MPIU_Malloc(data_sz);
- MPIU_ERR_CHKANDJUMP1(recv_buffer == NULL, mpi_errno, MPI_ERR_OTHER,
- "**nomem", "**nomem %s", "Recv Pack Buffer alloc");
- REQ_OFI(rreq)->pack_buffer = recv_buffer;
- }
-
- /* ---------------- */
- /* Post the receive */
- /* ---------------- */
- uint64_t msgflags;
- iovec_t iov;
- msg_tagged_t msg;
- iov.iov_base = recv_buffer;
- iov.iov_len = data_sz;
- if(REQ_OFI(rreq)->match_state == PEEK_FOUND)
- msgflags = FI_CLAIM;
- else
- msgflags = 0ULL;
-
- msg.msg_iov = &iov;
- msg.desc = NULL;
- msg.iov_count = 1;
- msg.addr = remote_proc;
- msg.tag = match_bits;
- msg.ignore = mask_bits;
- msg.context = (void *) &(REQ_OFI(rreq)->ofi_context);
- msg.data = 0;
- FI_RC(fi_trecvmsg(gl_data.endpoint,&msg,msgflags), trecv);
- END_FUNC_RC(FCNAME);
-}
-
-#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_send)
-int MPID_nem_ofi_send(struct MPIDI_VC *vc,
+int ADD_SUFFIX(MPID_nem_ofi_send)(struct MPIDI_VC *vc,
const void *buf,
int count,
MPI_Datatype datatype,
@@ -283,7 +207,7 @@ int MPID_nem_ofi_send(struct MPIDI_VC *vc,
int mpi_errno = MPI_SUCCESS;
BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest, tag,
+ mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest, tag,
comm, context_offset, request, MPID_NORMAL_SEND);
END_FUNC(FCNAME);
return mpi_errno;
@@ -291,7 +215,7 @@ int MPID_nem_ofi_send(struct MPIDI_VC *vc,
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_isend)
-int MPID_nem_ofi_isend(struct MPIDI_VC *vc,
+int ADD_SUFFIX(MPID_nem_ofi_isend)(struct MPIDI_VC *vc,
const void *buf,
int count,
MPI_Datatype datatype,
@@ -300,7 +224,7 @@ int MPID_nem_ofi_isend(struct MPIDI_VC *vc,
{
int mpi_errno = MPI_SUCCESS;
BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest,
+ mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest,
tag, comm, context_offset, request, MPID_NORMAL_SEND);
END_FUNC(FCNAME);
return mpi_errno;
@@ -308,7 +232,7 @@ int MPID_nem_ofi_isend(struct MPIDI_VC *vc,
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_ssend)
-int MPID_nem_ofi_ssend(struct MPIDI_VC *vc,
+int ADD_SUFFIX(MPID_nem_ofi_ssend)(struct MPIDI_VC *vc,
const void *buf,
int count,
MPI_Datatype datatype,
@@ -317,7 +241,7 @@ int MPID_nem_ofi_ssend(struct MPIDI_VC *vc,
{
int mpi_errno = MPI_SUCCESS;
BEGIN_FUNC(FCNAME);
- mpi_errno = do_isend(vc, buf, count, datatype, dest,
+ mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest,
tag, comm, context_offset, request, MPID_SYNC_SEND);
END_FUNC(FCNAME);
return mpi_errno;
@@ -325,7 +249,7 @@ int MPID_nem_ofi_ssend(struct MPIDI_VC *vc,
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_issend)
-int MPID_nem_ofi_issend(struct MPIDI_VC *vc,
+int ADD_SUFFIX(MPID_nem_ofi_issend)(struct MPIDI_VC *vc,
const void *buf,
int count,
MPI_Datatype datatype,
@@ -341,67 +265,86 @@ int MPID_nem_ofi_issend(struct MPIDI_VC *vc,
return mpi_errno;
}
-#define DO_CANCEL(req) \
-({ \
- int mpi_errno = MPI_SUCCESS; \
- int ret; \
- BEGIN_FUNC(FCNAME); \
- MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); \
- ret = fi_cancel((fid_t)gl_data.endpoint, \
- &(REQ_OFI(req)->ofi_context)); \
- if (ret == 0) { \
- MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); \
- } else { \
- MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE); \
- } \
- END_FUNC(FCNAME); \
- return mpi_errno; \
-})
#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_cancel_send)
-int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPID_Request *sreq)
+#define FCNAME DECL_FUNC(MPID_nem_ofi_recv_posted)
+int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Request *rreq)
{
- DO_CANCEL(sreq);
-}
+ int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
+ uint64_t match_bits = 0, mask_bits = 0;
+ fi_addr_t remote_proc = 0;
+ MPIDI_msg_sz_t data_sz;
+ MPI_Aint dt_true_lb;
+ MPID_Datatype *dt_ptr;
+ MPIR_Context_id_t context_id;
+ char *recv_buffer;
+ BEGIN_FUNC(FCNAME);
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_cancel_recv)
-int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPID_Request *rreq)
-{
- DO_CANCEL(rreq);
+ /* ------------------------ */
+ /* Initialize the request */
+ /* ------------------------ */
+ MPID_nem_ofi_init_req(rreq);
+ REQ_OFI(rreq)->event_callback = ADD_SUFFIX(MPID_nem_ofi_recv_callback);
+ REQ_OFI(rreq)->vc = vc;
+
+ /* ---------------------------------------------------- */
+ /* Fill out the match info, and allocate the pack buffer */
+ /* a send request */
+ /* ---------------------------------------------------- */
+ src = rreq->dev.match.parts.rank;
+ tag = rreq->dev.match.parts.tag;
+ context_id = rreq->dev.match.parts.context_id;
+#if API_SET == API_SET_1
+ match_bits = init_recvtag(&mask_bits, context_id, src, tag);
+#elif API_SET == API_SET_2
+ match_bits = init_recvtag_2(&mask_bits, context_id, tag);
+#endif
+ OFI_ADDR_INIT(src, vc, remote_proc);
+ MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype,
+ dt_contig, data_sz, dt_ptr, dt_true_lb);
+ if (dt_contig) {
+ recv_buffer = (char *) rreq->dev.user_buf + dt_true_lb;
+ }
+ else {
+ recv_buffer = (char *) MPIU_Malloc(data_sz);
+ MPIU_ERR_CHKANDJUMP1(recv_buffer == NULL, mpi_errno, MPI_ERR_OTHER,
+ "**nomem", "**nomem %s", "Recv Pack Buffer alloc");
+ REQ_OFI(rreq)->pack_buffer = recv_buffer;
+ }
+
+ /* ---------------- */
+ /* Post the receive */
+ /* ---------------- */
+ uint64_t msgflags;
+ iovec_t iov;
+ msg_tagged_t msg;
+ iov.iov_base = recv_buffer;
+ iov.iov_len = data_sz;
+ if(REQ_OFI(rreq)->match_state == PEEK_FOUND)
+ msgflags = FI_CLAIM;
+ else
+ msgflags = 0ULL;
+
+ msg.msg_iov = &iov;
+ msg.desc = NULL;
+ msg.iov_count = 1;
+ msg.addr = remote_proc;
+ msg.tag = match_bits;
+ msg.ignore = mask_bits;
+ msg.context = (void *) &(REQ_OFI(rreq)->ofi_context);
+ msg.data = 0;
+ FI_RC(fi_trecvmsg(gl_data.endpoint,&msg,msgflags), trecv);
+ END_FUNC_RC(FCNAME);
}
+
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_posted)
-void MPID_nem_ofi_anysource_posted(MPID_Request * rreq)
+void ADD_SUFFIX(MPID_nem_ofi_anysource_posted)(MPID_Request * rreq)
{
int mpi_errno = MPI_SUCCESS;
BEGIN_FUNC(FCNAME);
- mpi_errno = MPID_nem_ofi_recv_posted(NULL, rreq);
+ mpi_errno = ADD_SUFFIX(MPID_nem_ofi_recv_posted)(NULL, rreq);
MPIU_Assert(mpi_errno == MPI_SUCCESS);
END_FUNC(FCNAME);
}
-
-#undef FCNAME
-#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_matched)
-int MPID_nem_ofi_anysource_matched(MPID_Request * rreq)
-{
- int mpi_errno = TRUE;
- int ret;
- BEGIN_FUNC(FCNAME);
- /* ----------------------------------------------------- */
- /* Netmod has notified us that it has matched an any */
- /* source request on another device. We have the chance */
- /* to cancel this shared request if it has been posted */
- /* ----------------------------------------------------- */
- ret = fi_cancel((fid_t) gl_data.endpoint, &(REQ_OFI(rreq)->ofi_context));
- if (ret == 0) {
- /* --------------------------------------------------- */
- /* Request cancelled: cancel and complete the request */
- /* --------------------------------------------------- */
- mpi_errno = FALSE;
- }
- END_FUNC(FCNAME);
- return mpi_errno;
-}
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c | 115 ++++---
.../ch3/channels/nemesis/netmod/ofi/ofi_impl.h | 146 ++-------
.../ch3/channels/nemesis/netmod/ofi/ofi_init.c | 32 +--
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c | 106 ++++---
.../nemesis/netmod/ofi/ofi_probe_template.c | 176 ++++++++++
.../ch3/channels/nemesis/netmod/ofi/ofi_progress.c | 167 +---------
.../channels/nemesis/netmod/ofi/ofi_tag_layout.h | 144 ++++++++
.../ch3/channels/nemesis/netmod/ofi/ofi_tagged.c | 343 ++------------------
.../ofi/{ofi_tagged.c => ofi_tagged_template.c} | 323 ++++++++-----------
9 files changed, 676 insertions(+), 876 deletions(-)
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
create mode 100644 src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h
copy src/mpid/ch3/channels/nemesis/netmod/ofi/{ofi_tagged.c => ofi_tagged_template.c} (65%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-10-geb69611
by noreply@mpich.org 24 Apr '15
by noreply@mpich.org 24 Apr '15
24 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via eb69611ecdb0cd2f65dd4076a50c13d3fbc4531c (commit)
via caa70a87a2fc04cf113761d2eb2e0c60d86c6e25 (commit)
from 263d5b543a2db5ea422cc2750836bc37107c3843 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/eb69611ecdb0cd2f65dd4076a50c13d3f…
commit eb69611ecdb0cd2f65dd4076a50c13d3fbc4531c
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Fri Apr 24 13:45:30 2015 -0500
bug-fix: error macro for atomic datatype checking
The atomic datatype check macro is meant to use the datatype itself
to create an error string. This removes the unused "name" argument.
Fixes #1906
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 5a5478f..cf7ed3c 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -248,7 +248,7 @@ cvars:
} \
}
-#define MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype_, name_, err_) \
+#define MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype_, err_) \
do { \
if (!MPIR_Type_is_rma_atomic(datatype_)) { \
err_ = MPIR_Err_create_code(MPI_SUCCESS, \
@@ -257,7 +257,7 @@ cvars:
MPI_ERR_TYPE, \
"**rmatypenotatomic", \
"**rmatypenotatomic %D", \
- name_); \
+ datatype); \
goto fn_fail; \
} \
} while (0)
diff --git a/src/mpi/rma/compare_and_swap.c b/src/mpi/rma/compare_and_swap.c
index ecd4921..3dbc92f 100644
--- a/src/mpi/rma/compare_and_swap.c
+++ b/src/mpi/rma/compare_and_swap.c
@@ -119,7 +119,7 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
/* Check if datatype is a C integer, Fortran Integer,
logical, or byte, per the classes given on page 165. */
- MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype, "datatype", mpi_errno);
+ MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype, mpi_errno);
if (win_ptr->create_flavor != MPI_WIN_FLAVOR_DYNAMIC)
MPIR_ERRTEST_DISP(target_disp, mpi_errno);
diff --git a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
index d31b4be..3f1bac9 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
@@ -85,7 +85,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
}
/* Check if datatype is a C integer, Fortran Integer,
logical, or byte, per the classes given on page 165. */
- MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype, "datatype", mpi_errno);
+ MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype, mpi_errno);
req = (MPIDI_Win_request *) MPIU_Calloc0(1, MPIDI_Win_request);
req->win = win;
http://git.mpich.org/mpich.git/commitdiff/caa70a87a2fc04cf113761d2eb2e0c60d…
commit caa70a87a2fc04cf113761d2eb2e0c60d86c6e25
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Apr 23 15:49:15 2015 -0500
tsuite: test to expose limitation in Portals4 netmod
Tests handling of PTL_NO_SPACE scenario where the max entry_list
limit is reached in the Portals4 netmod.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 0886a79..d1c2967 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -530,6 +530,7 @@
/rma/putfence1
/rma/putpscw1
/rma/wintest
+/rma/manyget
/spawn/namepub
/spawn/disconnect3
/spawn/spaiccreate
diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index 1c42b1c..50785e9 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -144,7 +144,8 @@ noinst_PROGRAMS = \
atomic_rmw_fop \
atomic_rmw_cas \
atomic_rmw_gacc \
- acc-pairtype
+ acc-pairtype \
+ manyget
if BUILD_MPIX_TESTS
noinst_PROGRAMS += aint
diff --git a/test/mpi/rma/manyget.c b/test/mpi/rma/manyget.c
new file mode 100644
index 0000000..176cc18
--- /dev/null
+++ b/test/mpi/rma/manyget.c
@@ -0,0 +1,59 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2015 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+/* This test triggers a limitation in the Portals4 netmod where
+ * too many large messages can overflow the available ME entries
+ * (PTL_NO_SPACE). Our approach is to queue the entire send message
+ * in the Rportals layer until we know there is ME space available.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <mpi.h>
+
+#define BUFSIZE (128*1024)
+
+int main(int argc, char *argv[])
+{
+ int i, rank, size;
+ int *buf;
+ MPI_Win win;
+
+ MPI_Init(&argc, &argv);
+
+ buf = malloc(BUFSIZE);
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+ if (size != 2) {
+ printf("test must be run with 2 processes!\n");
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
+
+ if (rank == 0)
+ MPI_Win_create(buf, sizeof(int), BUFSIZE / sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD,
+ &win);
+ else
+ MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+
+ MPI_Win_fence(0, win);
+
+ if (rank == 1) {
+ for (i = 0; i < 100000; i++)
+ MPI_Get(buf, BUFSIZE / sizeof(int), MPI_INT, 0, 0, BUFSIZE / sizeof(int), MPI_INT, win);
+ }
+
+ MPI_Win_fence(0, win);
+ MPI_Win_free(&win);
+
+ if (rank == 0)
+ printf(" No Errors\n");
+
+ free(buf);
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index 52e94fa..fa8acee 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -133,6 +133,7 @@ atomic_rmw_cas 3
atomic_rmw_gacc 3
@mpix@aint 2 strict=false
acc-pairtype 2
+manyget 2
## This test is not strictly correct. This was meant to test out the
## case when MPI_Test is not nonblocking. However, we ended up
-----------------------------------------------------------------------
Summary of changes:
src/include/mpierrs.h | 4 +-
src/mpi/rma/compare_and_swap.c | 2 +-
.../pamid/src/onesided/mpid_win_compare_and_swap.c | 2 +-
test/mpi/.gitignore | 1 +
test/mpi/rma/Makefile.am | 3 +-
test/mpi/rma/manyget.c | 59 ++++++++++++++++++++
test/mpi/rma/testlist.in | 1 +
7 files changed, 67 insertions(+), 5 deletions(-)
create mode 100644 test/mpi/rma/manyget.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-8-g263d5b5
by noreply@mpich.org 24 Apr '15
by noreply@mpich.org 24 Apr '15
24 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 263d5b543a2db5ea422cc2750836bc37107c3843 (commit)
from 2b975462f59dccaea7101ebebf25747c41f3c08a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/263d5b543a2db5ea422cc2750836bc371…
commit 263d5b543a2db5ea422cc2750836bc37107c3843
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Thu Apr 23 22:43:47 2015 -0500
Promote MPL_large_writev/readv return types to ssize_t.
We were originally returning "int" from these functions because the
idea was that they'd never read/write more than INT_MAX. However, in
the case where the upper layer passes an IOV, where the first element
is smaller than INT_MAX, but the next element is larger than INT_MAX,
the total number of bytes sent might be larger than INT_MAX.
This was occassionally showing up as an error on Mac OS for large
message communication.
Signed-off-by: Antonio J. Pena <apenya(a)mcs.anl.gov>
diff --git a/src/mpl/include/mplsock.h b/src/mpl/include/mplsock.h
index 4759fca..fc4155f 100644
--- a/src/mpl/include/mplsock.h
+++ b/src/mpl/include/mplsock.h
@@ -34,8 +34,8 @@ extern "C" {
#endif
/* *INDENT-OFF* */
-int MPL_large_writev(int fd, const struct iovec *iov, int iovcnt);
-int MPL_large_readv(int fd, const struct iovec *iov, int iovcnt);
+ssize_t MPL_large_writev(int fd, const struct iovec *iov, int iovcnt);
+ssize_t MPL_large_readv(int fd, const struct iovec *iov, int iovcnt);
/* *INDENT-ON* */
#if defined(__cplusplus)
diff --git a/src/mpl/src/mplsock.c b/src/mpl/src/mplsock.c
index 087ebd5..4c6cdd5 100644
--- a/src/mpl/src/mplsock.c
+++ b/src/mpl/src/mplsock.c
@@ -16,7 +16,7 @@
* negligible compared to the system call overhead for small messages
* and compared to the data transmission overhead for large
* messages. */
-int MPL_large_writev(int fd, const struct iovec *iov, int iovcnt)
+ssize_t MPL_large_writev(int fd, const struct iovec *iov, int iovcnt)
{
ssize_t total_size, tmp;
struct iovec dummy;
@@ -68,7 +68,7 @@ int MPL_large_writev(int fd, const struct iovec *iov, int iovcnt)
}
-int MPL_large_readv(int fd, const struct iovec *iov, int iovcnt)
+ssize_t MPL_large_readv(int fd, const struct iovec *iov, int iovcnt)
{
ssize_t total_size, tmp;
struct iovec dummy;
-----------------------------------------------------------------------
Summary of changes:
src/mpl/include/mplsock.h | 4 ++--
src/mpl/src/mplsock.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b2-7-g2b97546
by noreply@mpich.org 24 Apr '15
by noreply@mpich.org 24 Apr '15
24 Apr '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 2b975462f59dccaea7101ebebf25747c41f3c08a (commit)
via f2d0f7fe87a42e2b751e77a203b157249ed2d1f6 (commit)
from d04c8a1e86c811422bf6d5f5afd78f8584ae36b0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/2b975462f59dccaea7101ebebf25747c4…
commit 2b975462f59dccaea7101ebebf25747c41f3c08a
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Mar 17 13:25:52 2015 -0700
build-system: add lib64 dirs only if they exist
Stop unconditionally adding lib64 directories to LDFLAGS. This simplifies
linker commands and removes unnecessary flags from the compile wrappers.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/confdb/aclocal_libs.m4 b/confdb/aclocal_libs.m4
index 9dff742..09e9c4c 100644
--- a/confdb/aclocal_libs.m4
+++ b/confdb/aclocal_libs.m4
@@ -47,8 +47,11 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
[AS_IF([test -n "${with_$1}"],
dnl is adding lib64 by default really the right thing to do? What if
dnl we are on a 32-bit host that happens to have both lib dirs available?
- [PAC_APPEND_FLAG([-L${with_$1}/lib64],[LDFLAGS])
- PAC_APPEND_FLAG([-L${with_$1}/lib],[LDFLAGS])])])
+ [PAC_APPEND_FLAG([-L${with_$1}/lib],[LDFLAGS])
+ AS_IF([test -d "${with_$1}/lib64}"],
+ [PAC_APPEND_FLAG([-L${with_$1}/lib64],[LDFLAGS])])
+ ])
+ ])
])
http://git.mpich.org/mpich.git/commitdiff/f2d0f7fe87a42e2b751e77a203b157249…
commit f2d0f7fe87a42e2b751e77a203b157249ed2d1f6
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Mon Feb 23 16:17:44 2015 -0600
build-system: fix prepend/append flag macros
Contains 2 fixes:
1. Use double quotes in grep expressions so variable expansion takes place.
2. Tweak grep expressions so a substring match will not cause to new flag to
be incorrectly de-duped.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/confdb/aclocal_util.m4 b/confdb/aclocal_util.m4
index 575a144..2648be5 100644
--- a/confdb/aclocal_util.m4
+++ b/confdb/aclocal_util.m4
@@ -64,7 +64,7 @@ dnl argument is already present in the variable
AC_DEFUN([PAC_APPEND_FLAG],[
AC_REQUIRE([AC_PROG_FGREP])
AS_IF(
- [echo "$$2" | $FGREP -e '$1' >/dev/null 2>&1],
+ [echo "$$2" | $FGREP -e "\<$1\>" >/dev/null 2>&1],
[echo "$2(='$$2') contains '$1', not appending" >&AS_MESSAGE_LOG_FD],
[echo "$2(='$$2') does not contain '$1', appending" >&AS_MESSAGE_LOG_FD
$2="$$2 $1"]
@@ -80,7 +80,7 @@ dnl should be added in reverse order.
AC_DEFUN([PAC_PREPEND_FLAG],[
AC_REQUIRE([AC_PROG_FGREP])
AS_IF(
- [echo "$$2" | $FGREP -e '$1' >/dev/null 2>&1],
+ [echo "$$2" | $FGREP -e "\<$1\>" >/dev/null 2>&1],
[echo "$2(='$$2') contains '$1', not prepending" >&AS_MESSAGE_LOG_FD],
[echo "$2(='$$2') does not contain '$1', prepending" >&AS_MESSAGE_LOG_FD
$2="$1 $$2"]
-----------------------------------------------------------------------
Summary of changes:
confdb/aclocal_libs.m4 | 7 +++++--
confdb/aclocal_util.m4 | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0