Skip to content

Commit

Permalink
OFI/MLX: fixed warnings reported by GCC 7.1 and updated documentation.
Browse files Browse the repository at this point in the history
fixed HPCX <=v1.9.7 support (#7)

Signed-off-by: Sannikov, Alexander <[email protected]>
Signed-off-by: Dmitry Gladkov <[email protected]>
  • Loading branch information
alexander-sannikov authored and dmitrygx committed Aug 27, 2017
1 parent 587674c commit ee512f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ See the `fi_netdir(7)` man page for more details.

The MLX provider enables applications using OFI to be run over UCX
communication library. It uses libucp for connections control and data transfer operations.
Supported UCP API version: 1.0
Supported UCP API version: 1.2

See the `fi_mlx(7)` man page for more details.

#### Dependencies

- The MLX provider requires UCP API 1.0 capable libucp and libucs (tested with hpcx v1.8.0).
- The MLX provider requires UCP API 1.2 capable libucp and libucs (tested with hpcx v1.8.0, v1.9.7).
If you are compiling Libfabric from source and want to enable MLX
support, you will also need the matching header files for UCX.
If the libraries and header files are not in default paths, specify them using:
Expand Down
11 changes: 8 additions & 3 deletions prov/mlx/src/mlx_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@
#include "mlx.h"


int mlx_errcode_translation_table[(-UCS_ERR_LAST)+2];
int mlx_errcode_translation_table[(-UCS_ERR_LAST)+2] = { -FI_EOTHER };

struct mlx_global_descriptor mlx_descriptor = {
.config = NULL,
};

static int mlx_init_errcodes()
{
memset(mlx_errcode_translation_table, -FI_EOTHER, (-UCS_ERR_LAST)+2);
MLX_TRANSLATE_ERRCODE (UCS_OK) = -FI_SUCCESS;
MLX_TRANSLATE_ERRCODE (UCS_INPROGRESS) = -FI_EINPROGRESS;
MLX_TRANSLATE_ERRCODE (UCS_ERR_NO_MESSAGE) = -FI_ENOMSG;
Expand Down Expand Up @@ -119,7 +118,13 @@ struct fi_fabric_attr mlx_fabric_attrs = {
struct fi_ep_attr mlx_ep_attrs = {
.type = FI_EP_RDM,
.protocol = FI_PROTO_MLX,
.protocol_version = UCP_API_RELEASE,
#if defined(UCP_API_RELEASE) && (UCP_API_RELEASE <= 2947)
#warning "HPCX 1.9.7 have an issue with UCP_API_VERSION macro"
.protocol_version = (((UCP_API_MAJOR) << UCP_VERSION_MAJOR_SHIFT)|
((UCP_API_MINOR) << UCP_VERSION_MINOR_SHIFT)),
#else
.protocol_version = (UCP_API_VERSION),
#endif
.max_msg_size = 0xFFFFFFFF,
.mem_tag_format = 0x0,
.tx_ctx_cnt = 1,
Expand Down

0 comments on commit ee512f3

Please sign in to comment.