- 
                Notifications
    You must be signed in to change notification settings 
- Fork 929
ompi/datatype: define OMPI_DATATYPE_INIT_UNAVAILABLE_BASIC_TYPE macro #1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ompi/datatype: define OMPI_DATATYPE_INIT_UNAVAILABLE_BASIC_TYPE macro #1665
Conversation
| @bosilca can you please have a look at this ? first, the compilation will alway fail if heterogeneous support is enabled #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
[...]
#if defined(HAVE_PTRDIFF_T) && SIZEOF_PTRDIFF_T == 4
            array_of_disp[i] = opal_swap_bytes4(array_of_disp[i]);
#elif defined(HAVE_PTRDIFF_T) && SIZEOF_PTRDIFF_T == 8
            array_of_disp[i] = (MPI_Aint)opal_swap_bytes8(array_of_disp[i]);
#else
#error "Unknown size of ptrdiff_t"
#endifthen, even if  also, ptrdiff_t is used in several places in  | 
| I think the correct approach will be to use OPAL_PTRDIFF everywhere where we need a correspondence between our internal type and the MPI view of MPI_AINT (and MPI_COUNT).  | 
6870b87    to
    6820b41      
    Compare
  
    | :bot:retest | 
| @bosilca i updated the PR based on your review, and also replaced  | 
| Thanks @ggouaillardet. Now that I see the entire change, I got concerned. Basically this change means that OMPI developers should stop using ptrdiff_t and instead always use OPAL_PTRDIFF_T. It is a drastic requirement. Do we really want to impose it on our developers? I'm asking because we can take the opposite approach, aka. fallback on a consistent naming and provide a definition to ptrdiff_t in case it is not found on the system... | 
| @bosilca first, what is the rationale for having both  any thoughts ? | 
| I think the usage of OPAL_PTRDIFF_T was to support C89. Now that we require C99 and ptrdiff_t is a required type (see C99 7.17 stddef.h) we probably should remove the configury that creates OPAL_PTRDIFF_T and replace all occurances with ptrdiff_t. A compiler that doesn't have ptrdiff_t is not compliant and should not be supported. | 
| sounds fair to me, I will update the PR accordingly | 
| @ggouaillardet I checked 25+ systems and all of them show  In principle I agree w/ Nathan that  | 
| Test passed. | 
6820b41    to
    2b4d59e      
    Compare
  
    | @bosilca i updated the PR by removing  | 
| Test FAILed. | 
| Looks mostly as a gigantic sed. 👍 | 
| @ggouaillardet This failed several CI tests. Please check. | 
2b4d59e    to
    1942809      
    Compare
  
    1942809    to
    c50c0bc      
    Compare
  
    e07d005    to
    fd245f5      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a Signed-off-by line to this PR's commit.
| @ggouaillardet any update on this issue ? | 
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
since Open MPI now requires a C99, and ptrdiff_t type is part of C99, there is no more need for the abstract OPAL_PTRDIFF_TYPE type. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
since Open MPI now requires a C99, and ptrdiff_t type is part of C99, there is no more need for the abstract OPAL_PTRDIFF_TYPE type. Thanks George, Nathan and Paul for the help. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
fd245f5    to
    cc8a655      
    Compare
  
    
and properly handle the case when ptrdiff_t is not found
Thanks Ilias Miroslav for the report