2013-09-10 19:34:09 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
|
|
|
* All rights reserved.
|
2015-08-05 15:27:54 +03:00
|
|
|
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
2013-09-10 19:34:09 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2013-09-10 19:34:09 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2013-09-10 19:34:09 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_SPML_BASE_H
|
|
|
|
#define MCA_SPML_BASE_H
|
|
|
|
|
|
|
|
#include "oshmem_config.h"
|
|
|
|
|
2015-03-06 06:50:44 +03:00
|
|
|
#include "oshmem/mca/mca.h"
|
2013-09-10 19:34:09 +04:00
|
|
|
#include "opal/mca/base/mca_base_framework.h"
|
|
|
|
#include "opal/class/opal_list.h"
|
|
|
|
#include "opal/class/opal_pointer_array.h"
|
|
|
|
|
|
|
|
#include "oshmem/mca/spml/spml.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for the PML
|
|
|
|
*/
|
|
|
|
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is the base priority for a SPML wrapper component
|
2015-06-24 06:59:57 +03:00
|
|
|
* If there exists more than one then it is undefined
|
2013-09-10 19:34:09 +04:00
|
|
|
* which one is picked.
|
|
|
|
*/
|
|
|
|
#define SPML_SELECT_WRAPPER_PRIORITY -128
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Globals
|
|
|
|
*/
|
|
|
|
OSHMEM_DECLSPEC extern mca_spml_base_component_t mca_spml_base_selected_component;
|
|
|
|
OSHMEM_DECLSPEC extern opal_pointer_array_t mca_spml_base_spml;
|
|
|
|
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_finalize(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Select an available component.
|
|
|
|
*/
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_select(bool enable_progress_threads,
|
|
|
|
bool enable_threads);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Share in modex the name of the selected component
|
|
|
|
*/
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_spml_selected(const char *name);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Verify that all new procs are using the currently selected component
|
|
|
|
*/
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_spml_check_selected(const char *my_spml,
|
|
|
|
oshmem_proc_t **procs,
|
|
|
|
size_t nprocs);
|
|
|
|
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_wait(void* addr,
|
|
|
|
int cmp,
|
|
|
|
void* value,
|
|
|
|
int datatype);
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_wait_nb(void* handle);
|
|
|
|
OSHMEM_DECLSPEC int mca_spml_base_oob_get_mkeys(int pe,
|
|
|
|
uint32_t seg,
|
2014-02-26 20:32:23 +04:00
|
|
|
sshmem_mkey_t *mkeys);
|
2013-09-10 19:34:09 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* MCA framework
|
|
|
|
*/
|
|
|
|
OSHMEM_DECLSPEC extern mca_base_framework_t oshmem_spml_base_framework;
|
|
|
|
|
|
|
|
/* ******************************************************************** */
|
|
|
|
#ifdef __BASE_FILE__
|
|
|
|
#define __SPML_FILE__ __BASE_FILE__
|
|
|
|
#else
|
|
|
|
#define __SPML_FILE__ __FILE__
|
|
|
|
#endif
|
|
|
|
|
2013-12-16 13:13:27 +04:00
|
|
|
#ifdef OPAL_ENABLE_DEBUG
|
|
|
|
#define SPML_VERBOSE(level, ...) \
|
|
|
|
oshmem_output_verbose(level, oshmem_spml_base_framework.framework_output, \
|
2015-08-05 15:27:54 +03:00
|
|
|
"%s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__)
|
2013-12-16 13:13:27 +04:00
|
|
|
#else
|
|
|
|
#define SPML_VERBOSE(level, ...)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define SPML_ERROR(...) \
|
2014-03-05 12:49:14 +04:00
|
|
|
oshmem_output(oshmem_spml_base_framework.framework_output, \
|
2015-08-05 15:27:54 +03:00
|
|
|
"Error %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__)
|
2013-09-10 19:34:09 +04:00
|
|
|
|
2014-02-18 23:44:37 +04:00
|
|
|
#define SPML_WARNING(...) \
|
|
|
|
oshmem_output_verbose(0, oshmem_spml_base_framework.framework_output, \
|
2015-08-05 15:27:54 +03:00
|
|
|
"Warning %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__)
|
2014-02-18 23:44:37 +04:00
|
|
|
|
2013-09-10 19:34:09 +04:00
|
|
|
END_C_DECLS
|
|
|
|
|
|
|
|
#endif /* MCA_SPML_BASE_H */
|