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-2018 Intel, Inc. All rights reserved.
1818 * Copyright (c) 2015-2018 Research Organization for Information Science
1919 * and Technology (RIST). All rights reserved.
@@ -501,10 +501,13 @@ static int setup_launch(int *argcptr, char ***argvptr,
501501 * we have to insert the orted_prefix in the right place
502502 */
503503 (void )asprintf (& final_cmd ,
504- "%s%s%s PATH=%s%s$PATH ; export PATH ; "
504+ "%s%s%s%s%s%s PATH=%s%s$PATH ; export PATH ; "
505505 "LD_LIBRARY_PATH=%s%s$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH ; "
506506 "DYLD_LIBRARY_PATH=%s%s$DYLD_LIBRARY_PATH ; export DYLD_LIBRARY_PATH ; "
507507 "%s %s" ,
508+ (NULL != mca_plm_rsh_component .chdir ? "cd " : " " ),
509+ (NULL != mca_plm_rsh_component .chdir ? mca_plm_rsh_component .chdir : " " ),
510+ (NULL != mca_plm_rsh_component .chdir ? " ; " : " " ),
508511 (opal_prefix != NULL ? "OPAL_PREFIX=" : " " ),
509512 (opal_prefix != NULL ? opal_prefix : " " ),
510513 (opal_prefix != NULL ? " ; export OPAL_PREFIX;" : " " ),
@@ -531,7 +534,7 @@ static int setup_launch(int *argcptr, char ***argvptr,
531534 * we have to insert the orted_prefix in the right place
532535 */
533536 (void )asprintf (& final_cmd ,
534- "%s%s%s set path = ( %s $path ) ; "
537+ "%s%s%s%s%s%s set path = ( %s $path ) ; "
535538 "if ( $?LD_LIBRARY_PATH == 1 ) "
536539 "set OMPI_have_llp ; "
537540 "if ( $?LD_LIBRARY_PATH == 0 ) "
@@ -545,6 +548,9 @@ static int setup_launch(int *argcptr, char ***argvptr,
545548 "if ( $?OMPI_have_dllp == 1 ) "
546549 "setenv DYLD_LIBRARY_PATH %s%s$DYLD_LIBRARY_PATH ; "
547550 "%s %s" ,
551+ (NULL != mca_plm_rsh_component .chdir ? "cd " : " " ),
552+ (NULL != mca_plm_rsh_component .chdir ? mca_plm_rsh_component .chdir : " " ),
553+ (NULL != mca_plm_rsh_component .chdir ? " ; " : " " ),
548554 (opal_prefix != NULL ? "setenv OPAL_PREFIX " : " " ),
549555 (opal_prefix != NULL ? opal_prefix : " " ),
550556 (opal_prefix != NULL ? " ;" : " " ),
0 commit comments