1313 * Copyright (c) 2007-2012 Los Alamos National Security, LLC. All rights
1414 * reserved.
1515 * Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
16- * Copyright (c) 2011-2017 IBM Corporation. All rights reserved.
16+ * Copyright (c) 2011-2019 IBM Corporation. All rights reserved.
1717 * Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
1818 * Copyright (c) 2015-2018 Research Organization for Information Science
1919 * and Technology (RIST). All rights reserved.
@@ -497,10 +497,13 @@ static int setup_launch(int *argcptr, char ***argvptr,
497497 * we have to insert the orted_prefix in the right place
498498 */
499499 opal_asprintf (& final_cmd ,
500- "%s%s%s PATH=%s%s$PATH ; export PATH ; "
500+ "%s%s%s%s%s%s PATH=%s%s$PATH ; export PATH ; "
501501 "LD_LIBRARY_PATH=%s%s$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH ; "
502502 "DYLD_LIBRARY_PATH=%s%s$DYLD_LIBRARY_PATH ; export DYLD_LIBRARY_PATH ; "
503503 "%s %s" ,
504+ (NULL != mca_plm_rsh_component .chdir ? "cd " : " " ),
505+ (NULL != mca_plm_rsh_component .chdir ? mca_plm_rsh_component .chdir : " " ),
506+ (NULL != mca_plm_rsh_component .chdir ? " ; " : " " ),
504507 (opal_prefix != NULL ? "OPAL_PREFIX=" : " " ),
505508 (opal_prefix != NULL ? opal_prefix : " " ),
506509 (opal_prefix != NULL ? " ; export OPAL_PREFIX;" : " " ),
@@ -527,7 +530,7 @@ static int setup_launch(int *argcptr, char ***argvptr,
527530 * we have to insert the orted_prefix in the right place
528531 */
529532 opal_asprintf (& final_cmd ,
530- "%s%s%s set path = ( %s $path ) ; "
533+ "%s%s%s%s%s%s set path = ( %s $path ) ; "
531534 "if ( $?LD_LIBRARY_PATH == 1 ) "
532535 "set OMPI_have_llp ; "
533536 "if ( $?LD_LIBRARY_PATH == 0 ) "
@@ -541,6 +544,9 @@ static int setup_launch(int *argcptr, char ***argvptr,
541544 "if ( $?OMPI_have_dllp == 1 ) "
542545 "setenv DYLD_LIBRARY_PATH %s%s$DYLD_LIBRARY_PATH ; "
543546 "%s %s" ,
547+ (NULL != mca_plm_rsh_component .chdir ? "cd " : " " ),
548+ (NULL != mca_plm_rsh_component .chdir ? mca_plm_rsh_component .chdir : " " ),
549+ (NULL != mca_plm_rsh_component .chdir ? " ; " : " " ),
544550 (opal_prefix != NULL ? "setenv OPAL_PREFIX " : " " ),
545551 (opal_prefix != NULL ? opal_prefix : " " ),
546552 (opal_prefix != NULL ? " ;" : " " ),
0 commit comments