Skip to content

Handle Debugging:File queries

Joachim edited this page Oct 28, 2021 · 4 revisions

File queries

These functions are analogous to the mpidbg_comm_* functions, but for MPI_File.

int mpidbg_file_query(mqs_process *process,
                      mqs_taddr_t file,
                      struct mpidbg_file_handle_t **handle);

Free a handle returned by the mpidbg_file_query() function.

int mpidbg_file_handle_free(struct mpidbg_file_handle_t *handle);
enum mpidbg_file_access_mode_bitmap_t {
  MPIDBG_MODE_RDONLY      = 0x1,
  MPIDBG_MODE_RDWR        = 0x2,
  MPIDBG_MODE_WRONLY      = 0x4,
  MPIDBG_MODE_CREATE      = 0x8,
  MPIDBG_MODE_EXCL        = 0x10,
  MPIDBG_MODE_DELETE_ON_CLOSE = 0x20,
  MPIDBG_MODE_UNIQUE_OPEN = 0x40,
  MPIDBG_MODE_SEQUENTIAL  = 0x80,
  MPIDBG_MODE_APPEND      = 0x100
};
int mpidbg_file_query_basic(
                      struct mpidbg_file_handle_t *handle,
                      struct mpidbg_comm_handle_t **file_comm,
                      char **file_name,
                      int *amode, // using values of mpidbg_file_access_mode_bitmap_t
                      struct mpidbg_info_handle_t **file_info,
                      int *atomicity, // true if atomic mode
                      mpidbg_offset_t *displacement,
                      struct mpidbg_type_handle_t ** etype,
                      struct mpidbg_type_handle_t ** filetype,
                      char **datarep,
                      mpidbg_offset_t *pos,
                      mpidbg_offset_t *pos_shared,
                      int64 *file_fortran_handle,
                      int64 *file_fortran90_handle, /* might this be different? */
                      mqs_taddr_t *file_c_handle);

TODO: define mpidbg_offset_t large enough to store offsets into files (64-bit even on 32-bit target systems)

Session query function:

Query a handle returned by mpidbg_file_query() and, if found and valid, return the session this communicator was derived from

int mpidbg_file_query_session(struct mpidbg_file_handle_t *handle,
                              struct mpidbg_session_handle_t **file_session);
Clone this wiki locally