2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03: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 23:57:21 +03:00
|
|
|
* 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.
|
2007-01-30 01:01:28 +03:00
|
|
|
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file **/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/orte_constants.h"
|
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
2007-01-30 01:01:28 +03:00
|
|
|
#include "orte/runtime/params.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/runtime/opal.h"
|
|
|
|
#include "orte/runtime/runtime.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialze and setup a process in the ORTE.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Upon success.
|
|
|
|
* @retval ORTE_ERROR Upon failure.
|
|
|
|
*/
|
|
|
|
|
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;
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* ORTE takes the responsibility of starting the progress and event
|
|
|
|
* (and other) engines.
|
|
|
|
*/
|
|
|
|
opal_init_only = false;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-01-30 01:01:28 +03:00
|
|
|
if (orte_initialized) {
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|