fixed multiple problems w/ ompi_sys_info()
- moved to ompi_mpi_init after call to ompi_common_cmd_line_init - added call to ompi_common_cmd_line_init - fixed issues w/ string handling This commit was SVN r1368.
Этот коммит содержится в:
родитель
f05e7b4f0e
Коммит
6401dffd57
@ -5,7 +5,7 @@
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
SUBDIRS = config include src test
|
||||
SUBDIRS = config include src
|
||||
|
||||
EXTRA_DIST = README INSTALL VERSION Doxyfile
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "mpi.h"
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "util/sys_info.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
||||
#pragma weak MPI_Init = PMPI_Init
|
||||
@ -38,9 +37,6 @@ int MPI_Init(int *argc, char ***argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the local system information and populate the ompi_system_info structure */
|
||||
ompi_sys_info();
|
||||
|
||||
/* Call the back-end initialization function (we need to put as
|
||||
little in this function as possible so that if it's profiled, we
|
||||
don't lose anything) */
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
#include "include/constants.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "util/sys_info.h"
|
||||
#include "mpi.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "communicator/communicator.h"
|
||||
#include "group/group.h"
|
||||
#include "util/common_cmd_line.h"
|
||||
#include "errhandler/errhandler.h"
|
||||
#include "op/op.h"
|
||||
#include "mca/base/base.h"
|
||||
@ -50,6 +52,15 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
ompi_proc_t** procs;
|
||||
size_t nprocs;
|
||||
|
||||
|
||||
/* Save command line parameters */
|
||||
if (OMPI_SUCCESS != (ret = ompi_common_cmd_line_init(argc, argv))) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get the local system information and populate the ompi_system_info structure */
|
||||
ompi_sys_info();
|
||||
|
||||
/* Become a OMPI process */
|
||||
|
||||
if (OMPI_SUCCESS != (ret = ompi_init(argc, argv))) {
|
||||
|
@ -45,6 +45,7 @@ char *ompi_os_path(bool relative, ...)
|
||||
|
||||
if (0 == num_elements) { /* must be looking for a simple answer */
|
||||
path = (char *)malloc(2);
|
||||
path[0] = 0;
|
||||
if (relative) {
|
||||
strcpy(path, ".");
|
||||
}
|
||||
@ -65,6 +66,7 @@ char *ompi_os_path(bool relative, ...)
|
||||
if (NULL == path) {
|
||||
return(NULL);
|
||||
}
|
||||
path[0] = 0;
|
||||
|
||||
if (relative) {
|
||||
strcpy(path, ".");
|
||||
|
@ -58,7 +58,7 @@ static int ompi_check_dir(bool create, char *directory)
|
||||
char *ompi_find_session_dir(bool create, char *prefix)
|
||||
{
|
||||
char *tmpprefix=NULL, *tmp=NULL;
|
||||
char *sessions=NULL;
|
||||
char sessions[PATH_MAX];
|
||||
|
||||
sprintf(sessions, "openmpi-sessions-%s", ompi_system_info.user);
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user