2011-04-26 17:31:07 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2011-09-19 20:10:37 +04:00
|
|
|
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
2011-04-26 17:31:07 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "opal_config.h"
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "opal/constants.h"
|
|
|
|
#include "opal/util/show_help.h"
|
2011-09-19 20:10:37 +04:00
|
|
|
#include "opal/mca/hwloc/hwloc.h"
|
|
|
|
#include "opal/mca/hwloc/base/base.h"
|
2011-04-26 17:31:07 +04:00
|
|
|
|
|
|
|
|
2011-09-19 20:10:37 +04:00
|
|
|
int opal_hwloc_base_report_bind_failure(const char *file,
|
2011-04-26 17:31:07 +04:00
|
|
|
int line,
|
|
|
|
const char *msg, int rc)
|
|
|
|
{
|
|
|
|
static int already_reported = 0;
|
|
|
|
|
|
|
|
if (!already_reported) {
|
|
|
|
char hostname[64];
|
|
|
|
gethostname(hostname, sizeof(hostname));
|
|
|
|
|
2011-09-19 20:10:37 +04:00
|
|
|
opal_show_help("help-opal-hwloc-base.txt", "mbind failure", true,
|
2011-04-26 17:31:07 +04:00
|
|
|
hostname, getpid(), file, line, msg,
|
2011-10-12 20:07:09 +04:00
|
|
|
(OPAL_HWLOC_BASE_MBFA_WARN == opal_hwloc_base_mbfa) ?
|
2011-04-26 17:31:07 +04:00
|
|
|
"Warning -- your job will continue, but possibly with degraded performance" :
|
|
|
|
"ERROR -- your job may abort or behave erraticly");
|
|
|
|
already_reported = 1;
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
return OPAL_SUCCESS;
|
|
|
|
}
|