Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] one more finding in openmpi-1.7.5a1
From: tmishima_at_[hidden]
Date: 2014-02-13 19:55:26


Hi Ralph,

I would report one more finding in openmpi-1.7.5a1.

Because ORTE_MAPPING_BY...s are not a bit field expression,
at orte_rmaps_base_set_ranking_policy in rmaps_base_frame.c
you should not use "&" to compare them:

   747 if (NULL == spec) {
   748 /* check for map-by object directives - we set the
   749 * ranking to match if one was given
   750 */
   751 if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE
(mapping)) {
   752 if (ORTE_MAPPING_BYCORE == ORTE_GET_MAPPING_POLICY
(mapping)) {
   753 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_CORE);
   754 } else if (ORTE_MAPPING_BYNODE ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   755 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_NODE);
   756 } else if (ORTE_MAPPING_BYL1CACHE ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   757 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_L1CACHE);
   758 } else if (ORTE_MAPPING_BYL2CACHE ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   759 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_L2CACHE);
   760 } else if (ORTE_MAPPING_BYL3CACHE ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   761 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_L3CACHE);
   762 } else if (ORTE_MAPPING_BYSOCKET ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   763 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_SOCKET);
   764 } else if (ORTE_MAPPING_BYNUMA ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   765 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_NUMA);
   766 } else if (ORTE_MAPPING_BYBOARD ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   767 ORTE_SET_RANKING_POLICY(tmp, ORTE_RANK_BY_BOARD);
   768 } else if (ORTE_MAPPING_BYHWTHREAD ==
ORTE_GET_MAPPING_POLICY(mapping)) {
   769 ORTE_SET_RANKING_POLICY(tmp,
ORTE_RANK_BY_HWTHREAD);
   770 }

Regards,
Tetsuya Mishima