Fixes #4117: Move r30298 to v1.7 branch (deprecate old-style mapping and binding directives)
Fixes #4240: Move r30643 to v1.7 branch (resolve the problem of binding in inverted topologies)

---svn-pre-commit-ignore-below---

r30362 [[BR]]
Addendum to r30298: tweak the wording of the help messages a bit.

Refs #4117.  Please use this commit rather than the patch attached to
the ticket; the patch had a few mistakes in the tweaked wording.

r30620 [[BR]]
After a lot of pain, I've managed to resolve the problem of conflicting mapping directives caused by mismatched MCA params - i.e., where someone has one variant of an MCA param (e.g., rmaps_base_mapping_policy) in their default MCA param file, and then specifies another variant (e.g., --npernode) on the command line. I can't fully resolve the problem as there is no way to know precisely what the user meant - we can only guess which param was really intended since the MCA param system
can't apply its normal precedence rules.

So...print a big "deprecated" warning for the old params and error out if a conflict is detected. I know that isn't what people really wanted, but it's the best we
 can do. If only the old style param is given, then process it after the warning.

Extend the current map-by param to add support for ppr and cpus-per-proc, adding the latter to the list of allowed modifiers using "pe=n" for processing elements/proc. Thus, you can map-by socket:pe=2,oversubscribe to map by socket, binding 2 processing elements/process, with oversubscription allowed. Or you can map-by ppr:2:socket:pe=4 to map two processes to every socket in the allocation, binding each process to 4 processing elements.

For those wondering, a processing element is defined as a hwthread if --use-hwthreads-as-cpus is given, or else as a core.

Refs #4117


r30649 [[BR]]
Rats - need to include bydist in the mapping list

Refs #4117


r30662 [[BR]]
Check for --cpus-per-proc earlier, before the correct option can be processed. Thanks to Tetsuya Mishima for reporting it.

Refs #4117


r30663 [[BR]]
Correct the handling of various map/bind combinations when pe=N is given. Thanks to Elena Elkina for reporting it.

Refs #4117


r30671 [[BR]]
Handle modifiers to the --map-by dist option

Refs #4117


r30672 [[BR]]
Protect against no modifiers

Refs #4117


r30643 [[BR]]
Resolve the problem of binding in inverted topologies - check the relative depth of the map and bind objects in the topology, and let that determine whether we bind downward or upwards.

cmr=v1.7.5:reviewer=jsquyres:subject=Resolve the problem of binding in inverted topologies


r30661 [[BR]]
It is just fine to map by node or slot and bind, so ensure the switch statement includes those options. Thanks to Tatsuya Mishima for point it out.

Refs #4240
Fixes #4243: Move r30648 to v1.7 branch (set hwthreads to cpus when binding to them)

---svn-pre-commit-ignore-below---

r30648 [[BR]]
If we are binding to hwthreads, then we need to treat hwthreads as cpus to get the mapping right

cmr=v1.7.5:reviewer=jsquyres:subject=set hwthreads to cpus when binding to them
Fixes #4250: Move r30660 to v1.7 branch (the openshmem community is crazy)

---svn-pre-commit-ignore-below---

r30660 [[BR]]
Remove num_pes,my_pe declarations from shmem.fh.

The openshmem test suite
(http://bongo.cs.uh.edu/site/sites/default/site_files/openshmem-test-suite-release-1.0d.tar.bz2)
declares num_pes and my_pe in each Fortran test file -- it apparently
doesn't expect shmem.fh to declare these functions.  Sigh.

cmr=v1.7.5:reviewer=miked:subject=the openshmem community is crazy
Fixes #4236: Move r30635 to v1.7 branch (fix singleton mpi_abort)

---svn-pre-commit-ignore-below---

r30635 [[BR]]
Fix singleton MPI_Abort. Singletons no longer immediately start an HNP, but only launch one when they need it for comm_spawn. So there isn't anyone to send the "abort" report to, and thus we just exit after emitting our message.

cmr=v1.7.5:reviewer=jsquyres:subject=Fix singleton MPI_Abort
Fixes #4251: Move r30665 to v1.7 branch (remove asynchronous from the ignore tkr mpi_f08 module.)

---svn-pre-commit-ignore-below---

r30665 [[BR]]
Remove ASYNCHRONOUS from the ignore TKR mpi_f08 module.

It turns out that ASYNCHRONOUS should not be used with ignore TKR
dummy parameters (some compilers will [correctly] warn about this).

Many thanks to Rolf Rabenseifner and Christoph Niethammer, who noticed
the problem.

Submitted by Rolf Rabenseifner, reviewed by Jeff.

cmr=v1.7.5:reviewer=ompi-rm1.7:subject=Remove ASYNCHRONOUS from the ignore TKR mpi_f08 module.
Fixes #4254: Move r30674 to v1.7 branch (usnic: handle missing ibv_event_type_str)

---svn-pre-commit-ignore-below---

r30674 [[BR]]
usnic: handle missing ibv_event_type_str

Some older versions of libibverbs do not have `ibv_event_type_str`,
leading to compilation failures on older machines, irrespective of
whether they could ever support usNIC anyway.  If we encounter any other
build issues related to "old verbs" then we should just cause the usnic
BTL to disqualify itself when it encounters "old" traits.

Thanks to Paul Hargrove for reporting the issue:
http://www.open-mpi.org/community/lists/devel/2014/02/14056.php

Reviewed-by: Jeff Squyres <jsquyres@cisco.com>

cmr=v1.7.5:reviewer=ompi-rm1.7
Fixes #4256: Move r30675 to v1.7 branch (Provide better messages when we)

---svn-pre-commit-ignore-below---

r30675 [[BR]]
Provide better messages when we don't find any included interfaces, and/or don't find any interfaces for use by OOB.

cmr=v1.7.5:reviewer=jsquyres
Fixes #4238: Move r30641 to v1.7 branch (fix race condition in finalize)

---svn-pre-commit-ignore-below---

r30641 [[BR]]
Fix a race condition that could result in assert failures during finalize. Ensure we shutdown the orte progress thread prior to finalizing the rml/oob frameworks so that no async operations are executing during destruct of the base-level lists and objects.

cmr=v1.7.5:reviewer=jsquyres:subject=fix race condition in finalize