2005-03-14 20:57:21 +00:00
|
|
|
/*
|
2007-03-16 23:11:45 +00:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 19:57:48 +00:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-03-14 20:57:21 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2007-01-29 22:01:28 +00:00
|
|
|
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
2005-03-14 20:57:21 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file **/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/orte_constants.h"
|
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
2007-01-29 22:01:28 +00:00
|
|
|
#include "orte/runtime/params.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/runtime/opal.h"
|
|
|
|
#include "orte/runtime/runtime.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialze and setup a process in the ORTE.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Upon success.
|
|
|
|
* @retval ORTE_ERROR Upon failure.
|
|
|
|
*/
|
|
|
|
|
2005-08-26 20:13:35 +00:00
|
|
|
int orte_init(bool infrastructure)
|
2005-03-14 20:57:21 +00:00
|
|
|
{
|
2005-03-23 17:50:12 +00:00
|
|
|
int rc;
|
2007-03-16 23:11:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* ORTE takes the responsibility of starting the progress and event
|
|
|
|
* (and other) engines.
|
|
|
|
*/
|
|
|
|
opal_init_only = false;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2007-01-29 22:01:28 +00:00
|
|
|
if (orte_initialized) {
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2005-05-22 18:40:03 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = opal_init())) {
|
2005-03-23 17:50:12 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
2005-03-14 20:57:21 +00:00
|
|
|
}
|
|
|
|
|
2005-08-26 20:13:35 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_system_init(infrastructure))) {
|
2005-03-23 17:50:12 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
2005-03-14 20:57:21 +00:00
|
|
|
}
|
2005-09-02 21:07:21 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|