Skip to content

[OMPD] The LLVM OMPD ompd_get_api_version() function returns a non-standard API version #51

Open
@jdelsign

Description

@jdelsign

The LLVM OMPD ompd_get_api_version() function returns the API version as 0x5000602, but that value is not in the OMP v5.0 standard. What should it be? The standard does not say, which is a problem with the standard itself, reported here: http://trac.openmp.org/trac/OpenMP/ticket/894

I assume that the intent was that for a given OpenMP spec, the OMPD API version would be equal to the OpenMP version (defined by the _OPENMP macro). For example, OpenMP 5.0 defines _OPENMP and 201811, therefore the version of the OMPD API contained within the OpenMP 5.0 spec should be 201811.

Currently omp-debug.h in the above LLVM OMPD repository defines:

    #define OMPD_DLL_VERSION 201811;

    #define OMPD_IMPLEMENTS_OPENMP 5
    #define OMPD_IMPLEMENTS_OPENMP_SUBVERSION 0
    #define OMPD_TR_VERSION 6
    #define OMPD_TR_SUBVERSION 2
    #define OMPD_VERSION                                                           \
      (OMPD_IMPLEMENTS_OPENMP << 24) + (OMPD_IMPLEMENTS_OPENMP_SUBVERSION << 16) + \
	  (OMPD_TR_VERSION << 8) + OMPD_TR_SUBVERSION

Once the issue is resolved in the OMP standard, the LLVM OMPD library should return the correct value.

BTW: There is a stray semi-colon at the end of line defining OMPD_DLL_VERSION.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions