Workaround for a Torque Bug:
Workaround for a Torque Bug:

Torque cannot handle very long qsub commands.  Since Rocoto uses the -v
option to pass each environment variable individually, the length of the
qsub command can get quite long, especially when long path names are used
as values in the environment settings.  

This is a quick fix that checks to see if the resulting command will
exceed 2048 characters if -v is used.  If so, then -v is NOT used and 
-V is used instead.  This works, but has a downside in that ALL 
environment settings, possibly including ones the user does not want,
are passed to the job environment.

The disadvantage of -V above might be avoidable if we wipe out the user's
environment and repopulate it with only the settings the user wants.  But,
that is bound to be very complex due to the fact that important environment
settings required for using the batch system must be preserved.  Sorting
out what to keep and what to throw away seems intractable.

A future commit will clean this solution up a bit and also implement
it for for the "torque" scheduler.  This commit only fixes it for the
"moabtorque" scheduler, which is what is used on Jet and Zeus.


christopherwharrop/rocoto,christopherwharrop/rocoto