gmegan / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
1 stars 0 forks source link

shmem_get_config binary compatibility #153

Open gmegan opened 5 years ago

gmegan commented 5 years ago

Using the solution for config structs from UCX, we can support backward compatibility to shmem_get_config without adding any new arguments to the existing API routine.

We can place the flags inside the config struct rather than pass them as a separate argument. The header file can set the flags for shmem_get_config to only the valid fields for the version of the struct in the header file. As long as future versions do not remove or rearrange struct members, no recompile is required for programs.

We can also address the issue of backward compatibility for implementation specific configuration using a void * to refer to a struct supplied by the implementation.

Using this solution, we do not need the config_mask argument to team creation since the mask will be set in the struct.

Here is an example of code snippets with three versions of config flags and an example program to illustate this solution: https://gitlab.com/gmegan/openshmem-examples/tree/master/shmem_team/get_conf

BryantLam commented 5 years ago

For reference, libstdc++ preserves backwards compatibility but not forwards compatibility. There are two sections for Allowed Changes and Prohibited Changes on this page to draw inspiration from.