btl/vader: fix compilation with SGI xpmem and add some debugging to
component_init. cmr=v1.7.5:ticker=#4053 This commit was SVN r30535.
Этот коммит содержится в:
родитель
64321acc22
Коммит
84320f3815
@ -251,6 +251,7 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls,
|
|||||||
|
|
||||||
/* disable if there are no local peers */
|
/* disable if there are no local peers */
|
||||||
if (0 == MCA_BTL_VADER_NUM_LOCAL_PEERS) {
|
if (0 == MCA_BTL_VADER_NUM_LOCAL_PEERS) {
|
||||||
|
BTL_VERBOSE(("No peers to communicate with. Disabling vader."));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +278,7 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls,
|
|||||||
component->my_seg_id = xpmem_make (0, 0xffffffffffffffffll, XPMEM_PERMIT_MODE,
|
component->my_seg_id = xpmem_make (0, 0xffffffffffffffffll, XPMEM_PERMIT_MODE,
|
||||||
(void *)0666);
|
(void *)0666);
|
||||||
if (-1 == component->my_seg_id) {
|
if (-1 == component->my_seg_id) {
|
||||||
|
BTL_VERBOSE(("Could not create xpmem segment"));
|
||||||
free (btls);
|
free (btls);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -284,6 +286,7 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls,
|
|||||||
component->my_segment = mmap (NULL, mca_btl_vader_component.segment_size, PROT_READ |
|
component->my_segment = mmap (NULL, mca_btl_vader_component.segment_size, PROT_READ |
|
||||||
PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0);
|
PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0);
|
||||||
if ((void *)-1 == component->my_segment) {
|
if ((void *)-1 == component->my_segment) {
|
||||||
|
BTL_VERBOSE(("Could not create anonymous memory segment"));
|
||||||
free (btls);
|
free (btls);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -301,12 +304,14 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls,
|
|||||||
rc = opal_shmem_segment_create (&mca_btl_vader_component.seg_ds, sm_file, mca_btl_vader_component.segment_size);
|
rc = opal_shmem_segment_create (&mca_btl_vader_component.seg_ds, sm_file, mca_btl_vader_component.segment_size);
|
||||||
free (sm_file);
|
free (sm_file);
|
||||||
if (OPAL_SUCCESS != rc) {
|
if (OPAL_SUCCESS != rc) {
|
||||||
|
BTL_VERBOSE(("Could not create shared memory segment"));
|
||||||
free (btls);
|
free (btls);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
component->my_segment = opal_shmem_segment_attach (&mca_btl_vader_component.seg_ds);
|
component->my_segment = opal_shmem_segment_attach (&mca_btl_vader_component.seg_ds);
|
||||||
if (NULL == component->my_segment) {
|
if (NULL == component->my_segment) {
|
||||||
|
BTL_VERBOSE(("Could not attach to just created shared memory segment"));
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -320,11 +325,13 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls,
|
|||||||
/* initialize my fifo */
|
/* initialize my fifo */
|
||||||
rc = vader_fifo_init ((struct vader_fifo_t *) component->my_segment);
|
rc = vader_fifo_init ((struct vader_fifo_t *) component->my_segment);
|
||||||
if (OMPI_SUCCESS != rc) {
|
if (OMPI_SUCCESS != rc) {
|
||||||
|
BTL_VERBOSE(("Error initializing FIFO"));
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = mca_btl_base_vader_modex_send ();
|
rc = mca_btl_base_vader_modex_send ();
|
||||||
if (OMPI_SUCCESS != rc) {
|
if (OMPI_SUCCESS != rc) {
|
||||||
|
BTL_VERBOSE(("Error sending modex"));
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,14 @@
|
|||||||
#define MCA_BTL_VADER_ENDPOINT_H
|
#define MCA_BTL_VADER_ENDPOINT_H
|
||||||
|
|
||||||
#if OMPI_BTL_VADER_HAVE_XPMEM
|
#if OMPI_BTL_VADER_HAVE_XPMEM
|
||||||
#include <xpmem.h>
|
#if defined(HAVE_XPMEM_H)
|
||||||
|
#include <xpmem.h>
|
||||||
|
#elif defined(HAVE_SN_XPMEM_H)
|
||||||
|
#include <sn/xpmem.h>
|
||||||
|
|
||||||
|
typedef int64_t xpmem_apid_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include "opal/mca/shmem/base/base.h"
|
#include "opal/mca/shmem/base/base.h"
|
||||||
#endif
|
#endif
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user