1
1

Merge pull request #998 from tkordenbrock/topic/fix.incorrect.ompi_proc.cast

Looks good to me.

mtl-portals4: fix bug in the Portals4 get_peer family
Этот коммит содержится в:
Ryan Grant 2015-10-08 08:38:16 -06:00
родитель 4addab8e16 88d79efd9f
Коммит 8134ba76f1
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -224,7 +224,7 @@ ompi_mtl_portals4_get_proc_group(struct ompi_group_t *group, int rank);
static inline ptl_process_t
ompi_mtl_portals4_get_peer_group(struct ompi_group_t *group, int rank)
{
return *((ptl_process_t*)ompi_mtl_portals4_get_proc_group(group, rank));
return *((ptl_process_t*)(ompi_mtl_portals4_get_proc_group(group, rank)->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4]));
}
static inline ompi_proc_t *
@ -236,7 +236,7 @@ ompi_mtl_portals4_get_proc(struct ompi_communicator_t *comm, int rank)
static inline ptl_process_t
ompi_mtl_portals4_get_peer(struct ompi_communicator_t *comm, int rank)
{
return *((ptl_process_t*)ompi_mtl_portals4_get_proc(comm, rank));
return *((ptl_process_t*)(ompi_mtl_portals4_get_proc(comm, rank)->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4]));
}

Просмотреть файл

@ -20,6 +20,8 @@
#ifndef OMPI_MTL_PORTALS_ENDPOINT_H
#define OMPI_MTL_PORTALS_ENDPOINT_H
#include "ompi/mca/mtl/portals4/mtl_portals4.h"
struct mca_mtl_base_endpoint_t {
ptl_process_t ptl_proc;
};