Skip to content
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

specify normative language references (particularly for ISO C) #139

Closed
jeffhammond opened this issue Jun 4, 2019 · 24 comments
Closed

specify normative language references (particularly for ISO C) #139

jeffhammond opened this issue Jun 4, 2019 · 24 comments
Assignees

Comments

@jeffhammond
Copy link
Member

Problem

We say "ISO C" many times without defining it or citing a specific ISO document.

On the other hand, we cite specific documents for Fortran 2008, POSIX, Unicode, etc.

Proposal

Define what ISO means and cite the document that defines it, e.g. ISO/IEC 9899:2011.

Changes to the Text

TODO

Impact on Implementations

None in most cases, but Microsoft may have a problem if we refer to a version of C that their compiler doesn't support. On the other hand, MPI references int64_t already, which was introduced in C99, so there is already an implicit requirement of C99 support, which Microsoft's compiler lacks (although they support fixed-width integer types, which are also defined in C++11).

Impact on Users

Users almost certainly don't care what the standard says about ISO standard languages, as long as their MPI implementation works with their compiler.

References

#137 (comment)

@hjelmn
Copy link

hjelmn commented Jun 4, 2019

@jeffhammond I believe that Microsoft has updated their compiler to support most of C99 (and probably C11). Someone from Microsoft will have to confirm but otherwise I fully support clarifying it as being at least ISO C99.

@omor1
Copy link
Member

omor1 commented Jun 4, 2019

If I recall correctly the fixed-width integer MPI types are optional as well.

How do people feel about introducing support for C integer types (e.g. size_t, ptrdiff_t)? MPI does support its own version of each (MPI_Count, MPI_Aint), but doesn’t have built-in types for the C language types.

@hjelmn
Copy link

hjelmn commented Jun 4, 2019

@omor1 I think this is covered by another proposal. The idea is to allow the MPI implementation to make datatypes for every language type if it is defined. Can't remember the ticket number. I am hoping at the same time we can deprecate the poorly-named MPI_LONG_INT, and MPI_SHORT_INT at the same time as those names collide with C types and do not represent the C types.

@hjelmn
Copy link

hjelmn commented Jun 4, 2019

@omor1 The proposal was along the lines of MPI_LANGUAGE_TYPE. So, MPI_C_INT64_T for example.

@mhoemmen
Copy link

mhoemmen commented Jun 5, 2019

How do people feel about introducing support for C integer types (e.g. size_t, ptrdiff_t)?

It's useful for C or C++ programmers who call MPI functions directly. It's not so useful for writing C++ bindings. In practice, we create C++ bindings by template-specializing some traits class and/or function for every built-in type that's actually a type, not a typedef. size_t etc. are aliases (typedefs), not actual types, so you can't template-specialize on them or safely write overloads (e.g., size_t could be any unsigned integer type of the right size).

@hzhou
Copy link

hzhou commented Jun 5, 2019

A related side-note: what does standard say about when an optional type, e.g. MPI_LONG_LONG_INT, is not available in an implementation?

@hjelmn
Copy link

hjelmn commented Jun 5, 2019

MPI_LONG_LONG_INT .... now there is some great consistency for you :)

@hzhou
Copy link

hzhou commented Jun 5, 2019

How do people feel about introducing support for C integer types (e.g. size_t, ptrdiff_t)? MPI does support its own version of each (MPI_Count, MPI_Aint), but doesn’t have built-in types for the C language types.

It is just adding on top of existing mess, ...so, why not?

Personally I would see just another direction. How about only specifying sized-types, i.e. MPI_INT_8, MPI_UINT_8, ..., MPI_INT_32, MPI_UINT_32, ... . Plus get-functions, e.g. MPI_Type_basic(TYPE, sizeof(long)), where TYPE is one of the enum constants - INT, UINT, FLOAT, .... The second argument is the type size in bytes, but for FORTRAN, it could be a kind value.

@hjelmn
Copy link

hjelmn commented Jun 5, 2019

@hzhou I personally don't think that is the best path forward. As I already mentioned, there is a proposal to allow the MPI implementation to define any type available in the binding language. IMHO that is the best path forward. See PR mpi-forum/mpi-standard#54

@tonyskjellum
Copy link

tonyskjellum commented Jun 5, 2019 via email

@hjelmn
Copy link

hjelmn commented Jun 5, 2019

@tonyskjellum From Microsoft's website: "C99 Conformance Visual Studio 2015 fully implements the C99 Standard Library, with the exception of any library features that depend on compiler features not yet supported by the Visual C++ compiler". They were the last to add support for it.

@tonyskjellum
Copy link

tonyskjellum commented Jun 5, 2019 via email

@mhoemmen
Copy link

mhoemmen commented Jun 5, 2019

@hjelmn wrote:

See PR mpi-forum/mpi-standard#54

The link appears to be broken -- would you happen to have a working link? Thanks!

@puribangalore
Copy link

puribangalore commented Jun 5, 2019 via email

@mhoemmen
Copy link

mhoemmen commented Jun 5, 2019

@puribangalore wrote:

It works fine, you need to login to github.

Does one need access permissions? I'm typing this comment in my browser window while logged into GitHub.

@jsquyres
Copy link
Member

jsquyres commented Jun 5, 2019

@mhoemmen You need to have access to the MPI Forum repo. If you agree to these terms, we can give you access.

@mhoemmen
Copy link

mhoemmen commented Jun 5, 2019

@jsquyres I do so agree; thanks!

@mhoemmen
Copy link

mhoemmen commented Jun 5, 2019

Thanks @jsquyres ! :-D

@hjelmn
Copy link

hjelmn commented Jun 5, 2019

Wow, @jsquyres will just let anyone have access :)

@omor1
Copy link
Member

omor1 commented Jun 5, 2019

@hjelmn well the link clearly lays out that anyone can have access as long as they agree to the listed terms ¯\_(ツ)_/¯.

@mhoemmen
Copy link

mhoemmen commented Jun 6, 2019

@hjelmn wrote:

Wow, @jsquyres will just let anyone have access :)

You apparently think I'm just anyone ;-P

@jeffhammond
Copy link
Member Author

Closing in favor of #693

@jeffhammond jeffhammond closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2023
@jeffhammond jeffhammond self-assigned this Apr 12, 2023
@bkmgit
Copy link

bkmgit commented Apr 13, 2023

Sorry, missed this.

@jeffhammond
Copy link
Member Author

So did I 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants