Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] one more finding in openmpi-1.7.5a1
From: Ralph Castain (rhc_at_[hidden])
Date: 2014-02-13 21:35:37


Thanks - these used to be bitmaps, but changed when we started getting so many options. Sadly, they are very rarely used, so bugs like this can go unnoticed for long times. Appreciate you taking such a close look at them.

Ralph

On Feb 13, 2014, at 4:55 PM, tmishima_at_[hidden] wrote:

>
> 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
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users