2014-01-28 11:30:36 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2014-01-28 11:30:36 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2014-01-28 11:30:36 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OSHMEM_UTIL_H
|
|
|
|
#define OSHMEM_UTIL_H
|
|
|
|
|
2014-02-26 20:32:23 +04:00
|
|
|
#include "oshmem_config.h"
|
|
|
|
|
2015-11-09 18:46:30 +03:00
|
|
|
#include "opal/util/output.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/mca/base/mca_base_framework.h"
|
|
|
|
|
2014-07-17 21:53:15 +04:00
|
|
|
/*
|
|
|
|
* Environment variables
|
|
|
|
*/
|
|
|
|
#define OSHMEM_ENV_SYMMETRIC_SIZE "SMA_SYMMETRIC_SIZE"
|
|
|
|
#define OSHMEM_ENV_DEBUG "SMA_DEBUG"
|
|
|
|
#define OSHMEM_ENV_INFO "SMA_INFO"
|
|
|
|
#define OSHMEM_ENV_VERSION "SMA_VERSION"
|
|
|
|
|
|
|
|
|
2014-03-05 12:49:14 +04:00
|
|
|
void oshmem_output_verbose(int level, int output_id, const char* prefix,
|
|
|
|
const char* file, int line, const char* function, const char* format, ...);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Temporary wrapper which ingores output verbosity level
|
|
|
|
* to ensure error messages are seeing by user
|
|
|
|
*/
|
2015-06-24 06:59:57 +03:00
|
|
|
void oshmem_output(int output_id, const char* prefix, const char* file,
|
2014-03-05 12:49:14 +04:00
|
|
|
int line, const char* function, const char* format, ...);
|
2014-01-28 11:30:36 +04:00
|
|
|
|
2015-11-09 18:46:30 +03:00
|
|
|
|
|
|
|
/* Force opening output for framework
|
|
|
|
* We would like to display error messages in any case (debug/release mode,
|
|
|
|
* set/unset verbose level)
|
|
|
|
* Setting verbose level is not a way because it enables non error messages
|
|
|
|
*/
|
|
|
|
static inline void oshmem_framework_open_output(struct mca_base_framework_t *framework)
|
|
|
|
{
|
|
|
|
if (-1 == framework->framework_output) {
|
|
|
|
framework->framework_output = opal_output_open(NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-01-28 11:30:36 +04:00
|
|
|
#endif /* OSHMEM_UTIL_H */
|