- Do the changes as in r11347 for gridengine to use opal_os_path().
- Remove extra NULL argument from rsh module. This commit was SVN r11377. The following SVN revision numbers were found above: r11347 --> open-mpi/ompi@f52c10d18e
Этот коммит содержится в:
родитель
d6b6f465b6
Коммит
9dda057f05
@ -131,10 +131,8 @@ struct orte_pls_gridengine_component_t {
|
|||||||
};
|
};
|
||||||
typedef struct orte_pls_gridengine_component_t orte_pls_gridengine_component_t;
|
typedef struct orte_pls_gridengine_component_t orte_pls_gridengine_component_t;
|
||||||
|
|
||||||
|
ORTE_MODULE_DECLSPEC extern orte_pls_gridengine_component_t mca_pls_gridengine_component;
|
||||||
ORTE_DECLSPEC extern orte_pls_gridengine_component_t mca_pls_gridengine_component;
|
extern orte_pls_base_module_t orte_pls_gridengine_module;
|
||||||
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_gridengine_module;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#include "opal/install_dirs.h"
|
#include "opal/install_dirs.h"
|
||||||
#include "opal/mca/base/mca_base_param.h"
|
#include "opal/mca/base/mca_base_param.h"
|
||||||
#include "opal/util/if.h"
|
#include "opal/util/if.h"
|
||||||
|
#include "opal/util/os_path.h"
|
||||||
#include "opal/util/path.h"
|
#include "opal/util/path.h"
|
||||||
#include "opal/event/event.h"
|
#include "opal/event/event.h"
|
||||||
#include "opal/util/show_help.h"
|
#include "opal/util/show_help.h"
|
||||||
@ -86,7 +87,9 @@
|
|||||||
#include "orte/mca/pls/gridengine/pls_gridengine.h"
|
#include "orte/mca/pls/gridengine/pls_gridengine.h"
|
||||||
#include "orte/util/sys_info.h"
|
#include "orte/util/sys_info.h"
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
#endif /* !defined(__WINDOWS__) */
|
||||||
|
|
||||||
orte_pls_base_module_1_0_0_t orte_pls_gridengine_module = {
|
orte_pls_base_module_1_0_0_t orte_pls_gridengine_module = {
|
||||||
orte_pls_gridengine_launch,
|
orte_pls_gridengine_launch,
|
||||||
@ -526,11 +529,10 @@ int orte_pls_gridengine_launch(orte_jobid_t jobid)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (NULL != prefix_dir) {
|
if (NULL != prefix_dir) {
|
||||||
asprintf(&argv[orted_index], "%s/%s/orted",
|
orted_path = opal_os_path( false, prefix_dir, bin_base, "orted", NULL );
|
||||||
prefix_dir, bin_base);
|
if (mca_pls_gridengine_component.debug) {
|
||||||
if (mca_pls_gridengine_component.debug) {
|
opal_output(0, "pls:gridengine: orted path=%s\n",
|
||||||
opal_output(0, "pls:gridengine: orted path=%s\n",
|
argv[orted_index]);
|
||||||
argv[orted_index]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* If we yet did not fill up the orted_path, do so now */
|
/* If we yet did not fill up the orted_path, do so now */
|
||||||
@ -550,13 +552,14 @@ int orte_pls_gridengine_launch(orte_jobid_t jobid)
|
|||||||
char *oldenv, *newenv;
|
char *oldenv, *newenv;
|
||||||
|
|
||||||
/* Reset PATH */
|
/* Reset PATH */
|
||||||
oldenv = getenv("PATH");
|
newenv = opal_os_path( false, prefix_dir, bin_base, NULL );
|
||||||
|
oldenv = getenv("PATH");
|
||||||
if (NULL != oldenv) {
|
if (NULL != oldenv) {
|
||||||
asprintf(&newenv, "%s/%s:%s", prefix_dir,
|
char *temp;
|
||||||
bin_base, oldenv);
|
asprintf(&temp, "%s:%s", newenv, oldenv);
|
||||||
} else {
|
free( newenv );
|
||||||
asprintf(&newenv, "%s/%s", prefix_dir, bin_base);
|
newenv = temp;
|
||||||
}
|
}
|
||||||
opal_setenv("PATH", newenv, true, &environ);
|
opal_setenv("PATH", newenv, true, &environ);
|
||||||
if (mca_pls_gridengine_component.debug) {
|
if (mca_pls_gridengine_component.debug) {
|
||||||
opal_output(0, "pls:gridengine: reset PATH: %s", newenv);
|
opal_output(0, "pls:gridengine: reset PATH: %s", newenv);
|
||||||
@ -566,10 +569,10 @@ int orte_pls_gridengine_launch(orte_jobid_t jobid)
|
|||||||
/* Reset LD_LIBRARY_PATH */
|
/* Reset LD_LIBRARY_PATH */
|
||||||
oldenv = getenv("LD_LIBRARY_PATH");
|
oldenv = getenv("LD_LIBRARY_PATH");
|
||||||
if (NULL != oldenv) {
|
if (NULL != oldenv) {
|
||||||
asprintf(&newenv, "%s/%s:%s", prefix_dir,
|
char* temp;
|
||||||
lib_base, oldenv);
|
asprintf(&temp, "%s:%s", newenv, oldenv);
|
||||||
} else {
|
free(newenv);
|
||||||
asprintf(&newenv, "%s/%s", prefix_dir, lib_base);
|
newenv = temp;
|
||||||
}
|
}
|
||||||
opal_setenv("LD_LIBRARY_PATH", newenv, true, &environ);
|
opal_setenv("LD_LIBRARY_PATH", newenv, true, &environ);
|
||||||
if (mca_pls_gridengine_component.debug) {
|
if (mca_pls_gridengine_component.debug) {
|
||||||
|
@ -803,7 +803,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
|||||||
oldenv = getenv("LD_LIBRARY_PATH");
|
oldenv = getenv("LD_LIBRARY_PATH");
|
||||||
if (NULL != oldenv) {
|
if (NULL != oldenv) {
|
||||||
char* temp;
|
char* temp;
|
||||||
asprintf(&temp, "%s:%s", newenv, oldenv, NULL);
|
asprintf(&temp, "%s:%s", newenv, oldenv);
|
||||||
free(newenv);
|
free(newenv);
|
||||||
newenv = temp;
|
newenv = temp;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user