
If PMIX_PACKAGE_RANK is available, uses this value to select between multiple NIC of equal distance between the current process. If this value is not available, try to calculate it by getting the locality string from each local process and assign a package_rank. If everything fails, fall back to using process_id.rank to select the NIC. This last case is not ideal, but has a small chance of occuring, and causes an output to be displayed to notify that this is occuring. Some of the information in master branch is not available for the multi-NIC patch, such as myprocinfo.rank. This info is used to select between multiple NIC of equal distance to the process. This adapts the previous commit to work with the v4.1.x branch. Signed-off-by: Nikola Dancejic <dancejic@amazon.com> (cherry picked from commit 8017f1280137dee4d5fc7dac0a5c627e72e48058)
65 строки
2.1 KiB
C
65 строки
2.1 KiB
C
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
/*
|
|
* Copyright (c) 2015 Intel, Inc. All rights reserved.
|
|
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
|
* reserved.
|
|
* Copyright (c) 2020 Triad National Security, LLC. All rights
|
|
* reserved.
|
|
*
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef OPAL_MCA_COMMON_OFI_H
|
|
#define OPAL_MCA_COMMON_OFI_H
|
|
|
|
#include "opal_config.h"
|
|
#include "opal/mca/base/mca_base_var.h"
|
|
#include "opal/mca/base/mca_base_framework.h"
|
|
#include "opal/util/proc.h"
|
|
#include <rdma/fabric.h>
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
typedef struct opal_common_ofi_module {
|
|
char **prov_include;
|
|
char **prov_exclude;
|
|
int verbose;
|
|
int registered;
|
|
int output;
|
|
} opal_common_ofi_module_t;
|
|
|
|
extern opal_common_ofi_module_t opal_common_ofi;
|
|
|
|
OPAL_DECLSPEC int opal_common_ofi_register_mca_variables(const mca_base_component_t *component);
|
|
OPAL_DECLSPEC void opal_common_ofi_mca_register(void);
|
|
OPAL_DECLSPEC void opal_common_ofi_mca_deregister(void);
|
|
|
|
/*
|
|
* @param list (IN) List of strings corresponding to lower providers.
|
|
* @param item (IN) Single string corresponding to a provider.
|
|
*
|
|
* @return 0 The lower provider of the item string is not in
|
|
* list or an input was NULL
|
|
* @return 1 The lower provider of the item string matches
|
|
* a string in the item list.
|
|
*
|
|
* This function will take a provider name string and a list of lower
|
|
* provider name strings as inputs. It will return true if the lower
|
|
* provider in the item string matches a lower provider in the list.
|
|
*
|
|
*/
|
|
OPAL_DECLSPEC int opal_common_ofi_is_in_list(char **list, char *item);
|
|
|
|
END_C_DECLS
|
|
|
|
struct fi_info* opal_mca_common_ofi_select_provider(struct fi_info *provider_list,
|
|
int32_t num_local_peers,
|
|
uint16_t my_local_rank,
|
|
char *cpuset, uint32_t pid);
|
|
|
|
#endif /* OPAL_MCA_COMMON_OFI_H */
|