Remove pointless check. The state_reason is set to WAIT_NO_REASON
so acct_policy_job_runnable will always return true.
Modify scontrol show job to require -dd option to print batch script.

I have implemented the changes as you suggested:   using a "-dd" option to indicate that the display of the script is wanted, and setting both the "SHOW_DETAIL" and a new "SHOW_DETAIL2" flag.

Since "scontrol" can be run interactively as well,  I added a new "script" option to indicate that display of both the script and the details is wanted if the job is a batch job.

Here are the man page updates for "man scontrol".   For the "-d, --details" option:

       -d, --details
              Causes  the  show command to provide additional details where available.  Repeating the option more than
              once (e.g., "-dd") will cause the show job command to also list the batch script, if the job was a batch
              job.

For the interactive "details" option:

       details
              Causes  the  show  command  to provide additional details where available.  Job information will include
              CPUs and NUMA memory allocated on each node.  Note that on computers  with  hyperthreading  enabled  and
              SLURM  configured  to allocate cores, each listed CPU represents one physical core.  Each hyperthread on
              that core can be allocated a separate task, so a job's CPU count and task count  may  differ.   See  the
              --cpu_bind  and  --mem_bind  option  descriptions  in  srun man pages for more information.  The details
              option is currently only supported for the show job command. To also list the  batch  script  for  batch
              jobs, in addition to the details, use the script option described below instead of this option.

And for the new interactive "script" option:

       script Causes the show job command to list the batch script for batch jobs in addition to the  detail  informa-
              tion described under the details option above.

Attached are the patch file for the changes and a text file with the results of the tests I did to check out the changes.   The patches are against SLURM 2.4.0-rc1.

        -Don Albert-
Change SchedulerParamters option from "bf_res=" to "bf_resolution="

This change makes the code consistent with the documentation.
Note that "bf_res=" will continue to be recognized for now.
Patch from Rod Schultz, Bull.
Correct default NodeAddr

According to man slurm.conf, the default for NodeAddr is NodeName:

  "By  default, the NodeAddr will be identical in value to NodeName."

However, it seems the default is NodeHostname (when that differs from
NodeName): With the following in slurmnodes.conf:

Nodename=c0-0 NodeHostname=compute-0-0 ...

I get

NodeName=c0-0 Arch=x86_64 CoresPerSocket=2
   CPUAlloc=0 CPUErr=0 CPUTot=4 Features=intel,rack0,hugemem
   Gres=(null)
***
   NodeAddr=compute-0-0 NodeHostName=compute-0-0
***
   OS=Linux RealMemory=3949 Sockets=2
   State=IDLE ThreadsPerCore=1 TmpDisk=10000 Weight=1027
   BootTime=2012-05-08T15:07:08 SlurmdStartTime=2012-05-25T10:30:10

(This is with 2.4.0-0.pre4.)

(We are planning to use cx-y instead of compute-x-y (the rocks default)
on our next cluster, to save some typing.)

--
Regards,
Bjørn-Helge Mevik, dr. scient,
Research Computing Services, University of Oslo
Fix bug that clears job pending reason field
Merge branch 'slurm-2.4'

Conflicts:
	NEWS