First cut of back-end LAM run-time functions
This commit was SVN r414.
Этот коммит содержится в:
родитель
c12154f792
Коммит
75c00ff451
28
src/mpi/runtime/Makefile.am
Обычный файл
28
src/mpi/runtime/Makefile.am
Обычный файл
@ -0,0 +1,28 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
noinst_LTLIBRARIES = libmpi_runtime.la
|
||||
|
||||
# Source code files
|
||||
|
||||
headers = \
|
||||
runtime.h
|
||||
|
||||
libmpi_runtime_la_SOURCES = \
|
||||
$(headers) \
|
||||
lam_mpi_init.c \
|
||||
lam_mpi_finalize.c \
|
||||
lam_mpi_globals.c
|
||||
|
||||
# Conditionally install the header files
|
||||
|
||||
if WANT_INSTALL_HEADERS
|
||||
lamdir = $(includedir)/lam/mpi/runtime
|
||||
lam_HEADERS = $(headers)
|
||||
else
|
||||
lamdir = $(includedir)
|
||||
endif
|
24
src/mpi/runtime/lam_mpi_finalize.c
Обычный файл
24
src/mpi/runtime/lam_mpi_finalize.c
Обычный файл
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_config.h"
|
||||
|
||||
#include "lam/constants.h"
|
||||
#include "lam/runtime/runtime.h"
|
||||
#include "mpi.h"
|
||||
#include "mpi/runtime/runtime.h"
|
||||
|
||||
int lam_mpi_finalize(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lam_mpi_finalized = 1;
|
||||
if (LAM_SUCCESS != (ret = lam_finalize())) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
12
src/mpi/runtime/lam_mpi_globals.c
Обычный файл
12
src/mpi/runtime/lam_mpi_globals.c
Обычный файл
@ -0,0 +1,12 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_config.h"
|
||||
|
||||
/*
|
||||
* Global variables and symbols for the MPI layer
|
||||
*/
|
||||
|
||||
int lam_mpi_initialized = 0;
|
||||
int lam_mpi_finalized = 0;
|
29
src/mpi/runtime/lam_mpi_init.c
Обычный файл
29
src/mpi/runtime/lam_mpi_init.c
Обычный файл
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_config.h"
|
||||
|
||||
#include "lam/constants.h"
|
||||
#include "lam/runtime/runtime.h"
|
||||
#include "mpi.h"
|
||||
#include "mpi/runtime/runtime.h"
|
||||
|
||||
|
||||
int lam_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (LAM_SUCCESS != (ret = lam_init(argc, argv))) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (LAM_SUCCESS != (ret = lam_rte_init())) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
lam_mpi_initialized = 1;
|
||||
return MPI_SUCCESS;
|
||||
}
|
28
src/mpi/runtime/runtime.h
Обычный файл
28
src/mpi/runtime/runtime.h
Обычный файл
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_MPI_INIT_H
|
||||
#define LAM_MPI_INIT_H
|
||||
|
||||
/*
|
||||
* Run-time functions for the MPI layer
|
||||
*/
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int lam_mpi_init(int argc, char **argv, int requested, int *provided);
|
||||
int lam_mpi_finalize(void);
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global variables and symbols for the MPI layer
|
||||
*/
|
||||
|
||||
extern int lam_mpi_initialized;
|
||||
extern int lam_mpi_finalized;
|
||||
|
||||
|
||||
#endif /* LAM_MPI_INIT_H */
|
Загрузка…
x
Ссылка в новой задаче
Block a user