* add start of the mpirun (C version) code
* Add error message to oob_base_init to make it clear when we have a startup failure * correctly initialize pcm output stream variable This commit was SVN r1955.
Этот коммит содержится в:
родитель
c5981080f2
Коммит
bf3c788bb5
@ -52,6 +52,7 @@ int mca_oob_base_init(bool *user_threads, bool *hidden_threads)
|
|||||||
OBJ_CONSTRUCT(&mca_oob_name_self, ompi_process_name_t);
|
OBJ_CONSTRUCT(&mca_oob_name_self, ompi_process_name_t);
|
||||||
self = mca_pcm.pcm_self();
|
self = mca_pcm.pcm_self();
|
||||||
if(NULL == self) {
|
if(NULL == self) {
|
||||||
|
ompi_output(0, "mca_oob_base_init: could not get PCM self pointer");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
mca_oob_name_self = *self;
|
mca_oob_name_self = *self;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
/*
|
/*
|
||||||
* Global variables
|
* Global variables
|
||||||
*/
|
*/
|
||||||
int mca_pcm_base_output = -1;
|
int mca_pcm_base_output = 0;
|
||||||
mca_pcm_base_module_t mca_pcm;
|
mca_pcm_base_module_t mca_pcm;
|
||||||
ompi_list_t mca_pcm_base_components_available;
|
ompi_list_t mca_pcm_base_components_available;
|
||||||
mca_pcm_base_component_t mca_pcm_base_selected_component;
|
mca_pcm_base_component_t mca_pcm_base_selected_component;
|
||||||
|
@ -5,7 +5,23 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
|
libs = $(top_builddir)/src/libmpi.la
|
||||||
|
|
||||||
bin_SCRIPTS = mpirun mpiboot
|
bin_SCRIPTS = mpirun mpiboot
|
||||||
|
|
||||||
EXTRA_DIST = $(bin_SCRIPTS)
|
EXTRA_DIST = $(bin_SCRIPTS)
|
||||||
|
|
||||||
|
bin_PROGRAMS = mpirun2
|
||||||
|
|
||||||
|
mpirun2_SOURCES = \
|
||||||
|
mpirun2.cc
|
||||||
|
mpirun2_LDADD = \
|
||||||
|
$(libs) \
|
||||||
|
$(LIBMPI_EXTRA_LIBS) \
|
||||||
|
$(LIBOMPI_EXTRA_LIBS)
|
||||||
|
mpirun2_LDFLAGS = \
|
||||||
|
$(LIBMPI_EXTRA_LDFLAGS) \
|
||||||
|
$(LIBOMPI_EXTRA_LDFLAGS)
|
||||||
|
mpirun2_DEPENDENCIES = \
|
||||||
|
$(libs)
|
||||||
|
|
||||||
|
75
src/tools/mpirun/mpirun2.cc
Обычный файл
75
src/tools/mpirun/mpirun2.cc
Обычный файл
@ -0,0 +1,75 @@
|
|||||||
|
/* -*- C++ -*-
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ompi_config.h"
|
||||||
|
|
||||||
|
#include "runtime/runtime.h"
|
||||||
|
#include "mca/base/base.h"
|
||||||
|
#include "util/cmd_line.h"
|
||||||
|
#include "include/constants.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
bool multi_thread = false;
|
||||||
|
bool hidden_thread = false;
|
||||||
|
int ret;
|
||||||
|
ompi_cmd_line_t *cmd_line = NULL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Intialize our environment
|
||||||
|
*/
|
||||||
|
cmd_line = ompi_cmd_line_create();
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS != ompi_init(argc, argv)) {
|
||||||
|
/* BWB show_help */
|
||||||
|
printf("show_help: ompi_init failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS != (ret = mca_base_cmd_line_setup(cmd_line))) {
|
||||||
|
/* BWB show_help */
|
||||||
|
printf("show_help: mca_base_cmd_line_setup failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS != ompi_cmd_line_parse(cmd_line, false, argc, argv) ||
|
||||||
|
ompi_cmd_line_is_taken(cmd_line, "help") ||
|
||||||
|
ompi_cmd_line_is_taken(cmd_line, "h")) {
|
||||||
|
printf("...showing ompi_info help message...\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS != mca_base_cmd_line_process_args(cmd_line)) {
|
||||||
|
/* BWB show_help */
|
||||||
|
printf("show_help: mca_base_cmd_line_process_args\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS != (ret = mca_base_open())) {
|
||||||
|
/* JMS show_help */
|
||||||
|
printf("show_help: mca_base_open failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS != ompi_rte_init(&multi_thread, &hidden_thread)) {
|
||||||
|
/* BWB show_help */
|
||||||
|
printf("show_help: ompi_rte_init failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clean up
|
||||||
|
*/
|
||||||
|
ompi_rte_finalize();
|
||||||
|
mca_base_close();
|
||||||
|
ompi_finalize();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Загрузка…
x
Ссылка в новой задаче
Block a user