Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

SGE: fix Eqw error when 'shell_start_mode' option is set to 'unix_behavior' #348

Merged
merged 1 commit into from May 2, 2016

Conversation

abretaud
Copy link

@abretaud abretaud commented May 2, 2016

Hi,
I run Faclon on a SGE cluster, and I have problems with jobs failing in Eqw state.
The problem comes from the fact that the cluster is configured with 'unix_behavior' for the 'shell_start_mode'. With this configuration, all scripts submitted to the cluster must have a shebang definition to run correctly.
Here's a little patch to always add a shebang to generated scripts. It is almost the same as for the slurm scheduler.

@pb-cdunn
Copy link

pb-cdunn commented May 2, 2016

Interesting. Why is -S /bin/bash not working for you?

$ man sge_conf
...
   shell_start_mode
       Note: Deprecated, may be removed in future release.
       This parameter defines the mechanisms which are used to actually invoke the job scripts on the execution hosts. The following values are recog‐
       nized:

       unix_behavior
              If  a user starts a job shell script under UNIX interactively by invoking it just with the script name the operating system's executable
              loader uses the information provided in a comment such as `#!/bin/csh' in the first line of the script to detect  which  command  inter‐
              preter  to  start  to  interpret the script. This mechanism is used by Sun Grid Engine when starting jobs if unix_behavior is defined as
              shell_start_mode.

       posix_compliant
              POSIX does not consider first script line comments such a `#!/bin/csh' as significant. The POSIX  standard  for  batch  queuing  systems
              (P1003.2d)  therefore  requires  a compliant queuing system to ignore such lines but to use user specified or configured default command
              interpreters instead. Thus, if shell_start_mode is set to posix_compliant Sun Grid Engine will either use the command interpreter  indi‐
              cated by the -S option of the qsub(1) command or the shell parameter of the queue to be used (see queue_conf(5) for details).
...
      Changes to shell_start_mode will take immediate effect.  The default for shell_start_mode is posix_compliant.
...
      This value is a global configuration parameter only. It cannot be overwritten by the execution host local configuration.

Oh! I see what you're saying. On your system, shell_start_mode=unix_behavior, so -S /bin/bash is ignored. Ugh! And your change works -- without setting the executable bit -- because SGE does not actually exec the script.

@pb-cdunn pb-cdunn merged commit 8b0040b into PacificBiosciences:master May 2, 2016
@abretaud
Copy link
Author

abretaud commented May 3, 2016

Thanks for merging!
The -S is just ignored when shell_start_mode is set to unix_behavior (at least in the sge version we are using)

pb-cdunn pushed a commit to PacificBiosciences/pypeFLOW that referenced this pull request May 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants