- 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;
|
||||
|
||||
|
||||
ORTE_DECLSPEC extern orte_pls_gridengine_component_t mca_pls_gridengine_component;
|
||||
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_gridengine_module;
|
||||
|
||||
ORTE_MODULE_DECLSPEC extern orte_pls_gridengine_component_t mca_pls_gridengine_component;
|
||||
extern orte_pls_base_module_t orte_pls_gridengine_module;
|
||||
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "opal/install_dirs.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "opal/util/if.h"
|
||||
#include "opal/util/os_path.h"
|
||||
#include "opal/util/path.h"
|
||||
#include "opal/event/event.h"
|
||||
#include "opal/util/show_help.h"
|
||||
@ -86,7 +87,9 @@
|
||||
#include "orte/mca/pls/gridengine/pls_gridengine.h"
|
||||
#include "orte/util/sys_info.h"
|
||||
|
||||
#if !defined(__WINDOWS__)
|
||||
extern char **environ;
|
||||
#endif /* !defined(__WINDOWS__) */
|
||||
|
||||
orte_pls_base_module_1_0_0_t orte_pls_gridengine_module = {
|
||||
orte_pls_gridengine_launch,
|
||||
@ -526,11 +529,10 @@ int orte_pls_gridengine_launch(orte_jobid_t jobid)
|
||||
}
|
||||
} else {
|
||||
if (NULL != prefix_dir) {
|
||||
asprintf(&argv[orted_index], "%s/%s/orted",
|
||||
prefix_dir, bin_base);
|
||||
if (mca_pls_gridengine_component.debug) {
|
||||
opal_output(0, "pls:gridengine: orted path=%s\n",
|
||||
argv[orted_index]);
|
||||
orted_path = opal_os_path( false, prefix_dir, bin_base, "orted", NULL );
|
||||
if (mca_pls_gridengine_component.debug) {
|
||||
opal_output(0, "pls:gridengine: orted path=%s\n",
|
||||
argv[orted_index]);
|
||||
}
|
||||
}
|
||||
/* 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;
|
||||
|
||||
/* Reset PATH */
|
||||
oldenv = getenv("PATH");
|
||||
newenv = opal_os_path( false, prefix_dir, bin_base, NULL );
|
||||
oldenv = getenv("PATH");
|
||||
if (NULL != oldenv) {
|
||||
asprintf(&newenv, "%s/%s:%s", prefix_dir,
|
||||
bin_base, oldenv);
|
||||
} else {
|
||||
asprintf(&newenv, "%s/%s", prefix_dir, bin_base);
|
||||
}
|
||||
char *temp;
|
||||
asprintf(&temp, "%s:%s", newenv, oldenv);
|
||||
free( newenv );
|
||||
newenv = temp;
|
||||
}
|
||||
opal_setenv("PATH", newenv, true, &environ);
|
||||
if (mca_pls_gridengine_component.debug) {
|
||||
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 */
|
||||
oldenv = getenv("LD_LIBRARY_PATH");
|
||||
if (NULL != oldenv) {
|
||||
asprintf(&newenv, "%s/%s:%s", prefix_dir,
|
||||
lib_base, oldenv);
|
||||
} else {
|
||||
asprintf(&newenv, "%s/%s", prefix_dir, lib_base);
|
||||
char* temp;
|
||||
asprintf(&temp, "%s:%s", newenv, oldenv);
|
||||
free(newenv);
|
||||
newenv = temp;
|
||||
}
|
||||
opal_setenv("LD_LIBRARY_PATH", newenv, true, &environ);
|
||||
if (mca_pls_gridengine_component.debug) {
|
||||
|
@ -803,7 +803,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
||||
oldenv = getenv("LD_LIBRARY_PATH");
|
||||
if (NULL != oldenv) {
|
||||
char* temp;
|
||||
asprintf(&temp, "%s:%s", newenv, oldenv, NULL);
|
||||
asprintf(&temp, "%s:%s", newenv, oldenv);
|
||||
free(newenv);
|
||||
newenv = temp;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user