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
September 2013
- 1 participants
- 24 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1b1-57-gcab15c5
by noreply@mpich.org 26 Sep '13
by noreply@mpich.org 26 Sep '13
26 Sep '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 cab15c5a4e3edd108064b2a53c3ac43cbbdee000 (commit)
via 278dfa647d069c0fd18f5778fe6710a783ec4050 (commit)
via 4e3c88ece6ab89c754974a226c781a07a331e4f2 (commit)
via 3668461a8a30ff433b7ab488cc93b466a9a55179 (commit)
via c3db96fde87ba3f1fa5f36953cbc0a9bc7f5086f (commit)
via 103382f5a366e07eef48e614e0eb7b1490b7edb0 (commit)
via d075cc9d5b7898691919f80cf0bcccc595d010ec (commit)
via 4b5a188aec3a043884505cd7f34b855e8238a3a3 (commit)
from a35fa10b8d70217662e8b1d1c04dfa39015ae757 (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/cab15c5a4e3edd108064b2a53c3ac43cb…
commit cab15c5a4e3edd108064b2a53c3ac43cbbdee000
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 17:25:55 2013 -0500
eagerly acquire lock in win_lock/lock_all for SHM operations.
If SHM is allocated by MPI_Win_allocate and target is on the same node
with origin, origin needs to acquire lock eagerly before it can
perform any SHM RMA operations immediately on target's SHM region.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index ae60cf0..fbf609f 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1884,6 +1884,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
{
int mpi_errno = MPI_SUCCESS;
struct MPIDI_Win_target_state *target_state;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_LOCK);
@@ -1925,15 +1926,31 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
mpi_errno = MPIDI_CH3I_Acquire_local_lock(win_ptr, lock_type);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
- else if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ else if (win_ptr->shm_allocated == TRUE) {
/* Lock must be taken immediately for shared memory windows because of
* load/store access */
- mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, win_ptr);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ if (win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly send lock request and wait for lock reply. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, dest, &target_vc);
+ }
- mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, dest);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED || orig_vc->node_id == target_vc->node_id) {
+ mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, 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); }
+ }
}
else if (MPIR_PARAM_CH3_RMA_LOCK_IMMED && ((assert & MPI_MODE_NOCHECK) == 0)) {
/* TODO: Make this mode of operation available through an assert
@@ -2375,6 +2392,7 @@ fn_fail:
int MPIDI_Win_lock_all(int assert, MPID_Win *win_ptr)
{
int mpi_errno = MPI_SUCCESS;
+ MPIDI_VC_t *orig_vc, *target_vc;
int i;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK_ALL);
@@ -2400,23 +2418,46 @@ int MPIDI_Win_lock_all(int assert, MPID_Win *win_ptr)
mpi_errno = MPIDI_CH3I_Acquire_local_lock(win_ptr, MPI_LOCK_SHARED);
if (mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
- if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ if (win_ptr->shm_allocated == TRUE) {
/* Immediately lock all targets for load/store access */
for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
/* Local process is already locked */
if (i == win_ptr->comm_ptr->rank) continue;
- mpi_errno = MPIDI_CH3I_Send_lock_msg(i, MPI_LOCK_SHARED, win_ptr);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ if (win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly send lock request and wait for lock reply. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, i, &target_vc);
+ }
+
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED || orig_vc->node_id == target_vc->node_id) {
+ mpi_errno = MPIDI_CH3I_Send_lock_msg(i, MPI_LOCK_SHARED, win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ }
}
for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
/* Local process is already locked */
if (i == win_ptr->comm_ptr->rank) continue;
- mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, i);
- if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ if (win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, i, &target_vc);
+ }
+
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED || orig_vc->node_id == target_vc->node_id) {
+ mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, i);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+ }
}
}
http://git.mpich.org/mpich.git/commitdiff/278dfa647d069c0fd18f5778fe6710a78…
commit 278dfa647d069c0fd18f5778fe6710a783ec4050
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 17:16:21 2013 -0500
perform SHM operations immediately.
If SHM is allocated, perform RMA operations immediately after it is
issued, not queuing them up any more.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
index 82b1d2d..3d441c9 100644
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
@@ -27,6 +27,7 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
@@ -59,8 +60,23 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(result_datatype, result_predefined);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
+ if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly perform this operation on shared memory region. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
+ }
+
/* Do =! rank first (most likely branch?) */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
+ (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id))
{
mpi_errno = MPIDI_CH3I_Shm_get_acc_op(origin_addr, origin_count, origin_datatype,
result_addr, result_count, result_datatype,
@@ -135,6 +151,7 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
{
int mpi_errno = MPI_SUCCESS;
int rank;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
@@ -152,13 +169,28 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
rank = win_ptr->comm_ptr->rank;
+ if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly perform this operation on shared memory region. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
+ }
+
/* The datatype must be predefined, and one of: C integer, Fortran integer,
* Logical, Multi-language types, or Byte. This is checked above the ADI,
* so there's no need to check it again here. */
/* FIXME: For shared memory windows, we should provide an implementation
* that uses a processor atomic operation. */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
+ (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id))
{
mpi_errno = MPIDI_CH3I_Shm_cas_op(origin_addr, compare_addr, result_addr,
datatype, target_rank, target_disp, win_ptr);
@@ -212,6 +244,7 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
{
int mpi_errno = MPI_SUCCESS;
int rank;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_FETCH_AND_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_FETCH_AND_OP);
@@ -229,12 +262,27 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
rank = win_ptr->comm_ptr->rank;
+ if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly perform this operation on shared memory region. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
+ }
+
/* The datatype and op must be predefined. This is checked above the ADI,
* so there's no need to check it again here. */
/* FIXME: For shared memory windows, we should provide an implementation
* that uses a processor atomic operation. */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
+ (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id))
{
mpi_errno = MPIDI_CH3I_Shm_fop_op(origin_addr, result_addr, datatype,
target_rank, target_disp, op, win_ptr);
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index e7318e2..0d2c37a 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -124,6 +124,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_PUT);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_PUT);
@@ -148,8 +149,23 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
rank = win_ptr->comm_ptr->rank;
+ if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly perform this operation on shared memory region. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
+ }
+
/* If the put is a local operation, do it here */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
+ (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id))
{
mpi_errno = MPIDI_CH3I_Shm_put_op(origin_addr, origin_count, origin_datatype, target_rank,
target_disp, target_count, target_datatype, win_ptr);
@@ -222,6 +238,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
int dt_contig ATTRIBUTE((unused)), rank, predefined;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET);
@@ -245,9 +262,24 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
}
rank = win_ptr->comm_ptr->rank;
+
+ if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly perform this operation on shared memory region. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
+ }
/* If the get is a local operation, do it here */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
+ (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id))
{
mpi_errno = MPIDI_CH3I_Shm_get_op(origin_addr, origin_count, origin_datatype, target_rank,
target_disp, target_count, target_datatype, win_ptr);
@@ -318,6 +350,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
int dt_contig ATTRIBUTE((unused)), rank, origin_predefined, target_predefined;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
+ MPIDI_VC_t *orig_vc, *target_vc;
MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
@@ -346,8 +379,23 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
+ if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
+ /* check if target is local and shared memory is allocated on window,
+ if so, we directly perform this operation on shared memory region. */
+
+ /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
+ the same node. However, in ch3:sock, even if origin and target are on the same node, they do
+ not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
+ which is only set to TRUE when SHM region is allocated in nemesis.
+ In future we need to figure out a way to check if origin and target are in the same "SHM comm".
+ */
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
+ MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
+ }
+
/* Do =! rank first (most likely branch?) */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
+ (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id))
{
mpi_errno = MPIDI_CH3I_Shm_acc_op(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count, target_datatype,
http://git.mpich.org/mpich.git/commitdiff/4e3c88ece6ab89c754974a226c781a07a…
commit 4e3c88ece6ab89c754974a226c781a07a331e4f2
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 13:06:48 2013 -0500
Delete MPIDI_CH3I_DO_SHM_OP macro.
Originally for SHM RMA operations, we create strcutures to queue them up and perform
them lazily when closing the epoch. Because creating queued structure causes siginificant
performance overhead, we decide to not queue them up but perform them immediately. Therefore
MPIDI_DO_SHM_OP macro and some special judgements on SHM operations (to count queued
operations) are not needed anymore.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index a697250..ae60cf0 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -202,55 +202,6 @@ static int create_datatype(const MPIDI_RMA_dtype_info *dtype_info,
} while (0)
-/* Perform RMA operation asynchronously if window of processes on the same node
- is allocated on shared memory */
-#define MPIDI_CH3I_DO_SHM_OP(op_ptr_, win_ptr_, err_) \
- do { \
- switch ((op_ptr_)->type) \
- { \
- case (MPIDI_RMA_PUT): \
- (err_) = MPIDI_CH3I_Shm_put_op((op_ptr_)->origin_addr, (op_ptr_)->origin_count, (op_ptr_)->origin_datatype, \
- (op_ptr_)->target_rank, (op_ptr_)->target_disp, (op_ptr_)->target_count, \
- (op_ptr_)->target_datatype, (win_ptr_)); \
- if (err_) {MPIU_ERR_POP(err_);} \
- break; \
- case (MPIDI_RMA_ACCUMULATE): \
- case (MPIDI_RMA_ACC_CONTIG): \
- (err_) = MPIDI_CH3I_Shm_acc_op((op_ptr_)->origin_addr, (op_ptr_)->origin_count, (op_ptr_)->origin_datatype, \
- (op_ptr_)->target_rank, (op_ptr_)->target_disp, (op_ptr_)->target_count, \
- (op_ptr_)->target_datatype, (op_ptr_)->op, (win_ptr_)); \
- if (err_) {MPIU_ERR_POP(err_);} \
- break; \
- case (MPIDI_RMA_GET_ACCUMULATE): \
- (err_) = MPIDI_CH3I_Shm_get_acc_op((op_ptr_)->origin_addr, (op_ptr_)->origin_count, (op_ptr_)->origin_datatype, \
- (op_ptr_)->result_addr, (op_ptr_)->result_count, (op_ptr_)->result_datatype, \
- (op_ptr_)->target_rank, (op_ptr_)->target_disp, (op_ptr_)->target_count, \
- (op_ptr_)->target_datatype, (op_ptr_)->op, (win_ptr_)); \
- if (err_) {MPIU_ERR_POP(err_);} \
- break; \
- case (MPIDI_RMA_GET): \
- (err_) = MPIDI_CH3I_Shm_get_op((op_ptr_)->origin_addr, (op_ptr_)->origin_count, (op_ptr_)->origin_datatype, \
- (op_ptr_)->target_rank, (op_ptr_)->target_disp, (op_ptr_)->target_count, \
- (op_ptr_)->target_datatype, (win_ptr_)); \
- if (err_) {MPIU_ERR_POP(err_);} \
- break; \
- case (MPIDI_RMA_COMPARE_AND_SWAP): \
- (err_) = MPIDI_CH3I_Shm_cas_op((op_ptr_)->origin_addr, (op_ptr_)->compare_addr, (op_ptr_)->result_addr, \
- (op_ptr_)->origin_datatype, (op_ptr_)->target_rank, (op_ptr_)->target_disp, \
- (win_ptr_)); \
- if (err_) {MPIU_ERR_POP(err_);} \
- break; \
- case (MPIDI_RMA_FETCH_AND_OP): \
- (err_) = MPIDI_CH3I_Shm_fop_op((op_ptr_)->origin_addr, (op_ptr_)->result_addr, (op_ptr_)->origin_datatype, \
- (op_ptr_)->target_rank, (op_ptr_)->target_disp, (op_ptr_)->op, (win_ptr_)); \
- if (err_) {MPIU_ERR_POP(err_);} \
- break; \
- default: \
- MPIU_ERR_SETANDJUMP(err_,MPI_ERR_OTHER,"**winInvalidOp"); \
- } \
- } while (0)
-
-
#undef FUNCNAME
#define FUNCNAME MPIDI_Win_fence
#undef FCNAME
@@ -329,7 +280,6 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
{
int nRequest = 0;
int nRequestNew = 0;
- MPIDI_VC_t *orig_vc, *target_vc;
/* Ensure ordering of load/store operations. */
if (win_ptr->shm_allocated == TRUE) {
@@ -363,15 +313,11 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
ops from this process */
total_op_count = 0;
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
while (curr_ptr != NULL)
{
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, curr_ptr->target_rank, &target_vc);
- if (!(win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- total_op_count++;
- rma_target_proc[curr_ptr->target_rank] = 1;
- nops_to_proc[curr_ptr->target_rank]++;
- }
+ total_op_count++;
+ rma_target_proc[curr_ptr->target_rank] = 1;
+ nops_to_proc[curr_ptr->target_rank]++;
curr_ptr = curr_ptr->next;
}
@@ -407,13 +353,6 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
while (curr_ptr != NULL)
{
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, curr_ptr->target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
- MPIDI_CH3I_DO_SHM_OP(curr_ptr, win_ptr, mpi_errno);
- MPIDI_CH3I_RMA_Ops_free_and_next(ops_list, &curr_ptr);
- }
- else {
-
MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE;
/* The completion counter at the target is decremented only on
@@ -456,7 +395,6 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
nRequestNew = nRequest;
}
}
- } /* end of else */
}
MPIU_INSTR_DURATION_END(winfence_issue);
@@ -1573,7 +1511,6 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
int start_grp_size, *ranks_in_start_grp, *ranks_in_win_grp, rank;
int nRequest = 0;
int nRequestNew = 0;
- MPIDI_VC_t *orig_vc, *target_vc;
MPIU_CHKLMEM_DECL(9);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_COMPLETE);
@@ -1686,14 +1623,10 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
total_op_count = 0;
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
while (curr_ptr != NULL)
{
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, curr_ptr->target_rank, &target_vc);
- if (!(win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- nops_to_proc[curr_ptr->target_rank]++;
- total_op_count++;
- }
+ nops_to_proc[curr_ptr->target_rank]++;
+ total_op_count++;
curr_ptr = curr_ptr->next;
}
@@ -1712,13 +1645,6 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
while (curr_ptr != NULL)
{
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, curr_ptr->target_rank, &target_vc);
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
- MPIDI_CH3I_DO_SHM_OP(curr_ptr, win_ptr, mpi_errno);
- MPIDI_CH3I_RMA_Ops_free_and_next(ops_list, &curr_ptr);
- }
- else {
-
MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE;
/* The completion counter at the target is decremented only on
@@ -1755,7 +1681,6 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
nRequestNew = nRequest;
}
}
- } /* end of else */
}
MPIU_INSTR_DURATION_END(wincomplete_issue);
@@ -2579,7 +2504,6 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
MPIDI_RMA_Op_t *curr_ptr;
MPI_Win source_win_handle = MPI_WIN_NULL, target_win_handle = MPI_WIN_NULL;
int nRequest=0, nRequestNew=0;
- MPIDI_VC_t *orig_vc, *target_vc;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_DO_PASSIVE_TARGET_RMA);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_DO_PASSIVE_TARGET_RMA);
@@ -2589,21 +2513,6 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
(win_ptr->targets[target_rank].remote_lock_state == MPIDI_CH3_WIN_LOCK_CALLED &&
win_ptr->targets[target_rank].remote_lock_assert & MPI_MODE_NOCHECK));
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
-
- /* if alloc_shm is enabled and target process is on the same node,
- directly perform RMA operations at the origin side and remove them
- from passive RMA operation list */
- if (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id) {
- curr_ptr = MPIDI_CH3I_RMA_Ops_head(&win_ptr->targets[target_rank].rma_ops_list);
- while (curr_ptr != NULL) {
- MPIU_Assert(curr_ptr->target_rank == target_rank);
- MPIDI_CH3I_DO_SHM_OP(curr_ptr, win_ptr, mpi_errno);
- MPIDI_CH3I_RMA_Ops_free_and_next(&win_ptr->targets[target_rank].rma_ops_list, &curr_ptr);
- }
- }
-
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
http://git.mpich.org/mpich.git/commitdiff/3668461a8a30ff433b7ab488cc93b466a…
commit 3668461a8a30ff433b7ab488cc93b466a9a55179
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 13:10:32 2013 -0500
Delete judgements of datatypes of RMA operations.
If we perform SHM ops immediately, we do not need to do the judgements
when incrementing datatypes, because SHM ops are already performed at
that point and judgements only works for remaining operations.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
index e8e3dea..82b1d2d 100644
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
@@ -71,7 +71,6 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
else {
MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
MPIDI_RMA_Op_t *new_ptr = NULL;
- MPIDI_VC_t *orig_vc, *target_vc;
/* Append the operation to the window's RMA ops queue */
MPIU_INSTR_DURATION_START(rmaqueue_alloc);
@@ -98,29 +97,19 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
new_ptr->op = op;
MPIU_INSTR_DURATION_END(rmaqueue_set);
- /* check if target is local and shared memory is allocated on window,
- if so, we do not need to increment reference counts on datatype. This is
- because this operation will be directly done on shared memory region, instead
- of sending and receiving through the progress engine, therefore datatype
- will not be referenced by the progress engine */
-
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (!(win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- /* if source or target datatypes are derived, increment their
- reference counts */
- if (!origin_predefined) {
- MPID_Datatype_get_ptr(origin_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- if (!result_predefined) {
- MPID_Datatype_get_ptr(result_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- if (!target_predefined) {
- MPID_Datatype_get_ptr(target_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
+ /* if source or target datatypes are derived, increment their
+ reference counts */
+ if (!origin_predefined) {
+ MPID_Datatype_get_ptr(origin_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
+ if (!result_predefined) {
+ MPID_Datatype_get_ptr(result_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
+ if (!target_predefined) {
+ MPID_Datatype_get_ptr(target_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
}
}
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index c690907..e7318e2 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -159,7 +159,6 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
{
MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
MPIDI_RMA_Op_t *new_ptr = NULL;
- MPIDI_VC_t *orig_vc, *target_vc;
/* queue it up */
MPIU_INSTR_DURATION_START(rmaqueue_alloc);
@@ -182,36 +181,20 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
new_ptr->target_datatype = target_datatype;
MPIU_INSTR_DURATION_END(rmaqueue_set);
- /* check if target is local and shared memory is allocated on window,
- if so, we do not need to increment reference counts on datatype. This is
- because this operation will be directly done on shared memory region, instead
- of sending and receiving through the progress engine, therefore datatype
- will not be referenced by the progress engine */
-
- /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
- the same node. However, in ch3:sock, even if origin and target are on the same node, they do
- not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
- which is only set to TRUE when SHM region is allocated in nemesis.
- In future we need to figure out a way to check if origin and target are in the same "SHM comm".
- */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (!(win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- /* if source or target datatypes are derived, increment their
- reference counts */
- MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, predefined);
- if (!predefined)
- {
- MPID_Datatype_get_ptr(origin_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, predefined);
- if (!predefined)
- {
- MPID_Datatype_get_ptr(target_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- }
+ /* if source or target datatypes are derived, increment their
+ reference counts */
+ MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, predefined);
+ if (!predefined)
+ {
+ MPID_Datatype_get_ptr(origin_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
+ MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, predefined);
+ if (!predefined)
+ {
+ MPID_Datatype_get_ptr(target_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
}
fn_exit:
@@ -274,7 +257,6 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
{
MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
MPIDI_RMA_Op_t *new_ptr = NULL;
- MPIDI_VC_t *orig_vc, *target_vc;
/* queue it up */
MPIU_INSTR_DURATION_START(rmaqueue_alloc);
@@ -294,30 +276,20 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
new_ptr->target_datatype = target_datatype;
MPIU_INSTR_DURATION_END(rmaqueue_set);
- /* check if target is local and shared memory is allocated on window,
- if so, we do not need to increment reference counts on datatype. This is
- because this operation will be directly done on shared memory region, instead
- of sending and receiving through the progress engine, therefore datatype
- will not be referenced by the progress engine */
-
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (!(win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- /* if source or target datatypes are derived, increment their
- reference counts */
- MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, predefined);
- if (!predefined)
- {
- MPID_Datatype_get_ptr(origin_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, predefined);
- if (!predefined)
- {
- MPID_Datatype_get_ptr(target_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- }
+ /* if source or target datatypes are derived, increment their
+ reference counts */
+ MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, predefined);
+ if (!predefined)
+ {
+ MPID_Datatype_get_ptr(origin_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
+ MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, predefined);
+ if (!predefined)
+ {
+ MPID_Datatype_get_ptr(target_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
}
fn_exit:
@@ -386,7 +358,6 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
{
MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
MPIDI_RMA_Op_t *new_ptr = NULL;
- MPIDI_VC_t *orig_vc, *target_vc;
/* queue it up */
MPIU_INSTR_DURATION_START(rmaqueue_alloc);
@@ -427,28 +398,18 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
new_ptr->op = op;
MPIU_INSTR_DURATION_END(rmaqueue_set);
- /* check if target is local and shared memory is allocated on window,
- if so, we do not need to increment reference counts on datatype. This is
- because this operation will be directly done on shared memory region, instead
- of sending and receiving through the progress engine, therefore datatype
- will not be referenced by the progress engine */
-
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- if (!(win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- /* if source or target datatypes are derived, increment their
- reference counts */
- if (!origin_predefined)
- {
- MPID_Datatype_get_ptr(origin_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- if (!target_predefined)
- {
- MPID_Datatype_get_ptr(target_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- }
+ /* if source or target datatypes are derived, increment their
+ reference counts */
+ if (!origin_predefined)
+ {
+ MPID_Datatype_get_ptr(origin_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
+ if (!target_predefined)
+ {
+ MPID_Datatype_get_ptr(target_datatype, dtp);
+ MPID_Datatype_add_ref(dtp);
+ }
}
fn_exit:
http://git.mpich.org/mpich.git/commitdiff/c3db96fde87ba3f1fa5f36953cbc0a9bc…
commit c3db96fde87ba3f1fa5f36953cbc0a9bc7f5086f
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 17:38:02 2013 -0500
change the condition of memory barrier.
Change the condition of full memory barrier when closing an epoch
from *judging create_flavor* to *checking if SHM is allocated*.
Because condition of *SHM is allocated* means either create_flavor
is SHARED or alloc_shm optimization is enabled for MPI_Win_allocate.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 5d6d07c..a697250 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -332,7 +332,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
MPIDI_VC_t *orig_vc, *target_vc;
/* Ensure ordering of load/store operations. */
- if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ if (win_ptr->shm_allocated == TRUE) {
OPA_read_write_barrier();
}
@@ -1593,7 +1593,7 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
comm_size = comm_ptr->local_size;
/* Ensure ordering of load/store operations. */
- if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ if (win_ptr->shm_allocated == TRUE) {
OPA_read_write_barrier();
}
@@ -1890,7 +1890,7 @@ int MPIDI_Win_wait(MPID_Win *win_ptr)
}
/* Ensure ordering of load/store operations. */
- if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ if (win_ptr->shm_allocated == TRUE) {
OPA_read_write_barrier();
}
@@ -1934,7 +1934,7 @@ int MPIDI_Win_test(MPID_Win *win_ptr, int *flag)
win_ptr->epoch_state = MPIDI_EPOCH_NONE;
/* Ensure ordering of load/store operations. */
- if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ if (win_ptr->shm_allocated == TRUE) {
OPA_read_write_barrier();
}
}
@@ -2056,7 +2056,7 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
}
/* Ensure ordering of load/store operations. */
- if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ if (win_ptr->shm_allocated == TRUE) {
OPA_read_write_barrier();
}
http://git.mpich.org/mpich.git/commitdiff/103382f5a366e07eef48e614e0eb7b149…
commit 103382f5a366e07eef48e614e0eb7b1490b7edb0
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 17:17:30 2013 -0500
fix bug: delete memory barriers in win_lock/lock_all.
We don't need the full memory barrier when opening an epoch, ordering of
modifications on the same window location can be protected by the full
memory barrier when closing the epoch. User can modify any window location
only within an RMA epoch.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 47e8764..5d6d07c 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -2004,8 +2004,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 */
- OPA_read_write_barrier();
-
mpi_errno = MPIDI_CH3I_Send_lock_msg(dest, lock_type, win_ptr);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
@@ -2479,7 +2477,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 */
- OPA_read_write_barrier();
for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
/* Local process is already locked */
http://git.mpich.org/mpich.git/commitdiff/d075cc9d5b7898691919f80cf0bcccc59…
commit d075cc9d5b7898691919f80cf0bcccc595d010ec
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 17:09:59 2013 -0500
fix bug: delete memory barriers in win_post/start.
We don't need the full memory barrier when opening an epoch, ordering of
modifications on the same window location can be protected by the full
memory barrier when closing the epoch. User can modify any window location
only within an RMA epoch.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index cea6063..47e8764 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1393,11 +1393,6 @@ 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 */
@@ -1550,11 +1545,6 @@ 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;
http://git.mpich.org/mpich.git/commitdiff/4b5a188aec3a043884505cd7f34b855e8…
commit 4b5a188aec3a043884505cd7f34b855e8238a3a3
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Wed Sep 25 17:36:56 2013 -0500
fix bug: add a memory barrier in win_fence.
Do a memory barrier when winow is allocated by MPI_Win_allocate_shared,
if this fence is (1) not call with MPI_MODE_NO_PROCEDE; (2) not the very
first fence; (3) not following a fence with MPI_MODE_NO_SUCCEED.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index afe4796..cea6063 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -330,6 +330,12 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
int nRequest = 0;
int nRequestNew = 0;
MPIDI_VC_t *orig_vc, *target_vc;
+
+ /* Ensure ordering of load/store operations. */
+ if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ OPA_read_write_barrier();
+ }
+
MPIU_INSTR_DURATION_START(winfence_rs);
/* This is the second or later fence. Do all the preceding RMA ops. */
comm_ptr = win_ptr->comm_ptr;
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/src/ch3u_rma_acc_ops.c | 91 ++++++++++++-----
src/mpid/ch3/src/ch3u_rma_ops.c | 173 +++++++++++++++++---------------
src/mpid/ch3/src/ch3u_rma_sync.c | 187 ++++++++++++-----------------------
3 files changed, 220 insertions(+), 231 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-49-ga35fa10
by noreply@mpich.org 25 Sep '13
by noreply@mpich.org 25 Sep '13
25 Sep '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 a35fa10b8d70217662e8b1d1c04dfa39015ae757 (commit)
from 60165ef2d70dc83586201408add87bdd5f86aa0b (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/a35fa10b8d70217662e8b1d1c04dfa390…
commit a35fa10b8d70217662e8b1d1c04dfa39015ae757
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Sep 24 20:42:55 2013 -0500
Change to PMI proxy on unknown key lookup
When a key is not found locally, pass the "get" command upstream.
This allows us to handle special cases like dead processes.
Fixes #1917.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c b/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
index 7466a1f..b46ab87 100644
--- a/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
+++ b/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
@@ -409,24 +409,24 @@ static HYD_status fn_get(int fd, char *args[])
}
}
- HYD_STRING_STASH_INIT(stash);
- HYD_STRING_STASH(stash, HYDU_strdup("cmd=get_result rc="), status);
if (val) {
+ HYD_STRING_STASH_INIT(stash);
+ HYD_STRING_STASH(stash, HYDU_strdup("cmd=get_result rc="), status);
HYD_STRING_STASH(stash, HYDU_strdup("0 msg=success value="), status);
HYD_STRING_STASH(stash, HYDU_strdup(val), status);
+ HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
+
+ HYD_STRING_SPIT(stash, cmd, status);
+
+ status = send_cmd_downstream(fd, cmd);
+ HYDU_ERR_POP(status, "error sending PMI response\n");
+ HYDU_FREE(cmd);
}
else {
- HYD_STRING_STASH(stash, HYDU_strdup("-1 msg=key_"), status);
- HYD_STRING_STASH(stash, HYDU_strdup(key), status);
- HYD_STRING_STASH(stash, HYDU_strdup("_not_found value=unknown"), status);
+ /* if we can't find the key locally, ask upstream */
+ status = send_cmd_upstream("cmd=get ", fd, token_count, args);
+ HYDU_ERR_POP(status, "error sending command upstream\n");
}
- HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
-
- HYD_STRING_SPIT(stash, cmd, status);
-
- status = send_cmd_downstream(fd, cmd);
- HYDU_ERR_POP(status, "error sending command downstream\n");
- HYDU_FREE(cmd);
}
fn_exit:
diff --git a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
index 4dd7ffe..9955e18 100644
--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
+++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
@@ -199,6 +199,86 @@ static HYD_status fn_put(int fd, int pid, int pgid, char *args[])
goto fn_exit;
}
+static HYD_status fn_get(int fd, int pid, int pgid, char *args[])
+{
+ int i;
+ struct HYD_proxy *proxy;
+ struct HYD_pmcd_pmi_pg_scratch *pg_scratch;
+ struct HYD_pmcd_pmi_kvs_pair *run;
+ char *kvsname, *key, *val;
+ char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+ struct HYD_pmcd_token *tokens;
+ int token_count;
+ HYD_status status = HYD_SUCCESS;
+
+ HYDU_FUNC_ENTER();
+
+ status = HYD_pmcd_pmi_args_to_tokens(args, &tokens, &token_count);
+ HYDU_ERR_POP(status, "unable to convert args to tokens\n");
+
+ kvsname = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "kvsname");
+ HYDU_ERR_CHKANDJUMP(status, kvsname == NULL, HYD_INTERNAL_ERROR,
+ "unable to find token: kvsname\n");
+
+ key = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "key");
+ HYDU_ERR_CHKANDJUMP(status, key == NULL, HYD_INTERNAL_ERROR, "unable to find token: key\n");
+
+ proxy = HYD_pmcd_pmi_find_proxy(fd);
+ HYDU_ASSERT(proxy, status);
+
+ pg_scratch = (struct HYD_pmcd_pmi_pg_scratch *) proxy->pg->pg_scratch;
+
+ val = NULL;
+ if (!strcmp(key, "PMI_dead_processes")) {
+ val = pg_scratch->dead_processes;
+ goto found_val;
+ }
+
+ if (strcmp(pg_scratch->kvs->kvsname, kvsname))
+ HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR,
+ "kvsname (%s) does not match this group's kvs space (%s)\n",
+ kvsname, pg_scratch->kvs->kvsname);
+
+ /* Try to find the key */
+ for (run = pg_scratch->kvs->key_pair; run; run = run->next) {
+ if (!strcmp(run->key, key)) {
+ val = run->val;
+ break;
+ }
+ }
+
+ found_val:
+ i = 0;
+ tmp[i++] = HYDU_strdup("cmd=get_result rc=");
+ if (val) {
+ tmp[i++] = HYDU_strdup("0 msg=success value=");
+ tmp[i++] = HYDU_strdup(val);
+ }
+ else {
+ tmp[i++] = HYDU_strdup("-1 msg=key_");
+ tmp[i++] = HYDU_strdup(key);
+ tmp[i++] = HYDU_strdup("_not_found value=unknown");
+ }
+ tmp[i++] = HYDU_strdup("\n");
+ tmp[i++] = NULL;
+
+ status = HYDU_str_alloc_and_join(tmp, &cmd);
+ HYDU_ERR_POP(status, "unable to join strings\n");
+ HYDU_free_strlist(tmp);
+
+ status = cmd_response(fd, pid, cmd);
+ HYDU_ERR_POP(status, "error writing PMI line\n");
+ HYDU_FREE(cmd);
+
+ fn_exit:
+ HYD_pmcd_pmi_free_tokens(tokens, token_count);
+ HYDU_FUNC_EXIT();
+ return status;
+
+ fn_fail:
+ goto fn_exit;
+}
+
static char *mcmd_args[MAX_PMI_ARGS] = { NULL };
static int mcmd_num_args = 0;
@@ -684,6 +764,7 @@ static HYD_status fn_lookup_name(int fd, int pid, int pgid, char *args[])
static struct HYD_pmcd_pmi_handle pmi_v1_handle_fns_foo[] = {
{"barrier_in", fn_barrier_in},
{"put", fn_put},
+ {"get", fn_get},
{"spawn", fn_spawn},
{"publish_name", fn_publish_name},
{"unpublish_name", fn_unpublish_name},
-----------------------------------------------------------------------
Summary of changes:
src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c | 24 ++++----
src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c | 81 ++++++++++++++++++++++++++++++
2 files changed, 93 insertions(+), 12 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-48-g60165ef
by noreply@mpich.org 25 Sep '13
by noreply@mpich.org 25 Sep '13
25 Sep '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 60165ef2d70dc83586201408add87bdd5f86aa0b (commit)
via 38282c95c597f9fe60ef7cb79a0cf2cc73f4fa28 (commit)
from 885bf732074b5fab25cb0c14c9ce25e62b8f8d82 (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/60165ef2d70dc83586201408add87bdd5…
commit 60165ef2d70dc83586201408add87bdd5f86aa0b
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Tue Sep 24 23:22:36 2013 -0500
set disp_unit in win_shared_query.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
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 6045f54..bfd70b3 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
@@ -29,11 +29,13 @@ int MPIDI_CH3_SHM_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint
/* Default, if no processes have size > 0. */
*size = 0;
+ *disp_unit = 0;
*((void**) baseptr) = NULL;
for (i = 0; i < comm_size; i++) {
if (win_ptr->sizes[i] > 0) {
*size = win_ptr->sizes[i];
+ *disp_unit = win_ptr->disp_units[i];
*((void**) baseptr) = win_ptr->shm_base_addrs[i];
break;
}
@@ -41,6 +43,7 @@ int MPIDI_CH3_SHM_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint
} else {
*size = win_ptr->sizes[target_rank];
+ *disp_unit = win_ptr->disp_units[target_rank];
*((void**) baseptr) = win_ptr->shm_base_addrs[target_rank];
}
http://git.mpich.org/mpich.git/commitdiff/38282c95c597f9fe60ef7cb79a0cf2cc7…
commit 38282c95c597f9fe60ef7cb79a0cf2cc73f4fa28
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Tue Aug 27 19:05:25 2013 -0500
Improve the win_shared test to check for more errors.
As reported by Michael Raymond @ SGI, we were never checking if the
disp_unit was set correctly. This patch improves the error checks.
Signed-off-by: Xin Zhao <xinzhao3(a)illinois.edu>
diff --git a/test/mpi/rma/win_shared.c b/test/mpi/rma/win_shared.c
index b4e1f6c..03e35de 100644
--- a/test/mpi/rma/win_shared.c
+++ b/test/mpi/rma/win_shared.c
@@ -42,15 +42,19 @@ int main(int argc, char **argv) {
/* Locate absolute base */
MPI_Win_shared_query(shm_win, MPI_PROC_NULL, &size, &disp_unit, &base);
+ /* make sure the query returned the right values */
+ if (disp_unit != sizeof(int))
+ errors++;
+ if (size != ELEM_PER_PROC * sizeof(int))
+ errors++;
+ if ((shm_rank == 0) && (base != my_base))
+ errors++;
+ if (shm_rank && (base == my_base))
+ errors++;
+
if (verbose) printf("%d -- size = %d baseptr = %p my_baseptr = %p\n", shm_rank,
(int) size, (void*) base, (void*) my_base);
- assert(size == ELEM_PER_PROC * sizeof(int));
- if (shm_rank == 0)
- assert(base == my_base);
- else
- assert(base != my_base);
-
MPI_Win_lock_all(MPI_MODE_NOCHECK, shm_win);
/* Write to all my data */
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c | 3 +++
test/mpi/rma/win_shared.c | 16 ++++++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, mpich-3.0.x, deleted. v3.0.4
by noreply@mpich.org 23 Sep '13
by noreply@mpich.org 23 Sep '13
23 Sep '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, mpich-3.0.x has been deleted
was 0f1067da5ffe74f6288f2767fe701d82a85ce99c
-----------------------------------------------------------------------
0f1067da5ffe74f6288f2767fe701d82a85ce99c Fix for #1813
-----------------------------------------------------------------------
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-46-g885bf73
by noreply@mpich.org 23 Sep '13
by noreply@mpich.org 23 Sep '13
23 Sep '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 885bf732074b5fab25cb0c14c9ce25e62b8f8d82 (commit)
from 66d87263f13b6c388b1702b4deeb84bf1376d28e (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/885bf732074b5fab25cb0c14c9ce25e62…
commit 885bf732074b5fab25cb0c14c9ce25e62b8f8d82
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Wed Sep 11 22:00:39 2013 -0500
Cleanup multiple aspects of the is_local lookup.
1. Cleanup check for local IPs. We check to see if the host IP
matches that of the list of local IP addresses. If it does, it's a
local host.
2. Do not try to detect remotely accessible nodes. Our logic for
identifying whether a node is remotely accessible is quite primitive
and hacky. It doesn't serve any real purpose either. This patch
deletes that code.
3. Cleanup the is_local lookup function. If getifaddrs and inet_ntop
are available, try to detect local processes. If they aren't there,
simply return non-local. In this case, the launcher will fall back to
using a remote launch even for local processes. Bad, but workable.
4. Make the hostname lookups more comprehensive, by matching the local
hostname and the IP address the local hostname resolves to as well.
This works well when the /etc/hosts file contains an IP address match
that is not a part of the network addresses. In this case, the
hostname IP lookup will give that IP address, but it will not match
any of the local network IP addresses.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/pm/hydra/include/hydra.h b/src/pm/hydra/include/hydra.h
index c7cc78f..e17b8c8 100644
--- a/src/pm/hydra/include/hydra.h
+++ b/src/pm/hydra/include/hydra.h
@@ -596,7 +596,6 @@ HYD_status HYDU_sock_set_nonblock(int fd);
HYD_status HYDU_sock_forward_stdio(int in, int out, int *closed);
HYD_status HYDU_sock_get_iface_ip(char *iface, char **ip);
HYD_status HYDU_sock_is_local(char *host, int *is_local);
-HYD_status HYDU_sock_remote_access(char *host, int *remote_access);
HYD_status
HYDU_sock_create_and_listen_portstr(char *iface, char *hostname, char *port_range,
char **port_str,
diff --git a/src/pm/hydra/ui/mpich/mpiexec.c b/src/pm/hydra/ui/mpich/mpiexec.c
index 34c9763..0e80405 100644
--- a/src/pm/hydra/ui/mpich/mpiexec.c
+++ b/src/pm/hydra/ui/mpich/mpiexec.c
@@ -272,21 +272,15 @@ int main(int argc, char **argv)
/* If the user didn't specify a local hostname, try to find one in
* the list of nodes passed to us */
if (HYD_server_info.localhost == NULL) {
- /* See if the node list contains a remotely accessible localhost */
+ /* See if the node list contains a localhost */
for (node = HYD_server_info.node_list; node; node = node->next) {
- int is_local, remote_access;
+ int is_local;
status = HYDU_sock_is_local(node->hostname, &is_local);
HYDU_ERR_POP(status, "unable to check if %s is local\n", node->hostname);
- if (is_local) {
- status = HYDU_sock_remote_access(node->hostname, &remote_access);
- HYDU_ERR_POP(status, "unable to check if %s is remotely accessible\n",
- node->hostname);
-
- if (remote_access)
- break;
- }
+ if (is_local)
+ break;
}
if (node)
diff --git a/src/pm/hydra/utils/sock/sock.c b/src/pm/hydra/utils/sock/sock.c
index 3a772c4..56cd7c7 100644
--- a/src/pm/hydra/utils/sock/sock.c
+++ b/src/pm/hydra/utils/sock/sock.c
@@ -488,134 +488,131 @@ HYD_status HYDU_sock_get_iface_ip(char *iface, char **ip)
goto fn_exit;
}
+#if defined(HAVE_GETIFADDRS) && defined (HAVE_INET_NTOP)
HYD_status HYDU_sock_is_local(char *host, int *is_local)
{
struct hostent *ht;
- char *ip1 = NULL, *ip2 = NULL;
- char buf1[INET_ADDRSTRLEN];
+ char *host_ip = NULL, *local_ip = NULL, *lhost_ip = NULL;
+ char lhost[MAX_HOSTNAME_LEN];
struct sockaddr_in sa;
-
-#if defined(HAVE_GETIFADDRS)
struct ifaddrs *ifaddr, *ifa;
-#endif /* HAVE_GETIFADDRS */
-
-#if defined (HAVE_INET_NTOP)
- int remote_access;
-#endif /* HAVE_INET_NTOP */
-
+ char buf[INET_ADDRSTRLEN];
HYD_status status = HYD_SUCCESS;
*is_local = 0;
- /* If we are unable to resolve the remote host name, it need not
- * be an error. It could mean that the user is using an alias for
- * the hostname (e.g., an ssh config alias) */
- if ((ht = gethostbyname(host)) == NULL)
+ /* Algorithm used:
+ *
+ * 1. Find the local host name
+ * - If "host" matches the local host name, return.
+ * 2. Find the IP address associated with "host" and the IP the local host
+ * resolves to.
+ * - If these IPs match, return.
+ * 3. Find all local network IP addresses
+ * - If the "host" IP address matches any of the local network IP
+ * addresses, return.
+ */
+
+
+ /* STEP 1: If "host" matches the local host name, return */
+ if (gethostname(lhost, MAX_HOSTNAME_LEN) < 0) {
+ HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "gethostname returned an error\n");
+ }
+ else if (!strcmp(lhost, host)) {
+ *is_local = 1;
goto fn_exit;
+ }
+
+
+ /* STEP 2: If the IP address associated with "host" and the IP address local
+ * host resolves to match, return */
+
+ if ((ht = gethostbyname(lhost)) == NULL) {
+ HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "gethostbyname error on %s: %s\n",
+ lhost, hstrerror(h_errno));
+ }
memset((char *) &sa, 0, sizeof(struct sockaddr_in));
memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
-#if defined HAVE_INET_NTOP
- ip1 = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf1,
- MAX_HOSTNAME_LEN));
- HYDU_ASSERT(ip1, status);
+ /* Find the IP address of the host */
+ lhost_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
+ MAX_HOSTNAME_LEN));
+ HYDU_ASSERT(lhost_ip, status);
+
+ /* If we are unable to resolve the remote host name, it need not be an
+ * error. It could mean that the user is using an alias for the hostname
+ * (e.g., an ssh config alias) */
+ if ((ht = gethostbyname(host)) == NULL)
+ goto fn_exit;
+
+ memset((char *) &sa, 0, sizeof(struct sockaddr_in));
+ memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
- status = HYDU_sock_remote_access(ip1, &remote_access);
- HYDU_ERR_POP(status, "unable to check if the IP is remotely accessible\n");
+ /* Find the IP address of the host */
+ host_ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
+ MAX_HOSTNAME_LEN));
+ HYDU_ASSERT(host_ip, status);
- if (!remote_access) {
+ /* See if the IP address of the hostname we got matches the IP address
+ * to which the local host resolves */
+ if (!strcmp(lhost_ip, host_ip)) {
*is_local = 1;
goto fn_exit;
}
-#else
- goto fn_exit;
-#endif /* HAVE_INET_NTOP */
-#if defined(HAVE_GETIFADDRS)
- /* Got the interface name; let's query for the IP address */
+
+ /* STEP 3: Find all local IP addresses and try to match the host IP
+ * with it. */
+
if (getifaddrs(&ifaddr) == -1)
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "getifaddrs failed\n");
+ /* Find the IP addresses of all local interfaces */
for (ifa = ifaddr; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) {
- struct sockaddr_in *sa_ptr;
+ struct sockaddr_in *sa_ptr = (struct sockaddr_in *) ifa->ifa_addr;
- sa_ptr = (struct sockaddr_in *) ifa->ifa_addr;
+ local_ip = HYDU_strdup((char *)
+ inet_ntop(AF_INET, (const void *) &(sa_ptr->sin_addr), buf,
+ MAX_HOSTNAME_LEN));
+ HYDU_ASSERT(local_ip, status);
-#if defined HAVE_INET_NTOP
- {
- char buf2[INET_ADDRSTRLEN];
-
- ip2 = HYDU_strdup((char *)
- inet_ntop(AF_INET, (const void *) &(sa_ptr->sin_addr), buf2,
- MAX_HOSTNAME_LEN));
- HYDU_ASSERT(ip2, status);
- }
-#endif /* HAVE_INET_NTOP */
-
- if (!strcmp(ip1, ip2)) {
+ /* STEP 3: For each local IP address, see if it matches the "host"
+ * IP address */
+ if (!strcmp(host_ip, local_ip)) {
*is_local = 1;
freeifaddrs(ifaddr);
goto fn_exit;
}
- HYDU_FREE(ip2);
- ip2 = NULL;
+ HYDU_FREE(local_ip);
+ local_ip = NULL;
}
}
freeifaddrs(ifaddr);
-#endif
fn_exit:
- if (ip1)
- HYDU_FREE(ip1);
- if (ip2)
- HYDU_FREE(ip2);
+ if (host_ip)
+ HYDU_FREE(host_ip);
+ if (local_ip)
+ HYDU_FREE(local_ip);
+ if (lhost_ip)
+ HYDU_FREE(lhost_ip);
return status;
fn_fail:
goto fn_exit;
}
-
-HYD_status HYDU_sock_remote_access(char *host, int *remote_access)
-{
- struct hostent *ht;
- char *ip = NULL, buf[INET_ADDRSTRLEN];
- struct sockaddr_in sa;
- HYD_status status = HYD_SUCCESS;
-
- if ((ht = gethostbyname(host))) {
- memset((char *) &sa, 0, sizeof(struct sockaddr_in));
- memcpy(&sa.sin_addr, ht->h_addr_list[0], ht->h_length);
-
-#if defined HAVE_INET_NTOP
- ip = HYDU_strdup((char *) inet_ntop(AF_INET, (const void *) &sa.sin_addr, buf,
- MAX_HOSTNAME_LEN));
- HYDU_ASSERT(ip, status);
#else
- ip = HYDU_strdup(host);
-#endif
- }
- else {
- ip = HYDU_strdup(host);
- }
-
- /* FIXME: Comparing the hostname to "127.*" does not seem like a
- * good way of checking if a hostname is remotely accessible */
- if (!MPL_strncmp(ip, "127.", strlen("127.")))
- *remote_access = 0;
- else
- *remote_access = 1;
-
- fn_exit:
- HYDU_FREE(ip);
- return status;
+HYD_status HYDU_sock_is_local(char *host, int *is_local)
+{
+ *is_local = 0;
- fn_fail:
- goto fn_exit;
+ return HYD_SUCCESS;
}
+#endif /* HAVE_GETIFADDRS && HAVE_INET_NTOP */
HYD_status
HYDU_sock_create_and_listen_portstr(char *iface, char *hostname, char *port_range,
-----------------------------------------------------------------------
Summary of changes:
src/pm/hydra/include/hydra.h | 1 -
src/pm/hydra/ui/mpich/mpiexec.c | 14 +---
src/pm/hydra/utils/sock/sock.c | 161 +++++++++++++++++++--------------------
3 files changed, 83 insertions(+), 93 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-45-g66d8726
by noreply@mpich.org 23 Sep '13
by noreply@mpich.org 23 Sep '13
23 Sep '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 66d87263f13b6c388b1702b4deeb84bf1376d28e (commit)
via f6c6652f8fa48acabb04d897d6c1aa0c659fe408 (commit)
via 5e0610ce6e6eeef3888b62c0c220a82349df2f09 (commit)
via f8f37925b728c1cb7d11f1c7721aca4ce57efabd (commit)
from 177120ef3171e09c915182061c7d7ec426d46430 (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/66d87263f13b6c388b1702b4deeb84bf1…
commit 66d87263f13b6c388b1702b4deeb84bf1376d28e
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Fri Aug 16 15:41:58 2013 -0500
Add a test mpit_vars.c to print all MPI_T stuffs
In verbose mode, mpit_vars.c prints all MPI_T control variables, performance
variables and categories defined in the MPI implementation.
It is adapted from the code provided Bill Gropp.
It needs more refinement when printing hierarchical categories.
Also added mpit_vars to .gitignore.
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index e5f8917..8155151 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -840,6 +840,7 @@
/manual/spawntest_master
/manual/testconnectserial
/mpi_t/mpi_t_str
+/mpi_t/mpit_vars
/perf/allredtrace
/perf/commcreatep
/perf/dtpack
diff --git a/test/mpi/mpi_t/Makefile.am b/test/mpi/mpi_t/Makefile.am
index 21d86ce..0cd2132 100644
--- a/test/mpi/mpi_t/Makefile.am
+++ b/test/mpi/mpi_t/Makefile.am
@@ -13,5 +13,5 @@ EXTRA_DIST = testlist
## file, we don't need per-target _SOURCES rules, automake will infer them
## correctly
noinst_PROGRAMS = \
- mpi_t_str
-
+ mpi_t_str \
+ mpit_vars
diff --git a/test/mpi/mpi_t/mpit_vars.c b/test/mpi/mpi_t/mpit_vars.c
new file mode 100644
index 0000000..3798764
--- /dev/null
+++ b/test/mpi/mpi_t/mpit_vars.c
@@ -0,0 +1,582 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2013 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+/* To print out all MPI_T control variables, performance variables and their
+ categories in the MPI implementation. But whether they function well as
+ expected, is not tested.
+ */
+
+#include <stdio.h>
+#include <strings.h>
+#include <string.h> /* For strncpy */
+#include <stdlib.h>
+#include "mpi.h"
+
+char *mpit_scopeToStr(int scope);
+char *mpit_bindingToStr(int binding);
+char *mpit_validDtypeStr(MPI_Datatype datatype);
+char *mpit_varclassToStr(int varClass);
+char *mpit_verbosityToStr(int verbosity);
+int perfvarReadInt(int pvarIndex, int isContinuous, int *found);
+unsigned int perfvarReadUint(int pvarIndex, int isContinuous, int *found);
+double perfvarReadDouble(int pvarIndex, int isContinuous, int *found);
+int PrintControlVars(FILE * fp);
+int PrintPerfVars(FILE * fp);
+int PrintCategories(FILE * fp);
+
+static int verbose = 0;
+
+int main(int argc, char *argv[])
+{
+ int required, provided;
+ required = MPI_THREAD_SINGLE;
+
+ MPI_T_init_thread(required, &provided);
+ MPI_Init_thread(&argc, &argv, required, &provided);
+
+ PrintControlVars(stdout);
+ if (verbose)
+ fprintf(stdout, "\n");
+
+ PrintPerfVars(stdout);
+ if (verbose)
+ fprintf(stdout, "\n");
+
+ PrintCategories(stdout);
+
+ MPI_Finalize();
+ MPI_T_finalize();
+
+ fprintf(stdout, " No Errors\n");
+
+ return 0;
+}
+
+int PrintControlVars(FILE * fp)
+{
+ int i, num_cvar, nameLen, verbosity, descLen, binding, scope;
+ int ival, hasValue;
+ char name[128], desc[1024];
+ MPI_T_enum enumtype = MPI_T_ENUM_NULL;
+ MPI_Datatype datatype;
+
+ MPI_T_cvar_get_num(&num_cvar);
+ if (verbose)
+ fprintf(fp, "%d MPI Control Variables\n", num_cvar);
+ for (i = 0; i < num_cvar; i++) {
+ hasValue = 0;
+ nameLen = sizeof(name);
+ descLen = sizeof(desc);
+ MPI_T_cvar_get_info(i, name, &nameLen, &verbosity, &datatype,
+ &enumtype, desc, &descLen, &binding, &scope);
+ if (datatype == MPI_INT && enumtype != MPI_T_ENUM_NULL) {
+ int enameLen, enumber;
+ char ename[128];
+ enameLen = sizeof(ename);
+ /* TODO: Extract a useful string to show for an enum */
+ MPI_T_enum_get_info(enumtype, &enumber, ename, &enameLen);
+ }
+ if (datatype == MPI_INT && binding == MPI_T_BIND_NO_OBJECT) {
+ int count;
+ MPI_T_cvar_handle chandle;
+ MPI_T_cvar_handle_alloc(i, NULL, &chandle, &count);
+ if (count == 1) {
+ MPI_T_cvar_read(chandle, &ival);
+ hasValue = 1;
+ }
+ MPI_T_cvar_handle_free(&chandle);
+ }
+
+ if (hasValue && verbose) {
+ fprintf(fp, "\t%s=%d\t%s\t%s\t%s\t%s\t%s\n",
+ name,
+ ival,
+ mpit_scopeToStr(scope),
+ mpit_bindingToStr(binding),
+ mpit_validDtypeStr(datatype), mpit_verbosityToStr(verbosity), desc);
+ }
+ else if (verbose) {
+ fprintf(fp, "\t%s\t%s\t%s\t%s\t%s\t%s\n",
+ name,
+ mpit_scopeToStr(scope),
+ mpit_bindingToStr(binding),
+ mpit_validDtypeStr(datatype), mpit_verbosityToStr(verbosity), desc);
+ }
+ }
+
+ return 0;
+}
+
+int PrintPerfVars(FILE * fp)
+{
+ int i, numPvar, nameLen, descLen, verbosity, varClass;
+ int binding, isReadonly, isContinuous, isAtomic;
+ char name[128], desc[1024];
+ MPI_T_enum enumtype;
+ MPI_Datatype datatype;
+
+ MPI_T_pvar_get_num(&numPvar);
+ if (verbose)
+ fprintf(fp, "%d MPI Performance Variables\n", numPvar);
+
+ for (i = 0; i < numPvar; i++) {
+ nameLen = sizeof(name);
+ descLen = sizeof(desc);
+ MPI_T_pvar_get_info(i, name, &nameLen, &verbosity, &varClass,
+ &datatype, &enumtype, desc, &descLen, &binding,
+ &isReadonly, &isContinuous, &isAtomic);
+
+ if (verbose)
+ fprintf(fp, "\t%s\t%s\t%s\t%s\t%s\tReadonly=%s\tContinuous=%s\tAtomic=%s\t%s\n",
+ name,
+ mpit_varclassToStr(varClass),
+ mpit_bindingToStr(binding),
+ mpit_validDtypeStr(datatype),
+ mpit_verbosityToStr(verbosity),
+ isReadonly ? "T" : "F", isContinuous ? "T" : "F", isAtomic ? "T" : "F", desc);
+
+ if (datatype == MPI_INT) {
+ int val, isFound;
+ val = perfvarReadInt(i, isContinuous, &isFound);
+ if (isFound && verbose)
+ fprintf(fp, "\tValue = %d\n", val);
+ }
+ else if (datatype == MPI_UNSIGNED) {
+ int isFound;
+ unsigned int val;
+ val = perfvarReadUint(i, isContinuous, &isFound);
+ if (isFound && verbose)
+ fprintf(fp, "\tValue = %u\n", val);
+ }
+ else if (datatype == MPI_DOUBLE) {
+ int isFound;
+ double val;
+ val = perfvarReadDouble(i, isContinuous, &isFound);
+ if (isFound && verbose)
+ fprintf(fp, "\tValue = %e\n", val);
+ }
+ }
+ return 0;
+}
+
+int PrintCategories(FILE * fp)
+{
+ int i, j, numCat, nameLen, descLen, numCvars, numPvars, numSubcat;
+ char name[128], desc[1024];
+
+ MPI_T_category_get_num(&numCat);
+ if (verbose) {
+ if (numCat > 0)
+ fprintf(fp, "%d MPI_T categories\n", numCat);
+ else
+ fprintf(fp, "No categories defined\n");
+ }
+
+ for (i = 0; i < numCat; i++) {
+ MPI_T_category_get_info(i, name, &nameLen, desc, &descLen, &numCvars,
+ &numPvars, &numSubcat);
+ if (verbose)
+ fprintf(fp, "Category %s has %d control variables, %d performance variables, \
+ %d subcategories\n", name, numCvars, numPvars, numSubcat);
+
+ if (numCvars > 0) {
+ if (verbose)
+ fprintf(fp, "\tControl variables include: ");
+ int *cvarIndex = (int *) malloc(numCvars * sizeof(int));
+ MPI_T_category_get_cvars(i, numCvars, cvarIndex);
+ for (j = 0; j < numCvars; j++) {
+ /* Get just the variable name */
+ int varnameLen, verbose, binding, scope;
+ MPI_Datatype datatype;
+ char varname[128];
+ varnameLen = sizeof(varname);
+ MPI_T_cvar_get_info(cvarIndex[j], varname, &varnameLen,
+ &verbose, &datatype, NULL, NULL, NULL, &binding, &scope);
+ if (verbose)
+ fprintf(fp, "%s, ", varname);
+ }
+ free(cvarIndex);
+ if (verbose)
+ fprintf(fp, "\n");
+ }
+
+ if (numPvars > 0) {
+ if (verbose)
+ fprintf(fp, "\tPerformance variables include: ");
+
+ int *pvarIndex = (int *) malloc(numPvars * sizeof(int));
+ MPI_T_category_get_pvars(i, numPvars, pvarIndex);
+ for (j = 0; j < numPvars; j++) {
+ int varnameLen, verbose, varclass, binding;
+ int isReadonly, isContinuous, isAtomic;
+ MPI_Datatype datatype;
+ char varname[128];
+ varnameLen = sizeof(varname);
+ MPI_T_pvar_get_info(pvarIndex[j], varname, &varnameLen, &verbose,
+ &varclass, &datatype, NULL, NULL, NULL, &binding,
+ &isReadonly, &isContinuous, &isAtomic);
+ if (verbose)
+ fprintf(fp, "%s, ", varname);
+
+ }
+ free(pvarIndex);
+ if (verbose)
+ fprintf(fp, "\n");
+ }
+
+ /* TODO: Make it possible to recursively print category information */
+ if (verbose)
+ fprintf(fp, "\tNumber of subcategories: %d\n", numSubcat);
+ }
+
+ return 0;
+}
+
+
+/* --- Support routines --- */
+
+char *mpit_validDtypeStr(MPI_Datatype datatype)
+{
+ char *p = 0;
+ if (datatype == MPI_INT)
+ p = "MPI_INT";
+ else if (datatype == MPI_UNSIGNED)
+ p = "MPI_UNSIGNED";
+ else if (datatype == MPI_UNSIGNED_LONG)
+ p = "MPI_UNSIGNED_LONG";
+ else if (datatype == MPI_UNSIGNED_LONG_LONG)
+ p = "MPI_UNSIGNED_LONG_LONG";
+ else if (datatype == MPI_COUNT)
+ p = "MPI_COUNT";
+ else if (datatype == MPI_CHAR)
+ p = "MPI_CHAR";
+ else if (datatype == MPI_DOUBLE)
+ p = "MPI_DOUBLE";
+ else {
+ if (datatype == MPI_DATATYPE_NULL) {
+ p = "Invalid MPI datatype:NULL";
+ }
+ else {
+ static char typename[MPI_MAX_OBJECT_NAME + 9];
+ int tlen;
+ strncpy(typename, "Invalid:", MPI_MAX_OBJECT_NAME);
+ MPI_Type_get_name(datatype, typename + 8, &tlen);
+ if (typename[0])
+ p = typename;
+ }
+ }
+
+ return p;
+}
+
+char *mpit_scopeToStr(int scope)
+{
+ char *p = 0;
+ switch (scope) {
+ case MPI_T_SCOPE_CONSTANT:
+ p = "SCOPE_CONSTANT";
+ break;
+ case MPI_T_SCOPE_READONLY:
+ p = "SCOPE_READONLY";
+ break;
+ case MPI_T_SCOPE_LOCAL:
+ p = "SCOPE_LOCAL";
+ break;
+ case MPI_T_SCOPE_GROUP:
+ p = "SCOPE_GROUP";
+ break;
+ case MPI_T_SCOPE_GROUP_EQ:
+ p = "SCOPE_GROUP_EQ";
+ break;
+ case MPI_T_SCOPE_ALL:
+ p = "SCOPE_ALL";
+ break;
+ case MPI_T_SCOPE_ALL_EQ:
+ p = "SCOPE_ALL_EQ";
+ break;
+ default:
+ p = "Unrecoginized scope";
+ break;
+ }
+ return p;
+}
+
+char *mpit_bindingToStr(int binding)
+{
+ char *p;
+ switch (binding) {
+ case MPI_T_BIND_NO_OBJECT:
+ p = "NO_OBJECT";
+ break;
+ case MPI_T_BIND_MPI_COMM:
+ p = "MPI_COMM";
+ break;
+ case MPI_T_BIND_MPI_DATATYPE:
+ p = "MPI_DATATYPE";
+ break;
+ case MPI_T_BIND_MPI_ERRHANDLER:
+ p = "MPI_ERRHANDLER";
+ break;
+ case MPI_T_BIND_MPI_FILE:
+ p = "MPI_FILE";
+ break;
+ case MPI_T_BIND_MPI_GROUP:
+ p = "MPI_GROUP";
+ break;
+ case MPI_T_BIND_MPI_OP:
+ p = "MPI_OP";
+ break;
+ case MPI_T_BIND_MPI_REQUEST:
+ p = "MPI_REQUEST";
+ break;
+ case MPI_T_BIND_MPI_WIN:
+ p = "MPI_WIN";
+ break;
+ case MPI_T_BIND_MPI_MESSAGE:
+ p = "MPI_MESSAGE";
+ break;
+ case MPI_T_BIND_MPI_INFO:
+ p = "MPI_INFO";
+ break;
+ default:
+ p = "Unknown object binding";
+ }
+ return p;
+}
+
+char *mpit_varclassToStr(int varClass)
+{
+ char *p = 0;
+ switch (varClass) {
+ case MPI_T_PVAR_CLASS_STATE:
+ p = "CLASS_STATE";
+ break;
+ case MPI_T_PVAR_CLASS_LEVEL:
+ p = "CLASS_LEVEL";
+ break;
+ case MPI_T_PVAR_CLASS_SIZE:
+ p = "CLASS_SIZE";
+ break;
+ case MPI_T_PVAR_CLASS_PERCENTAGE:
+ p = "CLASS_PERCENTAGE";
+ break;
+ case MPI_T_PVAR_CLASS_HIGHWATERMARK:
+ p = "CLASS_HIGHWATERMARK";
+ break;
+ case MPI_T_PVAR_CLASS_LOWWATERMARK:
+ p = "CLASS_LOWWATERMARK";
+ break;
+ case MPI_T_PVAR_CLASS_COUNTER:
+ p = "CLASS_COUNTER";
+ break;
+ case MPI_T_PVAR_CLASS_AGGREGATE:
+ p = "CLASS_AGGREGATE";
+ break;
+ case MPI_T_PVAR_CLASS_TIMER:
+ p = "CLASS_TIMER";
+ break;
+ case MPI_T_PVAR_CLASS_GENERIC:
+ p = "CLASS_GENERIC";
+ break;
+ default:
+ p = "Unrecognized pvar class";
+ break;
+ }
+ return p;
+}
+
+char *mpit_verbosityToStr(int verbosity)
+{
+ char *p = 0;
+ switch (verbosity) {
+ case MPI_T_VERBOSITY_USER_BASIC:
+ p = "VERBOSITY_USER_BASIC";
+ break;
+ case MPI_T_VERBOSITY_USER_DETAIL:
+ p = "VERBOSITY_USER_DETAIL";
+ break;
+ case MPI_T_VERBOSITY_USER_ALL:
+ p = "VERBOSITY_USER_ALL";
+ break;
+ case MPI_T_VERBOSITY_TUNER_BASIC:
+ p = "VERBOSITY_TUNER_BASIC";
+ break;
+ case MPI_T_VERBOSITY_TUNER_DETAIL:
+ p = "VERBOSITY_TUNER_DETAIL";
+ break;
+ case MPI_T_VERBOSITY_TUNER_ALL:
+ p = "VERBOSITY_TUNER_ALL";
+ break;
+ case MPI_T_VERBOSITY_MPIDEV_BASIC:
+ p = "VERBOSITY_MPIDEV_BASIC";
+ break;
+ case MPI_T_VERBOSITY_MPIDEV_DETAIL:
+ p = "VERBOSITY_MPIDEV_DETAIL";
+ break;
+ case MPI_T_VERBOSITY_MPIDEV_ALL:
+ p = "VERBOSITY_MPIDEV_ALL";
+ break;
+ default:
+ p = "Invalid verbosity";
+ break;
+ }
+ return p;
+}
+
+char *mpit_errclassToStr(int err)
+{
+ char *p = 0;
+ switch (err) {
+ case MPI_T_ERR_MEMORY:
+ p = "ERR_MEMORY";
+ break;
+ case MPI_T_ERR_NOT_INITIALIZED:
+ p = "ERR_NOT_INITIALIZED";
+ break;
+ case MPI_T_ERR_CANNOT_INIT:
+ p = "ERR_CANNOT_INIT";
+ break;
+ case MPI_T_ERR_INVALID_INDEX:
+ p = "ERR_INVALID_INDEX";
+ break;
+ case MPI_T_ERR_INVALID_ITEM:
+ p = "ERR_INVALID_ITEM";
+ break;
+ case MPI_T_ERR_INVALID_HANDLE:
+ p = "ERR_INVALID_HANDLE";
+ break;
+ case MPI_T_ERR_OUT_OF_HANDLES:
+ p = "ERR_OUT_OF_HANDLES";
+ break;
+ case MPI_T_ERR_OUT_OF_SESSIONS:
+ p = "ERR_OUT_OF_SESSIONS";
+ break;
+ case MPI_T_ERR_INVALID_SESSION:
+ p = "ERR_INVALID_SESSION";
+ break;
+ case MPI_T_ERR_CVAR_SET_NOT_NOW:
+ p = "ERR_CVAR_SET_NOT_NOW";
+ break;
+ case MPI_T_ERR_CVAR_SET_NEVER:
+ p = "ERR_CVAR_SET_NEVER";
+ break;
+ case MPI_T_ERR_PVAR_NO_STARTSTOP:
+ p = "ERR_PVAR_NO_STARTSTOP";
+ break;
+ case MPI_T_ERR_PVAR_NO_WRITE:
+ p = "ERR_PVAR_NO_WRITE";
+ break;
+ case MPI_T_ERR_PVAR_NO_ATOMIC:
+ p = "ERR_PVAR_NO_ATOMIC";
+ break;
+ default:
+ p = "Unknown MPI_T_ERR class";
+ break;
+ }
+ return p;
+}
+
+/* Return the value of the performance variable as the value */
+int perfvarReadInt(int pvarIndex, int isContinuous, int *found)
+{
+ int count, val = -1;
+ int err1 = MPI_SUCCESS;
+ int err2 = MPI_SUCCESS;
+ MPI_T_pvar_session session;
+ MPI_T_pvar_handle pvarHandle;
+ MPI_T_pvar_session_create(&session);
+ MPI_T_pvar_handle_alloc(session, pvarIndex, NULL, &pvarHandle, &count);
+ if (count == 1) {
+ *found = 1;
+ if (!isContinuous) {
+ /* start and stop the variable (just because we can) */
+ err1 = MPI_T_pvar_start(session, pvarHandle);
+ err2 = MPI_T_pvar_stop(session, pvarHandle);
+ }
+ MPI_T_pvar_read(session, pvarHandle, &val);
+ }
+ MPI_T_pvar_handle_free(session, &pvarHandle);
+ MPI_T_pvar_session_free(&session);
+
+ /* Above codes imply that err1 and err2 should be MPI_SUCCESS.
+ * If not, catch errors here, e.g., when MPI_ERR_INTERN is returned.
+ */
+ if (err1 != MPI_SUCCESS || err2 != MPI_SUCCESS) {
+ fprintf(stderr, "Unexpected MPI_T_pvar_start/stop return code\n");
+ abort();
+ }
+
+ return val;
+}
+
+/* Return the value of the performance variable as the value */
+unsigned int perfvarReadUint(int pvarIndex, int isContinuous, int *found)
+{
+ int count;
+ unsigned int val = 0;
+ int err1 = MPI_SUCCESS;
+ int err2 = MPI_SUCCESS;
+ MPI_T_pvar_session session;
+ MPI_T_pvar_handle pvarHandle;
+
+ *found = 0;
+ MPI_T_pvar_session_create(&session);
+ MPI_T_pvar_handle_alloc(session, pvarIndex, NULL, &pvarHandle, &count);
+ if (count == 1) {
+ *found = 1;
+ if (!isContinuous) {
+ /* start and stop the variable (just because we can) */
+ err1 = MPI_T_pvar_start(session, pvarHandle);
+ err2 = MPI_T_pvar_stop(session, pvarHandle);
+ }
+ MPI_T_pvar_read(session, pvarHandle, &val);
+ }
+ MPI_T_pvar_handle_free(session, &pvarHandle);
+ MPI_T_pvar_session_free(&session);
+
+ /* Above codes imply that err1 and err2 should be MPI_SUCCESS.
+ * If not, catch errors here, e.g., when MPI_ERR_INTERN is returned.
+ */
+ if (err1 != MPI_SUCCESS || err2 != MPI_SUCCESS) {
+ fprintf(stderr, "Unexpected MPI_T_pvar_start/stop return code\n");
+ abort();
+ }
+
+ return val;
+}
+
+double perfvarReadDouble(int pvarIndex, int isContinuous, int *found)
+{
+ int count;
+ double val = 0.0;
+ int err1 = MPI_SUCCESS;
+ int err2 = MPI_SUCCESS;
+ MPI_T_pvar_session session;
+ MPI_T_pvar_handle pvarHandle;
+
+ *found = 0;
+ MPI_T_pvar_session_create(&session);
+ MPI_T_pvar_handle_alloc(session, pvarIndex, NULL, &pvarHandle, &count);
+ if (count == 1) {
+ *found = 1;
+ if (!isContinuous) {
+ /* start and stop the variable (just because we can) */
+ err1 = MPI_T_pvar_start(session, pvarHandle);
+ err2 = MPI_T_pvar_stop(session, pvarHandle);
+ }
+ MPI_T_pvar_read(session, pvarHandle, &val);
+ }
+ MPI_T_pvar_handle_free(session, &pvarHandle);
+ MPI_T_pvar_session_free(&session);
+
+ /* Catch errors if MPI_T_pvar_start/stop are not properly implemented */
+ if (err1 != MPI_SUCCESS || err2 != MPI_SUCCESS) {
+ fprintf(stderr, "Unknown MPI_T return code when starting/stopping double pvar\n");
+ abort();
+ }
+
+ return val;
+}
diff --git a/test/mpi/mpi_t/testlist b/test/mpi/mpi_t/testlist
index 1426ac3..effe91f 100644
--- a/test/mpi/mpi_t/testlist
+++ b/test/mpi/mpi_t/testlist
@@ -1 +1,2 @@
mpi_t_str 1 mpiversion=3.0 xfail=ticket1898
+mpit_vars 1 mpiversion=3.0
http://git.mpich.org/mpich.git/commitdiff/f6c6652f8fa48acabb04d897d6c1aa0c6…
commit f6c6652f8fa48acabb04d897d6c1aa0c659fe408
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Wed Aug 14 17:12:38 2013 -0500
Add the missing constant MPI_T_SCOPE_CONSTANT
This commit will increase the ABI version. Fix #1904
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index 2234b8a..923df8d 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -632,7 +632,8 @@ enum MPIR_T_scope_t {
MPIX_T_SCOPE_INVALID = 0,
/* arbitrarily shift values to aid debugging and reduce accidental errors */
- MPI_T_SCOPE_READONLY = 60439,
+ MPI_T_SCOPE_CONSTANT = 60438,
+ MPI_T_SCOPE_READONLY,
MPI_T_SCOPE_LOCAL,
MPI_T_SCOPE_GROUP,
MPI_T_SCOPE_GROUP_EQ,
http://git.mpich.org/mpich.git/commitdiff/5e0610ce6e6eeef3888b62c0c220a8234…
commit 5e0610ce6e6eeef3888b62c0c220a82349df2f09
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Fri Aug 16 16:21:58 2013 -0500
Return MPI_ERR_INTERN for not-impl MPI_T functions
Some MPI_T functions return MPI_SUCCESS even when they are not implemented.
Now return MPI_ERR_INTERN instead. Of course it is a temp fix.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi_t/cat_changed.c b/src/mpi_t/cat_changed.c
index 3d20e11..989d102 100644
--- a/src/mpi_t/cat_changed.c
+++ b/src/mpi_t/cat_changed.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_category_changed_impl(int *stamp)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/cat_get_categories.c b/src/mpi_t/cat_get_categories.c
index 53c6904..5f61d63 100644
--- a/src/mpi_t/cat_get_categories.c
+++ b/src/mpi_t/cat_get_categories.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_category_get_categories_impl(int cat_index, int len, int indices[])
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/cat_get_cvars.c b/src/mpi_t/cat_get_cvars.c
index 35788ca..cfdf92c 100644
--- a/src/mpi_t/cat_get_cvars.c
+++ b/src/mpi_t/cat_get_cvars.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_category_get_cvars_impl(int cat_index, int len, int indices[])
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/cat_get_info.c b/src/mpi_t/cat_get_info.c
index cb76eb9..6f95643 100644
--- a/src/mpi_t/cat_get_info.c
+++ b/src/mpi_t/cat_get_info.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_category_get_info_impl(int cat_index, char *name, int *name_len, char *desc, int *desc_len, int *num_cvars, int *num_pvars, int *num_categories)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/cat_get_pv.c b/src/mpi_t/cat_get_pv.c
index 7a0e657..aeaf630 100644
--- a/src/mpi_t/cat_get_pv.c
+++ b/src/mpi_t/cat_get_pv.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_category_get_pvars_impl(int cat_index, int len, int indices[])
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/enum_get_info.c b/src/mpi_t/enum_get_info.c
index ce2e6f6..7289b7f 100644
--- a/src/mpi_t/enum_get_info.c
+++ b/src/mpi_t/enum_get_info.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_enum_get_info_impl(MPI_T_enum enumtype, int *num, char *name, int *name_len)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/enum_get_item.c b/src/mpi_t/enum_get_item.c
index 06d3d78..4d8eec4 100644
--- a/src/mpi_t/enum_get_item.c
+++ b/src/mpi_t/enum_get_item.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_enum_get_item_impl(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/pvar_readreset.c b/src/mpi_t/pvar_readreset.c
index a582d57..86fb6f5 100644
--- a/src/mpi_t/pvar_readreset.c
+++ b/src/mpi_t/pvar_readreset.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_pvar_readreset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/pvar_reset.c b/src/mpi_t/pvar_reset.c
index ddddf95..1e2fc72 100644
--- a/src/mpi_t/pvar_reset.c
+++ b/src/mpi_t/pvar_reset.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_pvar_reset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/pvar_start.c b/src/mpi_t/pvar_start.c
index 30383e3..8472b6c 100644
--- a/src/mpi_t/pvar_start.c
+++ b/src/mpi_t/pvar_start.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_pvar_start_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
diff --git a/src/mpi_t/pvar_stop.c b/src/mpi_t/pvar_stop.c
index 5c5ce55..8cf85a3 100644
--- a/src/mpi_t/pvar_stop.c
+++ b/src/mpi_t/pvar_stop.c
@@ -30,7 +30,7 @@
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_T_pvar_stop_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
{
- int mpi_errno = MPI_SUCCESS;
+ int mpi_errno = MPI_ERR_INTERN;
/* TODO implement this function */
http://git.mpich.org/mpich.git/commitdiff/f8f37925b728c1cb7d11f1c7721aca4ce…
commit f8f37925b728c1cb7d11f1c7721aca4ce57efabd
Author: Junchao Zhang <jczhang(a)bblogin2.mcs.anl.gov>
Date: Tue Aug 13 16:25:15 2013 -0500
Add MPI_T return codes. Fix #1905
Add missing MPI_T error codes in mpi.h. Will increase the ABI version.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index ed0981d..2234b8a 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -813,10 +813,29 @@ typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
#define MPI_ERR_RMA_SHARED 57 /* */
#define MPI_ERR_RMA_FLAVOR 58 /* */
+/* Return codes for functions in the MPI Tool Information Interface */
+#define MPI_T_ERR_MEMORY 59 /* Out of memory */
+#define MPI_T_ERR_NOT_INITIALIZED 60 /* Interface not initialized */
+#define MPI_T_ERR_CANNOT_INIT 61 /* Interface not in the state to
+ be initialized */
+#define MPI_T_ERR_INVALID_INDEX 62 /* The index is invalid or
+ has been deleted */
+#define MPI_T_ERR_INVALID_ITEM 63 /* Item index queried is out of range */
+#define MPI_T_ERR_INVALID_HANDLE 64 /* The handle is invalid */
+#define MPI_T_ERR_OUT_OF_HANDLES 65 /* No more handles available */
+#define MPI_T_ERR_OUT_OF_SESSIONS 66 /* No more sessions available */
+#define MPI_T_ERR_INVALID_SESSION 67 /* Session argument is not valid */
+#define MPI_T_ERR_CVAR_SET_NOT_NOW 68 /* Cvar can't be set at this moment */
+#define MPI_T_ERR_CVAR_SET_NEVER 69 /* Cvar can't be set until
+ end of execution */
+#define MPI_T_ERR_PVAR_NO_STARTSTOP 70 /* Pvar can't be started or stopped */
+#define MPI_T_ERR_PVAR_NO_WRITE 71 /* Pvar can't be written or reset */
+#define MPI_T_ERR_PVAR_NO_ATOMIC 72 /* Pvar can't be R/W atomically */
+
#define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a
predefined error class */
/* WARNING: this is also defined in mpishared.h. Update both locations */
-#define MPICH_ERR_LAST_CLASS 58 /* It is also helpful to know the
+#define MPICH_ERR_LAST_CLASS 72 /* It is also helpful to know the
last valid class */
/* End of MPI's error classes */
diff --git a/src/include/mpishared.h b/src/include/mpishared.h
index 8e04633..46a6bf1 100644
--- a/src/include/mpishared.h
+++ b/src/include/mpishared.h
@@ -62,7 +62,7 @@
#include "mpierrs.h"
/* FIXME: This is extracted from mpi.h.in, where it may not be appropriate */
-#define MPICH_ERR_LAST_CLASS 58 /* It is also helpful to know the
+#define MPICH_ERR_LAST_CLASS 72 /* It is also helpful to know the
last valid class */
#include "mpifunc.h"
-----------------------------------------------------------------------
Summary of changes:
src/include/mpi.h.in | 24 ++-
src/include/mpishared.h | 2 +-
src/mpi_t/cat_changed.c | 2 +-
src/mpi_t/cat_get_categories.c | 2 +-
src/mpi_t/cat_get_cvars.c | 2 +-
src/mpi_t/cat_get_info.c | 2 +-
src/mpi_t/cat_get_pv.c | 2 +-
src/mpi_t/enum_get_info.c | 2 +-
src/mpi_t/enum_get_item.c | 2 +-
src/mpi_t/pvar_readreset.c | 2 +-
src/mpi_t/pvar_reset.c | 2 +-
src/mpi_t/pvar_start.c | 2 +-
src/mpi_t/pvar_stop.c | 2 +-
test/mpi/.gitignore | 1 +
test/mpi/mpi_t/Makefile.am | 4 +-
test/mpi/mpi_t/mpit_vars.c | 582 ++++++++++++++++++++++++++++++++++++++++
test/mpi/mpi_t/testlist | 1 +
17 files changed, 620 insertions(+), 16 deletions(-)
create mode 100644 test/mpi/mpi_t/mpit_vars.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-41-g177120e
by noreply@mpich.org 20 Sep '13
by noreply@mpich.org 20 Sep '13
20 Sep '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 177120ef3171e09c915182061c7d7ec426d46430 (commit)
via a460c1eeca56cc4c7f61fddcdb2724bd605fdea2 (commit)
via 526749d0f10e8c5920836c9191d6a04b74bc167a (commit)
from b539c5a1765a1f03ef5e847b95180ca64c5a6c48 (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/177120ef3171e09c915182061c7d7ec42…
commit 177120ef3171e09c915182061c7d7ec426d46430
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Fri Sep 20 12:21:35 2013 -0500
Update README with hwloc version.
No reviewer.
diff --git a/CHANGES b/CHANGES
index a35ea83..d033542 100644
--- a/CHANGES
+++ b/CHANGES
@@ -21,7 +21,7 @@
# Enable shared library builds by default.
- # Upgraded hwloc to 1.7.1.
+ # Upgraded hwloc to 1.7.2.
# Several improvements to the Hydra-SLURM integration.
http://git.mpich.org/mpich.git/commitdiff/a460c1eeca56cc4c7f61fddcdb2724bd6…
commit a460c1eeca56cc4c7f61fddcdb2724bd605fdea2
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Sun May 19 00:17:55 2013 -0500
Hydra-specific patches for hwloc.
Picked up the relevant parts of [2bda6bc7], [49b74176] and [59cbc846].
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 a76d42e..5d635d5 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..c73edc2 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,9 @@
-:
-autoreconf -ivf
+#!/bin/sh
+
+if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
+ autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
+else
+ autoreconf=${AUTORECONF:-autoreconf}
+fi
+
+$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 02b1e6f..b9ab48f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -441,7 +441,25 @@ EOF])
])
AC_CHECK_DECLS([strtoull], [], [], [AC_INCLUDES_DEFAULT])
- AC_CHECK_FUNCS([sysctl sysctlbyname])
+ # Do a full link test instead of just using AC_CHECK_FUNCS, which
+ # just checks to see if the symbol exists or not. For example,
+ # the prototype of sysctl uses u_int, which on some platforms
+ # (such as FreeBSD) is only defined under __BSD_VISIBLE, __USE_BSD
+ # or other similar definitions. So while the symbols "sysctl" and
+ # "sysctlbyname" might still be available in libc (which autoconf
+ # checks for), they might not be actually usable.
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <sys/sysctl.h>
+ ],
+ [return sysctl(NULL,0,NULL,NULL,NULL,0);],
+ AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]))
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <sys/sysctl.h>
+ ],
+ [return sysctlbyname(NULL,NULL,NULL,NULL,0);],
+ AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]))
case ${target} in
*-*-mingw*|*-*-cygwin*)
@@ -1232,7 +1250,10 @@ dnl number of arguments (10). Success means the compiler couldn't really check.
AC_DEFUN([_HWLOC_CHECK_DECL], [
AC_MSG_CHECKING([whether function $1 is declared])
AC_REQUIRE([AC_PROG_CC])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],[$1(1,2,3,4,5,6,7,8,9,10);])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT([$4])
+ $1(int,long,int,long,int,long,int,long,int,long);],
+ [$1(1,2,3,4,5,6,7,8,9,10);])],
[AC_MSG_RESULT([no])
$3],
[AC_MSG_RESULT([yes])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
index d697e58..e7477e9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
@@ -12,6 +12,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_LANG([C])
AC_PROG_CC
+AM_PROG_CC_C_O
cat <<EOF
http://git.mpich.org/mpich.git/commitdiff/526749d0f10e8c5920836c9191d6a04b7…
commit 526749d0f10e8c5920836c9191d6a04b74bc167a
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Fri Sep 20 10:37:18 2013 -0500
Upgrade to hwloc-1.7.2.
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 5d635d5..a76d42e 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 bc99c0e..60a762d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -17,6 +17,18 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).
+Version 1.7.2
+-------------
+* Do not create invalid block OS devices on very old Linux kernel such
+ as RHEL4 2.6.9.
+* Fix PCI subvendor/device IDs.
+* Fix the management of Misc objects inserted by parent.
+ Thanks to Jirka Hladky for reporting the problem.
+* Add a Port<n>State into attribute to OpenFabrics OS devices.
+* Add a MICSerialNumber info attribute to Xeon PHI/MIC OS devices.
+* Improve verbose error messages when failing to load from XML.
+
+
Version 1.7.1
-------------
* Fix a failed assertion in the distance grouping code when loading a XML
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index b057041..68cd34e 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=7
-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
@@ -58,4 +58,4 @@ date="Unreleased developer copy"
# 2. Version numbers are described in the Libtool current:revision:age
# format.
-libhwloc_so_version=8:1:3
+libhwloc_so_version=8:2:3
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index c73edc2..d69ef09 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,9 +1,2 @@
-#!/bin/sh
-
-if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
- autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
-else
- autoreconf=${AUTORECONF:-autoreconf}
-fi
-
-$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 b9ab48f..02b1e6f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -441,25 +441,7 @@ EOF])
])
AC_CHECK_DECLS([strtoull], [], [], [AC_INCLUDES_DEFAULT])
- # Do a full link test instead of just using AC_CHECK_FUNCS, which
- # just checks to see if the symbol exists or not. For example,
- # the prototype of sysctl uses u_int, which on some platforms
- # (such as FreeBSD) is only defined under __BSD_VISIBLE, __USE_BSD
- # or other similar definitions. So while the symbols "sysctl" and
- # "sysctlbyname" might still be available in libc (which autoconf
- # checks for), they might not be actually usable.
- AC_TRY_LINK([
- #include <stdio.h>
- #include <sys/sysctl.h>
- ],
- [return sysctl(NULL,0,NULL,NULL,NULL,0);],
- AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]))
- AC_TRY_LINK([
- #include <stdio.h>
- #include <sys/sysctl.h>
- ],
- [return sysctlbyname(NULL,NULL,NULL,NULL,0);],
- AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]))
+ AC_CHECK_FUNCS([sysctl sysctlbyname])
case ${target} in
*-*-mingw*|*-*-cygwin*)
@@ -1250,10 +1232,7 @@ dnl number of arguments (10). Success means the compiler couldn't really check.
AC_DEFUN([_HWLOC_CHECK_DECL], [
AC_MSG_CHECKING([whether function $1 is declared])
AC_REQUIRE([AC_PROG_CC])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT([$4])
- $1(int,long,int,long,int,long,int,long,int,long);],
- [$1(1,2,3,4,5,6,7,8,9,10);])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],[$1(1,2,3,4,5,6,7,8,9,10);])],
[AC_MSG_RESULT([no])
$3],
[AC_MSG_RESULT([yes])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
index d756120..4af37db 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/Makefile.am
@@ -1,5 +1,5 @@
# Copyright © 2009-2013 Inria. All rights reserved.
-# Copyright © 2009-2012 Université Bordeaux 1
+# Copyright © 2009-2013 Université Bordeaux 1
# Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
# See COPYING in top-level directory.
@@ -116,11 +116,8 @@ endif
# of nested structurre/union declarations.
#
-if HWLOC_BUILD_DOXYGEN
-$(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
- rm -fr $(DOX_DIR)
- $(DOXYGEN) $(DOX_CONFIG)
- -$(SED_I) -e 's/__hwloc_restrict/restrict/g' \
+RENAME_SED = \
+ $(SED_I) -e 's/__hwloc_restrict/restrict/g' \
-e 's/\\_\\-\\_\\-hwloc\\_\\-restrict/restrict/g' \
-e 's/__hwloc_attribute_unused//g' \
-e 's/\\_\\-\\_\\-hwloc\\_\\-attribute\\_\\-unused//g' \
@@ -135,7 +132,13 @@ $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
-e 's/HWLOC_DECLSPEC//g' \
-e 's/HWLOC\\_\\-DECLSPEC//g' \
-e 's/__hwloc_inline/inline/g' \
- -e 's/\\_\\-\\_\\-hwloc\\_\\-inline/inline/g' \
+ -e 's/\\_\\-\\_\\-hwloc\\_\\-inline/inline/g'
+
+if HWLOC_BUILD_DOXYGEN
+$(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
+ rm -fr $(DOX_DIR)
+ $(DOXYGEN) $(DOX_CONFIG)
+ -$(RENAME_SED) \
$(DOX_DIR)/html/*.html $(DOX_DIR)/latex/*.tex $(DOX_DIR)/man/man3/*.3
@echo "Work-around spurious leading _ in doxygen filenames..."
-(cd $(DOX_DIR)/man/man3 ; \
@@ -149,6 +152,9 @@ $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
@mv $(DOX_DIR)/man.tmp $(DOX_MAN_DIR)/man3
endif
+www-doc-sed:
+ -$(RENAME_SED) www.open-mpi.org/html/*.php
+
#
# Rules for building the PDF
#
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 d6d5c19..507e962 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -1647,8 +1647,10 @@ object instead.
<dt>NVIDIAUUID, NVIDIASerial (NVML GPU OS devices)</dt>
<dd>The UUID and Serial of NVIDIA GPUs.
</dd>
-<dt>MICFamily</dt>
-<dd>The family of an Intel Xeon Phi (MIC) coprocessor.
+<dt>MICFamily, MICSKU, MICSerialNumber, MICActiveCores, MICMemorySize</dt>
+<dd>The family, SKU (model), serial number,
+ number of active cores, and memory size (in kB)
+ of an Intel Xeon Phi (MIC) coprocessor.
</dd>
<dt>DMIBoardVendor, DMIBoardName, etc. (Machine object)</dt>
<dd>DMI hardware information such as the motherboard and chassis
@@ -1659,10 +1661,12 @@ as reported by Linux under <tt>/sys/class/dmi/id/</tt>.
<dd>The MAC address and the port number of a software network
interface, such as <tt>eth4</tt> on Linux.
</dd>
-<dt>NodeGUID, SysImageGUID, Port3LID, Port4LMC, Port5GID6
+<dt>NodeGUID, SysImageGUID, Port1State, Port2LID, Port2LMC, Port3GID1
(OpenFabrics OS devices)</dt>
-<dd>The node GUID and GUID mask, the LID and LID mask count of a given
-port, and a GID of a port.
+<dd>The node GUID and GUID mask,
+the state of a port #1 (value is 4 when active),
+the LID and LID mask count of port #2,
+and GID #1 of port #3.
</dd>
</dl>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
index ddf5731..6aacb8e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
@@ -528,12 +528,14 @@ extern "C" {
#define hwloc_set_binding_hooks HWLOC_NAME(set_binding_hooks)
#define hwloc_set_linuxfs_hooks HWLOC_NAME(set_linuxfs_hooks)
+#define hwloc_set_bgq_hooks HWLOC_NAME(set_bgq_hooks)
#define hwloc_set_solaris_hooks HWLOC_NAME(set_solaris_hooks)
#define hwloc_set_aix_hooks HWLOC_NAME(set_aix_hooks)
#define hwloc_set_osf_hooks HWLOC_NAME(set_osf_hooks)
#define hwloc_set_windows_hooks HWLOC_NAME(set_windows_hooks)
#define hwloc_set_darwin_hooks HWLOC_NAME(set_darwin_hooks)
#define hwloc_set_freebsd_hooks HWLOC_NAME(set_freebsd_hooks)
+#define hwloc_set_netbsd_hooks HWLOC_NAME(set_netbsd_hooks)
#define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)
#define hwloc_add_uname_info HWLOC_NAME(add_uname_info)
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 1566a2f..3403f51 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
@@ -1,7 +1,7 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2013 Inria. All rights reserved.
- * Copyright © 2009-2012 Université Bordeaux 1
+ * Copyright © 2009-2013 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* Copyright © 2010 IBM
* See COPYING in top-level directory.
@@ -272,6 +272,47 @@ hwloc_opendir(const char *p, int d __hwloc_attribute_unused)
}
+static int
+hwloc_linux_parse_cpuset_file(FILE *file, hwloc_bitmap_t set)
+{
+ unsigned long start, stop;
+
+ /* reset to zero first */
+ hwloc_bitmap_zero(set);
+
+ while (fscanf(file, "%lu", &start) == 1)
+ {
+ int c = fgetc(file);
+
+ stop = start;
+
+ if (c == '-') {
+ /* Range */
+ if (fscanf(file, "%lu", &stop) != 1) {
+ /* Expected a number here */
+ errno = EINVAL;
+ return -1;
+ }
+ c = fgetc(file);
+ }
+
+ if (c == EOF || c == '\n') {
+ hwloc_bitmap_set_range(set, start, stop);
+ break;
+ }
+
+ if (c != ',') {
+ /* Expected EOF, EOL, or a comma */
+ errno = EINVAL;
+ return -1;
+ }
+
+ hwloc_bitmap_set_range(set, start, stop);
+ }
+
+ return 0;
+}
+
/*****************************
******* CpuBind Hooks *******
@@ -353,6 +394,7 @@ hwloc_linux_find_kernel_nr_cpus(hwloc_topology_t topology)
{
static int _nr_cpus = -1;
int nr_cpus = _nr_cpus;
+ FILE *possible;
if (nr_cpus != -1)
/* already computed */
@@ -365,6 +407,21 @@ hwloc_linux_find_kernel_nr_cpus(hwloc_topology_t topology)
/* start from scratch, the topology isn't ready yet (complete_cpuset is missing (-1) or empty (0))*/
nr_cpus = 1;
+ possible = fopen("/sys/devices/system/cpu/possible", "r");
+ if (possible) {
+ hwloc_bitmap_t possible_bitmap = hwloc_bitmap_alloc();
+ if (hwloc_linux_parse_cpuset_file(possible, possible_bitmap) == 0) {
+ int max_possible = hwloc_bitmap_last(possible_bitmap);
+
+ hwloc_debug_bitmap("possible CPUs are %s\n", possible_bitmap);
+
+ if (nr_cpus < max_possible + 1)
+ nr_cpus = max_possible + 1;
+ }
+ fclose(possible);
+ hwloc_bitmap_free(possible_bitmap);
+ }
+
while (1) {
cpu_set_t *set = CPU_ALLOC(nr_cpus);
size_t setsize = CPU_ALLOC_SIZE(nr_cpus);
@@ -3542,14 +3599,23 @@ hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pci
DIR *dir;
struct dirent *dirent;
hwloc_obj_t obj;
- int res = 0;
+ int res = 0, err;
if (hwloc_linux_deprecated_classlinks_model == -2)
hwloc_linux_check_deprecated_classlinks_model();
if (hwloc_linux_deprecated_classlinks_model != 1) {
/* modern sysfs: <device>/<class>/<name> */
+ struct stat st;
snprintf(path, sizeof(path), "%s/%s", devicepath, classname);
+
+ /* some very host kernel (2.6.9/RHEL4) have <device>/<class> symlink without any way to find <name>.
+ * make sure <device>/<class> is a directory to avoid this case.
+ */
+ err = lstat(path, &st);
+ if (err < 0 || !S_ISDIR(st.st_mode))
+ goto trydeprecated;
+
dir = opendir(path);
if (dir) {
hwloc_linux_deprecated_classlinks_model = 0;
@@ -3568,6 +3634,7 @@ hwloc_linux_class_readdir(struct hwloc_topology *topology, struct hwloc_obj *pci
}
}
+trydeprecated:
if (hwloc_linux_deprecated_classlinks_model != 0) {
/* deprecated sysfs: <device>/<class>:<name> */
dir = opendir(devicepath);
@@ -3678,6 +3745,22 @@ hwloc_linux_infiniband_class_fillinfos(struct hwloc_topology *topology __hwloc_a
}
for(i=1; ; i++) {
+ snprintf(path, sizeof(path), "%s/ports/%u/state", osdevpath, i);
+ fd = fopen(path, "r");
+ if (fd) {
+ char statevalue[2];
+ if (fgets(statevalue, sizeof(statevalue), fd)) {
+ char statename[32];
+ statevalue[1] = '\0'; /* only keep the first byte/digit */
+ snprintf(statename, sizeof(statename), "Port%uState", i);
+ hwloc_obj_add_info(obj, statename, statevalue);
+ }
+ fclose(fd);
+ } else {
+ /* no such port */
+ break;
+ }
+
snprintf(path, sizeof(path), "%s/ports/%u/lid", osdevpath, i);
fd = fopen(path, "r");
if (fd) {
@@ -3691,9 +3774,6 @@ hwloc_linux_infiniband_class_fillinfos(struct hwloc_topology *topology __hwloc_a
hwloc_obj_add_info(obj, lidname, lidvalue);
}
fclose(fd);
- } else {
- /* no such port */
- break;
}
snprintf(path, sizeof(path), "%s/ports/%u/lid_mask_count", osdevpath, i);
@@ -3881,6 +3961,19 @@ hwloc_linux_mic_class_fillinfos(struct hwloc_topology *topology __hwloc_attribut
fclose(fd);
}
+ snprintf(path, sizeof(path), "%s/serialnumber", osdevpath);
+ fd = fopen(path, "r");
+ if (fd) {
+ char sn[64];
+ if (fgets(sn, sizeof(sn), fd)) {
+ char *eol = strchr(sn, '\n');
+ if (eol)
+ *eol = 0;
+ hwloc_obj_add_info(obj, "MICSerialNumber", sn);
+ }
+ fclose(fd);
+ }
+
snprintf(path, sizeof(path), "%s/active_cores", osdevpath);
fd = fopen(path, "r");
if (fd) {
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
index f70609e..62f88a0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
@@ -503,6 +503,7 @@ hwloc_look_pci(struct hwloc_backend *backend)
unsigned isbridge;
unsigned domain;
unsigned device_class;
+ unsigned short tmp16;
char name[128];
unsigned offset;
#ifdef HWLOC_HAVE_PCI_FIND_CAP
@@ -559,10 +560,6 @@ hwloc_look_pci(struct hwloc_backend *backend)
obj->attr->pcidev.class_id = device_class;
HWLOC_BUILD_ASSERT(PCI_REVISION_ID < CONFIG_SPACE_CACHESIZE);
obj->attr->pcidev.revision = config_space_cache[PCI_REVISION_ID];
- HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_VENDOR_ID < CONFIG_SPACE_CACHESIZE);
- obj->attr->pcidev.subvendor_id = config_space_cache[PCI_SUBSYSTEM_VENDOR_ID];
- HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_ID < CONFIG_SPACE_CACHESIZE);
- obj->attr->pcidev.subdevice_id = config_space_cache[PCI_SUBSYSTEM_ID];
obj->attr->pcidev.linkspeed = 0; /* unknown */
#ifdef HWLOC_HAVE_PCI_FIND_CAP
@@ -648,6 +645,20 @@ hwloc_look_pci(struct hwloc_backend *backend)
obj->attr->bridge.downstream.pci.subordinate_bus = config_space_cache[PCI_SUBORDINATE_BUS];
}
+ if (obj->type == HWLOC_OBJ_PCI_DEVICE) {
+ memcpy(&tmp16, &config_space_cache[PCI_SUBSYSTEM_VENDOR_ID], sizeof(tmp16));
+ HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_VENDOR_ID < CONFIG_SPACE_CACHESIZE);
+ obj->attr->pcidev.subvendor_id = tmp16;
+ memcpy(&tmp16, &config_space_cache[PCI_SUBSYSTEM_ID], sizeof(tmp16));
+ HWLOC_BUILD_ASSERT(PCI_SUBSYSTEM_ID < CONFIG_SPACE_CACHESIZE);
+ obj->attr->pcidev.subdevice_id = tmp16;
+ } else {
+ /* TODO:
+ * bridge must lookup PCI_CAP_ID_SSVID and then look at offset+PCI_SSVID_VENDOR/DEVICE_ID
+ * cardbus must look at PCI_CB_SUBSYSTEM_VENDOR_ID and PCI_CB_SUBSYSTEM_ID
+ */
+ }
+
/* starting from pciutils 2.2, pci_lookup_name() takes a variable number
* of arguments, and supports the PCI_LOOKUP_NO_NUMBERS flag.
*/
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
index 2a2c41a..cc6521c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
@@ -706,6 +706,8 @@ hwloc_look_xml(struct hwloc_backend *backend)
failed:
if (data->look_failed)
data->look_failed(data);
+ if (hwloc__xml_verbose())
+ fprintf(stderr, "XML component discovery failed.\n");
err:
hwloc_localeswitch_fini();
return -1;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
index d09627a..a6fc4f9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
@@ -688,6 +688,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
child->distances_count += obj->distances_count;
child->distances = realloc(child->distances, child->distances_count * sizeof(*child->distances));
memcpy(child->distances + obj->distances_count, obj->distances, obj->distances_count * sizeof(*child->distances));
+ free(obj->distances);
} else {
child->distances_count = obj->distances_count;
child->distances = obj->distances;
@@ -700,6 +701,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
child->infos_count += obj->infos_count;
child->infos = realloc(child->infos, child->infos_count * sizeof(*child->infos));
memcpy(child->infos + obj->infos_count, obj->infos, obj->infos_count * sizeof(*child->infos));
+ free(obj->infos);
} else {
child->infos_count = obj->infos_count;
child->infos = obj->infos;
@@ -897,7 +899,7 @@ hwloc_topology_insert_misc_object_by_cpuset(struct hwloc_topology *topology, hwl
if (hwloc_bitmap_iszero(cpuset))
return NULL;
- if (!hwloc_bitmap_isincluded(cpuset, hwloc_topology_get_complete_cpuset(topology)))
+ if (!hwloc_bitmap_isincluded(cpuset, hwloc_topology_get_topology_cpuset(topology)))
return NULL;
obj = hwloc_alloc_setup_object(HWLOC_OBJ_MISC, -1);
@@ -1183,11 +1185,18 @@ add_default_object_sets(hwloc_obj_t obj, int parent_has_sets)
if (hwloc_obj_type_is_io(obj->type))
return;
- if (parent_has_sets || obj->cpuset) {
- /* if the parent has non-NULL sets, or if the object has non-NULL cpusets,
- * it must have non-NULL nodesets
- */
+ if (parent_has_sets && obj->type != HWLOC_OBJ_MISC) {
+ /* non-MISC object must have cpuset if parent has one. */
assert(obj->cpuset);
+ }
+
+ /* other sets must be consistent with main cpuset:
+ * check cpusets and add nodesets if needed.
+ *
+ * MISC may have no sets at all (if added by parent), or usual ones (if added by cpuset),
+ * but that's not easy to detect, so just make sure sets are consistent as usual.
+ */
+ if (obj->cpuset) {
assert(obj->online_cpuset);
assert(obj->complete_cpuset);
assert(obj->allowed_cpuset);
@@ -1198,9 +1207,9 @@ add_default_object_sets(hwloc_obj_t obj, int parent_has_sets)
if (!obj->allowed_nodeset)
obj->allowed_nodeset = hwloc_bitmap_alloc_full();
} else {
- /* parent has no sets and object has NULL cpusets,
- * it must have NULL nodesets
- */
+ assert(!obj->online_cpuset);
+ assert(!obj->complete_cpuset);
+ assert(!obj->allowed_cpuset);
assert(!obj->nodeset);
assert(!obj->complete_nodeset);
assert(!obj->allowed_nodeset);
@@ -1239,6 +1248,9 @@ propagate_nodeset(hwloc_obj_t obj, hwloc_obj_t sys)
/* don't propagate nodesets in I/O objects, keep them NULL */
if (hwloc_obj_type_is_io(child->type))
return;
+ /* don't propagate nodesets in Misc inserted by parent (no nodeset if no cpuset) */
+ if (child->type == HWLOC_OBJ_MISC && !child->cpuset)
+ return;
/* Propagate singleton nodesets down */
if (parent_weight == 1) {
@@ -1450,7 +1462,7 @@ remove_empty(hwloc_topology_t topology, hwloc_obj_t *pobj)
if (obj->type != HWLOC_OBJ_NODE
&& !obj->first_child /* only remove if all children were removed above, so that we don't remove parents of NUMAnode */
- && !hwloc_obj_type_is_io(obj->type)
+ && !hwloc_obj_type_is_io(obj->type) && obj->type != HWLOC_OBJ_MISC
&& obj->cpuset /* don't remove if no cpuset at all, there's likely a good reason why it's different from having an empty cpuset */
&& hwloc_bitmap_iszero(obj->cpuset)) {
/* Remove empty children */
@@ -2195,7 +2207,7 @@ next_cpubackend:
}
if (!discoveries) {
- hwloc_debug("%s", "No CPU backend enabled\n");
+ hwloc_debug("%s", "No CPU backend enabled or no discovery succeeded\n");
errno = EINVAL;
return -1;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
index c0d6ba1..d697e58 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/embedded/configure.ac
@@ -9,11 +9,9 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.10 dist-bzip2 foreign subdir-objects tar-ustar -Wall -Werror])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
AC_LANG([C])
AC_PROG_CC
-AM_PROG_CC_C_O
cat <<EOF
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c
index 95365af..74180c1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_insert_misc.c
@@ -23,8 +23,9 @@ int main(void)
hwloc_topology_load(topology);
hwloc_topology_check(topology);
cpuset = hwloc_bitmap_alloc();
- hwloc_bitmap_set(cpuset, 0);
+ hwloc_bitmap_set(cpuset, hwloc_bitmap_first(hwloc_topology_get_topology_cpuset(topology)));
obj = hwloc_topology_insert_misc_object_by_cpuset(topology, cpuset, "test");
+ assert(obj);
hwloc_bitmap_free(cpuset);
hwloc_topology_insert_misc_object_by_parent(topology, obj, "test2");
hwloc_topology_check(topology);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in
index 54f5295..969eda7 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/hwloc-gather-topology.in
@@ -34,6 +34,10 @@ usage()
echo " $0 /tmp/\$(uname -n)"
}
+if test $# -lt 1 ; then
+ usage
+ exit 1
+fi
name="$1"; shift
if [ -z "$name" -o x`echo $name | cut -c1` = x- ] ; then
[ x$name != x -a x$name != x-h -a x$name != x--help ] && echo "Unrecognized option: $name"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in
index a2195d7..72bb583 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-annotate.1in
@@ -84,12 +84,12 @@ hwloc-annotate's operation is best described through several examples.
.PP
Add an info attribute to all Core objects:
- $ hwloc-annotate input.xml output.xml Core:all infoname infovalue
+ $ hwloc-annotate input.xml output.xml Core:all info infoname infovalue
Add an info attribute to the root object of the topology
and modify the input XML directly:
- $ hwloc-annotate file.xml file.xml root infoname infovalue
+ $ hwloc-annotate file.xml file.xml root info infoname infovalue
.
.\" **************************
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
index 8bfe806..75ada8a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc-info.1in
@@ -16,7 +16,7 @@ hwloc-info \- Show some information about some objects or about a topology
.B hwloc-info
[ \fIoptions \fR]...
\fI<object>\fR...
-.
+.PP
.B hwloc-info
[ \fIoptions \fR]...
.
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 f089597..549a53a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in
@@ -351,6 +351,8 @@ in the particular case of NUMA nodes, the layout is always a flat
rectangle, to avoid letting the user believe any particular NUMA
topology (lstopo is not able to render that yet).
.
+The layout of a level may be changed with \-\-vert and \-\-horiz.
+.
.\" **************************
.\" Examples Section
.\" **************************
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
index 7c2d6d6..16d5b1f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c
@@ -557,8 +557,10 @@ main (int argc, char *argv[])
}
err = hwloc_topology_load (topology);
- if (err)
+ if (err) {
+ fprintf(stderr, "hwloc_topology_load() failed (%s).\n", strerror(errno));
return EXIT_FAILURE;
+ }
if (top)
add_process_objects(topology);
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/NEWS | 12 +++
src/pm/hydra/tools/topo/hwloc/hwloc/VERSION | 4 +-
.../hydra/tools/topo/hwloc/hwloc/doc/Makefile.am | 20 +++--
src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy | 14 ++-
.../tools/topo/hwloc/hwloc/include/hwloc/rename.h | 2 +
.../tools/topo/hwloc/hwloc/src/topology-linux.c | 103 +++++++++++++++++++-
.../tools/topo/hwloc/hwloc/src/topology-pci.c | 19 +++-
.../tools/topo/hwloc/hwloc/src/topology-xml.c | 2 +
src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c | 32 ++++--
.../topo/hwloc/hwloc/tests/embedded/configure.ac | 1 -
.../topo/hwloc/hwloc/tests/hwloc_insert_misc.c | 3 +-
.../hwloc/tests/linux/hwloc-gather-topology.in | 4 +
.../topo/hwloc/hwloc/utils/hwloc-annotate.1in | 4 +-
.../tools/topo/hwloc/hwloc/utils/hwloc-info.1in | 2 +-
.../hydra/tools/topo/hwloc/hwloc/utils/lstopo.1in | 2 +
src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo.c | 4 +-
17 files changed, 190 insertions(+), 40 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-38-gb539c5a
by noreply@mpich.org 18 Sep '13
by noreply@mpich.org 18 Sep '13
18 Sep '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 b539c5a1765a1f03ef5e847b95180ca64c5a6c48 (commit)
from e6fde073449897f124965c87c3c73d1a35dda8c5 (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/b539c5a1765a1f03ef5e847b95180ca64…
commit b539c5a1765a1f03ef5e847b95180ca64c5a6c48
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Sep 18 10:52:00 2013 -0500
Maintain requested perms in more cases
If data sieving is not supported by the underlying file system (e.g. PVFS,
PLFS, BGLOCKLESS) then there is no reason to turn write-only requests
into read-write requests. Suggestion first reported by David Knaak of Cray.
Reviewed-by: David Knaak <knaak(a)cray.com>
diff --git a/src/mpi/romio/adio/common/ad_opencoll.c b/src/mpi/romio/adio/common/ad_opencoll.c
index 235bd78..2bea36e 100644
--- a/src/mpi/romio/adio/common/ad_opencoll.c
+++ b/src/mpi/romio/adio/common/ad_opencoll.c
@@ -79,8 +79,12 @@ void ADIOI_GEN_OpenColl(ADIO_File fd, int rank,
if write_only, open the file as read_write, but record it as write_only
in fd, so that get_amode returns the right answer. */
+ /* observation from David Knaak: file systems that do not support data
+ * sieving do not need to change the mode */
+
orig_amode_wronly = access_mode;
- if (access_mode & ADIO_WRONLY) {
+ if ( (access_mode & ADIO_WRONLY) &&
+ ADIO_Feature(fd, ADIO_DATA_SIEVING_WRITES) ) {
access_mode = access_mode ^ ADIO_WRONLY;
access_mode = access_mode | ADIO_RDWR;
}
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/ad_opencoll.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-37-ge6fde07
by noreply@mpich.org 18 Sep '13
by noreply@mpich.org 18 Sep '13
18 Sep '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 e6fde073449897f124965c87c3c73d1a35dda8c5 (commit)
from 46dba93ff00afede3c624e462eb3e7ac8e10dcce (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/e6fde073449897f124965c87c3c73d1a3…
commit e6fde073449897f124965c87c3c73d1a35dda8c5
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Wed Sep 18 09:31:04 2013 -0500
Test for PTHREAD_PROCESS_SHARED attribute
FreeBSD does not support this attribute. Including this runtime
test ensures nemesis will not override the allocate_shm function
pointer unless it is supported. Fixes #1926
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index 9d9c5ab..89ef6f9 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -28,11 +28,23 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t *win_fns)
{
int mpi_errno = MPI_SUCCESS;
+ int mutex_err;
+ pthread_mutexattr_t attr;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_WIN_FNS_INIT);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3_WIN_FNS_INIT);
- win_fns->allocate_shm = MPIDI_CH3I_Win_allocate_shm;
+ /* Test for PTHREAD_PROCESS_SHARED support. Some platforms do not support
+ * this capability even though it is a part of the pthreads core API (e.g.,
+ * FreeBSD does not support this as of version 9.1) */
+ pthread_mutexattr_init(&attr);
+ mutex_err = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_mutexattr_destroy(&attr);
+
+ /* Only allocate shared memory windows if we can use
+ * pthread_mutexattr_setpshared correctly. */
+ if (!mutex_err)
+ win_fns->allocate_shm = MPIDI_CH3I_Win_allocate_shm;
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3_WIN_FNS_INIT);
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-36-g46dba93
by noreply@mpich.org 17 Sep '13
by noreply@mpich.org 17 Sep '13
17 Sep '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 46dba93ff00afede3c624e462eb3e7ac8e10dcce (commit)
from f22b5c90632dd86d146dd275001459b66304c145 (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/46dba93ff00afede3c624e462eb3e7ac8…
commit 46dba93ff00afede3c624e462eb3e7ac8e10dcce
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Sep 17 10:29:48 2013 -0500
Improvements to large_type test
- large_type now conforms to mpich test guidelines.
- additional datatype cases that do not rely on "large MPI_Aint" (but
32 bit platforms probably still cannot process these types)
diff --git a/test/mpi/datatype/large_type.c b/test/mpi/datatype/large_type.c
index 9449160..bfc32ac 100644
--- a/test/mpi/datatype/large_type.c
+++ b/test/mpi/datatype/large_type.c
@@ -14,10 +14,6 @@ static MPI_Datatype make_largexfer_type_struct(MPI_Offset nbytes)
/* first pass: chunks of 1 MiB plus an additional remainder. Does require
* 8 byte MPI_Aint, which should have been checked for earlier */
- if (sizeof(MPI_Aint) <= sizeof(int)) {
- return MPI_DATATYPE_NULL;
- }
-
chunk_count = nbytes/typechunk_size;
remainder = nbytes % typechunk_size;
MPI_Type_contiguous(typechunk_size, MPI_BYTE, &chunktype);
@@ -25,18 +21,22 @@ static MPI_Datatype make_largexfer_type_struct(MPI_Offset nbytes)
/* a zero remainder means we can just count contigs */
if (remainder == 0) {
- memtype = chunktype;
+ MPI_Type_contiguous(chunk_count, chunktype, &memtype);
+ MPI_Type_free(&chunktype);
} else {
- /* struct type: some number of chunks plus remaining bytes tacked
+ if (sizeof(MPI_Aint) <= sizeof(int)) {
+ return MPI_DATATYPE_NULL;
+ }
+ /* struct type: some number of chunks plus remaining bytes tacked
* on at end */
int lens[] = {chunk_count, remainder};
MPI_Aint disp[] = {0, (MPI_Aint) typechunk_size * (MPI_Aint)chunk_count};
MPI_Datatype types[] = {chunktype, MPI_BYTE};
MPI_Type_struct(2, lens, disp, types, &memtype);
- MPI_Type_commit(&memtype);
MPI_Type_free(&chunktype);
}
+ MPI_Type_commit(&memtype);
return memtype;
}
static MPI_Datatype make_largexfer_type_hindexed(MPI_Offset nbytes)
@@ -76,31 +76,31 @@ static MPI_Datatype make_largexfer_type_hindexed(MPI_Offset nbytes)
}
-int testtype(MPI_Datatype type) {
+int testtype(MPI_Datatype type, MPI_Offset expected) {
MPI_Count size, lb, extent;
int nerrors=0;
MPI_Type_size_x(type, &size);
- if (size > 0) {
- printf("constructed type of size %lld\n", size);
- } else {
+ if (size < 0) {
printf("ERROR: type size apparently overflowed integer\n");
nerrors++;
}
+ if (size != expected) {
+ printf("reported type size %lld does not match expected %lld\n",
+ size, expected);
+ nerrors++;
+ }
+
MPI_Type_get_true_extent_x(type, &lb, &extent);
if (lb != 0) {
printf("ERROR: type should have lb of 0, reported %lld\n", lb);
nerrors ++;
- } else {
- printf("constructed type has lb of %lld\n", lb);
}
if (extent != size) {
printf("ERROR: extent should match size, not %lld\n", extent);
nerrors ++;
- } else {
- printf("constructed type extent matches size: %lld\n", extent);
}
return nerrors;
}
@@ -115,21 +115,30 @@ int main(int argc, char **argv)
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
-#define NR_TYPES 2
+#define NR_TYPES 3
+ MPI_Offset expected_sizes[NR_TYPES] = {1024UL*1024UL*2400UL,
+ 2346319872,
+ 2346319872};
MPI_Datatype types[NR_TYPES];
- types[0] = make_largexfer_type_struct(2346319872);
- types[1] = make_largexfer_type_hindexed(2346319872);
+ /* a contig type, itself large, but does not need 8 byte aints */
+ types[0] = make_largexfer_type_struct(expected_sizes[0]);
+ /* struct with addresses out past 2 GiB */
+ types[1] = make_largexfer_type_struct(expected_sizes[1]);
+ /* similar, but with hindexed type */
+ types[2] = make_largexfer_type_hindexed(expected_sizes[2]);
for (i=0; i<NR_TYPES; i++) {
- nerrors += testtype(types[i]);
- MPI_Type_free(&(types[i]));
+ if (types[i] != MPI_DATATYPE_NULL) {
+ nerrors += testtype(types[i], expected_sizes[i]);
+ MPI_Type_free(&(types[i]));
+ }
}
MPI_Finalize();
if (rank == 0) {
if (nerrors) {
- printf("foiund %d errors\n", nerrors);
+ printf("found %d errors\n", nerrors);
} else {
printf(" No errors\n");
}
-----------------------------------------------------------------------
Summary of changes:
test/mpi/datatype/large_type.c | 51 +++++++++++++++++++++++----------------
1 files changed, 30 insertions(+), 21 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0