2005-03-14 23:57:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file **/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
2005-03-23 20:50:12 +03:00
|
|
|
#include "include/orte_constants.h"
|
|
|
|
#include "mca/errmgr/errmgr.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2005-05-22 22:40:03 +04:00
|
|
|
#include "runtime/opal.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "runtime/runtime.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialze and setup a process in the ORTE.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Upon success.
|
|
|
|
* @retval ORTE_ERROR Upon failure.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* globals used by RTE */
|
2005-03-23 20:50:12 +03:00
|
|
|
int orte_debug_flag=(int)false;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2005-08-27 00:13:35 +04:00
|
|
|
int orte_init(bool infrastructure)
|
2005-03-14 23:57:21 +03:00
|
|
|
{
|
2005-03-23 20:50:12 +03:00
|
|
|
int rc;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2005-05-22 22:40:03 +04:00
|
|
|
if (ORTE_SUCCESS != (rc = opal_init())) {
|
2005-03-23 20:50:12 +03:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
2005-08-27 00:13:35 +04:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_system_init(infrastructure))) {
|
2005-03-23 20:50:12 +03:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
2005-09-03 01:07:21 +04:00
|
|
|
|
|
|
|
/* Since we are now finished with init, change the state to running */
|
|
|
|
orte_universe_info.state = ORTE_UNIVERSE_STATE_RUNNING;
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|