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
February 2013
- 2 participants
- 25 discussions
[mpich] MPICH primary repository branch, master, updated. v3.0.2-57-gf5be9cd
by noreply@mpich.org 28 Feb '13
by noreply@mpich.org 28 Feb '13
28 Feb '13
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 f5be9cdbf563dd55fa935967903241038ed60fae (commit)
from 941dfe7d3552604d11426c14f26d8ec88f8391b7 (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/f5be9cdbf563dd55fa935967903241038…
commit f5be9cdbf563dd55fa935967903241038ed60fae
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Wed Feb 27 11:39:23 2013 -0600
Fixed MPI_Get_elements returning wrong values
Fix bug #884. The routine was returning wrong results for derived
datatypes. Two comparisons have been fixed in PMPI_LOCAL MPI_Count
MPIR_Type_get_elements, src/mpi/datatype/get_elements_x.c. Two new
test cases, get_elems_d and get_elems_u have been provided in f90.
Reviewer: goodell
diff --git a/src/mpi/datatype/get_elements_x.c b/src/mpi/datatype/get_elements_x.c
index fe8eefc..a511452 100644
--- a/src/mpi/datatype/get_elements_x.c
+++ b/src/mpi/datatype/get_elements_x.c
@@ -147,7 +147,7 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_basic_type_elements(MPI_Count *bytes_p,
* Arguments:
* - bytes_p - input/output byte count
* - count - maximum number of this type to subtract from the bytes; a count
- * of -1 indicates use as many as we like
+ * of <0 indicates use as many as we like
* - datatype - input datatype
*
* Returns number of elements available given the two constraints of number of
@@ -232,14 +232,14 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count *bytes_p,
* cycle through the types just as the struct would. thus the
* nested loops.
*
- * We need to keep going until we see a "0" elements returned
+ * We need to keep going until we get less elements than expected
* or we run out of bytes.
*/
last_nr_elements = 1; /* seed value */
for (j=0;
- (count == -1 || j < count) &&
+ (count < 0 || j < count) &&
*bytes_p > 0 && last_nr_elements > 0;
j++)
{
@@ -255,7 +255,7 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count *bytes_p,
MPIU_Assert(last_nr_elements >= 0);
- if (last_nr_elements == 0) break;
+ if (last_nr_elements < ints[i+1]) break;
}
}
return nr_elements;
diff --git a/test/mpi/f90/datatype/Makefile.ap b/test/mpi/f90/datatype/Makefile.ap
index 8046393..9f94666 100644
--- a/test/mpi/f90/datatype/Makefile.ap
+++ b/test/mpi/f90/datatype/Makefile.ap
@@ -1,6 +1,6 @@
## vim: set ft=automake :
-noinst_PROGRAMS += structf indtype createf90 sizeof kinds trf90
+noinst_PROGRAMS += structf indtype createf90 sizeof kinds trf90 get_elem_d get_elem_u
structf_SOURCES = structf.f90
indtype_SOURCES = indtype.f90
@@ -8,4 +8,6 @@ createf90_SOURCES = createf90.f90
sizeof_SOURCES = sizeof.f90
kinds_SOURCES = kinds.f90
trf90_SOURCES = trf90.f90
+get_elem_d_SOURCES = get_elem_d.f90
+get_elem_u_SOURCES = get_elem_u.f90
diff --git a/test/mpi/f90/datatype/get_elem_d.f90 b/test/mpi/f90/datatype/get_elem_d.f90
new file mode 100644
index 0000000..6b9edde
--- /dev/null
+++ b/test/mpi/f90/datatype/get_elem_d.f90
@@ -0,0 +1,124 @@
+! -*- Mode: Fortran; -*-
+!
+! (C) 2013 by Argonne National Laboratory.
+! See COPYRIGHT in top-level directory.
+!
+
+! Based on a test written by Jim Hoekstra on behalf of Cray, Inc.
+! see ticket #884 https://trac.mpich.org/projects/mpich/ticket/884
+
+program get_elem_d
+
+ use mpi
+ implicit none
+
+ integer, parameter :: verbose=0
+ integer, parameter :: cmax=100,dmax=100,imax=60
+ integer, parameter :: nb=2
+ integer :: comm,rank,size,dest,ierror,errs=0
+ integer :: status(MPI_STATUS_SIZE)
+ integer :: i,ii,count,ka,j,jj,k,kj,krat,tag=100
+ integer :: blklen(nb)=(/2,2/)
+ integer :: types(nb)=(/MPI_DOUBLE_PRECISION,MPI_INTEGER/)
+ integer(kind=MPI_ADDRESS_KIND) :: disp(nb)
+ integer :: newtype,ntlen,ians(0:23),ians0(0:3),ians1(20),ians2(20)
+ double precision :: dbuff(dmax), a
+ integer :: ibuff(imax)
+ character :: cbuff(cmax)='X'
+
+ call MPI_Init(ierror)
+ comm=MPI_COMM_WORLD
+ call MPI_Comm_size(comm, size, ierror)
+ dest=size-1
+ call MPI_Comm_rank(comm, rank, ierror)
+ call MPI_Sizeof (j, kj, ierror)
+ call MPI_Sizeof (a, ka, ierror)
+ ntlen=2*ka+2*kj
+ krat=ntlen/kj
+ disp=(/0,2*ka/)
+
+ ! calculate answers for expected i values for Get_elements with derived type
+ ians0(0)=ka
+ ians0(1)=2*ka
+ ians0(2)=2*ka+kj
+ ians0(3)=2*ka+2*kj
+ ii=0
+ do i=1,24
+ if (i .eq. ians0(ii)) ii=ii+1
+ ians1(i)=ii
+ enddo
+ if (rank == 0 .and. verbose > 0) print *, (ians1(k),k=1,24)
+ jj=0
+ do j=0,19,4
+ ians(j)=jj+ka/kj
+ ians(j+1)=jj+2*(ka/kj)
+ ians(j+2)=jj+2*(ka/kj)+1
+ ians(j+3)=jj+2*(ka/kj)+2
+ if (rank == 0 .and. verbose > 0) print *, (ians(k),k=j,j+3)
+ jj=jj+ntlen/kj
+ enddo
+ ii=0
+ do i=1,20
+ if (i .eq. ians(ii)) ii=ii+1
+ ians2(i)=ii
+ enddo
+ if (rank == 0 .and. verbose > 0) print *, (ians2(k),k=1,20)
+
+ if (verbose > 0) print *, MPI_UNDEFINED
+
+ call MPI_Type_create_struct(nb, blklen, disp, types, newtype, ierror)
+ call MPI_Type_commit(newtype, ierror)
+
+ do i=1,24
+ if (rank == 0) then
+ call MPI_Send(cbuff, i, MPI_BYTE, dest, 100, comm, ierror)
+
+ else if (rank == dest) then
+
+ ! first receive
+ call MPI_Recv(dbuff, dmax, newtype, 0, 100, comm, status, ierror)
+ ! check on MPI_Get_elements
+ call MPI_Get_elements(status, newtype, count, ierror)
+ if (count .ne. ians1(i)) then
+ errs=errs+1
+ write (*,fmt="(i2,' R1 Get_elements count=',i3,&
+ &' but should be ',i3)") i,count,ians1(i)
+ endif
+
+ else
+ ! other ranks do not participate
+ endif
+ enddo
+
+ do i=1,20
+ if (rank == 0) then
+ call MPI_Send(ibuff, i, MPI_INTEGER, dest, 100, comm, ierror)
+
+ else if (rank == dest) then
+
+ ! second receive
+ call MPI_Recv(dbuff, dmax, newtype, 0, 100, comm, status, ierror)
+ ! check on MPI_Get_elements
+ call MPI_Get_elements(status, newtype, count, ierror)
+ if (count .ne. ians2(i)) then
+ errs=errs+1
+ write (*,fmt="(i2,' R2 Get_elements count=',i3,&
+ &' but should be ',i3)") i,count,ians2(i)
+ endif
+ else
+ ! other ranks do not participate
+ endif
+ enddo
+
+ if (rank .eq. dest) then
+ if (errs .eq. 0) then
+ write (*,*) " No Errors"
+ else
+ print *, 'errs=',errs
+ endif
+ endif
+
+ call MPI_Type_free(newtype, ierror)
+ call MPI_Finalize(ierror)
+
+end program get_elem_d
diff --git a/test/mpi/f90/datatype/get_elem_u.f90 b/test/mpi/f90/datatype/get_elem_u.f90
new file mode 100644
index 0000000..aa9f8fe
--- /dev/null
+++ b/test/mpi/f90/datatype/get_elem_u.f90
@@ -0,0 +1,72 @@
+! -*- Mode: Fortran; -*-
+!
+! (C) 2013 by Argonne National Laboratory.
+! See COPYRIGHT in top-level directory.
+!
+
+! Based on a test written by Jim Hoekstra on behalf of Cray, Inc.
+! see ticket #884 https://trac.mpich.org/projects/mpich/ticket/884
+
+PROGRAM get_elem_u
+
+ USE mpi
+ IMPLICIT NONE
+ INTEGER RANK, SIZE, IERR, COMM, errs
+ INTEGER MAX, I, K, dest
+ INTEGER STATUS(MPI_STATUS_SIZE)
+
+ INTEGER, PARAMETER :: nb=2
+ INTEGER :: blklen(nb)=(/1,1/)
+ INTEGER :: types(nb)=(/MPI_DOUBLE_PRECISION,MPI_CHAR/)
+ INTEGER(kind=MPI_ADDRESS_KIND) :: disp(nb)=(/0,8/)
+
+ INTEGER, PARAMETER :: amax=200
+ INTEGER :: type1, type2, extent
+ REAL :: a(amax)
+
+ errs = 0
+ CALL MPI_Init( ierr )
+ COMM = MPI_COMM_WORLD
+ CALL MPI_Comm_rank(COMM,RANK,IERR)
+ CALL MPI_Comm_size(COMM,SIZE,IERR)
+ dest=size-1
+
+ CALL MPI_Type_create_struct(nb, blklen, disp, types, type1, ierr)
+ CALL MPI_Type_commit(type1, ierr)
+ CALL MPI_Type_extent(type1, extent, ierr)
+
+ CALL MPI_Type_contiguous(4, Type1, Type2, ierr)
+ CALL MPI_Type_commit(Type2, ierr)
+ CALL MPI_Type_extent(Type2, extent, ierr)
+
+ DO k=1,17
+
+ IF(rank .EQ. 0) THEN
+
+ ! send k copies of datatype Type1
+ CALL MPI_Send(a, k, Type1, dest, 0, comm, ierr)
+
+ ELSE IF (rank == dest) THEN
+
+ CALL MPI_Recv(a, 200, Type2, 0, 0, comm, status, ierr)
+ CALL MPI_Get_elements(status, Type2, i, ierr)
+ IF (i .NE. 2*k) THEN
+ errs = errs+1
+ PRINT *, "k=",k," MPI_Get_elements returns", i, ", but it should be", 2*k
+ END IF
+
+ ELSE
+ ! thix rank does not particupate
+ END IF
+ enddo
+
+ CALL MPI_Type_free(type1, ierr)
+ CALL MPI_Type_free(type2, ierr)
+
+ CALL MPI_Finalize( ierr )
+
+ IF(rank .EQ. 0 .AND. errs .EQ. 0) THEN
+ PRINT *, " No Errors"
+ END IF
+
+END PROGRAM get_elem_u
diff --git a/test/mpi/f90/datatype/testlist.ap b/test/mpi/f90/datatype/testlist.ap
index 77964f6..9a402a4 100644
--- a/test/mpi/f90/datatype/testlist.ap
+++ b/test/mpi/f90/datatype/testlist.ap
@@ -4,3 +4,5 @@ createf90 1
sizeof 1
kinds 2 mpiversion=2.2
trf90 1
+get_elem_d 2
+get_elem_u 2
-----------------------------------------------------------------------
Summary of changes:
src/mpi/datatype/get_elements_x.c | 8 +-
test/mpi/f90/datatype/Makefile.ap | 4 +-
test/mpi/f90/datatype/get_elem_d.f90 | 124 ++++++++++++++++++++++++++++++++++
test/mpi/f90/datatype/get_elem_u.f90 | 72 ++++++++++++++++++++
test/mpi/f90/datatype/testlist.ap | 2 +
5 files changed, 205 insertions(+), 5 deletions(-)
create mode 100644 test/mpi/f90/datatype/get_elem_d.f90
create mode 100644 test/mpi/f90/datatype/get_elem_u.f90
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-56-g941dfe7
by noreply@mpich.org 28 Feb '13
by noreply@mpich.org 28 Feb '13
28 Feb '13
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 941dfe7d3552604d11426c14f26d8ec88f8391b7 (commit)
from 59e481288a7692ba5d93d76b30dde5e99d51e88c (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/941dfe7d3552604d11426c14f26d8ec88…
commit 941dfe7d3552604d11426c14f26d8ec88f8391b7
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 28 11:09:05 2013 -0600
Updated changes file with RMA changes for 3.0.3
diff --git a/CHANGES b/CHANGES
index 89b3316..20f4067 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,17 @@
Changes in 3.0.3
===============================================================================
+ # RMA: Added a new mechanism for piggybacking RMA synchronization operations,
+ which improves the performance of several synchronization operations,
+ including Flush.
+
+ # RMA: Added an optimization to utilize the MPI_MODE_NOCHECK assertion in
+ passive target RMA to improve performance by eliminating a lock request
+ message.
+
+ # RMA: Added a default implementation of shared memory windows to CH3. This
+ adds support for this MPI 3.0 feature to the ch3:sock device.
+
# PM/PMI: Upgraded to hwloc-1.6.2rc1. This version uses libpciaccess
instead of libpci, to workaround the GPL license used by libpci.
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-55-g59e4812
by noreply@mpich.org 25 Feb '13
by noreply@mpich.org 25 Feb '13
25 Feb '13
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 59e481288a7692ba5d93d76b30dde5e99d51e88c (commit)
from 882c80f2639e3da840d9feac1f7fd779a54411c2 (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/59e481288a7692ba5d93d76b30dde5e99…
commit 59e481288a7692ba5d93d76b30dde5e99d51e88c
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Mon Feb 25 14:49:35 2013 -0600
Added missing CS ENTER/EXIT guards to type_commit
MPI_Type_commit was missing CS ENTER/EXIT guards, which may be causing a
conflict with RMA code that creates derived datatypes at the target
process, when MPICH_ASYNC_PROGRESS is specified. This may have fixed #1766.
Reviewer: goodell
diff --git a/src/mpi/datatype/type_commit.c b/src/mpi/datatype/type_commit.c
index b34303e..cba1fcd 100644
--- a/src/mpi/datatype/type_commit.c
+++ b/src/mpi/datatype/type_commit.c
@@ -77,6 +77,7 @@ int MPI_Type_commit(MPI_Datatype *datatype)
MPIR_ERRTEST_INITIALIZED_ORDIE();
+ MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_COMMIT);
/* Validate parameters, especially handles needing to be converted */
@@ -116,6 +117,7 @@ int MPI_Type_commit(MPI_Datatype *datatype)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_COMMIT);
+ MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
-----------------------------------------------------------------------
Summary of changes:
src/mpi/datatype/type_commit.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-54-g882c80f
by noreply@mpich.org 22 Feb '13
by noreply@mpich.org 22 Feb '13
22 Feb '13
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 882c80f2639e3da840d9feac1f7fd779a54411c2 (commit)
via 1d64a433d6bfe73a195123030c4bb0de6a1ecbfa (commit)
via 8cbf64149eef321b6900671f4f060afffd1f9a77 (commit)
via 80285037077d0ca3b13025b098f7c6755cf368be (commit)
via 06411a39d9c737f8b8440eb766eb0c571225a2c7 (commit)
from bf6355f4fafc14088c69fd0761e075adeef7b591 (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/882c80f2639e3da840d9feac1f7fd779a…
commit 882c80f2639e3da840d9feac1f7fd779a54411c2
Merge: bf6355f 1d64a43
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Fri Feb 22 14:55:55 2013 -0600
Merge branch 'shr-mem-win-ch3'
This merge rounds out shared memory window support in CH3. Note that CH3
currently supports shared memory windows on MPI_COMM_SELF (and dups).
http://git.mpich.org/mpich.git/commitdiff/1d64a433d6bfe73a195123030c4bb0de6…
commit 1d64a433d6bfe73a195123030c4bb0de6a1ecbfa
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Fri Feb 22 12:55:40 2013 -0600
Moved window flavor error checking to public API
Hoisted the window flavor error check in Win_shared_query from Nemesis
up to the public API where it belongs.
Reviewer: apenya
diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 14998ea..330c296 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -245,6 +245,15 @@
} \
} while (0)
+#define MPIR_ERRTEST_WIN_FLAVOR(win_, flavor_, err_) \
+ do { \
+ if ((win_)->create_flavor != (flavor_)) { \
+ MPIU_ERR_SETANDSTMT1((err_), MPI_ERR_RMA_FLAVOR, \
+ goto fn_fail, "**winflavor", \
+ "**winflavor %s", #flavor_); \
+ } \
+ } while (0)
+
#define MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf,count,err) \
if (count > 0 && sendbuf == MPI_IN_PLACE) { \
err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
diff --git a/src/mpi/errhan/errnames.txt b/src/mpi/errhan/errnames.txt
index 4a482c5..cda2f7b 100644
--- a/src/mpi/errhan/errnames.txt
+++ b/src/mpi/errhan/errnames.txt
@@ -187,6 +187,7 @@ MPI_TYPECLASS_INTEGER, or MPI_TYPECLASS_COMPLEX
**rmatypenotatomic: Datatype not permitted for atomic operations
**rmatypenotatomic %D: Datatype (%D) not permitted for atomic operations
**winflavor: Window flavor is not compatible with the given operation
+**winflavor %s: Window flavor is not compatible with the given operation (expected %s)
**typenotpredefined: Datatype must be predefined
diff --git a/src/mpi/rma/win_shared_query.c b/src/mpi/rma/win_shared_query.c
index 4f4c00b..dc2fc88 100644
--- a/src/mpi/rma/win_shared_query.c
+++ b/src/mpi/rma/win_shared_query.c
@@ -112,6 +112,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,
comm_ptr = win_ptr->comm_ptr;
MPIR_ERRTEST_SEND_RANK(comm_ptr, rank, mpi_errno);
+ MPIR_ERRTEST_WIN_FLAVOR(win_ptr, MPI_WIN_FLAVOR_SHARED, mpi_errno);
}
MPID_END_ERROR_CHECKS;
}
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
index b3e5278..6aa1729 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
@@ -22,10 +22,6 @@ int MPIDI_CH3_SHM_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint
comm_size = win_ptr->comm_ptr->local_size;
- if (win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
- MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_RMA_FLAVOR, "**winflavor");
- }
-
/* Scan the sizes to locate the first process that allocated a nonzero
* amount of space */
if (target_rank == MPI_PROC_NULL) {
http://git.mpich.org/mpich.git/commitdiff/8cbf64149eef321b6900671f4f060afff…
commit 8cbf64149eef321b6900671f4f060afffd1f9a77
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Tue Feb 12 16:25:51 2013 -0600
CH3 default shared memory window implementation
This adds a default shared memory window implementation for CH3 (used
by e.g. sock), which works only for MPI_COMM_SELF (this is what the
default comm_split_type provides). This closes ticket #1666.
Reviewer: apenya
diff --git a/src/mpid/ch3/errnames.txt b/src/mpid/ch3/errnames.txt
index 49fc6b7..a3308bc 100644
--- a/src/mpid/ch3/errnames.txt
+++ b/src/mpid/ch3/errnames.txt
@@ -41,3 +41,4 @@
**ch3|rma_flags:Invalid combination of RMA packet flags
**ch3|nocheck_invalid:MPI_MODE_NOCHECK was specified, but the lock was not available at the target
**ch3|rma_msg:RMA message operation failed
+**ch3|win_shared_comm:Cannot map shared memory using the given communicator
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 48b8663..4efe3c2 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1210,6 +1210,7 @@ void *MPIDI_Alloc_mem(size_t size, MPID_Info *info_ptr);
int MPIDI_Free_mem(void *ptr);
/* internal */
+int MPIDI_SHM_Win_free(MPID_Win **);
int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);
int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
diff --git a/src/mpid/ch3/src/Makefile.mk b/src/mpid/ch3/src/Makefile.mk
index 92a5187..567e46b 100644
--- a/src/mpid/ch3/src/Makefile.mk
+++ b/src/mpid/ch3/src/Makefile.mk
@@ -16,7 +16,6 @@ lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/ch3/src/ch3u_port.c \
src/mpid/ch3/src/ch3u_recvq.c \
src/mpid/ch3/src/ch3u_request.c \
- src/mpid/ch3/src/ch3u_rma_notimpl.c \
src/mpid/ch3/src/ch3u_rma_acc_ops.c \
src/mpid/ch3/src/ch3u_rma_ops.c \
src/mpid/ch3/src/ch3u_rma_reqops.c \
diff --git a/src/mpid/ch3/src/ch3u_rma_notimpl.c b/src/mpid/ch3/src/ch3u_rma_notimpl.c
deleted file mode 100644
index 0a73c7e..0000000
--- a/src/mpid/ch3/src/ch3u_rma_notimpl.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- * (C) 2001 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- */
-
-#include "mpidi_ch3_impl.h"
-#include "mpidrma.h"
-
-/* FUNCNAME macros are included for the MPIDI_FUNC_NOTIMPL macro to keep the
- * state checker from emitting warnings */
-#undef FUNCNAME
-#define FUNCNAME MPIDI_FUNC_NOTIMPL
-#define MPIDI_FUNC_NOTIMPL(state_name) \
- int mpi_errno = MPI_SUCCESS; \
- \
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_##state_name); \
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_##state_name); \
- \
- MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**notimpl"); \
- \
- fn_exit: \
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_##state_name); \
- return mpi_errno; \
- /* --BEGIN ERROR HANDLING-- */ \
- fn_fail: \
- goto fn_exit; \
- /* --END ERROR HANDLING-- */
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_shared_query
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint *size, int *disp_unit, void *baseptr)
-{
- MPIDI_FUNC_NOTIMPL(WIN_FLUSH_LOCAL_ALL)
-}
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index d5480bb..d940a50 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -116,6 +116,63 @@ int MPIDI_Win_free(MPID_Win **win_ptr)
#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_Win_free
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_SHM_Win_free(MPID_Win **win_ptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_SHM_WIN_FREE);
+
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_SHM_WIN_FREE);
+
+ /* Free memory allocated by the default shared memory window
+ implementation. Note that this implementation works only for
+ MPI_COMM_SELF and does not map a shared segment. */
+
+ MPIU_Free((*win_ptr)->base);
+ MPIU_Free((*win_ptr)->shm_base_addrs);
+
+ mpi_errno = MPIDI_Win_free(win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_SHM_WIN_FREE);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Win_shared_query
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint *size,
+ int *disp_unit, void *baseptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
+
+ *(void**) baseptr = win_ptr->shm_base_addrs[0];
+ *size = win_ptr->size;
+ *disp_unit = win_ptr->disp_unit;
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
#define FUNCNAME MPIDI_Put
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index 6c0ad44..fba9694 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -222,17 +222,54 @@ int MPIDI_CH3U_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info *info
void **base_ptr, MPID_Win **win_ptr)
{
int mpi_errno = MPI_SUCCESS;
+ MPID_Comm *comm_self_ptr = NULL;
+ MPID_Group *group_comm, *group_self;
+ int result;
+ MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_WIN_ALLOCATE_SHARED);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_WIN_ALLOCATE_SHARED);
- MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**notimpl");
+#ifdef HAVE_ERROR_CHECKING
+ /* The baseline CH3 implementation only works with MPI_COMM_SELF */
+ MPID_Comm_get_ptr( MPI_COMM_SELF, comm_self_ptr );
+
+ mpi_errno = MPIR_Comm_group_impl(comm_ptr, &group_comm);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Comm_group_impl(comm_self_ptr, &group_self);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Group_compare_impl(group_comm, group_self, &result);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Group_free_impl(group_comm);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Group_free_impl(group_self);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ if (result != MPI_IDENT) {
+ MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_RMA_SHARED, "**ch3|win_shared_comm");
+ }
+#endif
+
+ mpi_errno = MPIDI_CH3U_Win_allocate(size, disp_unit, info, comm_ptr,
+ base_ptr, win_ptr);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ MPIU_CHKPMEM_MALLOC((*win_ptr)->shm_base_addrs, void **,
+ 1 /* comm_size */ * sizeof(void *),
+ mpi_errno, "(*win_ptr)->shm_base_addrs");
+
+ (*win_ptr)->shm_base_addrs[0] = *base_ptr;
+
+ /* Register the shared memory window free function, which will free the
+ memory allocated here. */
+ (*win_ptr)->RMAFns.Win_free = MPIDI_SHM_Win_free;
fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3U_WIN_ALLOCATE_SHARED);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
+ MPIU_CHKPMEM_REAP();
goto fn_exit;
/* --END ERROR HANDLING-- */
}
http://git.mpich.org/mpich.git/commitdiff/80285037077d0ca3b13025b098f7c6755…
commit 80285037077d0ca3b13025b098f7c6755cf368be
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 13:27:24 2013 -0600
Moved comm_split_type override from CH3 to Nemesis
Moved the MPI_Comm_split_type override from CH3 down to Nemesis. CH3
should now use the default implementation, which returns MPI_COMM_SELF.
Reviewer: apenya
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_init.c b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
index 9bccebd..bec2a40 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
@@ -19,6 +19,37 @@ MPIDI_PG_t *MPIDI_CH3I_my_pg = NULL;
static int nemesis_initialized = 0;
+#undef FUNCNAME
+#define FUNCNAME split_type
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+static int split_type(MPID_Comm * comm_ptr, int stype, int key,
+ MPID_Info *info_ptr, MPID_Comm ** newcomm_ptr)
+{
+ MPID_Node_id_t id;
+ MPIR_Rank_t nid;
+ int mpi_errno = MPI_SUCCESS;
+
+ mpi_errno = MPID_Get_node_id(comm_ptr, comm_ptr->rank, &id);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ nid = (stype == MPI_COMM_TYPE_SHARED) ? id : MPI_UNDEFINED;
+ mpi_errno = MPIR_Comm_split_impl(comm_ptr, nid, key, newcomm_ptr);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ fn_exit:
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+static MPID_CommOps comm_fns = {
+ split_type
+};
+
/* MPIDI_CH3_Init(): Initialize the nemesis channel */
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3_Init
@@ -32,6 +63,9 @@ int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t *pg_p, int pg_rank)
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_INIT);
+ /* Override split_type */
+ MPID_Comm_fns = &comm_fns;
+
mpi_errno = MPID_nem_init (pg_rank, pg_p, has_parent);
if (mpi_errno) MPIU_ERR_POP (mpi_errno);
diff --git a/src/mpid/ch3/src/mpid_init.c b/src/mpid/ch3/src/mpid_init.c
index ff393ad..92803b5 100644
--- a/src/mpid/ch3/src/mpid_init.c
+++ b/src/mpid/ch3/src/mpid_init.c
@@ -41,37 +41,6 @@ MPIDI_Process_t MPIDI_Process = { NULL };
MPIDI_CH3U_SRBuf_element_t * MPIDI_CH3U_SRBuf_pool = NULL;
MPIDI_CH3U_Win_fns_t MPIDI_CH3U_Win_fns = { NULL };
-#undef FUNCNAME
-#define FUNCNAME split_type
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-static int split_type(MPID_Comm * comm_ptr, int stype, int key,
- MPID_Info *info_ptr, MPID_Comm ** newcomm_ptr)
-{
- MPID_Node_id_t id;
- MPIR_Rank_t nid;
- int mpi_errno = MPI_SUCCESS;
-
- mpi_errno = MPID_Get_node_id(comm_ptr, comm_ptr->rank, &id);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
- nid = (stype == MPI_COMM_TYPE_SHARED) ? id : MPI_UNDEFINED;
- mpi_errno = MPIR_Comm_split_impl(comm_ptr, nid, key, newcomm_ptr);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
- fn_exit:
- return mpi_errno;
-
- /* --BEGIN ERROR HANDLING-- */
- fn_fail:
- goto fn_exit;
- /* --END ERROR HANDLING-- */
-}
-
-static MPID_CommOps comm_fns = {
- split_type
-};
-
#undef FUNCNAME
#define FUNCNAME finalize_failed_procs_group
@@ -166,9 +135,6 @@ int MPID_Init(int *argc, char ***argv, int requested, int *provided,
mpi_errno = MPIDU_Ftb_init();
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
- /* Override split_type */
- MPID_Comm_fns = &comm_fns;
-
/* Initialize Window functions table with defaults, then call the channel's
init function. */
MPIDI_Win_fns_init(&MPIDI_CH3U_Win_fns);
http://git.mpich.org/mpich.git/commitdiff/06411a39d9c737f8b8440eb766eb0c571…
commit 06411a39d9c737f8b8440eb766eb0c571225a2c7
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 13:24:01 2013 -0600
Added missing function boilerplate decls
Added missing boilerplate declarations before
finalize_failed_procs_group.
Reviewer: apenya
diff --git a/src/mpid/ch3/src/mpid_init.c b/src/mpid/ch3/src/mpid_init.c
index f777a41..ff393ad 100644
--- a/src/mpid/ch3/src/mpid_init.c
+++ b/src/mpid/ch3/src/mpid_init.c
@@ -72,6 +72,11 @@ static MPID_CommOps comm_fns = {
split_type
};
+
+#undef FUNCNAME
+#define FUNCNAME finalize_failed_procs_group
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int finalize_failed_procs_group(void *param)
{
int mpi_errno = MPI_SUCCESS;
-----------------------------------------------------------------------
Summary of changes:
src/include/mpierrs.h | 9 ++++
src/mpi/errhan/errnames.txt | 1 +
src/mpi/rma/win_shared_query.c | 1 +
src/mpid/ch3/channels/nemesis/src/ch3_init.c | 34 +++++++++++++
src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c | 4 --
src/mpid/ch3/errnames.txt | 1 +
src/mpid/ch3/include/mpidimpl.h | 1 +
src/mpid/ch3/src/Makefile.mk | 1 -
src/mpid/ch3/src/ch3u_rma_notimpl.c | 38 ---------------
src/mpid/ch3/src/ch3u_rma_ops.c | 57 +++++++++++++++++++++++
src/mpid/ch3/src/ch3u_win_fns.c | 39 +++++++++++++++-
src/mpid/ch3/src/mpid_init.c | 33 +------------
12 files changed, 144 insertions(+), 75 deletions(-)
delete mode 100644 src/mpid/ch3/src/ch3u_rma_notimpl.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-49-gbf6355f
by noreply@mpich.org 22 Feb '13
by noreply@mpich.org 22 Feb '13
22 Feb '13
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 bf6355f4fafc14088c69fd0761e075adeef7b591 (commit)
from 9e68dcf86dbd5ef70ea937f277aed512f14ce36e (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/bf6355f4fafc14088c69fd0761e075ade…
commit bf6355f4fafc14088c69fd0761e075adeef7b591
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Fri Feb 22 13:49:18 2013 -0600
Added missing descriptions for new RMA err classes
This patch adds basic error descriptions for the new RMA error classes
that were introduced in MPI 3.0.
Reviewer: none
diff --git a/src/mpi/errhan/baseerrnames.txt b/src/mpi/errhan/baseerrnames.txt
index 4e9c5c1..c66c7fe 100644
--- a/src/mpi/errhan/baseerrnames.txt
+++ b/src/mpi/errhan/baseerrnames.txt
@@ -74,3 +74,7 @@ MPI_ERR_SIZE 51 **rmasize
MPI_ERR_DISP 52 **rmadisp
MPI_ERR_ASSERT 53 **assert
MPIX_ERR_PROC_FAIL_STOP 54 **proc_fail_stop
+MPI_ERR_RMA_RANGE 55 **rmarange
+MPI_ERR_RMA_ATTACH 56 **rmaattach
+MPI_ERR_RMA_SHARED 57 **rmashared
+MPI_ERR_RMA_FLAVOR 58 **rmaflavor
diff --git a/src/mpi/errhan/errnames.txt b/src/mpi/errhan/errnames.txt
index f44112e..4a482c5 100644
--- a/src/mpi/errhan/errnames.txt
+++ b/src/mpi/errhan/errnames.txt
@@ -383,6 +383,10 @@ be in the range 0 to %d
**rmadisp:Invalid displacement argument in RMA call
**rmareqcancel:Request-based RMA operation cannot be cancelled
**rmareqop:Error in request-based RMA operation
+**rmarange:Target memory is not contained within the window
+**rmaattach:Memory cannot be attached
+**rmashared:Memory cannot be shared
+**rmaflavor:Incorrect window flavor
**assert:Invalid assert argument
**lockassertval:Invalid assert argument passed to MPI_Win_lock
**lockassertval %d: Invalid assert argument (%d) passed to MPI_Win_lock
-----------------------------------------------------------------------
Summary of changes:
src/mpi/errhan/baseerrnames.txt | 4 ++++
src/mpi/errhan/errnames.txt | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-48-g9e68dcf
by noreply@mpich.org 21 Feb '13
by noreply@mpich.org 21 Feb '13
21 Feb '13
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 9e68dcf86dbd5ef70ea937f277aed512f14ce36e (commit)
via 3aeb375de4f5860a1eb6c1ca4437977e557324d2 (commit)
via 402bc1614bac71a43d4220a6ae432f86ed5cd82d (commit)
via 7dee7463716e21c7902b8e8212cd4df32a413972 (commit)
via 64b60170bc43d052426295356f2d7cb0d70705f4 (commit)
via 625bf4fd529b67b6d15ebf1c1993cf10d91e1170 (commit)
via 223fce451bc9753ee79df426366987e3226c51ee (commit)
via 9c3a32fd9881db4a287df33f029e2eb64c83f3dc (commit)
via 255fb4a63c664f6752d6a4b69c3680d6a0218197 (commit)
via 422006da8dcd8ab6ee49169e41e98a33a0abd159 (commit)
via 1c737a373c237cfddeb684ee30d3936b9fd6ebe4 (commit)
via 4e67607f342ce4f8591c1ac95166153df72d02c0 (commit)
via 90be9ee1506481dcab84b89ccb8b0dc186b8b37b (commit)
via 478a80f5f7311f087e8eb69dd1dd65f83c5a3d0a (commit)
via c3f87fe32a5ec9208906d874d2b8563d188a7e71 (commit)
via 90b3b2f83c4659fdcdb6bf06a410c8fb63583374 (commit)
via bba35589949c92505de9f8f5fd7bc5d9e2693b23 (commit)
via c5312557541a513ed36d4a2d9090f70cf3a2e949 (commit)
from 617927fb6680aa0b5209fd29ab453e25c7ab3750 (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/9e68dcf86dbd5ef70ea937f277aed512f…
commit 9e68dcf86dbd5ef70ea937f277aed512f14ce36e
Merge: 617927f 3aeb375
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 18:01:49 2013 -0600
Merge branch 'packet-header-flags'
This merge adds a flags field to the packet header in RMA packets. The flags
are used to piggyback RMA synchronization operations.
http://git.mpich.org/mpich.git/commitdiff/3aeb375de4f5860a1eb6c1ca4437977e5…
commit 3aeb375de4f5860a1eb6c1ca4437977e557324d2
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 17:40:53 2013 -0600
Added missing CPPFLAGS in rma tests makefile
Reviewer: goodell
diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index e92c677..eb5b8d6 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -156,8 +156,8 @@ get_accumulate_double_derived_SOURCES = get_accumulate.c
get_accumulate_int_derived_SOURCES = get_accumulate.c
mutex_bench_SOURCES = mutex_bench.c mcs-mutex.c mcs-mutex.h
-mutex_bench_shared_CPPFLAGS = -DUSE_WIN_SHARED
+mutex_bench_shared_CPPFLAGS = -DUSE_WIN_SHARED $(AM_CPPFLAGS)
mutex_bench_shared_SOURCES = mutex_bench.c mcs-mutex.c mcs-mutex.h
linked_list_bench_lock_shr_nocheck_SOURCES = linked_list_bench_lock_shr.c
-linked_list_bench_lock_shr_nocheck_CPPFLAGS = -DUSE_MODE_NOCHECK
+linked_list_bench_lock_shr_nocheck_CPPFLAGS = -DUSE_MODE_NOCHECK $(AM_CPPFLAGS)
http://git.mpich.org/mpich.git/commitdiff/402bc1614bac71a43d4220a6ae432f86e…
commit 402bc1614bac71a43d4220a6ae432f86ed5cd82d
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Tue Feb 12 11:07:58 2013 -0600
Remove unnecessary flush for empty epochs
I initially added a conservative flush message for empty epochs (mostly
for documentation purposes). This is not needed in the current
implementation, since ops are not issued eagerly. If/when eager ops are
implemented, this patch should be reverted and additional window state
tracking for this case should be added. In the meantime, I am removing
this code to improve performance.
Reviewer: goodell
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 12a4031..1f6cbf9 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -2682,14 +2682,8 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
*wait_for_rma_done_pkt = 1;
}
- else if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) {
- /* No communication operations were left to process, but the RMA epoch
- is open. Send a flush message to ensure remote completion. */
- /* FIXME: This should be unnecessary for exclusive lock epochs */
- mpi_errno = MPIDI_CH3I_Send_flush_msg(target_rank, win_ptr);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- *wait_for_rma_done_pkt = 1;
- }
+ /* NOTE: Flush -- If RMA ops are issued eagerly, Send_flush_msg should be
+ called here and wait_for_rma_done_pkt should be set. */
MPIU_Assert(MPIDI_CH3I_RMA_Ops_isempty(&win_ptr->targets[target_rank].rma_ops_list));
http://git.mpich.org/mpich.git/commitdiff/7dee7463716e21c7902b8e8212cd4df32…
commit 7dee7463716e21c7902b8e8212cd4df32a413972
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Sat Feb 9 08:30:45 2013 -0600
Finished adding memory fences for shr mem win
This patch adds a few missing memory fences to the window
synchronization operations for shared memory windows. This closes
ticket #1729.
Reviewer: goodell
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 5a5e260..12a4031 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1324,6 +1324,11 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
MPIU_INSTR_DURATION_END(winpost_clearlock);
}
+ /* Ensure ordering of load/store operations. */
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ OPA_read_write_barrier();
+ }
+
post_grp_size = post_grp_ptr->size;
/* initialize the completion counter */
@@ -1476,6 +1481,11 @@ int MPIDI_Win_start(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr)
MPIU_INSTR_DURATION_END(winstart_clearlock);
}
+ /* Ensure ordering of load/store operations. */
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ OPA_read_write_barrier();
+ }
+
win_ptr->start_group_ptr = group_ptr;
MPIR_Group_add_ref( group_ptr );
win_ptr->start_assert = assert;
@@ -1522,6 +1532,11 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
comm_ptr = win_ptr->comm_ptr;
comm_size = comm_ptr->local_size;
+ /* Ensure ordering of load/store operations. */
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ OPA_read_write_barrier();
+ }
+
/* Translate the ranks of the processes in
start_group to ranks in win_ptr->comm_ptr */
@@ -1801,6 +1816,11 @@ int MPIDI_Win_wait(MPID_Win *win_ptr)
MPIU_INSTR_DURATION_END(winwait_wait);
}
+ /* Ensure ordering of load/store operations. */
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ OPA_read_write_barrier();
+ }
+
fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_WAIT);
return mpi_errno;
@@ -1833,12 +1853,17 @@ int MPIDI_Win_test(MPID_Win *win_ptr, int *flag)
*flag = (win_ptr->my_counter) ? 0 : 1;
- /* Track access epoch state */
if (*flag) {
+ /* Track access epoch state */
if (win_ptr->epoch_state == MPIDI_EPOCH_PSCW)
win_ptr->epoch_state = MPIDI_EPOCH_START;
else
win_ptr->epoch_state = MPIDI_EPOCH_NONE;
+
+ /* Ensure ordering of load/store operations. */
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ OPA_read_write_barrier();
+ }
}
fn_exit:
@@ -1906,7 +1931,6 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
/* Lock must be taken immediately for shared memory windows because of
* load/store access */
- /* FIXME: We may be able to make this just a read or write barrier */
OPA_read_write_barrier();
mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, win_ptr);
@@ -1960,9 +1984,8 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
win_ptr->epoch_state = MPIDI_EPOCH_NONE;
}
- /* Ensure that load/store operations are visible. */
+ /* Ensure ordering of load/store operations. */
if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
- /* FIXME: We may be able to make this just a read or write barrier */
OPA_read_write_barrier();
}
@@ -2188,10 +2211,9 @@ int MPIDI_Win_flush(int rank, MPID_Win *win_ptr)
need to insert this read/write memory fence for shared memory windows. */
/* For shared memory windows, all operations are done immediately, so there
- is nothing to flush. Ensure that load/store operations are visible and
+ is nothing to flush. Ensure ordering of load/store operations and
return. */
if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
- /* FIXME: We may be able to make this just a read or write barrier */
OPA_read_write_barrier();
goto fn_exit;
}
@@ -2384,8 +2406,6 @@ int MPIDI_Win_lock_all(int assert, MPID_Win *win_ptr)
if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
/* Immediately lock all targets for load/store access */
-
- /* FIXME: We may be able to make this just a read or write barrier */
OPA_read_write_barrier();
for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
http://git.mpich.org/mpich.git/commitdiff/64b60170bc43d052426295356f2d7cb0d…
commit 64b60170bc43d052426295356f2d7cb0d70705f4
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Fri Feb 8 11:28:36 2013 -0600
Cleaned up error names for CH3 RMA implementation
Moved RMA errors used in the CH3 RMA implementation into the ch3
errnames.txt file.
Reviewer: goodell
diff --git a/src/mpi/errhan/errnames.txt b/src/mpi/errhan/errnames.txt
index 2b9d49d..f44112e 100644
--- a/src/mpi/errhan/errnames.txt
+++ b/src/mpi/errhan/errnames.txt
@@ -706,8 +706,6 @@ is too big (> MPIU_SHMW_GHND_SZ)
**windeserialize:deserializing win object
**winnoprogress: Detected an error while in progress wait for RMA messages
**winInvalidOp: Invalid RMA operation
-**winRMAmessage: RMA message operation failed
-**winRMArequest: RMA message operation failed; request returned error
**open %s:open failed - %s
**setenv:setenv failed
**putenv:putenv failed
diff --git a/src/mpid/ch3/errnames.txt b/src/mpid/ch3/errnames.txt
index 9e55285..49fc6b7 100644
--- a/src/mpid/ch3/errnames.txt
+++ b/src/mpid/ch3/errnames.txt
@@ -40,3 +40,4 @@
**ch3|sync_arg %d:Invalid RMA synchronization argument (%d)
**ch3|rma_flags:Invalid combination of RMA packet flags
**ch3|nocheck_invalid:MPI_MODE_NOCHECK was specified, but the lock was not available at the target
+**ch3|rma_msg:RMA message operation failed
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index d497288..5a5e260 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1919,7 +1919,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
/* TODO: Make this mode of operation available through an assert
argument or info key. */
mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, win_ptr);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
}
fn_exit:
@@ -2711,7 +2711,7 @@ static int MPIDI_CH3I_Send_lock_msg(int dest, int lock_type, MPID_Win *win_ptr)
MPIU_THREAD_CS_ENTER(CH3COMM,vc);
mpi_errno = MPIDI_CH3_iStartMsg(vc, lock_pkt, sizeof(*lock_pkt), &req);
MPIU_THREAD_CS_EXIT(CH3COMM,vc);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
/* release the request returned by iStartMsg */
if (req != NULL) {
@@ -2846,7 +2846,7 @@ static int MPIDI_CH3I_Send_unlock_msg(int dest, MPID_Win *win_ptr) {
MPIU_THREAD_CS_ENTER(CH3COMM,vc);
mpi_errno = MPIDI_CH3_iStartMsg(vc, unlock_pkt, sizeof(*unlock_pkt), &req);
MPIU_THREAD_CS_EXIT(CH3COMM,vc);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
/* Release the request returned by iStartMsg */
if (req != NULL) {
@@ -2887,7 +2887,7 @@ static int MPIDI_CH3I_Send_flush_msg(int dest, MPID_Win *win_ptr) {
MPIU_THREAD_CS_ENTER(CH3COMM,vc);
mpi_errno = MPIDI_CH3_iStartMsg(vc, flush_pkt, sizeof(*flush_pkt), &req);
MPIU_THREAD_CS_EXIT(CH3COMM,vc);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
/* Release the request returned by iStartMsg */
if (req != NULL) {
@@ -3086,7 +3086,7 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
if (mpi_errno != MPI_SUCCESS)
{
MPID_Progress_end(&progress_state);
- MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winRMAmessage");
+ MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rma_msg");
}
/* --END ERROR HANDLING-- */
}
@@ -3095,7 +3095,7 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
mpi_errno = request->status.MPI_ERROR;
if (mpi_errno != MPI_SUCCESS) {
- MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winRMAmessage");
+ MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rma_msg");
}
MPID_Request_release(request);
@@ -3206,7 +3206,7 @@ static int MPIDI_CH3I_Send_lock_get(MPID_Win *win_ptr, int target_rank)
if (mpi_errno != MPI_SUCCESS)
{
MPID_Progress_end(&progress_state);
- MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winRMAmessage");
+ MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rma_msg");
}
/* --END ERROR HANDLING-- */
}
@@ -3215,7 +3215,7 @@ static int MPIDI_CH3I_Send_lock_get(MPID_Win *win_ptr, int target_rank)
mpi_errno = rreq->status.MPI_ERROR;
if (mpi_errno != MPI_SUCCESS) {
- MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winRMAmessage");
+ MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rma_msg");
}
/* if origin datatype was a derived datatype, it will get freed when the
@@ -4766,7 +4766,7 @@ int MPIDI_CH3_PktHandler_Unlock( MPIDI_VC_t *vc ATTRIBUTE((unused)),
MPID_Win_get_ptr(unlock_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
MPIDI_CH3_Progress_signal_completion();
@@ -4810,7 +4810,7 @@ int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_THREAD_CS_ENTER(CH3COMM,vc);
mpi_errno = MPIDI_CH3_iStartMsg(vc, flush_pkt, sizeof(*flush_pkt), &req);
MPIU_THREAD_CS_EXIT(CH3COMM,vc);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
/* Release the request returned by iStartMsg */
if (req != NULL) {
@@ -4862,7 +4862,7 @@ static int MPIDI_CH3I_RMAListComplete( MPID_Win *win_ptr,
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno != MPI_SUCCESS) {
MPID_Progress_end(&progress_state);
- MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winRMAmessage");
+ MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rma_msg");
}
/* --END ERROR HANDLING-- */
MPID_Request_release(curr_ptr->request);
@@ -4945,7 +4945,7 @@ static int MPIDI_CH3I_RMAListPartialComplete( MPID_Win *win_ptr,
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno != MPI_SUCCESS) {
MPID_Progress_end(&progress_state);
- MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winRMAmessage");
+ MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rma_msg");
}
/* --END ERROR HANDLING-- */
MPID_Request_release(curr_ptr->request);
@@ -5087,7 +5087,7 @@ int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma
MPIU_THREAD_CS_ENTER(CH3COMM,vc);
mpi_errno = MPIDI_CH3_iStartMsg(vc, flush_pkt, sizeof(*flush_pkt), &req);
MPIU_THREAD_CS_EXIT(CH3COMM,vc);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg");
/* Release the request returned by iStartMsg */
if (req != NULL) {
http://git.mpich.org/mpich.git/commitdiff/625bf4fd529b67b6d15ebf1c1993cf10d…
commit 625bf4fd529b67b6d15ebf1c1993cf10d91e1170
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 7 16:48:24 2013 -0600
Add a MODE_NOCHECK version of the llist bench test
Additional testing for shared lock with MODE_NOCHECK.
Reviewer: goodell
diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index 579721a..e92c677 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -91,6 +91,7 @@ noinst_PROGRAMS = \
linked_list_bench_lock_all \
linked_list_bench_lock_excl \
linked_list_bench_lock_shr \
+ linked_list_bench_lock_shr_nocheck \
fetch_and_op_char \
fetch_and_op_short \
fetch_and_op_int \
@@ -157,3 +158,6 @@ get_accumulate_int_derived_SOURCES = get_accumulate.c
mutex_bench_SOURCES = mutex_bench.c mcs-mutex.c mcs-mutex.h
mutex_bench_shared_CPPFLAGS = -DUSE_WIN_SHARED
mutex_bench_shared_SOURCES = mutex_bench.c mcs-mutex.c mcs-mutex.h
+
+linked_list_bench_lock_shr_nocheck_SOURCES = linked_list_bench_lock_shr.c
+linked_list_bench_lock_shr_nocheck_CPPFLAGS = -DUSE_MODE_NOCHECK
diff --git a/test/mpi/rma/linked_list_bench_lock_shr.c b/test/mpi/rma/linked_list_bench_lock_shr.c
index 49c3e04..62315ed 100644
--- a/test/mpi/rma/linked_list_bench_lock_shr.c
+++ b/test/mpi/rma/linked_list_bench_lock_shr.c
@@ -131,7 +131,11 @@ int main(int argc, char **argv) {
if (verbose)
printf("%d: Appending to <%d, %p>\n", procid, tail_ptr.rank, (void*) tail_ptr.disp);
+#ifdef USE_MODE_NOCHECK
+ MPI_Win_lock(MPI_LOCK_SHARED, tail_ptr.rank, MPI_MODE_NOCHECK, llist_win);
+#else
MPI_Win_lock(MPI_LOCK_SHARED, tail_ptr.rank, 0, llist_win);
+#endif
MPI_Accumulate(&new_elem_ptr, sizeof(llist_ptr_t), MPI_BYTE, tail_ptr.rank,
(MPI_Aint) &(((llist_elem_t*)tail_ptr.disp)->next), sizeof(llist_ptr_t),
MPI_BYTE, MPI_REPLACE, llist_win);
@@ -146,7 +150,11 @@ int main(int argc, char **argv) {
{
llist_ptr_t next_tail_ptr;
+#ifdef USE_MODE_NOCHECK
+ MPI_Win_lock(MPI_LOCK_SHARED, tail_ptr.rank, MPI_MODE_NOCHECK, llist_win);
+#else
MPI_Win_lock(MPI_LOCK_SHARED, tail_ptr.rank, 0, llist_win);
+#endif
MPI_Get_accumulate( NULL, 0, MPI_DATATYPE_NULL, &next_tail_ptr,
sizeof(llist_ptr_t), MPI_BYTE, tail_ptr.rank,
(MPI_Aint) &(((llist_elem_t*)tail_ptr.disp)->next),
diff --git a/test/mpi/rma/testlist b/test/mpi/rma/testlist
index 20c6c03..772be24 100644
--- a/test/mpi/rma/testlist
+++ b/test/mpi/rma/testlist
@@ -95,5 +95,6 @@ pscw_ordering 4 mpiversion=3.0
linked_list_bench_lock_all 4 mpiversion=3.0
linked_list_bench_lock_excl 4 mpiversion=3.0
linked_list_bench_lock_shr 4 mpiversion=3.0
+linked_list_bench_lock_shr_nocheck 4 mpiversion=3.0
mutex_bench 4 mpiversion=3.0
mutex_bench_shared 4 mpiversion=3.0
http://git.mpich.org/mpich.git/commitdiff/223fce451bc9753ee79df426366987e32…
commit 223fce451bc9753ee79df426366987e3226c51ee
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 7 16:29:22 2013 -0600
Implemented lock op piggybacking for MODE_NOCHECK
When the MPI_MODE_NOCHECK assertion is given to a passive target lock
operation, we defer acquisition of the lock and piggyback the request on
the first RMA op to the target. This eliminates a round-trip
lock-request message.
Reviewer: goodell
diff --git a/src/mpid/ch3/errnames.txt b/src/mpid/ch3/errnames.txt
index 3cde8bd..9e55285 100644
--- a/src/mpid/ch3/errnames.txt
+++ b/src/mpid/ch3/errnames.txt
@@ -39,3 +39,4 @@
**ch3|sync_arg:Invalid RMA synchronization argument
**ch3|sync_arg %d:Invalid RMA synchronization argument (%d)
**ch3|rma_flags:Invalid combination of RMA packet flags
+**ch3|nocheck_invalid:MPI_MODE_NOCHECK was specified, but the lock was not available at the target
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 0185480..48b8663 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1214,6 +1214,7 @@ int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);
int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
int MPIDI_CH3I_Send_pt_rma_done_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
+int MPIDI_CH3_Start_rma_op_target(MPID_Win *win_ptr, MPIDI_CH3_Pkt_flags_t flags);
int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
MPIDI_CH3_Pkt_flags_t flags, MPI_Win source_win_handle);
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 0bdae9c..935c03b 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -116,7 +116,10 @@ typedef uint16_t MPIDI_CH3_Pkt_flags_t;
#define MPIDI_CH3_PKT_FLAG_RMA_UNLOCK 2 /* ..............X. */
#define MPIDI_CH3_PKT_FLAG_RMA_FLUSH 4 /* .............X.. */
#define MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK 8 /* ............X... */
-#define MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE 16 /* ...........X.... */
+#define MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE 16 /* ...........X.... */
+#define MPIDI_CH3_PKT_FLAG_RMA_NOCHECK 32 /* ..........X..... */
+#define MPIDI_CH3_PKT_FLAG_RMA_SHARED 64 /* .........X...... */
+#define MPIDI_CH3_PKT_FLAG_RMA_EXCLUSIVE 128 /* ........X....... */
typedef struct MPIDI_CH3_Pkt_send
{
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index f6dd454..d497288 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1915,7 +1915,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, dest);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
- else if (MPIR_PARAM_RMA_LOCK_IMMED) {
+ else if (MPIR_PARAM_RMA_LOCK_IMMED && ((assert & MPI_MODE_NOCHECK) == 0)) {
/* TODO: Make this mode of operation available through an assert
argument or info key. */
mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, win_ptr);
@@ -2040,16 +2040,23 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
if (single_op_opt == 0) {
- /* Send a lock packet over to the target. wait for the lock_granted
- reply. Then do all the RMA ops. */
+ /* Send a lock packet over to the target and wait for the lock_granted
+ reply. If the user gave MODE_NOCHECK, we will piggyback the lock
+ request on the first RMA op. Then do all the RMA ops. */
- if (win_ptr->targets[dest].remote_lock_state == MPIDI_CH3_WIN_LOCK_CALLED) {
- mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, win_ptr->targets[dest].remote_lock_mode, win_ptr);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ if ((win_ptr->targets[dest].remote_lock_assert & MPI_MODE_NOCHECK) == 0)
+ {
+ if (win_ptr->targets[dest].remote_lock_state == MPIDI_CH3_WIN_LOCK_CALLED) {
+ mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, win_ptr->targets[dest].remote_lock_mode,
+ win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ }
}
- mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, dest);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ if (win_ptr->targets[dest].remote_lock_state == MPIDI_CH3_WIN_LOCK_REQUESTED) {
+ mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, dest);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ }
/* Now do all the RMA operations */
mpi_errno = MPIDI_CH3I_Do_passive_target_rma(win_ptr, dest, &wait_for_rma_done_pkt,
@@ -2487,27 +2494,29 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_DO_PASSIVE_TARGET_RMA);
MPIU_Assert(win_ptr->targets[target_rank].remote_lock_state == MPIDI_CH3_WIN_LOCK_GRANTED ||
- win_ptr->targets[target_rank].remote_lock_state == MPIDI_CH3_WIN_LOCK_FLUSH);
-
- if (win_ptr->targets[target_rank].remote_lock_mode == MPI_LOCK_EXCLUSIVE) {
- /* Exclusive lock -- no need to wait for rma done pkt at the end. This
- is because the target won't grant another process access to the
- window until all of our operations complete at that target. Thus,
- there is no third-party communication issue. */
+ win_ptr->targets[target_rank].remote_lock_state == MPIDI_CH3_WIN_LOCK_FLUSH ||
+ (win_ptr->targets[target_rank].remote_lock_state == MPIDI_CH3_WIN_LOCK_CALLED &&
+ win_ptr->targets[target_rank].remote_lock_assert & MPI_MODE_NOCHECK));
+
+ if (win_ptr->targets[target_rank].remote_lock_mode == MPI_LOCK_EXCLUSIVE &&
+ win_ptr->targets[target_rank].remote_lock_state != MPIDI_CH3_WIN_LOCK_CALLED) {
+ /* Exclusive lock already held -- no need to wait for rma done pkt at
+ the end. This is because the target won't grant another process
+ access to the window until all of our operations complete at that
+ target. Thus, there is no third-party communication issue. */
*wait_for_rma_done_pkt = 0;
}
else if (MPIDI_CH3I_RMA_Ops_isempty(&win_ptr->targets[target_rank].rma_ops_list)) {
- /* Shared lock -- The ops list is empty. Any issued ops are already
- remote complete; done packet is not needed for safe third party
- communication. */
+ /* The ops list is empty -- NOTE: we assume this is because the epoch
+ was flushed. Any issued ops are already remote complete; done
+ packet is not needed for safe third party communication. */
*wait_for_rma_done_pkt = 0;
}
else {
MPIDI_RMA_Op_t *tail = MPIDI_CH3I_RMA_Ops_tail(&win_ptr->targets[target_rank].rma_ops_list);
- /* shared lock. check if any of the rma ops is a get. If so, move it
- to the end of the list and do it last, in which case an rma done
- pkt is not needed. If there is no get, rma done pkt is needed */
+ /* Check if we can piggyback the RMA done acknowlegdement on the last
+ operation in the epoch. */
if (tail->type == MPIDI_RMA_GET ||
tail->type == MPIDI_RMA_COMPARE_AND_SWAP ||
@@ -2519,9 +2528,10 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
*wait_for_rma_done_pkt = 0;
}
else {
- /* go through the list and move the first get operation
- (if there is one) to the end. Note that the first
- operation may be a lock, so we can skip it */
+ /* Check if there is a get operation, which can be be performed
+ moved to the end to piggyback the RMA done acknowledgement. Go
+ through the list and move the first get operation (if there is
+ one) to the end. */
*wait_for_rma_done_pkt = 1;
curr_ptr = MPIDI_CH3I_RMA_Ops_head(&win_ptr->targets[target_rank].rma_ops_list);
@@ -2566,11 +2576,33 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
MPIU_Assert(nops > 0);
MPIU_Assert(curr_ptr->target_rank == target_rank);
+ /* Piggyback the lock operation on the first op */
+ if (win_ptr->targets[target_rank].remote_lock_state == MPIDI_CH3_WIN_LOCK_CALLED)
+ {
+ MPIU_Assert(win_ptr->targets[target_rank].remote_lock_assert & MPI_MODE_NOCHECK);
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK | MPIDI_CH3_PKT_FLAG_RMA_NOCHECK;
+
+ switch (win_ptr->targets[target_rank].remote_lock_mode) {
+ case MPI_LOCK_SHARED:
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_SHARED;
+ break;
+ case MPI_LOCK_EXCLUSIVE:
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_EXCLUSIVE;
+ break;
+ default:
+ MPIU_Assert(0);
+ break;
+ }
+
+ win_ptr->targets[target_rank].remote_lock_state = MPIDI_CH3_WIN_LOCK_GRANTED;
+ }
+
+ /* Piggyback the unlock/flush operation on the last op */
if (curr_ptr->next == NULL) {
if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) {
- flags = MPIDI_CH3_PKT_FLAG_RMA_UNLOCK;
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_UNLOCK;
} else if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) {
- flags = MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
} else {
MPIU_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_RMA_SYNC, "**ch3|sync_arg",
"**ch3|sync_arg %d", sync_flags);
@@ -3267,6 +3299,7 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
int complete = 0;
char *data_buf = NULL;
MPIDI_msg_sz_t data_len;
+ MPID_Win *win_ptr;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_PUT);
@@ -3276,8 +3309,6 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
if (put_pkt->count == 0)
{
- MPID_Win *win_ptr;
-
/* it's a 0-byte message sent just to decrement the
completion counter. This happens only in
post/start/complete/wait sync model; therefore, no need
@@ -3291,7 +3322,11 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
*rreqp = NULL;
goto fn_exit;
}
-
+
+ MPIU_Assert(put_pkt->target_win_handle != MPI_WIN_NULL);
+ MPID_Win_get_ptr(put_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, put_pkt->flags);
+
data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
data_buf = (char *)pkt + sizeof(MPIDI_CH3_Pkt_t);
@@ -3430,6 +3465,7 @@ int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
int complete;
char *data_buf = NULL;
MPIDI_msg_sz_t data_len;
+ MPID_Win *win_ptr;
int mpi_errno = MPI_SUCCESS;
int type_size;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_GET);
@@ -3437,7 +3473,11 @@ int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_GET);
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received get pkt");
-
+
+ MPIU_Assert(get_pkt->target_win_handle != MPI_WIN_NULL);
+ MPID_Win_get_ptr(get_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, get_pkt->flags);
+
data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
data_buf = (char *)pkt + sizeof(MPIDI_CH3_Pkt_t);
@@ -3560,6 +3600,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
int complete = 0;
char *data_buf = NULL;
MPIDI_msg_sz_t data_len;
+ MPID_Win *win_ptr;
int mpi_errno = MPI_SUCCESS;
int type_size;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_ACCUMULATE);
@@ -3569,6 +3610,10 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received accumulate pkt");
MPIU_INSTR_DURATION_START(rmapkt_acc);
+ MPIU_Assert(accum_pkt->target_win_handle != MPI_WIN_NULL);
+ MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, accum_pkt->flags);
+
data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
data_buf = (char *)pkt + sizeof(MPIDI_CH3_Pkt_t);
@@ -3730,6 +3775,9 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received accumulate immedidate pkt");
MPIU_INSTR_DURATION_START(rmapkt_acc_immed);
+ MPIU_Assert(accum_pkt->target_win_handle != MPI_WIN_NULL);
+ MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, accum_pkt->flags);
/* return the number of bytes processed in this function */
/* data_len == 0 (all within packet) */
@@ -3809,7 +3857,11 @@ int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_CAS);
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received CAS pkt");
+
MPIU_INSTR_DURATION_START(rmapkt_cas);
+ MPIU_Assert(cas_pkt->target_win_handle != MPI_WIN_NULL);
+ MPID_Win_get_ptr(cas_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, cas_pkt->flags);
/* return the number of bytes processed in this function */
/* data_len == 0 (all within packet) */
@@ -3905,6 +3957,7 @@ int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_fop_t *fop_pkt = &pkt->fop;
MPID_Request *req;
+ MPID_Win *win_ptr;
int len, data_complete = 0;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_FOP);
@@ -3912,7 +3965,11 @@ int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_FOP);
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received FOP pkt");
+
MPIU_INSTR_DURATION_START(rmapkt_fop);
+ MPIU_Assert(fop_pkt->target_win_handle != MPI_WIN_NULL);
+ MPID_Win_get_ptr(fop_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, fop_pkt->flags);
req = MPID_Request_create();
MPIU_ERR_CHKANDJUMP(req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
@@ -4920,6 +4977,47 @@ static int MPIDI_CH3I_RMAListPartialComplete( MPID_Win *win_ptr,
#undef FUNCNAME
+#define FUNCNAME MPIDI_CH3_Start_rma_op_target
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_CH3_Start_rma_op_target(MPID_Win *win_ptr, MPIDI_CH3_Pkt_flags_t flags)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_START_RMA_OP_TARGET);
+
+ MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_START_RMA_OP_TARGET);
+
+ /* Lock with NOCHECK is piggybacked on this message. We should be able to
+ * immediately grab the lock. Otherwise, there is a synchronization error. */
+ if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK &&
+ flags & MPIDI_CH3_PKT_FLAG_RMA_NOCHECK)
+ {
+ int lock_acquired;
+ int lock_mode;
+
+ if (flags & MPIDI_CH3_PKT_FLAG_RMA_SHARED) {
+ lock_mode = MPI_LOCK_SHARED;
+ } else if (flags & MPIDI_CH3_PKT_FLAG_RMA_EXCLUSIVE) {
+ lock_mode = MPI_LOCK_EXCLUSIVE;
+ } else {
+ MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_RMA_SYNC, "**ch3|rma_flags");
+ }
+
+ lock_acquired = MPIDI_CH3I_Try_acquire_win_lock(win_ptr, lock_mode);
+ MPIU_ERR_CHKANDJUMP(!lock_acquired, mpi_errno, MPI_ERR_RMA_SYNC, "**ch3|nocheck_invalid");
+ }
+
+fn_exit:
+ MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_START_RMA_OP_TARGET);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
#define FUNCNAME MPIDI_CH3_Finish_rma_op_target
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
http://git.mpich.org/mpich.git/commitdiff/9c3a32fd9881db4a287df33f029e2eb64…
commit 9c3a32fd9881db4a287df33f029e2eb64c83f3dc
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Fri Feb 1 16:32:07 2013 -0600
Flush piggybacking
This patch adds piggybacking of flush synchronization on top of the last
operation in an RMA epoch.
Reviewer: goodell
diff --git a/src/mpid/ch3/errnames.txt b/src/mpid/ch3/errnames.txt
index f43d204..3cde8bd 100644
--- a/src/mpid/ch3/errnames.txt
+++ b/src/mpid/ch3/errnames.txt
@@ -32,3 +32,10 @@
**ch3|close_progress:an error occurred while the device was waiting for all open connections to close
**ch3|pmi_finalize:PMI_Finalize failed
**ch3|pmi_finalize %d:PMI_Finalize failed, error %d
+
+#
+# RMA errors
+#
+**ch3|sync_arg:Invalid RMA synchronization argument
+**ch3|sync_arg %d:Invalid RMA synchronization argument (%d)
+**ch3|rma_flags:Invalid combination of RMA packet flags
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 4988002..f6dd454 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -121,7 +121,7 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *, MPID_Win *,
MPI_Win, MPI_Win, MPID_Request ** );
static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
int *wait_for_rma_done_pkt,
- int unlock_target);
+ MPIDI_CH3_Pkt_flags_t sync_flags);
static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *, int);
static int MPIDI_CH3I_Send_lock_get(MPID_Win *, int);
static int MPIDI_CH3I_RMAListComplete(MPID_Win *win_ptr,
@@ -2053,7 +2053,7 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
/* Now do all the RMA operations */
mpi_errno = MPIDI_CH3I_Do_passive_target_rma(win_ptr, dest, &wait_for_rma_done_pkt,
- 1 /* unlock the target */);
+ MPIDI_CH3_PKT_FLAG_RMA_UNLOCK);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
@@ -2233,7 +2233,7 @@ int MPIDI_Win_flush(int rank, MPID_Win *win_ptr)
win_ptr->targets[rank].remote_lock_state = MPIDI_CH3_WIN_LOCK_FLUSH;
mpi_errno = MPIDI_CH3I_Do_passive_target_rma(win_ptr, rank, &wait_for_rma_done_pkt,
- 0 /* don't unlock the target */);
+ MPIDI_CH3_PKT_FLAG_RMA_FLUSH);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
/* If the lock is a shared lock or we have done the single op optimization,
@@ -2244,9 +2244,6 @@ int MPIDI_Win_flush(int rank, MPID_Win *win_ptr)
/* wait until the "pt rma done" packet is received from the target.
This packet resets the remote_lock_state flag. */
- MPIDI_CH3I_Send_flush_msg(rank, win_ptr);
-
- /* poke the progress engine until remote_lock_state flag is reset */
if (win_ptr->targets[rank].remote_lock_state != MPIDI_CH3_WIN_LOCK_GRANTED)
{
MPID_Progress_state progress_state;
@@ -2479,7 +2476,7 @@ int MPIDI_Win_sync(MPID_Win *win_ptr)
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
- int *wait_for_rma_done_pkt, int unlock_target)
+ int *wait_for_rma_done_pkt, MPIDI_CH3_Pkt_flags_t sync_flags)
{
int mpi_errno = MPI_SUCCESS, nops;
MPIDI_RMA_Op_t *curr_ptr;
@@ -2570,18 +2567,23 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
MPIU_Assert(curr_ptr->target_rank == target_rank);
if (curr_ptr->next == NULL) {
- if (unlock_target) {
+ if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) {
flags = MPIDI_CH3_PKT_FLAG_RMA_UNLOCK;
+ } else if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) {
+ flags = MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
+ } else {
+ MPIU_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_RMA_SYNC, "**ch3|sync_arg",
+ "**ch3|sync_arg %d", sync_flags);
+ }
- /* Inform the target that we want an acknowledgement when the
- * unlock has completed. */
- if (*wait_for_rma_done_pkt) {
- flags |= MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK;
- }
+ /* Inform the target that we want an acknowledgement when the
+ * unlock has completed. */
+ if (*wait_for_rma_done_pkt) {
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK;
}
- }
- source_win_handle = win_ptr->handle;
+ source_win_handle = win_ptr->handle;
+ }
/* Track passive target write operations. This is used during Win_free
* to ensure that all writes to a given target have completed at that
@@ -2621,11 +2623,20 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
MPIU_INSTR_STMT(list_block=MPIU_INSTR_GET_VAR(winunlock_block));
mpi_errno = MPIDI_CH3I_RMAListComplete(win_ptr, &win_ptr->targets[target_rank].rma_ops_list);
}
- else if (unlock_target) {
+ else if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) {
/* No communication operations were left to process, but the RMA epoch
is open. Send an unlock message to release the lock at the target. */
mpi_errno = MPIDI_CH3I_Send_unlock_msg(target_rank, win_ptr);
- MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ *wait_for_rma_done_pkt = 1;
+ }
+ else if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) {
+ /* No communication operations were left to process, but the RMA epoch
+ is open. Send a flush message to ensure remote completion. */
+ /* FIXME: This should be unnecessary for exclusive lock epochs */
+ mpi_errno = MPIDI_CH3I_Send_flush_msg(target_rank, win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ *wait_for_rma_done_pkt = 1;
}
MPIU_Assert(MPIDI_CH3I_RMA_Ops_isempty(&win_ptr->targets[target_rank].rma_ops_list));
@@ -4934,8 +4945,8 @@ int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma
if (flags & MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE) {
MPIU_Assert(win_ptr->current_lock_type == MPID_LOCK_NONE);
- /* FIXME: MT: Accesses to my_counter should be done atomically */
win_ptr->my_counter -= 1;
+ MPIU_Assert(win_ptr->my_counter >= 0);
/* Signal the local process when the op counter reaches 0. */
if (win_ptr->my_counter == 0)
@@ -4949,7 +4960,7 @@ int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma
MPIU_Assert(win_ptr->current_lock_type != MPID_LOCK_NONE);
if (flags & MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK) {
- MPIU_Assert(source_win_handle != MPI_WIN_NULL);
+ MPIU_Assert(source_win_handle != MPI_WIN_NULL && vc != NULL);
mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr, source_win_handle);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
@@ -4961,6 +4972,31 @@ int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma
wake it up, so it can attempt to grab the lock. */
MPIDI_CH3_Progress_signal_completion();
}
+ else if (flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) {
+ if (flags & MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK) {
+ MPIDI_CH3_Pkt_t upkt;
+ MPIDI_CH3_Pkt_flush_t *flush_pkt = &upkt.flush;
+ MPID_Request *req = NULL;
+
+ MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received piggybacked flush request");
+ MPIU_Assert(source_win_handle != MPI_WIN_NULL && vc != NULL);
+
+ MPIDI_Pkt_init(flush_pkt, MPIDI_CH3_PKT_FLUSH);
+ flush_pkt->source_win_handle = source_win_handle;
+ flush_pkt->target_win_handle = MPI_WIN_NULL;
+ flush_pkt->target_rank = win_ptr->comm_ptr->rank;
+
+ MPIU_THREAD_CS_ENTER(CH3COMM,vc);
+ mpi_errno = MPIDI_CH3_iStartMsg(vc, flush_pkt, sizeof(*flush_pkt), &req);
+ MPIU_THREAD_CS_EXIT(CH3COMM,vc);
+ MPIU_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**winRMAmessage");
+
+ /* Release the request returned by iStartMsg */
+ if (req != NULL) {
+ MPID_Request_release(req);
+ }
+ }
+ }
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_FINISH_RMA_OP_TARGET);
http://git.mpich.org/mpich.git/commitdiff/255fb4a63c664f6752d6a4b69c3680d6a…
commit 255fb4a63c664f6752d6a4b69c3680d6a0218197
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Fri Feb 1 12:46:20 2013 -0600
Removed unused single_op_opt field from MPID_Request
The single_op_opt flag in the request object was previously used to
track whether an operation is a lock-op-unlock type, for the purposes of
completion. Tracking this state has been merged into the packet header
flags, so the single_op_opt flag is no longer needed.
Reviewer: goodell
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index df567ff..fd8e846 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -380,7 +380,6 @@ typedef struct MPIDI_Request {
MPI_Request request_handle;
MPI_Win target_win_handle;
MPI_Win source_win_handle;
- int single_op_opt; /* to indicate a lock-put-unlock optimization case */
MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */
struct MPIDI_Win_lock_queue *lock_queue_entry; /* for single lock-put-unlock optimization */
MPI_Request resp_request_handle; /* Handle for get_accumulate response */
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 82011a8..872cfb8 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -1167,7 +1167,6 @@ static int do_simple_get(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_queue)
req->dev.target_win_handle = win_ptr->handle;
req->dev.source_win_handle = lock_queue->source_win_handle;
req->dev.flags = lock_queue->pt_single_op->flags;
- req->dev.single_op_opt = 1;
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_RESP);
req->kind = MPID_REQUEST_SEND;
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 2921fae..5842b7b 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -82,7 +82,6 @@ MPID_Request * MPID_Request_create(void)
request for RMA operations */
req->dev.target_win_handle = MPI_WIN_NULL;
req->dev.source_win_handle = MPI_WIN_NULL;
- req->dev.single_op_opt = 0;
req->dev.lock_queue_entry = NULL;
req->dev.dtype_info = NULL;
req->dev.dataloop = NULL;
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index d5efb5d..4988002 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -4207,7 +4207,6 @@ int MPIDI_CH3_PktHandler_LockPutUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.user_buf = lock_put_unlock_pkt->addr;
req->dev.source_win_handle = lock_put_unlock_pkt->source_win_handle;
req->dev.flags = lock_put_unlock_pkt->flags;
- req->dev.single_op_opt = 1;
}
else {
@@ -4345,7 +4344,6 @@ int MPIDI_CH3_PktHandler_LockGetUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req = MPID_Request_create();
req->dev.target_win_handle = lock_get_unlock_pkt->target_win_handle;
req->dev.source_win_handle = lock_get_unlock_pkt->source_win_handle;
- req->dev.single_op_opt = 1;
req->dev.flags = lock_get_unlock_pkt->flags;
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_RESP);
http://git.mpich.org/mpich.git/commitdiff/422006da8dcd8ab6ee49169e41e98a33a…
commit 422006da8dcd8ab6ee49169e41e98a33a0abd159
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Wed Jan 30 16:50:56 2013 -0600
Cleanup of FOP packet header
Removed source_win_handle from the packet header, since it's no longer
needed.
Reviewer: goodell
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 7d47874..0bdae9c 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -322,9 +322,6 @@ typedef struct MPIDI_CH3_Pkt_fop
* epoch for decrementing rma op counter in
* active target rma and for unlocking window
* in passive target rma. Otherwise set to NULL*/
- MPI_Win source_win_handle; /* Used in the last RMA operation in an
- * epoch in the case of passive target rma
- * with shared locks. Otherwise set to NULL*/
int origin_data[MPIDI_RMA_FOP_IMMED_INTS];
}
MPIDI_CH3_Pkt_fop_t;
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 1f89383..d5efb5d 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1048,7 +1048,6 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
fop_pkt->flags = flags;
fop_pkt->datatype = rma_op->target_datatype;
fop_pkt->target_win_handle = target_win_handle;
- fop_pkt->source_win_handle = source_win_handle;
fop_pkt->request_handle = resp_req->handle;
fop_pkt->op = rma_op->op;
@@ -3915,7 +3914,6 @@ int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.op = fop_pkt->op;
req->dev.real_user_buf = fop_pkt->addr;
req->dev.target_win_handle = fop_pkt->target_win_handle;
- req->dev.source_win_handle = fop_pkt->source_win_handle;
req->dev.request_handle = fop_pkt->request_handle;
req->dev.flags = fop_pkt->flags;
http://git.mpich.org/mpich.git/commitdiff/1c737a373c237cfddeb684ee30d3936b9…
commit 1c737a373c237cfddeb684ee30d3936b9fd6ebe4
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Wed Jan 30 16:16:13 2013 -0600
Simplify get completion
We can simplify completion of get operations at the target, since
Finish_rma_op should now be called unconditionally. Flags are now used
to determing whether an acknowledgement should be sent, so the
source_window_handle check is removed.
Reviewer: goodell
diff --git a/src/mpid/ch3/src/ch3u_handle_send_req.c b/src/mpid/ch3/src/ch3u_handle_send_req.c
index b749d1d..47026d5 100644
--- a/src/mpid/ch3/src/ch3u_handle_send_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_send_req.c
@@ -48,15 +48,12 @@ int MPIDI_CH3_ReqHandler_GetSendRespComplete( MPIDI_VC_t *vc ATTRIBUTE((unused))
int *complete )
{
int mpi_errno = MPI_SUCCESS;
+ MPID_Win *win_ptr;
- /* FIXME: Should this test be an MPIU_Assert? */
- if (sreq->dev.source_win_handle != MPI_WIN_NULL) {
- MPID_Win *win_ptr;
- MPID_Win_get_ptr(sreq->dev.target_win_handle, win_ptr);
+ MPID_Win_get_ptr(sreq->dev.target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, FALSE, sreq->dev.flags, MPI_WIN_NULL);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- }
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, FALSE, sreq->dev.flags, MPI_WIN_NULL);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
/* mark data transfer as complete and decrement CC */
MPIDI_CH3U_Request_complete(sreq);
http://git.mpich.org/mpich.git/commitdiff/4e67607f342ce4f8591c1ac95166153df…
commit 4e67607f342ce4f8591c1ac95166153df72d02c0
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Wed Jan 30 12:56:13 2013 -0600
RMA sync. piggybacking from origin->target
This patch uses packet header flags to piggyback the unlock operation on other
RMA operations. For most operations, there is no net change. However, FOP and
GACC, unlock piggybacking was previously not implemented.
Reviewer: goodell
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index c79861a..0185480 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1215,7 +1215,7 @@ int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
int MPIDI_CH3I_Send_pt_rma_done_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
- int end_epoch, MPI_Win source_win_handle, int force_done_pkt);
+ MPIDI_CH3_Pkt_flags_t flags, MPI_Win source_win_handle);
#define MPIDI_CH3I_DATATYPE_IS_PREDEFINED(type, predefined) \
if ((HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) || \
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index f1b2c2a..7d47874 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -90,7 +90,6 @@ enum MPIDI_CH3_Pkt_types
MPIDI_CH3_PKT_ACCUM_IMMED, /* optimization for short accumulate */
/* FIXME: Add PUT, GET_IMMED packet types */
MPIDI_CH3_PKT_CAS,
- MPIDI_CH3_PKT_CAS_UNLOCK,
MPIDI_CH3_PKT_CAS_RESP,
MPIDI_CH3_PKT_FOP,
MPIDI_CH3_PKT_FOP_RESP,
@@ -298,10 +297,6 @@ typedef struct MPIDI_CH3_Pkt_cas
* epoch for decrementing rma op counter in
* active target rma and for unlocking window
* in passive target rma. Otherwise set to NULL*/
-
- /* source_win_handle is omitted here to reduce
- * the packet size. If this is the last CAS
- * packet, the type will be set to CAS_UNLOCK */
MPIDI_CH3_CAS_Immed_u origin_data;
MPIDI_CH3_CAS_Immed_u compare_data;
}
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index ad8789d..26d1b17 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -91,6 +91,7 @@ typedef struct MPIDI_PT_single_op {
void *data; /* for queued puts and accumulates, data is copied here */
MPI_Request request_handle; /* for gets */
int data_recd; /* to indicate if the data has been received */
+ MPIDI_CH3_Pkt_flags_t flags;
} MPIDI_PT_single_op;
typedef struct MPIDI_Win_lock_queue {
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
index 8ea67a8..8934f9e 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
@@ -598,8 +598,6 @@ int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *pktArray[],
MPIDI_CH3_PktHandler_Accumulate_Immed;
pktArray[MPIDI_CH3_PKT_CAS] =
MPIDI_CH3_PktHandler_CAS;
- pktArray[MPIDI_CH3_PKT_CAS_UNLOCK] =
- MPIDI_CH3_PktHandler_CAS;
pktArray[MPIDI_CH3_PKT_CAS_RESP] =
MPIDI_CH3_PktHandler_CASResp;
pktArray[MPIDI_CH3_PKT_FOP] =
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 66ca1e0..82011a8 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -152,8 +152,8 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, rreq->dev.source_win_handle != MPI_WIN_NULL,
- rreq->dev.source_win_handle, rreq->dev.single_op_opt);
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, rreq->dev.flags,
+ rreq->dev.source_win_handle);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
/* mark data transfer as complete and decrement CC */
@@ -353,6 +353,7 @@ int MPIDI_CH3_ReqHandler_GetRespDerivedDTComplete( MPIDI_VC_t *vc,
sreq->dev.datatype_ptr = new_dtp;
sreq->dev.target_win_handle = rreq->dev.target_win_handle;
sreq->dev.source_win_handle = rreq->dev.source_win_handle;
+ sreq->dev.flags = rreq->dev.flags;
MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP);
get_resp_pkt->request_handle = rreq->dev.request_handle;
@@ -418,7 +419,6 @@ int MPIDI_CH3_ReqHandler_SinglePutAccumComplete( MPIDI_VC_t *vc,
if (MPIDI_CH3I_Try_acquire_win_lock(win_ptr,
lock_queue_entry->lock_type) == 1)
{
- MPI_Win source_win_handle = lock_queue_entry->source_win_handle;
if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_PT_SINGLE_PUT) {
/* copy the data over */
@@ -447,11 +447,14 @@ int MPIDI_CH3_ReqHandler_SinglePutAccumComplete( MPIDI_VC_t *vc,
}
*curr_ptr_ptr = curr_ptr->next;
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE,
+ lock_queue_entry->pt_single_op->flags,
+ lock_queue_entry->source_win_handle);
+
MPIU_Free(lock_queue_entry->pt_single_op->data);
MPIU_Free(lock_queue_entry->pt_single_op);
MPIU_Free(lock_queue_entry);
- mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, TRUE, source_win_handle, TRUE);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
else {
@@ -551,8 +554,8 @@ int MPIDI_CH3_ReqHandler_FOPComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, rreq->dev.source_win_handle != MPI_WIN_NULL,
- rreq->dev.source_win_handle, FALSE);
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, rreq->dev.flags,
+ rreq->dev.source_win_handle);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
*complete = 1;
@@ -1163,6 +1166,7 @@ static int do_simple_get(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_queue)
}
req->dev.target_win_handle = win_ptr->handle;
req->dev.source_win_handle = lock_queue->source_win_handle;
+ req->dev.flags = lock_queue->pt_single_op->flags;
req->dev.single_op_opt = 1;
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_RESP);
diff --git a/src/mpid/ch3/src/ch3u_handle_send_req.c b/src/mpid/ch3/src/ch3u_handle_send_req.c
index 9d101e9..b749d1d 100644
--- a/src/mpid/ch3/src/ch3u_handle_send_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_send_req.c
@@ -52,15 +52,9 @@ int MPIDI_CH3_ReqHandler_GetSendRespComplete( MPIDI_VC_t *vc ATTRIBUTE((unused))
/* FIXME: Should this test be an MPIU_Assert? */
if (sreq->dev.source_win_handle != MPI_WIN_NULL) {
MPID_Win *win_ptr;
- /* Last RMA operation (get) from source. If active target RMA,
- decrement window counter. If passive target RMA,
- release lock on window and grant next lock in the
- lock queue if there is any; no need to send rma done
- packet since the last operation is a get. */
-
MPID_Win_get_ptr(sreq->dev.target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, FALSE, TRUE, MPI_WIN_NULL, FALSE);
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, FALSE, sreq->dev.flags, MPI_WIN_NULL);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index b230ec1..1f89383 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -347,20 +347,20 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
while (curr_ptr != NULL)
{
+ MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE;
+
/* The completion counter at the target is decremented only on
- the last RMA operation. We indicate the last operation by
- passing the source_win_handle only on the last operation.
- Otherwise, we pass NULL */
+ the last RMA operation. */
if (curr_ops_cnt[curr_ptr->target_rank] ==
- nops_to_proc[curr_ptr->target_rank] - 1)
- source_win_handle = win_ptr->handle;
- else
- source_win_handle = MPI_WIN_NULL;
-
+ nops_to_proc[curr_ptr->target_rank] - 1) {
+ flags = MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE;
+ }
+
+ source_win_handle = win_ptr->handle;
target_win_handle = win_ptr->all_win_handles[curr_ptr->target_rank];
#define MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_) /* Not used by active mode */
- MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, MPIDI_CH3_PKT_FLAG_NONE,
+ MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, flags,
source_win_handle, target_win_handle, mpi_errno);
#undef MPIDI_CH3I_TRACK_RMA_WRITE
@@ -1012,13 +1012,7 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
MPIU_Assert(len <= sizeof(MPIDI_CH3_CAS_Immed_u));
- /* If this is the last operation, it also unlocks the window
- at the target. */
- if (source_win_handle != MPI_WIN_NULL) {
- MPIDI_Pkt_init(cas_pkt, MPIDI_CH3_PKT_CAS_UNLOCK);
- } else {
- MPIDI_Pkt_init(cas_pkt, MPIDI_CH3_PKT_CAS);
- }
+ MPIDI_Pkt_init(cas_pkt, MPIDI_CH3_PKT_CAS);
cas_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
@@ -1640,20 +1634,20 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
while (curr_ptr != NULL)
{
+ MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE;
+
/* The completion counter at the target is decremented only on
- the last RMA operation. We indicate the last operation by
- passing the source_win_handle only on the last operation.
- Otherwise, we pass NULL */
+ the last RMA operation. */
if (curr_ops_cnt[curr_ptr->target_rank] ==
- nops_to_proc[curr_ptr->target_rank] - 1)
- source_win_handle = win_ptr->handle;
- else
- source_win_handle = MPI_WIN_NULL;
-
+ nops_to_proc[curr_ptr->target_rank] - 1) {
+ flags = MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE;
+ }
+
+ source_win_handle = win_ptr->handle;
target_win_handle = win_ptr->all_win_handles[curr_ptr->target_rank];
#define MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_) /* Not used by active mode */
- MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, MPIDI_CH3_PKT_FLAG_NONE,
+ MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, flags,
source_win_handle, target_win_handle, mpi_errno);
#undef MPIDI_CH3I_TRACK_RMA_WRITE
@@ -1700,7 +1694,7 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
MPID_Request *request;
MPIDI_Pkt_init(put_pkt, MPIDI_CH3_PKT_PUT);
- put_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ put_pkt->flags = MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE;
put_pkt->addr = NULL;
put_pkt->count = 0;
put_pkt->datatype = MPI_INT;
@@ -2572,18 +2566,23 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
{
MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE;
- /* To indicate the last RMA operation, we pass the
- source_win_handle only on the last operation. Otherwise,
- we pass MPI_WIN_NULL. */
-
/* Assertion: (curr_ptr != NULL) => (nops > 0) */
MPIU_Assert(nops > 0);
MPIU_Assert(curr_ptr->target_rank == target_rank);
- if (curr_ptr->next == NULL && unlock_target)
- source_win_handle = win_ptr->handle;
- else
- source_win_handle = MPI_WIN_NULL;
+ if (curr_ptr->next == NULL) {
+ if (unlock_target) {
+ flags = MPIDI_CH3_PKT_FLAG_RMA_UNLOCK;
+
+ /* Inform the target that we want an acknowledgement when the
+ * unlock has completed. */
+ if (*wait_for_rma_done_pkt) {
+ flags |= MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK;
+ }
+ }
+ }
+
+ source_win_handle = win_ptr->handle;
/* Track passive target write operations. This is used during Win_free
* to ensure that all writes to a given target have completed at that
@@ -2895,6 +2894,8 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
if (rma_op->type == MPIDI_RMA_PUT) {
MPIDI_Pkt_init(lock_put_unlock_pkt, MPIDI_CH3_PKT_LOCK_PUT_UNLOCK);
+ lock_put_unlock_pkt->flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK |
+ MPIDI_CH3_PKT_FLAG_RMA_UNLOCK | MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK;
lock_put_unlock_pkt->target_win_handle =
win_ptr->all_win_handles[rma_op->target_rank];
lock_put_unlock_pkt->source_win_handle = win_ptr->handle;
@@ -2913,6 +2914,8 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
else if (rma_op->type == MPIDI_RMA_ACCUMULATE) {
MPIDI_Pkt_init(lock_accum_unlock_pkt, MPIDI_CH3_PKT_LOCK_ACCUM_UNLOCK);
+ lock_accum_unlock_pkt->flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK |
+ MPIDI_CH3_PKT_FLAG_RMA_UNLOCK | MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK;
lock_accum_unlock_pkt->target_win_handle =
win_ptr->all_win_handles[rma_op->target_rank];
lock_accum_unlock_pkt->source_win_handle = win_ptr->handle;
@@ -2931,6 +2934,8 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
}
else if (rma_op->type == MPIDI_RMA_ACC_CONTIG) {
MPIDI_Pkt_init(lock_accum_unlock_pkt, MPIDI_CH3_PKT_LOCK_ACCUM_UNLOCK);
+ lock_accum_unlock_pkt->flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK |
+ MPIDI_CH3_PKT_FLAG_RMA_UNLOCK | MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK;
lock_accum_unlock_pkt->target_win_handle =
win_ptr->all_win_handles[rma_op->target_rank];
lock_accum_unlock_pkt->source_win_handle = win_ptr->handle;
@@ -3115,6 +3120,8 @@ static int MPIDI_CH3I_Send_lock_get(MPID_Win *win_ptr, int target_rank)
}
MPIDI_Pkt_init(lock_get_unlock_pkt, MPIDI_CH3_PKT_LOCK_GET_UNLOCK);
+ lock_get_unlock_pkt->flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK |
+ MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; /* FIXME | MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK; */
lock_get_unlock_pkt->target_win_handle =
win_ptr->all_win_handles[rma_op->target_rank];
lock_get_unlock_pkt->source_win_handle = win_ptr->handle;
@@ -3267,7 +3274,7 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
to check lock queue. */
if (put_pkt->target_win_handle != MPI_WIN_NULL) {
MPID_Win_get_ptr(put_pkt->target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, TRUE, TRUE, MPI_WIN_NULL, FALSE);
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, TRUE, put_pkt->flags, MPI_WIN_NULL);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
*buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -3285,6 +3292,7 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.user_count = put_pkt->count;
req->dev.target_win_handle = put_pkt->target_win_handle;
req->dev.source_win_handle = put_pkt->source_win_handle;
+ req->dev.flags = put_pkt->flags;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(put_pkt->datatype, predefined);
if (predefined)
@@ -3426,6 +3434,7 @@ int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req = MPID_Request_create();
req->dev.target_win_handle = get_pkt->target_win_handle;
req->dev.source_win_handle = get_pkt->source_win_handle;
+ req->dev.flags = get_pkt->flags;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(get_pkt->datatype, predefined);
if (predefined)
@@ -3562,6 +3571,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.real_user_buf = accum_pkt->addr;
req->dev.target_win_handle = accum_pkt->target_win_handle;
req->dev.source_win_handle = accum_pkt->source_win_handle;
+ req->dev.flags = accum_pkt->flags;
if (accum_pkt->type == MPIDI_CH3_PKT_GET_ACCUM) {
req->dev.resp_request_handle = accum_pkt->request_handle;
@@ -3755,8 +3765,8 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE,
- accum_pkt->source_win_handle != MPI_WIN_NULL,
- accum_pkt->source_win_handle, FALSE);
+ accum_pkt->flags,
+ accum_pkt->source_win_handle);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
@@ -3826,8 +3836,8 @@ int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPID_Win_get_ptr(cas_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, TRUE,
- pkt->type == MPIDI_CH3_PKT_CAS_UNLOCK,
- MPI_WIN_NULL, FALSE);
+ cas_pkt->flags,
+ MPI_WIN_NULL);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
fn_exit:
@@ -3907,6 +3917,7 @@ int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.target_win_handle = fop_pkt->target_win_handle;
req->dev.source_win_handle = fop_pkt->source_win_handle;
req->dev.request_handle = fop_pkt->request_handle;
+ req->dev.flags = fop_pkt->flags;
MPID_Datatype_get_size_macro(req->dev.datatype, len);
MPIU_Assert(len <= sizeof(MPIDI_CH3_FOP_Immed_u));
@@ -4197,6 +4208,7 @@ int MPIDI_CH3_PktHandler_LockPutUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_PutAccumRespComplete;
req->dev.user_buf = lock_put_unlock_pkt->addr;
req->dev.source_win_handle = lock_put_unlock_pkt->source_win_handle;
+ req->dev.flags = lock_put_unlock_pkt->flags;
req->dev.single_op_opt = 1;
}
@@ -4239,6 +4251,7 @@ int MPIDI_CH3_PktHandler_LockPutUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
new_ptr->vc = vc;
new_ptr->pt_single_op->type = MPIDI_RMA_PUT;
+ new_ptr->pt_single_op->flags = lock_put_unlock_pkt->flags;
new_ptr->pt_single_op->addr = lock_put_unlock_pkt->addr;
new_ptr->pt_single_op->count = lock_put_unlock_pkt->count;
new_ptr->pt_single_op->datatype = lock_put_unlock_pkt->datatype;
@@ -4335,6 +4348,7 @@ int MPIDI_CH3_PktHandler_LockGetUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.target_win_handle = lock_get_unlock_pkt->target_win_handle;
req->dev.source_win_handle = lock_get_unlock_pkt->source_win_handle;
req->dev.single_op_opt = 1;
+ req->dev.flags = lock_get_unlock_pkt->flags;
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_RESP);
req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GetSendRespComplete;
@@ -4400,6 +4414,7 @@ int MPIDI_CH3_PktHandler_LockGetUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
new_ptr->vc = vc;
new_ptr->pt_single_op->type = MPIDI_RMA_GET;
+ new_ptr->pt_single_op->flags = lock_get_unlock_pkt->flags;
new_ptr->pt_single_op->addr = lock_get_unlock_pkt->addr;
new_ptr->pt_single_op->count = lock_get_unlock_pkt->count;
new_ptr->pt_single_op->datatype = lock_get_unlock_pkt->datatype;
@@ -4453,6 +4468,7 @@ int MPIDI_CH3_PktHandler_LockAccumUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.recv_data_sz = type_size * lock_accum_unlock_pkt->count;
req->dev.user_count = lock_accum_unlock_pkt->count;
req->dev.target_win_handle = lock_accum_unlock_pkt->target_win_handle;
+ req->dev.flags = lock_accum_unlock_pkt->flags;
/* queue the information */
@@ -4493,6 +4509,7 @@ int MPIDI_CH3_PktHandler_LockAccumUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
new_ptr->vc = vc;
new_ptr->pt_single_op->type = MPIDI_RMA_ACCUMULATE;
+ new_ptr->pt_single_op->flags = lock_accum_unlock_pkt->flags;
new_ptr->pt_single_op->addr = lock_accum_unlock_pkt->addr;
new_ptr->pt_single_op->count = lock_accum_unlock_pkt->count;
new_ptr->pt_single_op->datatype = lock_accum_unlock_pkt->datatype;
@@ -4900,7 +4917,7 @@ static int MPIDI_CH3I_RMAListPartialComplete( MPID_Win *win_ptr,
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
- int end_epoch, MPI_Win source_win_handle, int force_done_pkt)
+ MPIDI_CH3_Pkt_flags_t flags, MPI_Win source_win_handle)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_FINISH_RMA_OP_TARGET);
@@ -4916,40 +4933,37 @@ int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma
if (win_ptr->current_lock_type != MPID_LOCK_NONE && is_rma_update)
win_ptr->my_pt_rma_puts_accs++;
- if (end_epoch) {
- /* Last RMA operation from source. If active target RMA, decrement
- window counter. If passive target RMA, release lock on window and
- grant next lock in the lock queue if there is any. If it's a shared
- lock or a lock-put-unlock type of optimization, we also need to send
- an ack to the source. */
-
- if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
- /* FIXME: MT: Accesses to my_counter should be done atomically */
- win_ptr->my_counter -= 1;
-
- /* Active target: Signal the local process when the op counter
- * reaches 0. */
- if (win_ptr->my_counter == 0)
- MPIDI_CH3_Progress_signal_completion();
- }
- else {
- if (source_win_handle != MPI_WIN_NULL &&
- ((win_ptr->current_lock_type == MPI_LOCK_SHARED || force_done_pkt)))
- {
- mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr, source_win_handle);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- }
+ /* Last RMA operation from source. If active target RMA, decrement window
+ counter. */
+ if (flags & MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE) {
+ MPIU_Assert(win_ptr->current_lock_type == MPID_LOCK_NONE);
- if (end_epoch) {
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ /* FIXME: MT: Accesses to my_counter should be done atomically */
+ win_ptr->my_counter -= 1;
- /* Passive target: The local process may be waiting for the
- * lock. Signal completion to wake it up, so it can attempt to
- * grab the lock. */
- MPIDI_CH3_Progress_signal_completion();
- }
+ /* Signal the local process when the op counter reaches 0. */
+ if (win_ptr->my_counter == 0)
+ MPIDI_CH3_Progress_signal_completion();
+ }
+
+ /* If passive target RMA, release lock on window and grant next lock in the
+ lock queue if there is any. If requested by the origin, send an ack back
+ to indicate completion at the target. */
+ else if (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) {
+ MPIU_Assert(win_ptr->current_lock_type != MPID_LOCK_NONE);
+
+ if (flags & MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK) {
+ MPIU_Assert(source_win_handle != MPI_WIN_NULL);
+ mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr, source_win_handle);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
+
+ mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+
+ /* The local process may be waiting for the lock. Signal completion to
+ wake it up, so it can attempt to grab the lock. */
+ MPIDI_CH3_Progress_signal_completion();
}
fn_exit:
http://git.mpich.org/mpich.git/commitdiff/90be9ee1506481dcab84b89ccb8b0dc18…
commit 90be9ee1506481dcab84b89ccb8b0dc186b8b37b
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Tue Jan 29 13:49:58 2013 -0600
Added flags to MPID_Request
Added a flags field to MPID_Request that we can use to stash flags from
suspended RMA ops and retrieve them later when we complete the operation.
Reviewer: goodell
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index de73708..df567ff 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -381,6 +381,7 @@ typedef struct MPIDI_Request {
MPI_Win target_win_handle;
MPI_Win source_win_handle;
int single_op_opt; /* to indicate a lock-put-unlock optimization case */
+ MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */
struct MPIDI_Win_lock_queue *lock_queue_entry; /* for single lock-put-unlock optimization */
MPI_Request resp_request_handle; /* Handle for get_accumulate response */
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index d52eb82..2921fae 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -87,6 +87,7 @@ MPID_Request * MPID_Request_create(void)
req->dev.dtype_info = NULL;
req->dev.dataloop = NULL;
req->dev.iov_offset = 0;
+ req->dev.flags = MPIDI_CH3_PKT_FLAG_NONE;
req->dev.resp_request_handle = MPI_REQUEST_NULL;
#ifdef MPIDI_CH3_REQUEST_INIT
MPIDI_CH3_REQUEST_INIT(req);
http://git.mpich.org/mpich.git/commitdiff/478a80f5f7311f087e8eb69dd1dd65f83…
commit 478a80f5f7311f087e8eb69dd1dd65f83c5a3d0a
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Jan 24 17:19:07 2013 -0600
Integrated flags into RMA op processing
This change extends RMA op processing to pass around flags as needed. It
doesn't yet utilize the flags.
Reviewer: goodell
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 96c8469..b230ec1 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -102,18 +102,22 @@ static int MPIDI_CH3I_Send_flush_msg(int dest, MPID_Win *win_ptr);
static int MPIDI_CH3I_Wait_for_lock_granted(MPID_Win *win_ptr, int target_rank);
static int MPIDI_CH3I_Acquire_local_lock(MPID_Win *win_ptr, int lock_mode);
static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win source_win_handle,
MPI_Win target_win_handle,
MPIDI_RMA_dtype_info * dtype_info,
void ** dataloop, MPID_Request ** request);
static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win source_win_handle,
MPI_Win target_win_handle,
MPIDI_RMA_dtype_info * dtype_info,
void ** dataloop, MPID_Request ** request);
static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *, MPID_Win *,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win, MPI_Win, MPID_Request ** );
static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *, MPID_Win *,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win, MPI_Win, MPID_Request ** );
static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
int *wait_for_rma_done_pkt,
@@ -135,14 +139,14 @@ static int create_datatype(const MPIDI_RMA_dtype_info *dtype_info,
/* Issue an RMA operation -- Before calling this macro, you must define the
* MPIDI_CH3I_TRACK_RMA_WRITE helper macro. This macro defines any extra action
* that should be taken when a write (put/acc) operation is encountered. */
-#define MPIDI_CH3I_ISSUE_RMA_OP(op_ptr_, win_ptr_, source_win_handle_, target_win_handle_,err_) \
+#define MPIDI_CH3I_ISSUE_RMA_OP(op_ptr_, win_ptr_, flags_, source_win_handle_, target_win_handle_,err_) \
do { \
switch ((op_ptr_)->type) \
{ \
case (MPIDI_RMA_PUT): \
case (MPIDI_RMA_ACCUMULATE): \
MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_); \
- (err_) = MPIDI_CH3I_Send_rma_msg((op_ptr_), (win_ptr_), (source_win_handle_), \
+ (err_) = MPIDI_CH3I_Send_rma_msg((op_ptr_), (win_ptr_), (flags_), (source_win_handle_), \
(target_win_handle_), &(op_ptr_)->dtype_info, \
&(op_ptr_)->dataloop, &(op_ptr_)->request); \
if (err_) { MPIU_ERR_POP(err_); } \
@@ -158,12 +162,12 @@ static int create_datatype(const MPIDI_RMA_dtype_info *dtype_info,
(op_ptr_)->origin_count = (op_ptr_)->result_count; \
(op_ptr_)->origin_datatype = (op_ptr_)->result_datatype; \
\
- (err_) = MPIDI_CH3I_Recv_rma_msg((op_ptr_), (win_ptr_), (source_win_handle_), \
+ (err_) = MPIDI_CH3I_Recv_rma_msg((op_ptr_), (win_ptr_), (flags_), (source_win_handle_), \
(target_win_handle_), &(op_ptr_)->dtype_info,\
&(op_ptr_)->dataloop, &(op_ptr_)->request); \
} else { \
MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_); \
- (err_) = MPIDI_CH3I_Send_rma_msg((op_ptr_), (win_ptr_), (source_win_handle_), \
+ (err_) = MPIDI_CH3I_Send_rma_msg((op_ptr_), (win_ptr_), (flags_), (source_win_handle_), \
(target_win_handle_), &(op_ptr_)->dtype_info,\
&(op_ptr_)->dataloop, &(op_ptr_)->request); \
} \
@@ -171,13 +175,13 @@ static int create_datatype(const MPIDI_RMA_dtype_info *dtype_info,
break; \
case MPIDI_RMA_ACC_CONTIG: \
MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_); \
- (err_) = MPIDI_CH3I_Send_contig_acc_msg((op_ptr_), (win_ptr_), \
+ (err_) = MPIDI_CH3I_Send_contig_acc_msg((op_ptr_), (win_ptr_), (flags_), \
(source_win_handle_), (target_win_handle_),\
&(op_ptr_)->request ); \
if (err_) { MPIU_ERR_POP(err_); } \
break; \
case (MPIDI_RMA_GET): \
- (err_) = MPIDI_CH3I_Recv_rma_msg((op_ptr_), (win_ptr_), \
+ (err_) = MPIDI_CH3I_Recv_rma_msg((op_ptr_), (win_ptr_), (flags_), \
(source_win_handle_), (target_win_handle_), \
&(op_ptr_)->dtype_info, \
&(op_ptr_)->dataloop, &(op_ptr_)->request); \
@@ -186,7 +190,7 @@ static int create_datatype(const MPIDI_RMA_dtype_info *dtype_info,
case (MPIDI_RMA_COMPARE_AND_SWAP): \
case (MPIDI_RMA_FETCH_AND_OP): \
MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_); \
- (err_) = MPIDI_CH3I_Send_immed_rmw_msg((op_ptr_), (win_ptr_), \
+ (err_) = MPIDI_CH3I_Send_immed_rmw_msg((op_ptr_), (win_ptr_), (flags_), \
(source_win_handle_), (target_win_handle_),\
&(op_ptr_)->request ); \
if (err_) { MPIU_ERR_POP(err_); } \
@@ -356,7 +360,8 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
target_win_handle = win_ptr->all_win_handles[curr_ptr->target_rank];
#define MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_) /* Not used by active mode */
- MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, source_win_handle, target_win_handle, mpi_errno);
+ MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, MPIDI_CH3_PKT_FLAG_NONE,
+ source_win_handle, target_win_handle, mpi_errno);
#undef MPIDI_CH3I_TRACK_RMA_WRITE
i++;
@@ -531,6 +536,7 @@ static int create_datatype(const MPIDI_RMA_dtype_info *dtype_info,
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win source_win_handle,
MPI_Win target_win_handle,
MPIDI_RMA_dtype_info *dtype_info,
@@ -559,7 +565,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(put_pkt, MPIDI_CH3_PKT_PUT);
put_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- put_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ put_pkt->flags = flags;
put_pkt->count = rma_op->target_count;
put_pkt->datatype = rma_op->target_datatype;
put_pkt->dataloop_size = 0;
@@ -598,7 +604,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(accum_pkt, MPIDI_CH3_PKT_GET_ACCUM);
accum_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ accum_pkt->flags = flags;
accum_pkt->count = rma_op->target_count;
accum_pkt->datatype = rma_op->target_datatype;
accum_pkt->dataloop_size = 0;
@@ -615,7 +621,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(accum_pkt, MPIDI_CH3_PKT_ACCUMULATE);
accum_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ accum_pkt->flags = flags;
accum_pkt->count = rma_op->target_count;
accum_pkt->datatype = rma_op->target_datatype;
accum_pkt->dataloop_size = 0;
@@ -847,6 +853,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
MPID_Win *win_ptr,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win source_win_handle,
MPI_Win target_win_handle,
MPID_Request **request)
@@ -875,7 +882,7 @@ static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
MPIDI_Pkt_init(accumi_pkt, MPIDI_CH3_PKT_ACCUM_IMMED);
accumi_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- accumi_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ accumi_pkt->flags = flags;
accumi_pkt->count = rma_op->target_count;
accumi_pkt->datatype = rma_op->target_datatype;
accumi_pkt->op = rma_op->op;
@@ -902,7 +909,7 @@ static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
MPIDI_Pkt_init(accum_pkt, MPIDI_CH3_PKT_ACCUMULATE);
accum_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ accum_pkt->flags = flags;
accum_pkt->count = rma_op->target_count;
accum_pkt->datatype = rma_op->target_datatype;
accum_pkt->dataloop_size = 0;
@@ -961,6 +968,7 @@ static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
MPID_Win *win_ptr,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win source_win_handle,
MPI_Win target_win_handle,
MPID_Request **request)
@@ -1014,7 +1022,7 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
cas_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- cas_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ cas_pkt->flags = flags;
cas_pkt->datatype = rma_op->target_datatype;
cas_pkt->target_win_handle = target_win_handle;
cas_pkt->request_handle = resp_req->handle;
@@ -1043,7 +1051,7 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
fop_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- fop_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ fop_pkt->flags = flags;
fop_pkt->datatype = rma_op->target_datatype;
fop_pkt->target_win_handle = target_win_handle;
fop_pkt->source_win_handle = source_win_handle;
@@ -1119,6 +1127,7 @@ fn_fail:
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
+ MPIDI_CH3_Pkt_flags_t flags,
MPI_Win source_win_handle,
MPI_Win target_win_handle,
MPIDI_RMA_dtype_info *dtype_info,
@@ -1168,7 +1177,7 @@ static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(get_pkt, MPIDI_CH3_PKT_GET);
get_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
- get_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
+ get_pkt->flags = flags;
get_pkt->count = rma_op->target_count;
get_pkt->datatype = rma_op->target_datatype;
get_pkt->request_handle = req->handle;
@@ -1644,7 +1653,8 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
target_win_handle = win_ptr->all_win_handles[curr_ptr->target_rank];
#define MPIDI_CH3I_TRACK_RMA_WRITE(op_ptr_, win_ptr_) /* Not used by active mode */
- MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, source_win_handle, target_win_handle, mpi_errno);
+ MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, MPIDI_CH3_PKT_FLAG_NONE,
+ source_win_handle, target_win_handle, mpi_errno);
#undef MPIDI_CH3I_TRACK_RMA_WRITE
i++;
@@ -2560,6 +2570,8 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
while (curr_ptr != NULL)
{
+ MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE;
+
/* To indicate the last RMA operation, we pass the
source_win_handle only on the last operation. Otherwise,
we pass MPI_WIN_NULL. */
@@ -2579,7 +2591,8 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
#define MPIDI_CH3I_TRACK_RMA_WRITE(op_, win_ptr_) \
do { (win_ptr_)->pt_rma_puts_accs[(op_)->target_rank]++; } while (0)
- MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, source_win_handle, target_win_handle, mpi_errno);
+ MPIDI_CH3I_ISSUE_RMA_OP(curr_ptr, win_ptr, flags, source_win_handle,
+ target_win_handle, mpi_errno);
#undef MPIDI_CH3I_TRACK_RMA_WRITE
/* If the request is null, we can remove it immediately */
http://git.mpich.org/mpich.git/commitdiff/c3f87fe32a5ec9208906d874d2b8563d1…
commit c3f87fe32a5ec9208906d874d2b8563d188a7e71
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Jan 24 17:07:13 2013 -0600
Added flags field to RMA op packet headers
Added flags field to RMA operation packets that are sent from origin to target.
This will be used to piggyback RMA synchronization operations.
Reviewer: goodell
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 5e63753..f1b2c2a 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -109,6 +109,15 @@ enum MPIDI_CH3_Pkt_types
};
typedef int16_t MPIDI_CH3_Pkt_type_t;
+typedef uint16_t MPIDI_CH3_Pkt_flags_t;
+
+ /* Flag vector bits:*/
+#define MPIDI_CH3_PKT_FLAG_NONE 0
+#define MPIDI_CH3_PKT_FLAG_RMA_LOCK 1 /* ...............X */
+#define MPIDI_CH3_PKT_FLAG_RMA_UNLOCK 2 /* ..............X. */
+#define MPIDI_CH3_PKT_FLAG_RMA_FLUSH 4 /* .............X.. */
+#define MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK 8 /* ............X... */
+#define MPIDI_CH3_PKT_FLAG_RMA_AT_COMPLETE 16 /* ...........X.... */
typedef struct MPIDI_CH3_Pkt_send
{
@@ -189,6 +198,7 @@ MPIDI_CH3_PKT_DEFS
typedef struct MPIDI_CH3_Pkt_put
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
void *addr;
int count;
MPI_Datatype datatype;
@@ -206,6 +216,7 @@ MPIDI_CH3_Pkt_put_t;
typedef struct MPIDI_CH3_Pkt_get
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
void *addr;
int count;
MPI_Datatype datatype;
@@ -231,6 +242,7 @@ MPIDI_CH3_Pkt_get_resp_t;
typedef struct MPIDI_CH3_Pkt_accum
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
MPI_Request request_handle; /* For get_accumulate response */
void *addr;
int count;
@@ -257,6 +269,7 @@ MPIDI_CH3_Pkt_get_accum_resp_t;
typedef struct MPIDI_CH3_Pkt_accum_immed
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
void *addr;
int count;
/* FIXME: Compress datatype/op into a single word (immedate mode) */
@@ -277,6 +290,7 @@ MPIDI_CH3_Pkt_accum_immed_t;
typedef struct MPIDI_CH3_Pkt_cas
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
MPI_Datatype datatype;
void *addr;
MPI_Request request_handle;
@@ -304,6 +318,7 @@ MPIDI_CH3_Pkt_cas_resp_t;
typedef struct MPIDI_CH3_Pkt_fop
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
MPI_Datatype datatype;
void *addr;
MPI_Op op;
@@ -354,6 +369,7 @@ typedef MPIDI_CH3_Pkt_lock_t MPIDI_CH3_Pkt_flush_t;
typedef struct MPIDI_CH3_Pkt_lock_put_unlock
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
MPI_Win target_win_handle;
MPI_Win source_win_handle;
int lock_type;
@@ -366,6 +382,7 @@ MPIDI_CH3_Pkt_lock_put_unlock_t;
typedef struct MPIDI_CH3_Pkt_lock_get_unlock
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
MPI_Win target_win_handle;
MPI_Win source_win_handle;
int lock_type;
@@ -379,6 +396,7 @@ MPIDI_CH3_Pkt_lock_get_unlock_t;
typedef struct MPIDI_CH3_Pkt_lock_accum_unlock
{
MPIDI_CH3_Pkt_type_t type;
+ MPIDI_CH3_Pkt_flags_t flags;
MPI_Win target_win_handle;
MPI_Win source_win_handle;
int lock_type;
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 904dc34..96c8469 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -559,7 +559,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(put_pkt, MPIDI_CH3_PKT_PUT);
put_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
-
+ put_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
put_pkt->count = rma_op->target_count;
put_pkt->datatype = rma_op->target_datatype;
put_pkt->dataloop_size = 0;
@@ -598,6 +598,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(accum_pkt, MPIDI_CH3_PKT_GET_ACCUM);
accum_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
accum_pkt->count = rma_op->target_count;
accum_pkt->datatype = rma_op->target_datatype;
accum_pkt->dataloop_size = 0;
@@ -614,6 +615,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(accum_pkt, MPIDI_CH3_PKT_ACCUMULATE);
accum_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
accum_pkt->count = rma_op->target_count;
accum_pkt->datatype = rma_op->target_datatype;
accum_pkt->dataloop_size = 0;
@@ -873,6 +875,7 @@ static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
MPIDI_Pkt_init(accumi_pkt, MPIDI_CH3_PKT_ACCUM_IMMED);
accumi_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ accumi_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
accumi_pkt->count = rma_op->target_count;
accumi_pkt->datatype = rma_op->target_datatype;
accumi_pkt->op = rma_op->op;
@@ -899,6 +902,7 @@ static int MPIDI_CH3I_Send_contig_acc_msg(MPIDI_RMA_Op_t *rma_op,
MPIDI_Pkt_init(accum_pkt, MPIDI_CH3_PKT_ACCUMULATE);
accum_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
accum_pkt->count = rma_op->target_count;
accum_pkt->datatype = rma_op->target_datatype;
accum_pkt->dataloop_size = 0;
@@ -1010,6 +1014,7 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
cas_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ cas_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
cas_pkt->datatype = rma_op->target_datatype;
cas_pkt->target_win_handle = target_win_handle;
cas_pkt->request_handle = resp_req->handle;
@@ -1038,6 +1043,7 @@ static int MPIDI_CH3I_Send_immed_rmw_msg(MPIDI_RMA_Op_t *rma_op,
fop_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ fop_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
fop_pkt->datatype = rma_op->target_datatype;
fop_pkt->target_win_handle = target_win_handle;
fop_pkt->source_win_handle = source_win_handle;
@@ -1162,6 +1168,7 @@ static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_Pkt_init(get_pkt, MPIDI_CH3_PKT_GET);
get_pkt->addr = (char *) win_ptr->base_addrs[rma_op->target_rank] +
win_ptr->disp_units[rma_op->target_rank] * rma_op->target_disp;
+ get_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
get_pkt->count = rma_op->target_count;
get_pkt->datatype = rma_op->target_datatype;
get_pkt->request_handle = req->handle;
@@ -1683,6 +1690,7 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
MPID_Request *request;
MPIDI_Pkt_init(put_pkt, MPIDI_CH3_PKT_PUT);
+ put_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
put_pkt->addr = NULL;
put_pkt->count = 0;
put_pkt->datatype = MPI_INT;
http://git.mpich.org/mpich.git/commitdiff/90b3b2f83c4659fdcdb6bf06a410c8fb6…
commit 90b3b2f83c4659fdcdb6bf06a410c8fb63583374
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Wed Jan 30 17:01:49 2013 -0600
Converted packet type field to 16-bits
Convert the packet type field from an enum to a uint16. This change was also
applied to packet types defined by Nemesis. Downstream netmod developers will
also have to make this change if they defined new packet types.
Reviewer: goodell
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index 7bd314a..f0096f5 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -61,7 +61,7 @@ typedef enum MPID_nem_pkt_type
typedef struct MPID_nem_pkt_lmt_rts
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
MPIDI_Message_match match;
MPI_Request sender_req_id;
MPIDI_msg_sz_t data_sz;
@@ -71,7 +71,7 @@ MPID_nem_pkt_lmt_rts_t;
typedef struct MPID_nem_pkt_lmt_cts
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
MPI_Request sender_req_id;
MPI_Request receiver_req_id;
MPIDI_msg_sz_t data_sz;
@@ -81,14 +81,14 @@ MPID_nem_pkt_lmt_cts_t;
typedef struct MPID_nem_pkt_lmt_done
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
MPI_Request req_id;
}
MPID_nem_pkt_lmt_done_t;
typedef struct MPID_nem_pkt_lmt_cookie
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
int from_sender;
MPI_Request sender_req_id;
MPI_Request receiver_req_id;
@@ -98,14 +98,14 @@ MPID_nem_pkt_lmt_cookie_t;
typedef struct MPID_nem_pkt_ckpt_marker
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
int wave; /* used for debugging */
}
MPID_nem_pkt_ckpt_marker_t;
typedef struct MPID_nem_pkt_netmod
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
unsigned subtype;
}
MPID_nem_pkt_netmod_t;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
index 8e2edc8..aab5019 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
@@ -194,7 +194,7 @@ typedef enum MPIDI_nem_tcp_pkt_type {
#ifdef ENABLE_CHECKPOINTING
typedef struct MPIDI_nem_tcp_pkt_unpause
{
- MPID_nem_pkt_type_t type;
+ MPIDI_CH3_Pkt_type_t type;
unsigned subtype;
} MPIDI_nem_tcp_pkt_unpause_t;
#endif
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 1637ab7..5e63753 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -9,6 +9,13 @@
#include "oputil.h"
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
/* Enable the use of data within the message packet for small messages */
#define USE_EAGER_SHORT
#define MPIDI_EAGER_SHORT_INTS 4
@@ -49,13 +56,11 @@ typedef union {
} MPIDI_CH3_FOP_Immed_u;
/*
- * MPIDI_CH3_Pkt_type_t
- *
* Predefined packet types. This simplifies some of the code.
*/
/* FIXME: Having predefined names makes it harder to add new message types,
such as different RMA types. */
-typedef enum MPIDI_CH3_Pkt_type
+enum MPIDI_CH3_Pkt_types
{
MPIDI_CH3_PKT_EAGER_SEND = 0,
#if defined(USE_EAGER_SHORT)
@@ -101,8 +106,9 @@ typedef enum MPIDI_CH3_Pkt_type
# endif
, MPIDI_CH3_PKT_END_ALL,
MPIDI_CH3_PKT_INVALID = -1 /* forces a signed enum to quash warnings */
-}
-MPIDI_CH3_Pkt_type_t;
+};
+
+typedef int16_t MPIDI_CH3_Pkt_type_t;
typedef struct MPIDI_CH3_Pkt_send
{
http://git.mpich.org/mpich.git/commitdiff/bba35589949c92505de9f8f5fd7bc5d9e…
commit bba35589949c92505de9f8f5fd7bc5d9e2693b23
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Mon Jan 28 14:29:43 2013 -0600
Consolidated RMA op finalization code
This patch consolidates the synchronization and tracking of RMA operations into
a single routine that is called whenever we complete an operation. The only
exception are lock-op-unlock operations that are completed from within the lock
operation processing code.
This code is pretty ugly, but it will get cleaner once packet flags are been
added.
Reviewer: goodell
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index ff4ed72..c79861a 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1214,6 +1214,8 @@ int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);
int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
int MPIDI_CH3I_Send_pt_rma_done_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
+int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
+ int end_epoch, MPI_Win source_win_handle, int force_done_pkt);
#define MPIDI_CH3I_DATATYPE_IS_PREDEFINED(type, predefined) \
if ((HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) || \
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 2eaa530..66ca1e0 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -152,36 +152,10 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- /* if passive target RMA, increment counter */
- if (win_ptr->current_lock_type != MPID_LOCK_NONE)
- win_ptr->my_pt_rma_puts_accs++;
-
- if (rreq->dev.source_win_handle != MPI_WIN_NULL) {
- /* Last RMA operation from source. If active
- target RMA, decrement window counter. If
- passive target RMA, release lock on window and
- grant next lock in the lock queue if there is
- any. If it's a shared lock or a lock-put-unlock
- type of optimization, we also need to send an
- ack to the source. */
-
- if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
- /* FIXME: MT: this has to be done atomically */
- win_ptr->my_counter -= 1;
- }
- else {
- if ((win_ptr->current_lock_type == MPI_LOCK_SHARED) ||
- (rreq->dev.single_op_opt == 1)) {
- mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr,
- rreq->dev.source_win_handle);
- if (mpi_errno) {
- MPIU_ERR_POP(mpi_errno);
- }
- }
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- }
- }
-
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, rreq->dev.source_win_handle != MPI_WIN_NULL,
+ rreq->dev.source_win_handle, rreq->dev.single_op_opt);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+
/* mark data transfer as complete and decrement CC */
MPIDI_CH3U_Request_complete(rreq);
*complete = TRUE;
@@ -444,6 +418,7 @@ int MPIDI_CH3_ReqHandler_SinglePutAccumComplete( MPIDI_VC_t *vc,
if (MPIDI_CH3I_Try_acquire_win_lock(win_ptr,
lock_queue_entry->lock_type) == 1)
{
+ MPI_Win source_win_handle = lock_queue_entry->source_win_handle;
if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_PT_SINGLE_PUT) {
/* copy the data over */
@@ -462,16 +437,6 @@ int MPIDI_CH3_ReqHandler_SinglePutAccumComplete( MPIDI_VC_t *vc,
MPIU_ERR_POP(mpi_errno);
}
- /* increment counter */
- win_ptr->my_pt_rma_puts_accs++;
-
- /* send done packet */
- mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr,
- lock_queue_entry->source_win_handle);
- if (mpi_errno) {
- MPIU_ERR_POP(mpi_errno);
- }
-
/* free lock_queue_entry including data buffer and remove
it from the queue. */
curr_ptr = (MPIDI_Win_lock_queue *) win_ptr->lock_queue;
@@ -486,8 +451,8 @@ int MPIDI_CH3_ReqHandler_SinglePutAccumComplete( MPIDI_VC_t *vc,
MPIU_Free(lock_queue_entry->pt_single_op);
MPIU_Free(lock_queue_entry);
- /* Release lock and grant next lock if there is one. */
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, TRUE, source_win_handle, TRUE);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
else {
/* could not acquire lock. mark data recd as 1 */
@@ -586,30 +551,9 @@ int MPIDI_CH3_ReqHandler_FOPComplete( MPIDI_VC_t *vc,
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
- /* if passive target RMA, increment counter */
- if (win_ptr->current_lock_type != MPID_LOCK_NONE)
- win_ptr->my_pt_rma_puts_accs++;
-
- if (rreq->dev.source_win_handle != MPI_WIN_NULL) {
- /* Last RMA operation from source. If active
- target RMA, decrement window counter. If
- passive target RMA, release lock on window and
- grant next lock in the lock queue if there is
- any. If it's a shared lock or a lock-put-unlock
- type of optimization, we also need to send an
- ack to the source. */
- if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
- /* FIXME: MT: this has to be done atomically */
- win_ptr->my_counter -= 1;
- MPIDI_CH3_Progress_signal_completion();
- }
- else {
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- /* Without the following signal_completion call, we
- sometimes hang */
- MPIDI_CH3_Progress_signal_completion();
- }
- }
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE, rreq->dev.source_win_handle != MPI_WIN_NULL,
+ rreq->dev.source_win_handle, FALSE);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
*complete = 1;
@@ -1021,6 +965,12 @@ int MPIDI_CH3I_Release_lock(MPID_Win *win_ptr)
/* if put or accumulate, send rma done packet and release lock. */
if (single_op->type != MPIDI_RMA_GET) {
+ /* NOTE: Only *queued* single_op operations are completed here.
+ Lock-op-unlock/single_op RMA ops can also be completed as
+ they arrive within various packet/request handlers via
+ MPIDI_CH3_Finish_rma_op_target(). That call cannot be used
+ here, because it would enter this function recursively. */
+
/* increment counter */
win_ptr->my_pt_rma_puts_accs++;
diff --git a/src/mpid/ch3/src/ch3u_handle_send_req.c b/src/mpid/ch3/src/ch3u_handle_send_req.c
index 0d7b6bd..9d101e9 100644
--- a/src/mpid/ch3/src/ch3u_handle_send_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_send_req.c
@@ -59,20 +59,19 @@ int MPIDI_CH3_ReqHandler_GetSendRespComplete( MPIDI_VC_t *vc ATTRIBUTE((unused))
packet since the last operation is a get. */
MPID_Win_get_ptr(sreq->dev.target_win_handle, win_ptr);
- if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
- /* FIXME: MT: this has to be done atomically */
- win_ptr->my_counter -= 1;
- }
- else {
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- }
+
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, FALSE, TRUE, MPI_WIN_NULL, FALSE);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
/* mark data transfer as complete and decrement CC */
MPIDI_CH3U_Request_complete(sreq);
*complete = TRUE;
+ fn_exit:
return mpi_errno;
+ fn_fail:
+ goto fn_exit;
}
int MPIDI_CH3_ReqHandler_SendReloadIOV( MPIDI_VC_t *vc ATTRIBUTE((unused)), MPID_Request *sreq,
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 4a5ef1b..904dc34 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1960,6 +1960,9 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
* in the queue, and return. */
MPIU_Assert(MPIDI_CH3I_RMA_Ops_isempty(&win_ptr->targets[dest].rma_ops_list));
+ /* NOTE: We don't need to signal completion here becase a thread in the
+ * same processes cannot lock the window again while it is already
+ * locked. */
mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
if (mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
win_ptr->targets[dest].remote_lock_state = MPIDI_CH3_WIN_LOCK_NONE;
@@ -3242,12 +3245,11 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
post/start/complete/wait sync model; therefore, no need
to check lock queue. */
if (put_pkt->target_win_handle != MPI_WIN_NULL) {
- MPID_Win_get_ptr(put_pkt->target_win_handle, win_ptr);
- /* FIXME: MT: this has to be done atomically */
- win_ptr->my_counter -= 1;
+ MPID_Win_get_ptr(put_pkt->target_win_handle, win_ptr);
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, TRUE, TRUE, MPI_WIN_NULL, FALSE);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
*buflen = sizeof(MPIDI_CH3_Pkt_t);
- MPIDI_CH3_Progress_signal_completion();
*rreqp = NULL;
goto fn_exit;
}
@@ -3730,41 +3732,11 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
/* Here is the code executed in PutAccumRespComplete after the
accumulation operation */
MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
-
- /* if passive target RMA, increment counter */
- if (win_ptr->current_lock_type != MPID_LOCK_NONE)
- win_ptr->my_pt_rma_puts_accs++;
-
- if (accum_pkt->source_win_handle != MPI_WIN_NULL) {
- /* Last RMA operation from source. If active
- target RMA, decrement window counter. If
- passive target RMA, release lock on window and
- grant next lock in the lock queue if there is
- any. If it's a shared lock or a lock-put-unlock
- type of optimization, we also need to send an
- ack to the source. */
- if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
- /* FIXME: MT: this has to be done atomically */
- win_ptr->my_counter -= 1;
- MPIDI_CH3_Progress_signal_completion();
- }
- else {
- if ((win_ptr->current_lock_type == MPI_LOCK_SHARED) ||
- (/*rreq->dev.single_op_opt*/ 0 == 1)) {
- mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr,
- accum_pkt->source_win_handle);
- if (mpi_errno) {
- MPIU_ERR_POP(mpi_errno);
- }
- }
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- /* Without the following signal_completion call, we
- sometimes hang */
- MPIDI_CH3_Progress_signal_completion();
- }
- }
- goto fn_exit;
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(vc, win_ptr, TRUE,
+ accum_pkt->source_win_handle != MPI_WIN_NULL,
+ accum_pkt->source_win_handle, FALSE);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
fn_exit:
@@ -3832,31 +3804,10 @@ int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPID_Win_get_ptr(cas_pkt->target_win_handle, win_ptr);
- /* if passive target RMA, increment counter */
- if (win_ptr->current_lock_type != MPID_LOCK_NONE)
- win_ptr->my_pt_rma_puts_accs++;
-
- /* Send RMA done packet? FIXME: Can the cas_resp handler handle this? */
- if (cas_pkt->type == MPIDI_CH3_PKT_CAS_UNLOCK) {
- /* Last RMA operation from source. If active
- target RMA, decrement window counter. If
- passive target RMA, release lock on window and
- grant next lock in the lock queue if there is
- any. If it's a shared lock or a lock-put-unlock
- type of optimization, we also need to send an
- ack to the source. */
- if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
- /* FIXME: MT: this has to be done atomically */
- win_ptr->my_counter -= 1;
- MPIDI_CH3_Progress_signal_completion();
- }
- else {
- mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
- /* Without the following signal_completion call, we
- sometimes hang */
- MPIDI_CH3_Progress_signal_completion();
- }
- }
+ mpi_errno = MPIDI_CH3_Finish_rma_op_target(NULL, win_ptr, TRUE,
+ pkt->type == MPIDI_CH3_PKT_CAS_UNLOCK,
+ MPI_WIN_NULL, FALSE);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
fn_exit:
MPIU_INSTR_DURATION_END(rmapkt_cas);
@@ -4922,6 +4873,74 @@ static int MPIDI_CH3I_RMAListPartialComplete( MPID_Win *win_ptr,
return mpi_errno;
}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_CH3_Finish_rma_op_target
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
+ int end_epoch, MPI_Win source_win_handle, int force_done_pkt)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_FINISH_RMA_OP_TARGET);
+
+ MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_FINISH_RMA_OP_TARGET);
+
+ /* This function should be called by the target process after each RMA
+ operation is completed, to update synchronization state. */
+
+ /* If this is a passive target RMA update operation, increment counter. This is
+ needed in Win_free to ensure that all ops are completed before a window
+ is freed. */
+ if (win_ptr->current_lock_type != MPID_LOCK_NONE && is_rma_update)
+ win_ptr->my_pt_rma_puts_accs++;
+
+ if (end_epoch) {
+ /* Last RMA operation from source. If active target RMA, decrement
+ window counter. If passive target RMA, release lock on window and
+ grant next lock in the lock queue if there is any. If it's a shared
+ lock or a lock-put-unlock type of optimization, we also need to send
+ an ack to the source. */
+
+ if (win_ptr->current_lock_type == MPID_LOCK_NONE) {
+ /* FIXME: MT: Accesses to my_counter should be done atomically */
+ win_ptr->my_counter -= 1;
+
+ /* Active target: Signal the local process when the op counter
+ * reaches 0. */
+ if (win_ptr->my_counter == 0)
+ MPIDI_CH3_Progress_signal_completion();
+ }
+ else {
+ if (source_win_handle != MPI_WIN_NULL &&
+ ((win_ptr->current_lock_type == MPI_LOCK_SHARED || force_done_pkt)))
+ {
+ mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr, source_win_handle);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ }
+
+ if (end_epoch) {
+ mpi_errno = MPIDI_CH3I_Release_lock(win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+
+ /* Passive target: The local process may be waiting for the
+ * lock. Signal completion to wake it up, so it can attempt to
+ * grab the lock. */
+ MPIDI_CH3_Progress_signal_completion();
+ }
+ }
+ }
+
+fn_exit:
+ MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_FINISH_RMA_OP_TARGET);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
/* ------------------------------------------------------------------------ */
/*
* For debugging, we provide the following functions for printing the
http://git.mpich.org/mpich.git/commitdiff/c5312557541a513ed36d4a2d9090f70cf…
commit c5312557541a513ed36d4a2d9090f70cf3a2e949
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Tue Feb 5 08:48:06 2013 -0600
Temporarily reverted is_gacc_op bugfix
Partially reverted [0b3640682] in preparation for incorporating new
piggybacking infrastructure. This temporarily re-introduces that bug
and it will be fixed again with the new piggybacking patch.
Reviwer: goodell
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 2352da7..2eaa530 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -82,7 +82,6 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
int *complete )
{
int mpi_errno = MPI_SUCCESS;
- int is_gacc_op = 0;
MPID_Win *win_ptr;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTACCUMRESPCOMPLETE);
@@ -97,7 +96,6 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
MPID_Request *resp_req;
MPID_IOV iov[MPID_IOV_LIMIT];
- is_gacc_op = 1;
MPIDI_Pkt_init(get_accum_resp_pkt, MPIDI_CH3_PKT_GET_ACCUM_RESP);
get_accum_resp_pkt->request_handle = rreq->dev.resp_request_handle;
@@ -172,7 +170,7 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
win_ptr->my_counter -= 1;
}
else {
- if ((win_ptr->current_lock_type == MPI_LOCK_SHARED && !is_gacc_op) ||
+ if ((win_ptr->current_lock_type == MPI_LOCK_SHARED) ||
(rreq->dev.single_op_opt == 1)) {
mpi_errno = MPIDI_CH3I_Send_pt_rma_done_pkt(vc, win_ptr,
rreq->dev.source_win_handle);
-----------------------------------------------------------------------
Summary of changes:
src/mpi/errhan/errnames.txt | 2 -
.../ch3/channels/nemesis/include/mpid_nem_impl.h | 12 +-
.../ch3/channels/nemesis/netmod/tcp/tcp_impl.h | 2 +-
src/mpid/ch3/errnames.txt | 9 +
src/mpid/ch3/include/mpidimpl.h | 3 +
src/mpid/ch3/include/mpidpkt.h | 45 ++-
src/mpid/ch3/include/mpidpre.h | 2 +-
src/mpid/ch3/include/mpidrma.h | 1 +
src/mpid/ch3/src/ch3u_handle_recv_pkt.c | 2 -
src/mpid/ch3/src/ch3u_handle_recv_req.c | 89 +---
src/mpid/ch3/src/ch3u_handle_send_req.c | 26 +-
src/mpid/ch3/src/ch3u_request.c | 2 +-
src/mpid/ch3/src/ch3u_rma_sync.c | 526 ++++++++++++++------
test/mpi/rma/Makefile.am | 6 +-
test/mpi/rma/linked_list_bench_lock_shr.c | 8 +
test/mpi/rma/testlist | 1 +
16 files changed, 458 insertions(+), 278 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-30-g617927f
by noreply@mpich.org 21 Feb '13
by noreply@mpich.org 21 Feb '13
21 Feb '13
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 617927fb6680aa0b5209fd29ab453e25c7ab3750 (commit)
via bda59a264d3889c1eb80ba79af67ad5661f9f435 (commit)
via 1f1897098dfec1740f93b1390ab1e7facdb0f9da (commit)
from 780133cd0fc51132438a42a4d013279989dc122b (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/617927fb6680aa0b5209fd29ab453e25c…
commit 617927fb6680aa0b5209fd29ab453e25c7ab3750
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 14:43:47 2013 -0600
Cleaned up test compiler warnings
Cleaned up a variety of compiler warnings relating to header files and
other such bugs. Most of this patch was provided by Jeff Hammond.
Reviewer: none
diff --git a/test/mpi/coll/nonblocking3.c b/test/mpi/coll/nonblocking3.c
index b1f66dd..e072def 100644
--- a/test/mpi/coll/nonblocking3.c
+++ b/test/mpi/coll/nonblocking3.c
@@ -21,6 +21,10 @@
/* USE_STRICT_MPI may be defined in mpitestconf.h */
#include "mpitestconf.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
static int errs = 0;
/* Constants that control the high level test harness behavior. */
diff --git a/test/mpi/f90/attr/attrlangc.c b/test/mpi/f90/attr/attrlangc.c
index 6920668..2ee4ef5 100644
--- a/test/mpi/f90/attr/attrlangc.c
+++ b/test/mpi/f90/attr/attrlangc.c
@@ -124,7 +124,7 @@ void cgetsizes_( MPI_Fint *ptrSize, MPI_Fint *intSize, MPI_Fint *aintSize )
}
/* ----------------------------------------------------------------------- */
-/* Copy and delete functions attached to keyvals
+/* Copy and delete functions attached to keyvals */
/* ----------------------------------------------------------------------- */
static int CMPI1_COPY_FN( MPI_Comm comm, int keyval, void *extra,
void *inval, void *outval, int *flag )
diff --git a/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c b/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c
index f045212..c6dec0b 100644
--- a/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c
+++ b/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c
@@ -17,6 +17,11 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
+#include "mpitest.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#define TRY(func) \
do { \
diff --git a/test/mpi/rma/linked_list.c b/test/mpi/rma/linked_list.c
index e17e6ce..c0dc769 100644
--- a/test/mpi/rma/linked_list.c
+++ b/test/mpi/rma/linked_list.c
@@ -19,11 +19,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <mpi.h>
#include <assert.h>
#include "mpitest.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#define NUM_ELEMS 32
#define NPROBE 100
#define ELEM_PER_ROW 16
diff --git a/test/mpi/rma/linked_list_bench_lock_all.c b/test/mpi/rma/linked_list_bench_lock_all.c
index 90df021..ef67050 100644
--- a/test/mpi/rma/linked_list_bench_lock_all.c
+++ b/test/mpi/rma/linked_list_bench_lock_all.c
@@ -15,11 +15,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <mpi.h>
#include <assert.h>
#include "mpitest.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#define NUM_ELEMS 1000
#define MAX_NPROBE nproc
#define MIN_NPROBE 1
diff --git a/test/mpi/rma/linked_list_bench_lock_excl.c b/test/mpi/rma/linked_list_bench_lock_excl.c
index 7fe5240..8bf5427 100644
--- a/test/mpi/rma/linked_list_bench_lock_excl.c
+++ b/test/mpi/rma/linked_list_bench_lock_excl.c
@@ -15,11 +15,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <mpi.h>
#include <assert.h>
#include "mpitest.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#define NUM_ELEMS 1000
#define MAX_NPROBE nproc
#define MIN_NPROBE 1
diff --git a/test/mpi/rma/linked_list_bench_lock_shr.c b/test/mpi/rma/linked_list_bench_lock_shr.c
index 2ddb791..49c3e04 100644
--- a/test/mpi/rma/linked_list_bench_lock_shr.c
+++ b/test/mpi/rma/linked_list_bench_lock_shr.c
@@ -15,11 +15,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <mpi.h>
#include <assert.h>
#include "mpitest.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#define NUM_ELEMS 1000
#define MAX_NPROBE nproc
#define MIN_NPROBE 1
diff --git a/test/mpi/rma/linked_list_fop.c b/test/mpi/rma/linked_list_fop.c
index 11d8ca0..bb95b77 100644
--- a/test/mpi/rma/linked_list_fop.c
+++ b/test/mpi/rma/linked_list_fop.c
@@ -19,11 +19,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <mpi.h>
#include <assert.h>
#include "mpitest.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#define NUM_ELEMS 32
#define NPROBE 100
#define ELEM_PER_ROW 16
diff --git a/test/mpi/rma/linked_list_lockall.c b/test/mpi/rma/linked_list_lockall.c
index 53b2ba6..f1373fb 100644
--- a/test/mpi/rma/linked_list_lockall.c
+++ b/test/mpi/rma/linked_list_lockall.c
@@ -19,11 +19,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <mpi.h>
#include <assert.h>
#include "mpitest.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#define NUM_ELEMS 32
#define NPROBE 100
#define ELEM_PER_ROW 16
diff --git a/test/mpi/rma/mutex_bench.c b/test/mpi/rma/mutex_bench.c
index 098382e..2db24e4 100644
--- a/test/mpi/rma/mutex_bench.c
+++ b/test/mpi/rma/mutex_bench.c
@@ -12,6 +12,7 @@
#include <assert.h>
#include <mpi.h>
+#include "mpitest.h"
#include "mcs-mutex.h"
#define NUM_ITER 1000
http://git.mpich.org/mpich.git/commitdiff/bda59a264d3889c1eb80ba79af67ad566…
commit bda59a264d3889c1eb80ba79af67ad5661f9f435
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 14:41:52 2013 -0600
Fixed several warnings in lockcontention3 test
This patch fixes several warnings when compiling the lockcontention3
test. PUT_VAL was reduced because the old value overflowed signed
integer comparisons.
Reviewer: none
diff --git a/test/mpi/rma/lockcontention3.c b/test/mpi/rma/lockcontention3.c
index 6204e94..d70e26c 100644
--- a/test/mpi/rma/lockcontention3.c
+++ b/test/mpi/rma/lockcontention3.c
@@ -8,6 +8,7 @@
#include "stdlib.h"
#include "mpitest.h"
#include <assert.h>
+#include <string.h>
#define LAST_TEST 14
#define RMA_SIZE 2048
@@ -15,7 +16,7 @@
#define OFFSET_2 83
#define OFFSET_3 157
-#define PUT_VAL 0xfedcba97
+#define PUT_VAL 0xdcba97
#define ACC_VAL 10771134
/*
@@ -316,6 +317,8 @@ int RMACheck( int i, int *buf, MPI_Aint bufsize )
break;
case 3: /* Datatype single put (strided put) */
case 6: /* a few small puts (like strided put, but 1 word at a time) */
+ /* FIXME: The conditional and increment are reversed below. This looks
+ * like a bug, and currently prevents the following test from running. */
for (j=0; j++; j<veccount) {
if (buf[j*stride] != PUT_VAL + j) {
errs++;
@@ -326,6 +329,8 @@ int RMACheck( int i, int *buf, MPI_Aint bufsize )
break;
case 4: /* Datatype single accumulate (strided acc) */
case 7: /* a few small accumulates (like strided acc, but 1 word at a time )*/
+ /* FIXME: The conditional and increment are reversed below. This looks
+ * like a bug, and currently prevents the following test from running. */
for (j=0; j++; j<veccount) {
if (buf[j*stride] != ACC_VAL + j + OFFSET_2 + j*stride) {
errs++;
@@ -342,7 +347,7 @@ int RMACheck( int i, int *buf, MPI_Aint bufsize )
for (j=0; j<longcount; j++) {
if (buf[OFFSET_1+j] != j) {
errs++;
- printf( "case 9: value is %d should be %d\n", i,
+ printf( "case 9: value is %d should be %d\n",
buf[OFFSET_1+j], OFFSET_1 + j );
}
}
@@ -440,7 +445,7 @@ int RMACheckGet( int i, MPI_Win win, int *getbuf, MPI_Aint getsize)
for (j=0; j<longcount; j++) {
if (getbuf[j] != OFFSET_3 + j) {
errs++;
- printf( "case 11: value is %d should be %d\n", i,
+ printf( "case 11: value is %d should be %d\n",
getbuf[j], OFFSET_3 + j );
}
}
http://git.mpich.org/mpich.git/commitdiff/1f1897098dfec1740f93b1390ab1e7fac…
commit 1f1897098dfec1740f93b1390ab1e7facdb0f9da
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 13:57:25 2013 -0600
Added missing thread safety to Comm_compare
This function was missing thread safety CS_ENTER/EXIT locks. The global
lock is necessary for this function because it accesses multiple parts
of the comm object, calls several internal routines that assume the
global lock is held, and upates the ref counts on the groups of each
communicator.
Reported by Steve Oyanagi @ Cray. This closes ticket #1796.
Reviewer: goodell
diff --git a/src/mpi/comm/comm_compare.c b/src/mpi/comm/comm_compare.c
index 6536c98..50d6cb2 100644
--- a/src/mpi/comm/comm_compare.c
+++ b/src/mpi/comm/comm_compare.c
@@ -75,6 +75,7 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result)
MPIR_ERRTEST_INITIALIZED_ORDIE();
+ MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_COMPARE);
# ifdef HAVE_ERROR_CHECKING
@@ -177,6 +178,7 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_COMPARE);
+ MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/comm_compare.c | 2 ++
test/mpi/coll/nonblocking3.c | 4 ++++
test/mpi/f90/attr/attrlangc.c | 2 +-
.../mpi_t/nem_fbox_fallback_to_queue_count.c | 5 +++++
test/mpi/rma/linked_list.c | 5 ++++-
test/mpi/rma/linked_list_bench_lock_all.c | 5 ++++-
test/mpi/rma/linked_list_bench_lock_excl.c | 5 ++++-
test/mpi/rma/linked_list_bench_lock_shr.c | 5 ++++-
test/mpi/rma/linked_list_fop.c | 5 ++++-
test/mpi/rma/linked_list_lockall.c | 5 ++++-
test/mpi/rma/lockcontention3.c | 11 ++++++++---
test/mpi/rma/mutex_bench.c | 1 +
12 files changed, 45 insertions(+), 10 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-27-g780133c
by noreply@mpich.org 21 Feb '13
by noreply@mpich.org 21 Feb '13
21 Feb '13
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 780133cd0fc51132438a42a4d013279989dc122b (commit)
via 8a9a743fcd6423a8bc82097dd6320207c1553395 (commit)
via 006dd97e9cb3309fa6e863a8a29c13c554e6e526 (commit)
via 4638b3b3e7ae85c1ae61bcd61bb69eb27b5b522d (commit)
from 89407ecc99f5b08a6fd44132ae44faa99dc9a71e (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/780133cd0fc51132438a42a4d01327998…
commit 780133cd0fc51132438a42a4d013279989dc122b
Author: William Gropp <wgropp(a)illinois.edu>
Date: Thu Feb 21 12:28:29 2013 -0600
More files for user error handler tests
diff --git a/test/mpi/errors/f90/Makefile.am b/test/mpi/errors/f90/Makefile.am
new file mode 100644
index 0000000..1c8b9ed
--- /dev/null
+++ b/test/mpi/errors/f90/Makefile.am
@@ -0,0 +1,13 @@
+# -*- Mode: Makefile; -*-
+# vim: set ft=automake :
+#
+# (C) 2011 by Argonne National Laboratory.
+# See COPYRIGHT in top-level directory.
+#
+
+include $(top_srcdir)/Makefile_f90.mtest
+
+EXTRA_DIST = testlist
+
+SUBDIRS = errhan
+DIST_SUBDIRS = errhan
diff --git a/test/mpi/errors/f90/testlist b/test/mpi/errors/f90/testlist
new file mode 100644
index 0000000..4723c12
--- /dev/null
+++ b/test/mpi/errors/f90/testlist
@@ -0,0 +1 @@
+errhan
http://git.mpich.org/mpich.git/commitdiff/8a9a743fcd6423a8bc82097dd6320207c…
commit 8a9a743fcd6423a8bc82097dd6320207c1553395
Author: William Gropp <wgropp(a)illinois.edu>
Date: Thu Feb 21 11:55:25 2013 -0600
Files that were modified to supprt the tests of user-defined error handlers from Fortran
diff --git a/.gitignore b/.gitignore
index 83a1548..60ce4db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -158,6 +158,8 @@ Makefile.am-stamp
/test/mpi/f90/ext/stamp-Makefile.am
/test/mpi/f90/io/Makefile.am
/test/mpi/f90/rma/Makefile.am
+/test/mpi/errors/f90/errhan/Makefile.am
+/test/mpi/errors/f90/errhan/testlist
# created solely from the f77 counterpart dirs
/test/mpi/f90/coll/
diff --git a/autogen.sh b/autogen.sh
index cec8ecc..f0a560a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -866,6 +866,15 @@ if [ -x ./maint/f77tof90 -a $do_f77tof90 = "yes" ] ; then
maint/f77tof90 $dir test/mpi/f90/$leafDir Makefile.am Makefile.ap
echo "timestamp" > test/mpi/f90/$leafDir/Makefile.am-stamp
done
+ for dir in test/mpi/errors/f77/* ; do
+ if [ ! -d $dir ] ; then continue ; fi
+ leafDir=`basename $dir`
+ if [ ! -d test/mpi/errors/f90/$leafDir ] ; then
+ mkdir test/mpi/errors/f90/$leafDir
+ fi
+ maint/f77tof90 $dir test/mpi/errors/f90/$leafDir Makefile.am Makefile.ap
+ echo "timestamp" > test/mpi/errors/f90/$leafDir/Makefile.am-stamp
+ done
echo "done"
fi
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index f0da35b..0106e6c 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -1406,7 +1406,11 @@ AC_OUTPUT(maint/testmerge \
errors/cxx/errhan/Makefile \
errors/cxx/io/Makefile \
errors/f77/Makefile \
+ errors/f77/errhan/Makefile \
+ errors/f77/errhan/addsize.h \
+ errors/f77/errhan/iooffset.h \
errors/f90/Makefile \
+ errors/f90/errhan/Makefile \
manual/Makefile \
manual/manyconnect \
manual/mpi_t/Makefile \
diff --git a/test/mpi/errors/f77/Makefile.am b/test/mpi/errors/f77/Makefile.am
index a3becfb..9b9a68a 100644
--- a/test/mpi/errors/f77/Makefile.am
+++ b/test/mpi/errors/f77/Makefile.am
@@ -9,6 +9,6 @@ include $(top_srcdir)/Makefile_f77.mtest
EXTRA_DIST = testlist
-# nothing tested in here for now...
-SUBDIRS =
+SUBDIRS = errhan
+DIST_SUBDIRS = errhan
diff --git a/test/mpi/errors/f77/testlist b/test/mpi/errors/f77/testlist
index fd69f0b..4723c12 100644
--- a/test/mpi/errors/f77/testlist
+++ b/test/mpi/errors/f77/testlist
@@ -1 +1 @@
-# Empty for now
+errhan
http://git.mpich.org/mpich.git/commitdiff/006dd97e9cb3309fa6e863a8a29c13c55…
commit 006dd97e9cb3309fa6e863a8a29c13c554e6e526
Author: William Gropp <wgropp(a)illinois.edu>
Date: Thu Feb 21 08:59:08 2013 -0600
Added tests for user-defined error handlers in Fortran
diff --git a/test/mpi/errors/f77/errhan/Makefile.am b/test/mpi/errors/f77/errhan/Makefile.am
new file mode 100644
index 0000000..56f28c1
--- /dev/null
+++ b/test/mpi/errors/f77/errhan/Makefile.am
@@ -0,0 +1,18 @@
+# -*- Mode: Makefile; -*-
+# vim: set ft=automake :
+#
+# (C) 2013 by Argonne National Laboratory.
+# See COPYRIGHT in top-level directory.
+#
+
+include $(top_srcdir)/Makefile_f77.mtest
+
+EXTRA_DIST = testlist
+
+AM_DEFAULT_SOURCE_EXT = .f
+
+## for all programs that are just built from the single corresponding source
+## file, we don't need per-target _SOURCES rules, automake will infer them
+## correctly
+noinst_PROGRAMS = uerrhandf
+
diff --git a/test/mpi/errors/f77/errhan/addsize.h.in b/test/mpi/errors/f77/errhan/addsize.h.in
new file mode 100644
index 0000000..320b3a5
--- /dev/null
+++ b/test/mpi/errors/f77/errhan/addsize.h.in
@@ -0,0 +1,6 @@
+C -*- Mode: Fortran; -*-
+C
+C (C) 2003 by Argonne National Laboratory.
+C See COPYRIGHT in top-level directory.
+C
+ @F77_MPI_ADDRESS@ asize
diff --git a/test/mpi/errors/f77/errhan/iooffset.h.in b/test/mpi/errors/f77/errhan/iooffset.h.in
new file mode 100644
index 0000000..61cd7c6
--- /dev/null
+++ b/test/mpi/errors/f77/errhan/iooffset.h.in
@@ -0,0 +1,6 @@
+C -*- Mode: Fortran; -*-
+C
+C (C) 2003 by Argonne National Laboratory.
+C See COPYRIGHT in top-level directory.
+C
+ @F77_MPI_OFFSET@ offset
diff --git a/test/mpi/errors/f77/errhan/testlist b/test/mpi/errors/f77/errhan/testlist
new file mode 100644
index 0000000..b98ab00
--- /dev/null
+++ b/test/mpi/errors/f77/errhan/testlist
@@ -0,0 +1 @@
+uerrhandf 1
diff --git a/test/mpi/errors/f77/errhan/uerrhandf.f b/test/mpi/errors/f77/errhan/uerrhandf.f
new file mode 100644
index 0000000..cd3c8bd
--- /dev/null
+++ b/test/mpi/errors/f77/errhan/uerrhandf.f
@@ -0,0 +1,140 @@
+C -*- Mode: Fortran; -*-
+C
+C (C) 2013 by Argonne National Laboratory.
+C See COPYRIGHT in top-level directory.
+C
+ program main
+ implicit none
+ include 'mpif.h'
+ include 'addsize.h'
+ include 'iooffset.h'
+ integer ierr, rank, i
+ integer errs
+ external comm_errh_fn, win_errh_fn, file_errh_fn
+ integer comm_errh, win_errh, file_errh
+ integer winbuf(2), winh, wdup, wdsize, sizeofint, id
+ integer fh, status(MPI_STATUS_SIZE)
+ common /ec/ iseen
+ integer iseen(3)
+ save /ec/
+
+ iseen(1) = 0
+ iseen(2) = 0
+ iseen(3) = 0
+ ierr = -1
+ errs = 0
+ call mtest_init( ierr )
+
+ call mpi_type_size( MPI_INTEGER, sizeofint, ierr )
+
+ call mpi_comm_create_errhandler( comm_errh_fn, comm_errh, ierr )
+ if (ierr .ne. MPI_SUCCESS) then
+ call mtestprinterrormsg( "Comm_create_errhandler:", ierr )
+ errs = errs + 1
+ endif
+ call mpi_win_create_errhandler( win_errh_fn, win_errh, ierr )
+ if (ierr .ne. MPI_SUCCESS) then
+ call mtestprinterrormsg( "Win_create_errhandler:", ierr )
+ errs = errs + 1
+ endif
+ call mpi_file_create_errhandler( file_errh_fn, file_errh, ierr )
+ if (ierr .ne. MPI_SUCCESS) then
+ call mtestprinterrormsg( "File_create_errhandler:", ierr )
+ errs = errs + 1
+ endif
+C
+ call mpi_comm_dup( MPI_COMM_WORLD, wdup, ierr )
+ call mpi_comm_set_errhandler( wdup, comm_errh, ierr )
+ call mpi_comm_size( wdup, wdsize, ierr )
+ call mpi_send( id, 1, MPI_INTEGER, wdsize, -37, wdup, ierr )
+ if (ierr .eq. MPI_SUCCESS) then
+ print *, ' Failed to detect error in use of MPI_SEND'
+ errs = errs + 1
+ else
+ if (iseen(1) .ne. 1) then
+ errs = errs + 1
+ print *, ' Failed to increment comm error counter'
+ endif
+ endif
+
+ call mpi_win_create( winbuf, 2*sizeofint, sizeofint, MPI_INFO_NULL
+ $ , wdup, winh, ierr )
+ if (ierr .ne. MPI_SUCCESS) then
+ call mtestprinterrormsg( "Win_create:", ierr )
+ errs = errs + 1
+ endif
+ call mpi_win_set_errhandler( winh, win_errh, ierr )
+ asize = 0
+ call mpi_put( winbuf, 1, MPI_INT, wdsize, asize, 1, MPI_INT, winh,
+ $ ierr )
+ if (ierr .eq. MPI_SUCCESS) then
+ print *, ' Failed to detect error in use of MPI_PUT'
+ errs = errs + 1
+ else
+ if (iseen(3) .ne. 1) then
+ errs = errs + 1
+ print *, ' Failed to increment win error counter'
+ endif
+ endif
+
+ call mpi_file_open( MPI_COMM_SELF, 'ftest', MPI_MODE_CREATE +
+ $ MPI_MODE_RDWR + MPI_MODE_DELETE_ON_CLOSE, MPI_INFO_NULL, fh,
+ $ ierr )
+ if (ierr .ne. MPI_SUCCESS) then
+ call mtestprinterrormsg( "File_open:", ierr )
+ errs = errs + 1
+ endif
+ call mpi_file_set_errhandler( fh, file_errh, ierr )
+ offset = -100
+ call mpi_file_read_at( fh, offset, winbuf, 1, MPI_INTEGER, status,
+ $ ierr )
+ if (ierr .eq. MPI_SUCCESS) then
+ print *, ' Failed to detect error in use of MPI_PUT'
+ errs = errs + 1
+ else
+ if (iseen(2) .ne. 1) then
+ errs = errs + 1
+ print *, ' Failed to increment file error counter'
+ endif
+ endif
+
+ call mpi_comm_free( wdup, ierr )
+ call mpi_win_free( winh, ierr )
+ call mpi_file_close( fh, ierr )
+
+ call mpi_errhandler_free( win_errh, ierr )
+ call mpi_errhandler_free( comm_errh, ierr )
+ call mpi_errhandler_free( file_errh, ierr )
+
+ call mtest_finalize( errs )
+ call mpi_finalize( ierr )
+ end
+C
+ subroutine comm_errh_fn( comm, ec )
+ integer comm, ec
+ common /ec/ iseen
+ integer iseen(3)
+ save /ec/
+C
+ iseen(1) = iseen(1) + 1
+C
+ end
+C
+ subroutine win_errh_fn( win, ec )
+ integer win, ec
+ common /ec/ iseen
+ integer iseen(3)
+ save /ec/
+C
+ iseen(3) = iseen(3) + 1
+C
+ end
+ subroutine file_errh_fn( fh, ec )
+ integer fh, ec
+ common /ec/ iseen
+ integer iseen(3)
+ save /ec/
+C
+ iseen(2) = iseen(2) + 1
+C
+ end
diff --git a/test/mpi/errors/f90/Makefile.am b/test/mpi/errors/f90/Makefile.am
deleted file mode 100644
index 204a561..0000000
--- a/test/mpi/errors/f90/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- Mode: Makefile; -*-
-# vim: set ft=automake :
-#
-# (C) 2011 by Argonne National Laboratory.
-# See COPYRIGHT in top-level directory.
-#
-
-include $(top_srcdir)/Makefile_f90.mtest
-
-EXTRA_DIST = testlist
-
-# nothing tested in here for now...
-SUBDIRS =
-
diff --git a/test/mpi/errors/f90/testlist b/test/mpi/errors/f90/testlist
deleted file mode 100644
index fd69f0b..0000000
--- a/test/mpi/errors/f90/testlist
+++ /dev/null
@@ -1 +0,0 @@
-# Empty for now
http://git.mpich.org/mpich.git/commitdiff/4638b3b3e7ae85c1ae61bcd61bb69eb27…
commit 4638b3b3e7ae85c1ae61bcd61bb69eb27b5b522d
Author: William Gropp <wgropp(a)illinois.edu>
Date: Fri Feb 15 09:24:42 2013 -0600
Added needed tests based on coverage analysis
diff --git a/test/mpi/ToDo b/test/mpi/ToDo
index 568a3c5..9c971a8 100644
--- a/test/mpi/ToDo
+++ b/test/mpi/ToDo
@@ -128,6 +128,25 @@ items listed here that are already sufficiently tested.
42. Keyval free (F90 and C++)
43. Type create indexed block
44. Type create resized
+45. User-defined error handler invoked:
+ a. On comm from Fortran on communicator
+ b. On win from C++ and Fortran
+46. Error output strings involving:
+ a. MPI_MODE_NOSTORE errors
+ b. MPI_MODE_NOCHECK errors
+ c. MPI_MODE_NOPUT errors
+ d. MPI_MODE_NOSUCCEED errors
+ e. MPI_MODE_NOPRECEED errors
+ f. Unknown assert value in window mode (as above)
+ g. Datatype = 0x0
+ h. MPI_Op = MPI_REPLACE
+ i. MPI_UNDEFINED
+ j. MPI_IN_PLACE
+ k. MPI_FILE_NULL
+ l. MPI_WIN_NULL
+ m. MPI_REQUEST_NULL
+ o. MPI_Count output (Note dangerous and improper assert! in errutil.c!)
+47. Use of "CombineSpecificCodes" (static in file); MPIR_Err_combine_codes
Also,
Replace the calls to MPIR_Group_release in Finalize with
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 2 +
autogen.sh | 9 ++
test/mpi/ToDo | 19 +++
test/mpi/configure.ac | 4 +
test/mpi/errors/f77/Makefile.am | 4 +-
test/mpi/errors/{attr => f77/errhan}/Makefile.am | 8 +-
.../{f77/rma => errors/f77/errhan}/addsize.h.in | 0
.../{f77/io => errors/f77/errhan}/iooffset.h.in | 0
test/mpi/errors/f77/errhan/testlist | 1 +
test/mpi/errors/f77/errhan/uerrhandf.f | 140 ++++++++++++++++++++
test/mpi/errors/f77/testlist | 2 +-
test/mpi/errors/f90/Makefile.am | 5 +-
test/mpi/errors/f90/testlist | 2 +-
13 files changed, 186 insertions(+), 10 deletions(-)
copy test/mpi/errors/{attr => f77/errhan}/Makefile.am (67%)
copy test/mpi/{f77/rma => errors/f77/errhan}/addsize.h.in (100%)
copy test/mpi/{f77/io => errors/f77/errhan}/iooffset.h.in (100%)
create mode 100644 test/mpi/errors/f77/errhan/testlist
create mode 100644 test/mpi/errors/f77/errhan/uerrhandf.f
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-23-g89407ec
by noreply@mpich.org 21 Feb '13
by noreply@mpich.org 21 Feb '13
21 Feb '13
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 89407ecc99f5b08a6fd44132ae44faa99dc9a71e (commit)
from e971ce3d34f599a6e0ca35beaf3e1f9d391b81fc (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/89407ecc99f5b08a6fd44132ae44faa99…
commit 89407ecc99f5b08a6fd44132ae44faa99dc9a71e
Author: James Dinan <dinan(a)mcs.anl.gov>
Date: Thu Feb 21 11:27:17 2013 -0600
Minor cleanups to MCS mutex test
Reviewer: none
diff --git a/test/mpi/rma/mcs-mutex.c b/test/mpi/rma/mcs-mutex.c
index 614e0dc..533fbdb 100644
--- a/test/mpi/rma/mcs-mutex.c
+++ b/test/mpi/rma/mcs-mutex.c
@@ -48,8 +48,8 @@ int MCS_Mutex_create(int tail_rank, MPI_Comm comm, MCS_Mutex * hdl_out)
MPI_Win_lock_all(0, hdl->window);
- hdl->base[0] = -1;
- hdl->base[1] = -1;
+ hdl->base[0] = MPI_PROC_NULL;
+ hdl->base[1] = MPI_PROC_NULL;
MPI_Win_sync(hdl->window);
MPI_Barrier(hdl->comm);
@@ -96,7 +96,7 @@ int MCS_Mutex_lock(MCS_Mutex hdl)
/* This store is safe, since it cannot happen concurrently with a remote
* write */
- hdl->base[MCS_MTX_ELEM_DISP] = -1;
+ hdl->base[MCS_MTX_ELEM_DISP] = MPI_PROC_NULL;
MPI_Win_sync(hdl->window);
MPI_Fetch_and_op(&rank, &prev, MPI_INT, hdl->tail_rank, MCS_MTX_TAIL_DISP,
@@ -105,7 +105,7 @@ int MCS_Mutex_lock(MCS_Mutex hdl)
/* If there was a previous tail, update their next pointer and wait for
* notification. Otherwise, the mutex was successfully acquired. */
- if (prev != -1) {
+ if (prev != MPI_PROC_NULL) {
/* Wait for notification */
MPI_Status status;
@@ -113,7 +113,7 @@ int MCS_Mutex_lock(MCS_Mutex hdl)
MPI_Win_flush(prev, hdl->window);
debug_print("%2d: LOCK - waiting for notification from %d\n", rank, prev);
- MPI_Recv(NULL, 0, MPI_BYTE, prev, MPI_MUTEX_TAG, hdl->comm, &status);
+ MPI_Recv(NULL, 0, MPI_BYTE, prev, MCS_MUTEX_TAG, hdl->comm, &status);
}
debug_print("%2d: LOCK - lock acquired\n", rank);
@@ -131,14 +131,14 @@ int MCS_Mutex_lock(MCS_Mutex hdl)
int MCS_Mutex_trylock(MCS_Mutex hdl, int *success)
{
int rank, nproc;
- int tail, nil = -1;
+ int tail, nil = MPI_PROC_NULL;
MPI_Comm_rank(hdl->comm, &rank);
MPI_Comm_size(hdl->comm, &nproc);
/* This store is safe, since it cannot happen concurrently with a remote
* write */
- hdl->base[MCS_MTX_ELEM_DISP] = -1;
+ hdl->base[MCS_MTX_ELEM_DISP] = MPI_PROC_NULL;
MPI_Win_sync(hdl->window);
/* Check if the lock is available and claim it if it is. */
@@ -146,7 +146,7 @@ int MCS_Mutex_trylock(MCS_Mutex hdl, int *success)
MCS_MTX_TAIL_DISP, hdl->window);
MPI_Win_flush(hdl->tail_rank, hdl->window);
- /* If the old tail was -1, we have claimed the mutex */
+ /* If the old tail was MPI_PROC_NULL, we have claimed the mutex */
*success = (tail == nil);
debug_print("%2d: TRYLOCK - %s\n", rank, (*success) ? "Success" : "Non-success");
@@ -175,9 +175,9 @@ int MCS_Mutex_unlock(MCS_Mutex hdl)
hdl->window);
MPI_Win_flush(rank, hdl->window);
- if ( next == -1) {
+ if ( next == MPI_PROC_NULL) {
int tail;
- int nil = -1;
+ int nil = MPI_PROC_NULL;
/* Check if we are the at the tail of the lock queue. If so, we're
* done. If not, we need to send notification. */
@@ -196,7 +196,7 @@ int MCS_Mutex_unlock(MCS_Mutex hdl)
MPI_NO_OP, hdl->window);
MPI_Win_flush(rank, hdl->window);
- if (next != -1) break;
+ if (next != MPI_PROC_NULL) break;
MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag,
MPI_STATUS_IGNORE);
@@ -205,9 +205,9 @@ int MCS_Mutex_unlock(MCS_Mutex hdl)
}
/* Notify the next waiting process */
- if (next != -1) {
+ if (next != MPI_PROC_NULL) {
debug_print("%2d: UNLOCK - notifying %d\n", rank, next);
- MPI_Send(NULL, 0, MPI_BYTE, next, MPI_MUTEX_TAG, hdl->comm);
+ MPI_Send(NULL, 0, MPI_BYTE, next, MCS_MUTEX_TAG, hdl->comm);
}
debug_print("%2d: UNLOCK - lock released\n", rank);
diff --git a/test/mpi/rma/mcs-mutex.h b/test/mpi/rma/mcs-mutex.h
index ac6a17c..c8d8843 100644
--- a/test/mpi/rma/mcs-mutex.h
+++ b/test/mpi/rma/mcs-mutex.h
@@ -9,7 +9,7 @@
#include <mpi.h>
-#define MPI_MUTEX_TAG 100
+#define MCS_MUTEX_TAG 100
#ifdef ENABLE_DEBUG
#define debug_print(...) do { printf(__VA_ARGS__); } while (0)
-----------------------------------------------------------------------
Summary of changes:
test/mpi/rma/mcs-mutex.c | 26 +++++++++++++-------------
test/mpi/rma/mcs-mutex.h | 2 +-
2 files changed, 14 insertions(+), 14 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.0.2-22-ge971ce3
by noreply@mpich.org 18 Feb '13
by noreply@mpich.org 18 Feb '13
18 Feb '13
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 e971ce3d34f599a6e0ca35beaf3e1f9d391b81fc (commit)
via e7754bbfe2124c85ef3863803856a4f7bdea8cca (commit)
via beb405075ee66a795e85a046a51c25e00b367bf6 (commit)
from 72d347070b52402039af3db2428a49089d2de35e (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/e971ce3d34f599a6e0ca35beaf3e1f9d3…
commit e971ce3d34f599a6e0ca35beaf3e1f9d391b81fc
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Mon Feb 18 13:17:22 2013 -0600
Updated the CHANGES file with the hwloc-1.6.2rc1 information.
No reviewer.
diff --git a/CHANGES b/CHANGES
index 744cb61..89b3316 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
Changes in 3.0.3
===============================================================================
+ # PM/PMI: Upgraded to hwloc-1.6.2rc1. This version uses libpciaccess
+ instead of libpci, to workaround the GPL license used by libpci.
+
# PM/PMI: Added support for the Cobalt process manager.
# Several other minor bug fixes, memory leak fixes, and code cleanup.
http://git.mpich.org/mpich.git/commitdiff/e7754bbfe2124c85ef3863803856a4f7b…
commit e7754bbfe2124c85ef3863803856a4f7bdea8cca
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Thu Jan 3 18:17:41 2013 +0000
Merge hydra-specific hwloc patches from
0e24791586e76e97bc533c8c20fdafec9af70a2b.
No reviewer.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index b146aae..918d3a1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = src include
if HWLOC_BUILD_STANDALONE
-SUBDIRS += utils tests
+# SUBDIRS += utils tests
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
-SUBDIRS += doc
+# SUBDIRS += doc
endif
# Do not let automake automatically add the non-standalone dirs to the
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index d69ef09..88a122a 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,2 @@
:
-autoreconf -ivf
+autoreconf ${autoreconf_args:"-ivf"}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
index 95fa6d4..ab335f5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -573,6 +573,16 @@ EOF])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_FUNCS([getpagesize memalign posix_memalign])
+ # when autoheader is run, it doesn't know about
+ # PAC_FUNC_NEEDS_DECL, so it doesn't generate an appropriate line
+ # in config.h.in. We need to fool it with a dummy AC_DEFINE().
+ if false ; then
+ AC_DEFINE([NEEDS_GETPAGESIZE_DECL], 1, [Define to 1 if getpagesize needs a declaration])
+ fi
+ if test $ac_cv_func_getpagesize = "yes" ; then
+ PAC_FUNC_NEEDS_DECL([#include <unistd.h>],getpagesize)
+ fi
+
AC_CHECK_HEADERS([sys/utsname.h])
AC_CHECK_FUNCS([uname])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
index 899f9d8..1e4eb45 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
@@ -184,6 +184,19 @@ if test "x$hwloc_have_plugins" = xyes; then
HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE $lt_cv_dlopen_libs"
fi
+## Enable creation of libtool-style versioning or no versioning
+AC_ARG_ENABLE(versioning,
+ [AC_HELP_STRING([--enable-versioning],[Enable library versioning])],,
+ [enable_versioning=yes])
+
+if test "$enable_versioning" = "yes" ; then
+ libhwloc_so_versionflags="-version-info \$(libhwloc_so_version)"
+else
+ libhwloc_so_versionflags="-avoid-version"
+fi
+export libhwloc_so_versionflags
+AC_SUBST(libhwloc_so_versionflags)
+
# Party on
AC_OUTPUT
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
index f1484f5..c33cc00 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
@@ -29,6 +29,10 @@
#endif
#include <string.h>
+#if defined(HAVE_GETPAGESIZE) && defined(NEEDS_GETPAGESIZE_DECL)
+int getpagesize(void);
+#endif
+
#ifdef HWLOC_HAVE_ATTRIBUTE_FORMAT
# if HWLOC_HAVE_ATTRIBUTE_FORMAT
# define __hwloc_attribute_format(type, str, arg) __attribute__((__format__(type, str, arg)))
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
index 5882cef..77a0f8d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -136,7 +136,7 @@ endif HWLOC_HAVE_WINDOWS
# Installable library
libhwloc_la_SOURCES = $(sources)
-libhwloc_la_LDFLAGS = $(ldflags) -version-info $(libhwloc_so_version) $(HWLOC_LIBS)
+libhwloc_la_LDFLAGS = $(ldflags) $(libhwloc_so_versionflags) $(HWLOC_LIBS)
if HWLOC_HAVE_PLUGINS
AM_CPPFLAGS += $(LTDLINCL)
http://git.mpich.org/mpich.git/commitdiff/beb405075ee66a795e85a046a51c25e00…
commit beb405075ee66a795e85a046a51c25e00b367bf6
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Mon Feb 18 12:45:01 2013 -0600
Upgrade to hwloc-1.6.1rc2. This version uses libpciaccess instead of
libpci, which works around the GPL license of libpci.
No reviewer.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index 918d3a1..b146aae 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = src include
if HWLOC_BUILD_STANDALONE
-# SUBDIRS += utils tests
+SUBDIRS += utils tests
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
-# SUBDIRS += doc
+SUBDIRS += doc
endif
# Do not let automake automatically add the non-standalone dirs to the
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
index 2ea5a1e..24e73c0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -17,6 +17,17 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).
+Version 1.6.2
+-------------
+* Use libpciaccess instead of pciutils/libpci by default for I/O discovery.
+ pciutils/libpci is only used if --enable-libpci is given to configure
+ because its GPL license may taint hwloc. See the Installation section
+ in the documentation for details.
+* Fix get_cpubind on Solaris when bound to a single PU with
+ processor_bind(). Thanks to Eugene Loh for reporting the problem
+ and providing a patch.
+
+
Version 1.6.1
-------------
* Fix some crash or buggy detection in the x86 backend when Linux
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index 9005840..13dcb20 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
@@ -7,7 +7,7 @@
major=1
minor=6
-release=1
+release=2
# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
@@ -16,7 +16,7 @@ release=1
# requirement is that it must be entirely printable ASCII characters
# and have no white space.
-greek=rc3
+greek=rc1
# If want_repo_rev=1, then the SVN r number will be included in the overall
# hwloc version number in some form.
@@ -58,4 +58,4 @@ date="Unreleased developer copy"
# 2. Version numbers are described in the Libtool current:revision:age
# format.
-libhwloc_so_version=7:1:2
+libhwloc_so_version=7:2:2
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index 88a122a..d69ef09 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,2 @@
:
-autoreconf ${autoreconf_args:"-ivf"}
+autoreconf -ivf
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
index a380286..95fa6d4 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -573,16 +573,6 @@ EOF])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_FUNCS([getpagesize memalign posix_memalign])
- # when autoheader is run, it doesn't know about
- # PAC_FUNC_NEEDS_DECL, so it doesn't generate an appropriate line
- # in config.h.in. We need to fool it with a dummy AC_DEFINE().
- if false ; then
- AC_DEFINE([NEEDS_GETPAGESIZE_DECL], 1, [Define to 1 if getpagesize needs a declaration])
- fi
- if test $ac_cv_func_getpagesize = "yes" ; then
- PAC_FUNC_NEEDS_DECL([#include <unistd.h>],getpagesize)
- fi
-
AC_CHECK_HEADERS([sys/utsname.h])
AC_CHECK_FUNCS([uname])
@@ -644,7 +634,13 @@ EOF])
# PCI support
hwloc_pci_happy=no
- if test "x$enable_pci" != "xno"; then
+ if test "x$enable_pci" != xno -a "x$enable_libpci" != "xyes"; then
+ hwloc_pci_happy=yes
+ HWLOC_PKG_CHECK_MODULES([PCIACCESS], [pciaccess], [pci_slot_match_iterator_create], [:], [hwloc_pci_happy=no])
+ if test x$hwloc_pci_happy = xyes; then hwloc_pci_lib=pciaccess; fi
+ fi
+ # PCI support with pciutils instead of pciaccess
+ if test "x$enable_pci" != "xno" -a "x$hwloc_pci_lib" != "xpciaccess"; then
hwloc_pci_happy=yes
HWLOC_PKG_CHECK_MODULES([PCI], [libpci], [pci_cleanup], [:], [
# manually check pciutils in case a old one without .pc is installed
@@ -684,18 +680,35 @@ EOF])
[hwloc_pci_happy=no])])
], [hwloc_pci_happy=no])
])
+ if test x$hwloc_pci_happy = xyes; then
+ # pciutils could be used, but we don't want to force use it since it may GPL-taint hwloc
+ if test x$enable_libpci = xyes; then
+ hwloc_pci_lib=pciutils
+ else
+ # user didn't explicit request pciutils, disable PCI and warn the user
+ hwloc_pci_happy=no
+ hwloc_warn_may_use_libpci=yes
+ fi
+ fi
fi
AC_SUBST(HWLOC_PCI_LIBS)
# If we asked for pci support but couldn't deliver, fail
- AS_IF([test "$enable_pci" = "yes" -a "$hwloc_pci_happy" = "no"],
+ AS_IF([test "$enable_pci" = "yes" -a "$hwloc_pci_happy" = "no" -a "$hwloc_warn_may_use_libpci" != "yes"],
[AC_MSG_WARN([Specified --enable-pci switch, but could not])
AC_MSG_WARN([find appropriate support])
AC_MSG_ERROR([Cannot continue])])
- if test "x$hwloc_pci_happy" = "xyes"; then
+ # pciaccess specific enabling
+ if test "x$hwloc_pci_lib" = "xpciaccess"; then
+ HWLOC_PCIACCESS_REQUIRES=pciaccess
+ AC_DEFINE([HWLOC_HAVE_LIBPCIACCESS], [1], [Define to 1 if you have the `libpciaccess' library.])
+ fi
+ # pciutils specific checks and enabling
+ if test "x$hwloc_pci_lib" = "xpciutils"; then
tmp_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $HWLOC_PCI_CFLAGS"
tmp_save_LIBS="$LIBS"
LIBS="$LIBS $HWLOC_PCI_LIBS"
+
AC_CHECK_DECLS([PCI_LOOKUP_NO_NUMBERS],,[:],[[#include <pci/pci.h>]])
AC_CHECK_DECLS([PCI_LOOKUP_NO_NUMBERS],,[:],[[#include <pci/pci.h>]])
AC_CHECK_LIB([pci], [pci_find_cap], [enable_pci_caps=yes], [enable_pci_caps=no], [$HWLOC_PCI_ADDITIONAL_LIBS])
@@ -721,16 +734,16 @@ EOF])
AC_DEFINE([HWLOC_HAVE_PCIDEV_DOMAIN], [1], [Define to 1 if struct pci_dev has a `domain' field.])
fi
- HWLOC_PCI_REQUIRES=libpci
- AC_DEFINE([HWLOC_HAVE_LIBPCI], [1], [Define to 1 if you have the `libpci' library.])
- AC_SUBST([HWLOC_HAVE_LIBPCI], [1])
CFLAGS="$tmp_save_CFLAGS"
LIBS="$tmp_save_LIBS"
+ HWLOC_PCI_REQUIRES=libpci
+ AC_DEFINE([HWLOC_HAVE_LIBPCI], [1], [Define to 1 if you have the `libpci' library.])
+ fi
+ # final common PCI enabling
+ if test "x$hwloc_pci_happy" = "xyes"; then
hwloc_components="$hwloc_components libpci"
hwloc_libpci_component_maybeplugin=1
- else
- AC_SUBST([HWLOC_HAVE_LIBPCI], [0])
fi
# don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
@@ -850,9 +863,9 @@ EOF])
AC_MSG_RESULT([$hwloc_plugin_components])
AS_IF([test "$hwloc_libpci_component" = "static"],
- [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCI_LIBS"
- HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCI_CFLAGS"
- HWLOC_REQUIRES="$HWLOC_PCI_REQUIRES $HWLOC_REQUIRES"])
+ [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCI_LIBS $HWLOC_PCIACCESS_LIBS"
+ HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCI_CFLAGS $HWLOC_PCIACCESS_CFLAGS"
+ HWLOC_REQUIRES="$HWLOC_PCI_REQUIRES $HWLOC_PCIACCESS_REQUIRES $HWLOC_REQUIRES"])
AS_IF([test "$hwloc_xml_libxml_component" = "static"],
[HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS"
HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS"
@@ -937,7 +950,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
[test "x$hwloc_have_cudart" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_LIBXML2], [test "$hwloc_libxml2_happy" = "yes"])
AM_CONDITIONAL([HWLOC_HAVE_CAIRO], [test "$hwloc_cairo_happy" = "yes"])
- AM_CONDITIONAL([HWLOC_HAVE_LIBPCI], [test "$hwloc_pci_happy" = "yes"])
+ AM_CONDITIONAL([HWLOC_HAVE_PCI], [test "$hwloc_pci_happy" = "yes"])
AM_CONDITIONAL([HWLOC_HAVE_SET_MEMPOLICY], [test "x$enable_set_mempolicy" != "xno"])
AM_CONDITIONAL([HWLOC_HAVE_MBIND], [test "x$enable_mbind" != "xno"])
AM_CONDITIONAL([HWLOC_HAVE_BUNZIPP], [test "x$BUNZIPP" != "xfalse"])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4
index 1023a50..0a47d53 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc_internal.m4
@@ -63,7 +63,10 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[
# PCI?
AC_ARG_ENABLE([pci],
AS_HELP_STRING([--disable-pci],
- [Disable the PCI device discovery using libpci]))
+ [Disable the PCI device discovery]))
+ AC_ARG_ENABLE([libpci],
+ AS_HELP_STRING([--enable-libpci],
+ [Use libpci for PCI support. Note that hwloc may be tainted by the pciutils GPL license.]))
# Linux libnuma
AC_ARG_ENABLE([libnuma],
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
index 5cd3343..899f9d8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac
@@ -184,19 +184,6 @@ if test "x$hwloc_have_plugins" = xyes; then
HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE $lt_cv_dlopen_libs"
fi
-## Enable creation of libtool-style versioning or no versioning
-AC_ARG_ENABLE(versioning,
- [AC_HELP_STRING([--enable-versioning],[Enable library versioning])],,
- [enable_versioning=yes])
-
-if test "$enable_versioning" = "yes" ; then
- libhwloc_so_versionflags="-version-info \$(libhwloc_so_version)"
-else
- libhwloc_so_versionflags="-avoid-version"
-fi
-export libhwloc_so_versionflags
-AC_SUBST(libhwloc_so_versionflags)
-
# Party on
AC_OUTPUT
@@ -215,6 +202,16 @@ append_env() {
eval "[$]1=\"$new_value\""
}
+# Warn about PCI support
+if test x$hwloc_warn_may_use_libpci = xyes; then
+ echo
+ echo "***********************************************************************"
+ echo "PCI support could not be enabled because libpciaccess is not available."
+ echo "libpci could be used instead but hwloc may be tainted by the GPL"
+ echo "license of pciutils. Add --enable-libpci to enable it."
+ echo "***********************************************************************"
+fi
+
# Show which optional support we'll be building
hwloc_xml_status=basic
AS_IF([test "$hwloc_libxml2_happy" = "yes"], [hwloc_xml_status=full])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp
index 4e7eaee..22f94b5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/hwloc-valgrind.supp
@@ -54,3 +54,20 @@
...
fun:lt_dlforeachfile
}
+
+#
+{
+ libpciaccess_device_name_leak
+ Memcheck:Leak
+ ...
+ fun:pci_device_get_device_name
+ fun:hwloc_look_libpci
+}
+{
+ libpciaccess_leak
+ Memcheck:Leak
+ ...
+ obj:*libpciaccess*
+ ...
+ fun:hwloc_look_libpci
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
index d9e7de9..c947011 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -145,9 +145,14 @@ is configured and build.
The hwloc core may also benefit from the following development packages:
<ul>
-<li>pciutils (libpci) for I/O discovery.
- The relevant development package is usually <tt>pciutils-devel</tt>
- or <tt>libpci-dev</tt>.
+<li>Hwloc can use one of two different libraries for I/O device
+discovery:
+<ol>
+<li> libpciaccess (BSD). The relevant development package is usually
+<tt>libpciaccess-devel</tt> or <tt>libpciaccess-dev</tt>. </li>
+<li>libpci, from the pciutils package (GPL). The relevant development
+package is usually <tt>pciutils-devel</tt> or <tt>libpci-dev</tt>.
+</ol>
</li>
<li>libnuma for memory binding and migration support on Linux
(<tt>numactl-devel</tt> or <tt>libnuma-dev</tt> package).
@@ -160,11 +165,30 @@ The hwloc core may also benefit from the following development packages:
or <tt>libxml2-dev</tt>.
</li>
</ul>
-libpci and libxml2 support may be statically built inside the main
-hwloc library, or as separate dynamically-loaded plugins
-(see the \ref plugins section).
+PCI and XML support may be statically built inside the main hwloc
+library, or as separate dynamically-loaded plugins (see the \ref
+plugins section).
+Note that because of the possibility of GPL taint (remember that hwloc
+is BSD-licensed), hwloc's <tt>configure</tt> script will prefer
+<tt>libpciaccess</tt> to the <tt>pciutils</tt> package. Indeed, if
+<tt>libpciaccess</tt> is not found, hwloc will not use
+<tt>pciutils</tt> unless it is specifically requested via the
+<tt>--enable-libpci</tt> flag is provided.
+
+Also note that if you install supplemental libraries in non-standard
+locations, hwloc's configure script may not be able to find them
+without some help. You may need to specify additional CPPFLAGS,
+LDFLAGS, or PKG_CONFIG_PATH values on the configure command line.
+
+For example, if libpciaccess was installed into /opt/pciaccess,
+hwloc's configure script may not find it be default. Try adding
+PKG_CONFIG_PATH to the ./configure command line, like this:
+
+\verbatim
+./configure PKG_CONFIG_PATH=/opt/pciaccess/lib/pkgconfig ...
+\endverbatim
\htmlonly
</div><div class="section" id="cli_examples">
@@ -1124,8 +1148,9 @@ It can be enabled by passing flags such as <tt>::HWLOC_TOPOLOGY_FLAG_IO_DEVICES<
to hwloc_topology_set_flags() before loading the topology.
Note that I/O discovery requires significant help from the operating system.
-The pciutils library (the development package is usually <tt>pciutils-devel</tt>
-or <tt>libpci-dev</tt>) is needed to detect PCI devices and bridges,
+The pciaccess library (the development package is usually <tt>libpciaccess-devel</tt>
+or <tt>libpciaccess-dev</tt>) is needed to detect PCI devices and bridges
+(libpci/pciutils may be used instead if a GPL dependency is acceptable),
and the actual locality of these devices is only currently detected
on Linux. Also, some operating systems require privileges for probing PCI
devices, see \ref faq_privileged for details.
@@ -2017,7 +2042,8 @@ environment variable (see \ref envvar).
</dd>
<dt>libpci</dt>
<dd>
- PCI object discovery uses the external pciutils library (aka libpci),
+ PCI object discovery uses the external pciaccess library (aka libpciaccess),
+ or optionally the pciutils library (libpci),
see \ref iodevices.
<b>It may be built as a plugin</b>.
</dd>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h
index 09ee33a..61cc602 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/components.h
@@ -188,9 +188,9 @@ HWLOC_DECLSPEC extern const struct hwloc_component hwloc_freebsd_component;
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_hpux_component;
#endif /* HWLOC_HPUX_SYS */
-#ifdef HWLOC_HAVE_LIBPCI
+#if (defined HWLOC_HAVE_LIBPCI) || (defined HWLOC_HAVE_LIBPCIACCESS)
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_libpci_component;
-#endif /* HWLOC_HAVE_LIBPCI */
+#endif /* HWLOC_HAVE_LIBPCI || HWLOC_HAVE_LIBPCIACCESS */
HWLOC_DECLSPEC extern const struct hwloc_component hwloc_synthetic_component;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
index c33cc00..f1484f5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
@@ -29,10 +29,6 @@
#endif
#include <string.h>
-#if defined(HAVE_GETPAGESIZE) && defined(NEEDS_GETPAGESIZE_DECL)
-int getpagesize(void);
-#endif
-
#ifdef HWLOC_HAVE_ATTRIBUTE_FORMAT
# if HWLOC_HAVE_ATTRIBUTE_FORMAT
# define __hwloc_attribute_format(type, str, arg) __attribute__((__format__(type, str, arg)))
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
index 3e978a6..5882cef 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2009-2012 Inria. All rights reserved.
+# Copyright © 2009-2013 Inria. All rights reserved.
# Copyright © 2009-2010, 2012 Université Bordeaux 1
# Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
# Copyright © 2011-2012 Oracle and/or its affiliates. All rights reserved.
@@ -55,16 +55,16 @@ hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS)
endif
endif HWLOC_HAVE_LIBXML2
-if HWLOC_HAVE_LIBPCI
+if HWLOC_HAVE_PCI
if HWLOC_LIBPCI_BUILD_STATIC
sources += topology-libpci.c
else
plugins_LTLIBRARIES += hwloc_libpci.la
hwloc_libpci_la_SOURCES = topology-libpci.c
-hwloc_libpci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCI_CFLAGS)
-hwloc_libpci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCI_LIBS)
+hwloc_libpci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCI_CFLAGS) $(HWLOC_PCIACCESS_CFLAGS)
+hwloc_libpci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCI_LIBS) $(HWLOC_PCIACCESS_LIBS)
endif
-endif HWLOC_HAVE_LIBPCI
+endif HWLOC_HAVE_PCI
if HWLOC_HAVE_SOLARIS
sources += topology-solaris.c
@@ -136,7 +136,7 @@ endif HWLOC_HAVE_WINDOWS
# Installable library
libhwloc_la_SOURCES = $(sources)
-libhwloc_la_LDFLAGS = $(ldflags) $(libhwloc_so_versionflags) $(HWLOC_LIBS)
+libhwloc_la_LDFLAGS = $(ldflags) -version-info $(libhwloc_so_version) $(HWLOC_LIBS)
if HWLOC_HAVE_PLUGINS
AM_CPPFLAGS += $(LTDLINCL)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
index eec944b..7766766 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-libpci.c
@@ -1,7 +1,7 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2012 Inria. All rights reserved.
- * Copyright © 2009-2011 Université Bordeaux 1
+ * Copyright © 2009-2011, 2013 Université Bordeaux 1
* See COPYING in top-level directory.
*/
@@ -12,7 +12,6 @@
#include <private/debug.h>
#include <private/misc.h>
-#include <pci/pci.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
@@ -20,7 +19,94 @@
#include <stdarg.h>
#include <setjmp.h>
-#define CONFIG_SPACE_CACHESIZE 256
+#if (defined HWLOC_HAVE_LIBPCIACCESS) && (defined HWLOC_HAVE_LIBPCI)
+#error Cannot have both LIBPCI and LIBPCIACCESS enabled simultaneously
+#elif (!defined HWLOC_HAVE_LIBPCIACCESS) && (!defined HWLOC_HAVE_LIBPCI)
+#error Cannot have neither LIBPCI nor LIBPCIACCESS enabled simultaneously
+#endif
+
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+#include <pciaccess.h>
+#else /* HWLOC_HAVE_LIBPCI */
+#include <pci/pci.h>
+#endif
+
+#ifndef PCI_HEADER_TYPE
+#define PCI_HEADER_TYPE 0x0e
+#endif
+#ifndef PCI_HEADER_TYPE_BRIDGE
+#define PCI_HEADER_TYPE_BRIDGE 1
+#endif
+
+#ifndef PCI_CLASS_DEVICE
+#define PCI_CLASS_DEVICE 0x0a
+#endif
+#ifndef PCI_CLASS_BRIDGE_PCI
+#define PCI_CLASS_BRIDGE_PCI 0x0604
+#endif
+
+#ifndef PCI_REVISION_ID
+#define PCI_REVISION_ID 0x08
+#endif
+
+#ifndef PCI_SUBSYSTEM_VENDOR_ID
+#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
+#endif
+#ifndef PCI_SUBSYSTEM_ID
+#define PCI_SUBSYSTEM_ID 0x2e
+#endif
+
+#ifndef PCI_PRIMARY_BUS
+#define PCI_PRIMARY_BUS 0x18
+#endif
+#ifndef PCI_SECONDARY_BUS
+#define PCI_SECONDARY_BUS 0x19
+#endif
+#ifndef PCI_SUBORDINATE_BUS
+#define PCI_SUBORDINATE_BUS 0x1a
+#endif
+
+#ifndef PCI_EXP_LNKSTA
+#define PCI_EXP_LNKSTA 18
+#endif
+
+#ifndef PCI_EXP_LNKSTA_SPEED
+#define PCI_EXP_LNKSTA_SPEED 0x000f
+#endif
+#ifndef PCI_EXP_LNKSTA_WIDTH
+#define PCI_EXP_LNKSTA_WIDTH 0x03f0
+#endif
+
+#ifndef PCI_CAP_ID_EXP
+#define PCI_CAP_ID_EXP 0x10
+#endif
+
+#ifndef PCI_CAP_NORMAL
+#define PCI_CAP_NORMAL 1
+#endif
+
+#ifndef PCI_STATUS
+#define PCI_STATUS 0x06
+#endif
+
+#ifndef PCI_CAPABILITY_LIST
+#define PCI_CAPABILITY_LIST 0x34
+#endif
+
+#ifndef PCI_STATUS_CAP_LIST
+#define PCI_STATUS_CAP_LIST 0x10
+#endif
+
+#ifndef PCI_CAP_LIST_ID
+#define PCI_CAP_LIST_ID 0
+#endif
+
+#ifndef PCI_CAP_LIST_NEXT
+#define PCI_CAP_LIST_NEXT 1
+#endif
+
+#define CONFIG_SPACE_CACHESIZE_TRY 256
+#define CONFIG_SPACE_CACHESIZE 64
static void
hwloc_pci_traverse_print_cb(void * cbdata __hwloc_attribute_unused,
@@ -289,6 +375,7 @@ hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_b
return parent;
}
+#ifdef HWLOC_HAVE_LIBPCI
/* Avoid letting libpci call exit(1) when no PCI bus is available. */
static jmp_buf err_buf;
static void
@@ -307,15 +394,58 @@ static void
hwloc_pci_warning(char *msg __hwloc_attribute_unused, ...)
{
}
+#endif
+
+#ifndef HWLOC_HAVE_PCI_FIND_CAP
+static unsigned
+hwloc_pci_find_cap(const unsigned char *config, size_t config_size, unsigned cap)
+{
+ unsigned char seen[256] = { 0 };
+ unsigned char ptr;
+
+ if (!(config[PCI_STATUS] & PCI_STATUS_CAP_LIST))
+ return 0;
+
+ for (ptr = config[PCI_CAPABILITY_LIST] & ~3;
+ ptr;
+ ptr = config[ptr + PCI_CAP_LIST_NEXT] & ~3) {
+ unsigned char id;
+
+ if (ptr >= config_size)
+ return 0;
+
+ /* Looped around! */
+ if (seen[ptr])
+ return 0;
+ seen[ptr] = 1;
+
+ id = config[ptr + PCI_CAP_LIST_ID];
+ if (id == cap)
+ return ptr;
+ if (id == 0xff)
+ break;
+
+ if (ptr + PCI_CAP_LIST_NEXT >= (unsigned char) config_size)
+ return 0;
+ }
+ return 0;
+}
+#endif
static int
hwloc_look_libpci(struct hwloc_backend *backend)
{
struct hwloc_topology *topology = backend->topology;
- struct pci_access *pciaccess;
- struct pci_dev *pcidev;
struct hwloc_obj fakehostbridge; /* temporary object covering the whole PCI hierarchy until its complete */
unsigned current_hostbridge;
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ int ret;
+ struct pci_device_iterator *iter;
+ struct pci_device *pcidev;
+#else /* HWLOC_HAVE_LIBPCI */
+ struct pci_access *pciaccess;
+ struct pci_dev *pcidev;
+#endif
int createdgroups = 0;
if (!(topology->flags & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO)))
@@ -331,6 +461,16 @@ hwloc_look_libpci(struct hwloc_backend *backend)
hwloc_debug("%s", "\nScanning PCI buses...\n");
+ /* initialize PCI scanning */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ ret = pci_system_init();
+ if (ret) {
+ hwloc_debug("%s", "Can not initialize libpciaccess\n");
+ return -1;
+ }
+
+ iter = pci_slot_match_iterator_create(NULL);
+#else /* HWLOC_HAVE_LIBPCI */
pciaccess = pci_alloc();
pciaccess->error = hwloc_pci_error;
pciaccess->warning = hwloc_pci_warning;
@@ -342,34 +482,64 @@ hwloc_look_libpci(struct hwloc_backend *backend)
pci_init(pciaccess);
pci_scan_bus(pciaccess);
+#endif
- pcidev = pciaccess->devices;
- while (pcidev) {
- char name[128];
- const char *resname;
- u8 config_space_cache[CONFIG_SPACE_CACHESIZE];
+ /* iterate over devices */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ for (pcidev = pci_device_next(iter);
+ pcidev;
+ pcidev = pci_device_next(iter))
+#else /* HWLOC_HAVE_LIBPCI */
+ for (pcidev = pciaccess->devices;
+ pcidev;
+ pcidev = pcidev->next)
+#endif
+ {
+ const char *vendorname, *devicename, *fullname;
+ unsigned char config_space_cache[CONFIG_SPACE_CACHESIZE_TRY];
+ unsigned config_space_cachesize = CONFIG_SPACE_CACHESIZE_TRY;
struct hwloc_obj *obj;
unsigned char headertype;
unsigned os_index;
unsigned isbridge;
unsigned domain;
unsigned device_class;
+ char name[128];
+ unsigned offset;
+#ifdef HWLOC_HAVE_PCI_FIND_CAP
+ struct pci_cap *cap;
+#endif
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ pciaddr_t got;
+#endif
/* cache what we need of the config space */
- pci_read_block(pcidev, 0, config_space_cache, CONFIG_SPACE_CACHESIZE);
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ pci_device_probe(pcidev);
+ pci_device_cfg_read(pcidev, config_space_cache, 0, CONFIG_SPACE_CACHESIZE_TRY, &got);
+ config_space_cachesize = got;
+#else /* HWLOC_HAVE_LIBPCI */
+ pci_read_block(pcidev, 0, config_space_cache, CONFIG_SPACE_CACHESIZE_TRY);
+#endif
- /* read some fields that may not always be available */
-#ifdef HWLOC_HAVE_PCIDEV_DOMAIN
+ /* try to read the domain */
+#if (defined HWLOC_HAVE_LIBPCIACCESS) || (defined HWLOC_HAVE_PCIDEV_DOMAIN)
domain = pcidev->domain;
#else
domain = 0; /* default domain number */
#endif
+
+ /* try to read the device_class */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ device_class = pcidev->device_class >> 8;
+#else /* HWLOC_HAVE_LIBPCI */
#ifdef HWLOC_HAVE_PCIDEV_DEVICE_CLASS
device_class = pcidev->device_class;
#else
HWLOC_BUILD_ASSERT(PCI_CLASS_DEVICE < CONFIG_SPACE_CACHESIZE);
device_class = config_space_cache[PCI_CLASS_DEVICE] | (config_space_cache[PCI_CLASS_DEVICE+1] << 8);
#endif
+#endif
/* is this a bridge? */
HWLOC_BUILD_ASSERT(PCI_HEADER_TYPE < CONFIG_SPACE_CACHESIZE);
@@ -397,15 +567,18 @@ hwloc_look_libpci(struct hwloc_backend *backend)
obj->attr->pcidev.linkspeed = 0; /* unknown */
#ifdef HWLOC_HAVE_PCI_FIND_CAP
- {
- struct pci_cap *cap = pci_find_cap(pcidev, PCI_CAP_ID_EXP, PCI_CAP_NORMAL);
- if (cap) {
- if (cap->addr + PCI_EXP_LNKSTA >= CONFIG_SPACE_CACHESIZE) {
- fprintf(stderr, "cannot read PCI_EXP_LNKSTA cap at %d (only %d cached)\n", cap->addr + PCI_EXP_LNKSTA, CONFIG_SPACE_CACHESIZE);
+ cap = pci_find_cap(pcidev, PCI_CAP_ID_EXP, PCI_CAP_NORMAL);
+ offset = cap ? cap->addr : 0;
+#else
+ offset = hwloc_pci_find_cap(config_space_cache, config_space_cachesize, PCI_CAP_ID_EXP);
+#endif /* HWLOC_HAVE_PCI_FIND_CAP */
+ if (offset > 0) {
+ if (offset + PCI_EXP_LNKSTA + 4 >= config_space_cachesize) {
+ fprintf(stderr, "cannot read PCI_EXP_LNKSTA cap at %d (only %d cached)\n", offset + PCI_EXP_LNKSTA, CONFIG_SPACE_CACHESIZE);
} else {
unsigned linksta, speed, width;
float lanespeed;
- memcpy(&linksta, &config_space_cache[cap->addr + PCI_EXP_LNKSTA], 4);
+ memcpy(&linksta, &config_space_cache[offset + PCI_EXP_LNKSTA], 4);
speed = linksta & PCI_EXP_LNKSTA_SPEED; /* PCIe generation */
width = (linksta & PCI_EXP_LNKSTA_WIDTH) >> 4; /* how many lanes */
/* PCIe Gen1 = 2.5GT/s signal-rate per lane with 8/10 encoding = 0.25GB/s data-rate per lane
@@ -416,8 +589,6 @@ hwloc_look_libpci(struct hwloc_backend *backend)
obj->attr->pcidev.linkspeed = lanespeed * width / 8; /* GB/s */
}
}
- }
-#endif /* HWLOC_HAVE_PCI_FIND_CAP */
if (isbridge) {
HWLOC_BUILD_ASSERT(PCI_PRIMARY_BUS < CONFIG_SPACE_CACHESIZE);
@@ -437,7 +608,10 @@ hwloc_look_libpci(struct hwloc_backend *backend)
* of arguments, and supports the PCI_LOOKUP_NO_NUMBERS flag.
*/
- resname = pci_lookup_name(pciaccess, name, sizeof(name),
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ vendorname = pci_device_get_vendor_name(pcidev);
+#else /* HWLOC_HAVE_LIBPCI */
+ vendorname = pci_lookup_name(pciaccess, name, sizeof(name),
#if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
PCI_LOOKUP_VENDOR|PCI_LOOKUP_NO_NUMBERS,
pcidev->vendor_id
@@ -446,10 +620,14 @@ hwloc_look_libpci(struct hwloc_backend *backend)
pcidev->vendor_id, 0, 0, 0
#endif
);
- if (resname)
- hwloc_obj_add_info(obj, "PCIVendor", resname);
-
- resname = pci_lookup_name(pciaccess, name, sizeof(name),
+#endif /* HWLOC_HAVE_LIBPCI */
+ if (vendorname)
+ hwloc_obj_add_info(obj, "PCIVendor", vendorname);
+
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ devicename = pci_device_get_device_name(pcidev);
+#else /* HWLOC_HAVE_LIBPCI */
+ devicename = pci_lookup_name(pciaccess, name, sizeof(name),
#if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
PCI_LOOKUP_DEVICE|PCI_LOOKUP_NO_NUMBERS,
pcidev->vendor_id, pcidev->device_id
@@ -458,10 +636,19 @@ hwloc_look_libpci(struct hwloc_backend *backend)
pcidev->vendor_id, pcidev->device_id, 0, 0
#endif
);
- if (resname)
- hwloc_obj_add_info(obj, "PCIDevice", resname);
-
- resname = pci_lookup_name(pciaccess, name, sizeof(name),
+#endif /* HWLOC_HAVE_LIBPCI */
+ if (devicename)
+ hwloc_obj_add_info(obj, "PCIDevice", devicename);
+
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ snprintf(name, sizeof(name), "%s%s%s",
+ vendorname ? vendorname : "",
+ vendorname && devicename ? " " : "",
+ devicename ? devicename : "");
+ fullname = name;
+ obj->name = strdup(name);
+#else /* HWLOC_HAVE_LIBPCI */
+ fullname = pci_lookup_name(pciaccess, name, sizeof(name),
#if HAVE_DECL_PCI_LOOKUP_NO_NUMBERS
PCI_LOOKUP_VENDOR|PCI_LOOKUP_DEVICE|PCI_LOOKUP_NO_NUMBERS,
pcidev->vendor_id, pcidev->device_id
@@ -470,21 +657,26 @@ hwloc_look_libpci(struct hwloc_backend *backend)
pcidev->vendor_id, pcidev->device_id, 0, 0
#endif
);
- if (resname)
- obj->name = strdup(resname);
+ if (fullname)
+ obj->name = strdup(fullname);
else
- resname = "??";
-
+ fullname = "??";
+#endif /* HWLOC_HAVE_LIBPCI */
hwloc_debug(" %04x:%02x:%02x.%01x %04x %04x:%04x %s\n",
domain, pcidev->bus, pcidev->dev, pcidev->func,
device_class, pcidev->vendor_id, pcidev->device_id,
- resname);
+ fullname);
hwloc_pci_add_object(&fakehostbridge, obj);
- pcidev = pcidev->next;
}
+ /* finalize device scanning */
+#ifdef HWLOC_HAVE_LIBPCIACCESS
+ pci_iterator_destroy(iter);
+ pci_system_cleanup();
+#else /* HWLOC_HAVE_LIBPCI */
pci_cleanup(pciaccess);
+#endif
hwloc_debug("%s", "\nPCI hierarchy after basic scan:\n");
hwloc_pci_traverse(NULL, &fakehostbridge, hwloc_pci_traverse_print_cb);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
index 1410b7b..1b95de0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
@@ -3170,20 +3170,26 @@ hwloc__get_dmi_one_info(struct hwloc_linux_backend_data_s *data,
char *tmp;
FILE *fd;
- snprintf(sysfs_path, sizeof(sysfs_path), "/sys/class/dmi/id/%s", sysfs_name);
+ snprintf(sysfs_path, sizeof(sysfs_path), "/sys/devices/virtual/dmi/id/%s", sysfs_name);
+ fd = hwloc_fopen(sysfs_path, "r", data->root_fd);
+ if (!fd) {
+ /* old path */
+ snprintf(sysfs_path, sizeof(sysfs_path), "/sys/class/dmi/id/%s", sysfs_name);
+ fd = hwloc_fopen(sysfs_path, "r", data->root_fd);
+ if (!fd)
+ return;
+ }
dmi_line[0] = '\0';
- fd = hwloc_fopen(sysfs_path, "r", data->root_fd);
- if (fd) {
- tmp = fgets(dmi_line, sizeof(dmi_line), fd);
- fclose (fd);
- if (tmp && dmi_line[0] != '\0') {
- tmp = strchr(dmi_line, '\n');
- if (tmp)
- *tmp = '\0';
- hwloc_debug("found %s '%s'\n", hwloc_name, dmi_line);
- hwloc_obj_add_info(obj, hwloc_name, dmi_line);
- }
+ tmp = fgets(dmi_line, sizeof(dmi_line), fd);
+ fclose (fd);
+
+ if (tmp && dmi_line[0] != '\0') {
+ tmp = strchr(dmi_line, '\n');
+ if (tmp)
+ *tmp = '\0';
+ hwloc_debug("found %s '%s'\n", hwloc_name, dmi_line);
+ hwloc_obj_add_info(obj, hwloc_name, dmi_line);
}
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
index bf6d25a..fec511d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
@@ -140,6 +140,7 @@ hwloc_solaris_set_thisthread_cpubind(hwloc_topology_t topology, hwloc_const_bitm
static int
hwloc_solaris_get_sth_cpubind(hwloc_topology_t topology, idtype_t idtype, id_t id, hwloc_bitmap_t hwloc_set, int flags __hwloc_attribute_unused)
{
+ processorid_t binding;
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
int n;
int i;
@@ -149,15 +150,21 @@ hwloc_solaris_get_sth_cpubind(hwloc_topology_t topology, idtype_t idtype, id_t i
return -1;
}
+ /* first check if processor_bind() was used to bind to a single processor rather than to an lgroup */
+ if ( processor_bind(idtype, id, PBIND_QUERY, &binding) == 0 && binding != PBIND_NONE ) {
+ hwloc_bitmap_only(hwloc_set, binding);
+ return 0;
+ }
+
+ /* if not, check lgroups */
hwloc_bitmap_zero(hwloc_set);
n = hwloc_get_nbobjs_by_depth(topology, depth);
-
for (i = 0; i < n; i++) {
hwloc_obj_t obj = hwloc_get_obj_by_depth(topology, depth, i);
lgrp_affinity_t aff = lgrp_affinity_get(idtype, id, obj->os_index);
if (aff == LGRP_AFF_STRONG)
- hwloc_bitmap_or(hwloc_set, hwloc_set, obj->cpuset);
+ hwloc_bitmap_or(hwloc_set, hwloc_set, obj->cpuset);
}
if (hwloc_bitmap_iszero(hwloc_set))
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h
index 3d7b439..19877bc 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/sys/processor.h
@@ -11,6 +11,7 @@
#include <sys/procset.h>
typedef int processorid_t;
#define PBIND_NONE -1
+#define PBIND_QUERY -2
extern int processor_bind(idtype_t idtype, id_t id, processorid_t processorid, processorid_t *obind);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in
index f647e3f..372a21d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-bind.1in
@@ -16,12 +16,16 @@ and/or memory.
.B hwloc-bind
[\fIoptions\fR] \fI<location1> [<location2> [...] ] [--] <command> \fR...
.
+.PP
+Note that hwloc(7) provides a detailed explanation of the hwloc system
+and of valid <location> formats;
+it should be read before reading this man page.
+.
.\" **************************
.\" Options Section
.\" **************************
.SH OPTIONS
.
-See below for a description of valid <location> formats.
.TP 10
\fB\-\-cpubind\fR
Use following arguments for CPU binding (default).
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in
index e2ad48d..1ba0c24 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-calc.1in
@@ -14,6 +14,11 @@ hwloc-calc \- Operate on cpu mask strings and objects
.B hwloc-calc
[\fIoptions\fR] \fI<location1> [<location2> [...] ]
.
+.PP
+Note that hwloc(7) provides a detailed explanation of the hwloc system
+and of valid <location> formats;
+it should be read before reading this man page.
+.
.\" **************************
.\" Options Section
.\" **************************
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
index 620a20b..4f15415 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
@@ -21,6 +21,10 @@ before reading this man page).
.B lstopo-no-graphics
[ \fIoptions \fR]... [ \fIfilename \fR]
.
+.PP
+Note that hwloc(7) provides a detailed explanation of the hwloc system; it
+should be read before reading this man page
+.
.\" **************************
.\" Options Section
.\" **************************
@@ -421,5 +425,5 @@ To count the number of logical processors in the system
.SH SEE ALSO
.
.ft R
-hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
+hwloc(7), hwloc-bind(1), hwloc-ps(1), hwloc-gather-topology(1)
.sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in
index bc6c91c..6c7a56a 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in
@@ -38,10 +38,10 @@ $ls
$ls --taskset -v > $tmp/test.taskset
$ls --merge > $tmp/test.merge
-@HWLOC_HAVE_LIBPCI_TRUE@ $ls --no-io > $tmp/test.no-io
-@HWLOC_HAVE_LIBPCI_TRUE@ $ls --no-bridges > $tmp/test.no-bridges
-@HWLOC_HAVE_LIBPCI_TRUE@ $ls --whole-io > $tmp/test.whole-io
-@HWLOC_HAVE_LIBPCI_TRUE@ $ls -v --whole-io > $tmp/test.wholeio_verbose
+@HWLOC_HAVE_PCI_TRUE@ $ls --no-io > $tmp/test.no-io
+@HWLOC_HAVE_PCI_TRUE@ $ls --no-bridges > $tmp/test.no-bridges
+@HWLOC_HAVE_PCI_TRUE@ $ls --whole-io > $tmp/test.whole-io
+@HWLOC_HAVE_PCI_TRUE@ $ls -v --whole-io > $tmp/test.wholeio_verbose
$ls --whole-system > $tmp/test.whole-system
$ls --ps > $tmp/test.
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 3 +
src/pm/hydra/tools/topo/hwloc/hwloc/NEWS | 11 +
src/pm/hydra/tools/topo/hwloc/hwloc/VERSION | 6 +-
.../hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 | 47 +++-
.../topo/hwloc/hwloc/config/hwloc_internal.m4 | 5 +-
src/pm/hydra/tools/topo/hwloc/hwloc/configure.ac | 10 +
.../topo/hwloc/hwloc/contrib/hwloc-valgrind.supp | 17 ++
src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy | 44 +++-
.../topo/hwloc/hwloc/include/private/components.h | 4 +-
.../hydra/tools/topo/hwloc/hwloc/src/Makefile.am | 10 +-
.../tools/topo/hwloc/hwloc/src/topology-libpci.c | 264 +++++++++++++++++---
.../tools/topo/hwloc/hwloc/src/topology-linux.c | 30 ++-
.../tools/topo/hwloc/hwloc/src/topology-solaris.c | 11 +-
.../hwloc/tests/ports/include/sys/processor.h | 1 +
.../tools/topo/hwloc/hwloc/utils/hwloc-bind.1in | 6 +-
.../tools/topo/hwloc/hwloc/utils/hwloc-calc.1in | 5 +
.../hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in | 6 +-
.../topo/hwloc/hwloc/utils/test-hwloc-ls.sh.in | 8 +-
18 files changed, 400 insertions(+), 88 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0