[torqueusers] login shells not run in torque 4 and bash -l

Charles Henry chenry at ittc.ku.edu
Wed Oct 10 13:30:27 MDT 2012

Hi list,

I have been following the torque 4 development, and I'm currently using torque 4.1.2 on RHEL6.2.  I have found that I cannot get cluster jobs to run correctly without using "#!/bin/bash -l" in each script.  A few sites (academic and government) are listing this workaround in their cluster FAQs.

Our site uses mpi-selector and needs to source /etc/profile for every cluster job (interactive or not).  I have looked for settings and even gone so far as reading the source code.  

The relevant settings are defined globally inside src/resmom/mom_main.c
... (line 205)
int      src_login_batch = TRUE;
int      src_login_interactive = TRUE;

and in src/resmom/start_exec.c
... (line 3736)
void source_login_shells_or_not(
  if (((TJE->is_interactive == TRUE) && (src_login_interactive == FALSE)) ||
      ((TJE->is_interactive != TRUE) && (src_login_batch == FALSE)))

Where those values are declared as "extern int", so the values from mom_main.c are accessible once the binaries are linked.

There's no error message from the source_login_shells_or_not function, and the code looks very similar to the torque-3 code (except for being wrapped up into functions).  Can anyone shed some light on the problem?


More information about the torqueusers mailing list