Add some comments to the #ifdefs for clarity. No functional changes.
This commit was SVN r27802.
Этот коммит содержится в:
родитель
344d407ed4
Коммит
34d1f0a585
@ -90,9 +90,9 @@ mca_btl_sm_t mca_btl_sm = {
|
|||||||
mca_btl_sm_prepare_src,
|
mca_btl_sm_prepare_src,
|
||||||
#if OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA
|
#if OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA
|
||||||
mca_btl_sm_prepare_dst,
|
mca_btl_sm_prepare_dst,
|
||||||
#else
|
#else /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
NULL,
|
NULL,
|
||||||
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
mca_btl_sm_send,
|
mca_btl_sm_send,
|
||||||
mca_btl_sm_sendi,
|
mca_btl_sm_sendi,
|
||||||
NULL, /* put */
|
NULL, /* put */
|
||||||
@ -758,7 +758,7 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_src(
|
|||||||
|
|
||||||
if( (0 != reserve) || ( OPAL_UNLIKELY(!mca_btl_sm_component.use_knem)
|
if( (0 != reserve) || ( OPAL_UNLIKELY(!mca_btl_sm_component.use_knem)
|
||||||
&& OPAL_UNLIKELY(!mca_btl_sm_component.use_cma)) ) {
|
&& OPAL_UNLIKELY(!mca_btl_sm_component.use_cma)) ) {
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
if ( reserve + max_data <= mca_btl_sm_component.eager_limit ) {
|
if ( reserve + max_data <= mca_btl_sm_component.eager_limit ) {
|
||||||
MCA_BTL_SM_FRAG_ALLOC_EAGER(frag,rc);
|
MCA_BTL_SM_FRAG_ALLOC_EAGER(frag,rc);
|
||||||
} else {
|
} else {
|
||||||
@ -1078,7 +1078,7 @@ int mca_btl_sm_get_sync(struct mca_btl_base_module_t* btl,
|
|||||||
|
|
||||||
/* FIXME: what if icopy.current_status == KNEM_STATUS_FAILED? */
|
/* FIXME: what if icopy.current_status == KNEM_STATUS_FAILED? */
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
|
|
||||||
#if OMPI_BTL_SM_HAVE_CMA
|
#if OMPI_BTL_SM_HAVE_CMA
|
||||||
if (OPAL_LIKELY(mca_btl_sm_component.use_cma)) {
|
if (OPAL_LIKELY(mca_btl_sm_component.use_cma)) {
|
||||||
@ -1131,9 +1131,8 @@ int mca_btl_sm_get_sync(struct mca_btl_base_module_t* btl,
|
|||||||
|
|
||||||
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
|
|
||||||
|
|
||||||
/* No support async_get for CMA yet */
|
|
||||||
#if OMPI_BTL_SM_HAVE_KNEM
|
#if OMPI_BTL_SM_HAVE_KNEM
|
||||||
|
/* No support async_get for CMA yet */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiate an asynchronous get.
|
* Initiate an asynchronous get.
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#endif /* HAVE_SCHED_H */
|
#endif /* HAVE_SCHED_H */
|
||||||
#if OMPI_BTL_SM_HAVE_KNEM
|
#if OMPI_BTL_SM_HAVE_KNEM
|
||||||
#include "knem_io.h"
|
#include "knem_io.h"
|
||||||
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
|
|
||||||
#include "opal/util/bit_ops.h"
|
#include "opal/util/bit_ops.h"
|
||||||
#include "opal/class/opal_free_list.h"
|
#include "opal/class/opal_free_list.h"
|
||||||
@ -182,7 +182,7 @@ struct mca_btl_sm_component_t {
|
|||||||
#if OMPI_BTL_SM_HAVE_KNEM
|
#if OMPI_BTL_SM_HAVE_KNEM
|
||||||
/* Knem capabilities info */
|
/* Knem capabilities info */
|
||||||
struct knem_cmd_info knem_info;
|
struct knem_cmd_info knem_info;
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
|
|
||||||
/** MCA: should we be using knem or not? neg=try but continue if
|
/** MCA: should we be using knem or not? neg=try but continue if
|
||||||
not available, 0=don't try, 1=try and fail if not available */
|
not available, 0=don't try, 1=try and fail if not available */
|
||||||
@ -241,7 +241,7 @@ struct mca_btl_sm_t {
|
|||||||
|
|
||||||
/* Number of status items currently in use */
|
/* Number of status items currently in use */
|
||||||
int knem_status_num_used;
|
int knem_status_num_used;
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
};
|
};
|
||||||
typedef struct mca_btl_sm_t mca_btl_sm_t;
|
typedef struct mca_btl_sm_t mca_btl_sm_t;
|
||||||
OMPI_MODULE_DECLSPEC extern mca_btl_sm_t mca_btl_sm;
|
OMPI_MODULE_DECLSPEC extern mca_btl_sm_t mca_btl_sm;
|
||||||
@ -518,7 +518,7 @@ extern struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_dst(
|
|||||||
size_t reserve,
|
size_t reserve,
|
||||||
size_t* size,
|
size_t* size,
|
||||||
uint32_t flags);
|
uint32_t flags);
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
|
|
||||||
#if OMPI_BTL_SM_HAVE_KNEM
|
#if OMPI_BTL_SM_HAVE_KNEM
|
||||||
/*
|
/*
|
||||||
@ -529,7 +529,7 @@ extern int mca_btl_sm_get_async(
|
|||||||
struct mca_btl_base_endpoint_t* endpoint,
|
struct mca_btl_base_endpoint_t* endpoint,
|
||||||
struct mca_btl_base_descriptor_t* des );
|
struct mca_btl_base_descriptor_t* des );
|
||||||
|
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
|
|
||||||
extern void mca_btl_sm_dump(struct mca_btl_base_module_t* btl,
|
extern void mca_btl_sm_dump(struct mca_btl_base_module_t* btl,
|
||||||
struct mca_btl_base_endpoint_t* endpoint,
|
struct mca_btl_base_endpoint_t* endpoint,
|
||||||
|
@ -235,7 +235,7 @@ static int sm_register(void)
|
|||||||
mca_btl_sm_component.use_cma = 0;
|
mca_btl_sm_component.use_cma = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
mca_btl_sm.super.btl_seg_size = sizeof (mca_btl_sm_segment_t);
|
mca_btl_sm.super.btl_seg_size = sizeof (mca_btl_sm_segment_t);
|
||||||
mca_btl_sm.super.btl_bandwidth = 9000; /* Mbs */
|
mca_btl_sm.super.btl_bandwidth = 9000; /* Mbs */
|
||||||
mca_btl_sm.super.btl_latency = 1; /* Microsecs */
|
mca_btl_sm.super.btl_latency = 1; /* Microsecs */
|
||||||
@ -300,7 +300,7 @@ static int mca_btl_sm_component_close(void)
|
|||||||
close(mca_btl_sm.knem_fd);
|
close(mca_btl_sm.knem_fd);
|
||||||
mca_btl_sm.knem_fd = -1;
|
mca_btl_sm.knem_fd = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
|
|
||||||
OBJ_DESTRUCT(&mca_btl_sm_component.sm_lock);
|
OBJ_DESTRUCT(&mca_btl_sm_component.sm_lock);
|
||||||
/**
|
/**
|
||||||
@ -711,7 +711,7 @@ mca_btl_sm_component_init(int *num_btls,
|
|||||||
orte_node_rank_t my_node_rank = ORTE_NODE_RANK_INVALID;
|
orte_node_rank_t my_node_rank = ORTE_NODE_RANK_INVALID;
|
||||||
#if OMPI_BTL_SM_HAVE_KNEM
|
#if OMPI_BTL_SM_HAVE_KNEM
|
||||||
int rc;
|
int rc;
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
|
|
||||||
*num_btls = 0;
|
*num_btls = 0;
|
||||||
/* lookup/create shared memory pool only when used */
|
/* lookup/create shared memory pool only when used */
|
||||||
@ -933,7 +933,7 @@ mca_btl_sm_component_init(int *num_btls,
|
|||||||
was <0, in which case the fact that knem is not available is
|
was <0, in which case the fact that knem is not available is
|
||||||
not an error. */
|
not an error. */
|
||||||
return btls;
|
return btls;
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1171,6 +1171,6 @@ int mca_btl_sm_component_progress(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM */
|
||||||
return nevents;
|
return nevents;
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,9 @@ typedef struct mca_btl_sm_hdr_t mca_btl_sm_hdr_t;
|
|||||||
|
|
||||||
struct mca_btl_sm_segment_t {
|
struct mca_btl_sm_segment_t {
|
||||||
mca_btl_base_segment_t base;
|
mca_btl_base_segment_t base;
|
||||||
#if OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA
|
#if OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA
|
||||||
uint64_t key;
|
uint64_t key;
|
||||||
#endif
|
#endif /* OMPI_BTL_SM_HAVE_KNEM || OMPI_BTL_SM_HAVE_CMA */
|
||||||
};
|
};
|
||||||
typedef struct mca_btl_sm_segment_t mca_btl_sm_segment_t;
|
typedef struct mca_btl_sm_segment_t mca_btl_sm_segment_t;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user