Skip to content

ORTED: issue with libpath and Intel compilers. #729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions orte/mca/plm/rsh/plm_rsh.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2011 IBM Corporation. All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Bull SAS. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -63,6 +64,7 @@ struct orte_plm_rsh_component_t {
bool pass_environ_mca_params;
char *ssh_args;
char *pass_libpath;
bool propagate_libpath;
};
typedef struct orte_plm_rsh_component_t orte_plm_rsh_component_t;

Expand Down
9 changes: 9 additions & 0 deletions orte/mca/plm/rsh/plm_rsh_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 IBM Corporation. All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Bull SAS. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -218,6 +219,14 @@ static int rsh_component_register(void)
MCA_BASE_VAR_SCOPE_READONLY,
&mca_plm_rsh_component.pass_libpath);

mca_plm_rsh_component.propagate_libpath = false;
(void) mca_base_component_var_register (c, "propagate_libpath",
"Prepend the current LD_LIBRARY_PATH to the remote shell's LD_LIBRARY_PATH",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&mca_plm_rsh_component.propagate_libpath);

return ORTE_SUCCESS;
}

Expand Down
25 changes: 25 additions & 0 deletions orte/mca/plm/rsh/plm_rsh_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Copyright (c) 2014-2015 Intel Corporation. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Bull SAS. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -340,6 +341,7 @@ static int setup_launch(int *argcptr, char ***argvptr,
char *lib_base=NULL, *bin_base=NULL;
char *opal_prefix = getenv("OPAL_PREFIX");
char* full_orted_cmd = NULL;
char *ld_library_path, *oldstr;

/* Figure out the basenames for the libdir and bindir. This
requires some explanation:
Expand Down Expand Up @@ -455,6 +457,29 @@ static int setup_launch(int *argcptr, char ***argvptr,
}
free(param);

if (true == mca_plm_rsh_component.propagate_libpath) {
/* if the user requested we pass the current node's LD_LIBRARY_PATH to
* the ORTED's environment on the remote node, we append it. */
ld_library_path = getenv("LD_LIBRARY_PATH");

if (NULL != ld_library_path) {
/* the user actually has a LD_LIBRARY_PATH we need to pass */
oldstr = lib_base;
lib_base = NULL;

if (NULL == oldstr) {
/* if no previous lib_base were set, we just copy the current
* LD_LIBRARY_PATH into lib_base. */
lib_base = strdup(ld_library_path);
} else {
/* In this case we concatenate the old lib_base (which is in
* oldstr) to the current ld_library_path. */
asprintf(&lib_base, "%s:%s", ld_library_path, oldstr);
free(oldstr);
}
}
}

/* we now need to assemble the actual cmd that will be executed - this depends
* upon whether or not a prefix directory is being used
*/
Expand Down