Command Usage: sam v8_1_5
sam run project

Just having some fun...
Command Description:

Your "run project" script is a python script.  It should look very similar
to the sample project available at http://d0db.fnal.gov/sam/doc/userdocs/project_setup.py.

Within your project script, you _must_ define a file_ready(inputFileName)
routine, in which your main processing is performed.

You may also define the following routines:
   begin_project():  things that should be done before any files are delivered
   end_project():    things that should be done after all files have been delivered
   abort_project():  things that should be done if the project aborts abnormally

Within your script, you have access to the following routines:
   getProjectName():        returns the current project name (string)
   getConsumerId():         returns the current consumer ID from the sam db (int)
   getConsumerProcessId():  returns the current consumer process ID from the sam db (int)
   dumpProject():           does a "sam dump project" on the current project
   dumpConsumer():          does a "sam dump consumer" on the current consumer


Usage:
       sam run project [--options] [-flags] <arg1>

Where:


  --options:
	                     --defname # project definition name
	                 --interactive # do NOT submit the job; instead, run interactively
	             --keepBatchScript # do not remove temporary batch wrapper script after execution
	                    --snapshot # name of the already-existing snapshot to be used as the project file list
	               --useForcedStop # project will be stopped if job count reaches zero, regardless of whether all consumers are finished or not
	         --batchSystem=<value> # name of the batch system to use if not the station default
	    --batchSystemFlags=<value> # additional batch-specific flags to be passed to the batch system
	         --bundleFiles=<value> # comma separated list of files to send with the job to a remote batch system
	    --corbaCallTimeout=<value> # time in seconds for CORBA method calls to return before timing out (default: 0; zero implies no timeout)
	         --cpuPerEvent=<value> # estimated amount of CPU required per event
	              --envVar=<value> # user environmental variables to be set when the job executes
	                 --jdf=<value> # job description file
	        --jobErrorFile=<value> # job error file (use __default__ for the defaul error file)
	         --jobInfoFile=<value> # job information file
	       --jobOutputFile=<value> # job output file (use __default__ for the default output file)
	          --nconsumers=<value> # number of consumer processes to run in this job
	             --project=<value> # name of the project
	               --queue=<value> # batch queue to which the job should be submitted
	       --retryInterval=<value> # retry interval base in seconds; will multiply this base times retryCount (default: 5)
	         --retryJitter=<value> # retry jitter, random jitter added to base retry interval times retryCount (default: 5)
	       --retryMaxCount=<value> # number of times to retry CORBA calls for retriable exceptions (default: 25; zero implies no retries)
	              --script=<value> # script containing the processing commands you wish to execute
	        --scriptParams=<value> # parameters to be passed to the script
	      --submitInfoFile=<value> # file into which submission information is written
	             --workDir=<value> # working directory for process
	    --wrapperScriptDir=<value> # directory in which to write the batch wrapper script (default: $HOME)

   -flags:
	                            -c # automatically close all servants after each method call
	                            -d # debug mode
	                            -s # retrySilently mode (do not issue messages to stderr on proxy retries)
	                            -t # time-it mode (print additional info on timings)
	                            -v # verbose mode

  Args:
	                        <arg1> # name of the userInputFile containing the processing code

Synonymous Options:
	       --cpu-per-event=<value> # synonym for --cpuPerEvent=<value>
	       --framework-exe=<value> # synonym for --script=<value>
	    --framework-params=<value> # synonym for --scriptParams=<value>
	        --frameworkExe=<value> # synonym for --script=<value>
	     --frameworkParams=<value> # synonym for --scriptParams=<value>
	                --name=<value> # synonym for --project=<value>

Mutually Exclusive Options:
	--defname OR --snapshot 

Required Data Types:
	                   batchSystem : string 
	              batchSystemFlags : string 
	                   bundleFiles : string 
	              corbaCallTimeout : int 
	                   cpuPerEvent : TimeInterval 
	                        envVar : string 
	                           jdf : string 
	                  jobErrorFile : string 
	                   jobInfoFile : string 
	                 jobOutputFile : string 
	                    nconsumers : int 
	                       project : string 
	                         queue : string 
	                 retryInterval : int 
	                   retryJitter : int 
	                 retryMaxCount : int 
	                        script : string 
	                  scriptParams : string 
	                submitInfoFile : string 
	                       workDir : string 
	              wrapperScriptDir : string 

You may omit "-c" if the $SAM_PYAPI_AUTO_CLOSE_SERVANTS environmental variable is set.
You may omit "--corbaCallTimeout=<value>" if the $SAM_PYAPI_CORBA_CALL_TIMEOUT environmental variable is set.
You may omit "--project=<value>" if the $SAM_PROJECT environmental variable is set.
You may omit "--retryInterval=<value>" if the $SAM_PYAPI_RETRY_INTERVAL environmental variable is set.
You may omit "--retryJitter=<value>" if the $SAM_PYAPI_RETRY_JITTER environmental variable is set.
You may omit "--retryMaxCount=<value>" if the $SAM_PYAPI_RETRY_MAX_COUNT environmental variable is set.
You may omit "-s" if the $SAM_PYAPI_RETRY_SILENTLY environmental variable is set.

UNIX ExitStatus:
	             Success :   0
	Unhandled exceptions : 127


See Also: