2004-08-07 04:53:56 +04:00
|
|
|
/*
|
2004-11-22 04:38:40 +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.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-07 04:53:56 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Interface into the MPI portion of the Open MPI Run Time Environment
|
|
|
|
*/
|
|
|
|
|
2004-08-14 05:56:05 +04:00
|
|
|
#ifndef OMPI_MPI_MPIRUNTIME_H
|
|
|
|
#define OMPI_MPI_MPIRUNTIME_H
|
2004-08-07 04:53:56 +04:00
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-11-15 23:03:14 +03:00
|
|
|
/** forward type declaration */
|
2004-11-03 22:33:31 +03:00
|
|
|
struct ompi_communicator_t;
|
2004-11-15 23:03:14 +03:00
|
|
|
/** forward type declaration */
|
|
|
|
struct ompi_thread_t;
|
2004-11-03 22:33:31 +03:00
|
|
|
|
2004-11-15 23:03:14 +03:00
|
|
|
/* Global variables and symbols for the MPI layer */
|
2004-08-07 04:53:56 +04:00
|
|
|
|
2004-11-15 23:03:14 +03:00
|
|
|
/** Is mpi initialized? */
|
|
|
|
OMPI_DECLSPEC extern bool ompi_mpi_initialized;
|
|
|
|
/** Has mpi been finalized? */
|
|
|
|
OMPI_DECLSPEC extern bool ompi_mpi_finalized;
|
2004-08-07 04:53:56 +04:00
|
|
|
|
2004-11-15 23:03:14 +03:00
|
|
|
/** Do we have multiple threads? */
|
|
|
|
OMPI_DECLSPEC extern bool ompi_mpi_thread_multiple;
|
|
|
|
/** Thread level requested to \c MPI_Init_thread() */
|
|
|
|
OMPI_DECLSPEC extern int ompi_mpi_thread_requested;
|
|
|
|
/** Thread level provided by Open MPI */
|
|
|
|
OMPI_DECLSPEC extern int ompi_mpi_thread_provided;
|
|
|
|
/** Identifier of the main thread */
|
|
|
|
OMPI_DECLSPEC extern struct ompi_thread_t *ompi_mpi_main_thread;
|
2004-08-07 04:53:56 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the Open MPI MPI environment
|
|
|
|
*
|
2004-08-14 05:56:05 +04:00
|
|
|
* @param argc argc, typically from main() (IN)
|
|
|
|
* @param argv argv, typically from main() (IN)
|
|
|
|
* @param requested Thread support that is requested (IN)
|
|
|
|
* @param provided Thread support that is provided (OUT)
|
|
|
|
*
|
|
|
|
* @returns MPI_SUCCESS if successful
|
|
|
|
* @returns Error code if unsuccessful
|
|
|
|
*
|
2004-08-07 04:53:56 +04:00
|
|
|
* Intialize all support code needed for MPI applications. This
|
|
|
|
* function should only be called by MPI applications (including
|
2004-08-14 05:56:05 +04:00
|
|
|
* singletons). If this function is called, ompi_init() and
|
|
|
|
* ompi_rte_init() should *not* be called.
|
|
|
|
*
|
|
|
|
* It is permissable to pass in (0, NULL) for (argc, argv).
|
2004-08-07 04:53:56 +04:00
|
|
|
*/
|
|
|
|
int ompi_mpi_init(int argc, char **argv, int requested, int *provided);
|
|
|
|
|
2005-01-13 18:30:49 +03:00
|
|
|
/**
|
|
|
|
* Setup I/O forwarding during MPI_Init through the I/O forwarding
|
|
|
|
* framework.
|
|
|
|
*/
|
|
|
|
int ompi_mpi_init_io(void);
|
|
|
|
|
2004-08-07 04:53:56 +04:00
|
|
|
/**
|
|
|
|
* Finalize the Open MPI MPI environment
|
|
|
|
*
|
2004-08-14 05:56:05 +04:00
|
|
|
* @returns MPI_SUCCESS if successful
|
|
|
|
* @returns Error code if unsuccessful
|
|
|
|
*
|
2004-08-07 04:53:56 +04:00
|
|
|
* Should be called after all MPI functionality is complete (usually
|
2004-08-07 20:07:09 +04:00
|
|
|
* during MPI_FINALIZE).
|
2004-08-07 04:53:56 +04:00
|
|
|
*/
|
|
|
|
int ompi_mpi_finalize(void);
|
|
|
|
|
2004-11-01 19:05:31 +03:00
|
|
|
/**
|
|
|
|
* Abort the processes of comm
|
|
|
|
*/
|
|
|
|
int ompi_mpi_abort(struct ompi_communicator_t* comm,
|
|
|
|
int errcode, bool kill_remote_of_intercomm);
|
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-08-07 04:53:56 +04:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-08-14 05:56:05 +04:00
|
|
|
#endif /* OMPI_MPI_MPIRUNTIME_H */
|