Skip to content

[OMPD] The LLVM OMPD library ompd_callbacks_t structure is wrong #54

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

Open
jdelsign opened this issue Feb 27, 2019 · 0 comments
Open

[OMPD] The LLVM OMPD library ompd_callbacks_t structure is wrong #54

jdelsign opened this issue Feb 27, 2019 · 0 comments

Comments

@jdelsign
Copy link

The "struct ompd_callbacks_t" used by the LLVM OMPD library does not match the OpenMP v5.0 spec (or the OpenMP omp-tools.h header). In particular, it is missing the read_string function pointer, which causes the structure to be the wrong size and the structure members. The definition used by the LLVM OMPD library is here: https://github.com/OpenMPToolsInterface/LLVM-openmp/blob/ompd-devices/libompd/src/ompd.h#L238

The correct definition of struct ompd_callbacks_t (from the OpenMP omp-tools.h header) is:

typedef struct ompd_callbacks_t {
  ompd_callback_memory_alloc_fn_t alloc_memory;
  ompd_callback_memory_free_fn_t free_memory;
  ompd_callback_print_string_fn_t print_string;
  ompd_callback_sizeof_fn_t sizeof_type;
  ompd_callback_symbol_addr_fn_t symbol_addr_lookup;
  ompd_callback_memory_read_fn_t read_memory;
  ompd_callback_memory_write_fn_t write_memory;
  ompd_callback_memory_read_fn_t read_string;
  ompd_callback_device_host_fn_t device_to_host;
  ompd_callback_device_host_fn_t host_to_device;
  ompd_callback_get_thread_context_for_thread_id_fn_t
      get_thread_context_for_thread_id;
} ompd_callbacks_t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants