Using openmpi-1.0.1. attemping to launch programs via 'mpirun --mca
pls_rsh_agent ssh' fails if the user login shell is tcsh, and
LD_LIBRARY_PATH is unset at startup.

    if ($?FOO) setenv BAR $FOO

is an error in tcsh if $FOO is unset, because it expands the whole
line at once. Instead one has to use:

    if ($?FOO) then
      setenv BAR $FOO
    endif


Hence the following patch to orte/mca/pls/rsh/pls_rsh_module.c seems
to fix things:


*** pls_rsh_module.c    2005-11-11 11:22:33.000000000 -0800
--- /home/gmorris/pls_rsh_module.c      2006-01-17 14:15:44.000000000 -0800
***************
*** 806,815 ****
                          if (remote_csh) {
                              asprintf (&argv[local_exec_index],
                                      "set path = ( %s/bin $path ) ; "
!                                     "if ( \"$?LD_LIBRARY_PATH\" == 1 ) "
!                                     "setenv LD_LIBRARY_PATH 
%s/lib:$LD_LIBRARY_PATH ; "
!                                     "if ( \"$?LD_LIBRARY_PATH\" == 0 ) "
!                                     "setenv LD_LIBRARY_PATH %s/lib ; "
                                      "%s/bin/%s",
                                      prefix_dir,
                                      prefix_dir,
--- 806,816 ----
                          if (remote_csh) {
                              asprintf (&argv[local_exec_index],
                                      "set path = ( %s/bin $path ) ; "
!                                     "if ( \"$?LD_LIBRARY_PATH\" == 1 ) then\n"
!                                     "setenv LD_LIBRARY_PATH 
%s/lib:$LD_LIBRARY_PATH\n"
!                                     "else\n"
!                                     "setenv LD_LIBRARY_PATH %s/lib\n"
!                                     "endif ; "
                                      "%s/bin/%s",
                                      prefix_dir,
                                      prefix_dir,



Reply via email to