Difference between revisions of "SWIF Analysis Jobs"

From GlueXWiki
Jump to: navigation, search
(GlueX Analysis Jobs)
 
(21 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
This page outlines how you can use my scripts to submit analysis jobs for SWIF.  It assumes that you already have a working knowledge of the JLab farm system.  If not, more information can be found at:
+
This page outlines how you can use some simple, generic scripts to submit SWIF analysis jobs on REST data at JLab.  It assumes that you already have a working knowledge of the JLab farm system.  If not, you can probably wing it, but more information can be found at:
  
 
* [https://scicomp.jlab.org/docs/?q=FarmUsersGuide Farm Users Guide]
 
* [https://scicomp.jlab.org/docs/?q=FarmUsersGuide Farm Users Guide]
  
== SciComp Job Links ==
+
== Submitting GlueX Analysis Jobs ==
=== Main ===
+
* [https://scicomp.jlab.org/scicomp/ Scientific Computing Home Page]
+
* [https://scicomp.jlab.org/scicomp/#/auger/jobs Auger Job Status Page]
+
* [https://scicomp.jlab.org/scicomp/#/jasmine/jobs JasMine Tape Job Status Page]
+
 
+
=== Documentation ===
+
* [https://scicomp.jlab.org/docs/batch Batch System]
+
* [https://scicomp.jlab.org/docs/storage Mass Storage System]
+
* [https://scicomp.jlab.org/docs/write-through-cache Write-Through Cache]
+
* [https://scicomp.jlab.org/docs/swif SWIF]
+
* [https://scicomp.jlab.org/docs/swif-cli SWIF Command Line]
+
 
+
=== Job Tracking ===
+
* [http://scicomp.jlab.org/farm2/job.html Completed Job History]
+
* [http://scicomp.jlab.org/farm2/project.html Job Stats By Project]
+
* [http://scicomp.jlab.org/farm2/trackOrg.html Job Stats By Track]
+
* [http://scicomp.jlab.org/farm2/report.html Cluster Report]
+
* [http://scicomp.jlab.org/farm2/walltime.html Walltime Distribution]
+
 
+
== GlueX Analysis Jobs ==
+
 
+
The scripts at:
+
 
+
* [https://halldsvn.jlab.org/repos/trunk/home/pmatt/jobs/analysis/ SWIF Analysis Jobs Scripts]
+
 
+
can be used to easily submit analysis jobs to the cluster using SWIF.  Just follow these steps:
+
  
 
1) Check out the scripts:
 
1) Check out the scripts:
Line 36: Line 10:
 
  svn co https://halldsvn.jlab.org/repos/trunk/home/pmatt/jobs/analysis/
 
  svn co https://halldsvn.jlab.org/repos/trunk/home/pmatt/jobs/analysis/
  
2) Then, in that folder, edit the <span style="color:red">"GLOBAL VARIABLES"</span> section of the swif_gluex_analysis.py file.  It's largely self-explanatory, but just in case:
+
2) Then, in that folder, edit the <span style="color:red">"GLOBAL VARIABLES"</span> section of the <span style="color:red">"swif_gluex_analysis.py"</span> file.  It's largely self-explanatory, but just in case, see the section below on [[SWIF_Analysis_Jobs#Script_Global_Variables | Script Global Variables]].
  
* Change the resource requirements for your jobs.
+
3) You do '''NOT''' need to edit any other portion of the python script file.  
* Change the source data information. This tells the script where to look for the input REST files for your jobs.
+
* Change the output data location: This tells the script where to save your output files.
+
* Job execution:
+
** Change the script file path: This should the path to which you just checked out the script.sh file. 
+
** Change the environment file: This is the file that the job script sources to setup your environment prior to running hd_root. 
+
** Change the config file path: This is where the script will auto-generate the JANA config file used when running hd_root.  It contains the command-line arguments used when running hd_root.  It can be anywhere you like. 
+
** Change the tree names: This should be a comma-separated list of names of the root tree files that are generated by your analysis that you want to save.  For example, if the output tree file will have the name <span style="color:red">"tree_klambda.root"</span>, you should have <span style="color:red">"klambda"</span> in the list to save it. 
+
* Change the config file contents: These are the command line arguments used when running hd_root.  You should especially change the plugins.  
+
  
3) You do NOT need to edit the script.sh file, unless you are creating skim files.  Otherwise, it will automatically save all results (danarest REST files, ROOT histograms, ROOT trees).   
+
4) You do '''NOT''' need to edit the <span style="color:red">"script.sh"</span> file, unless you are creating skim files and want to save them.  Otherwise, it will automatically save all results (danarest REST files, ROOT histograms, ROOT trees) (stdout & stderr saved by the job itself).   
  
4) Create your SWIF workflow and add jobs to it by calling:
+
5) Create your SWIF workflow and add jobs to it by calling:
  
 
  swif_gluex_analysis.py my_workflow_name min_run max_run
 
  swif_gluex_analysis.py my_workflow_name min_run max_run
Line 56: Line 22:
 
This will attempt to create the workflow each time you call it, so if the workflow already exists, it will give you an error message.  It can be ignored.   
 
This will attempt to create the workflow each time you call it, so if the workflow already exists, it will give you an error message.  It can be ignored.   
  
5) Start your workflow (submit jobs) by calling:
+
6) Start your workflow (submit jobs) by calling:
  
 
  swif run -workflow my_workflow_name -errorlimit none
 
  swif run -workflow my_workflow_name -errorlimit none
  
6) Check the status of your workflow (jobs) with:  
+
7) Check the status of your workflow (jobs) with:  
  
 
  swif status my_workflow_name
 
  swif status my_workflow_name
  
7) Resubmit failed jobs, change resource requirements, etc. by following the instructions at:
+
8) Resubmit failed jobs, change resource requirements, etc. by following the instructions at:
  
* [https://scicomp.jlab.org/docs/swif-cli SWIF Command-Line Instructions]
+
* [https://scicomp.jlab.org/docs/swif-cli-overview SWIF Command-Line Instructions]
 +
 
 +
9) Check your job output files.  They will go to the location you requested in <span style="color:red">"swif_gluex_analysis.py"</span>.  The log files (stdout and stderr) will be there as well.
 +
 
 +
== Script Global Variables ==
 +
* Change the resource requirements for your jobs. This should ideally be the minimum necessary: the less you require, the sooner your jobs will run. However, exceed these, and the job will fail.
 +
* Change the source data information. This tells the script where to look for the input REST files for your jobs.
 +
* Change the output data location: This tells the script where to save your output files.
 +
* Job execution settings:
 +
** Change the script file path: This should the path to which you just checked out the <span style="color:red">"script.sh"</span> file. 
 +
** Change the environment file: This is the file that the job script sources to setup your environment prior to running hd_root. 
 +
** Change the config file path: This is where the script will auto-generate the JANA config file used when running hd_root.  It contains the command-line arguments used when running hd_root.  It can be anywhere you like. 
 +
** Change the tree names: This should be a comma-separated list of names of the root tree files that are generated by your analysis that you want to save.  For example, if the output tree file will have the name <span style="color:red">"tree_klambda.root"</span>, you should have <span style="color:red">"klambda"</span> in the list to save it. In general, these are the same names as your plugins.
 +
* Change the JANA config file contents: These are the command line arguments used when running hd_root.  You should especially change the plugins.
 +
 
 +
== SciComp Job Links (For Reference) ==
 +
=== Main ===
 +
* [https://scicomp.jlab.org/scicomp/ Scientific Computing Home Page]
 +
* [https://scicomp.jlab.org/scicomp/#/auger/jobs Auger Job Status Page]
 +
* [https://scicomp.jlab.org/scicomp/#/jasmine/jobs JasMine Tape Job Status Page]
 +
 
 +
=== Documentation ===
 +
* [https://scicomp.jlab.org/docs/batch Batch System]
 +
* [https://scicomp.jlab.org/docs/storage Mass Storage System]
 +
* [https://scicomp.jlab.org/docs/write-through-cache Write-Through Cache]
 +
* [https://scicomp.jlab.org/docs/swif SWIF]
 +
* [https://scicomp.jlab.org/docs/swif-cli SWIF Command Line]
 +
 
 +
=== Job Tracking ===
 +
* [http://scicomp.jlab.org/farm2/job.html Completed Job History]
 +
* [http://scicomp.jlab.org/farm2/project.html Job Stats By Project]
 +
* [http://scicomp.jlab.org/farm2/trackOrg.html Job Stats By Track]
 +
* [http://scicomp.jlab.org/farm2/report.html Cluster Report]
 +
* [http://scicomp.jlab.org/farm2/walltime.html Walltime Distribution]

Latest revision as of 06:17, 22 June 2017

Overview

This page outlines how you can use some simple, generic scripts to submit SWIF analysis jobs on REST data at JLab. It assumes that you already have a working knowledge of the JLab farm system. If not, you can probably wing it, but more information can be found at:

Submitting GlueX Analysis Jobs

1) Check out the scripts:

svn co https://halldsvn.jlab.org/repos/trunk/home/pmatt/jobs/analysis/

2) Then, in that folder, edit the "GLOBAL VARIABLES" section of the "swif_gluex_analysis.py" file. It's largely self-explanatory, but just in case, see the section below on Script Global Variables.

3) You do NOT need to edit any other portion of the python script file.

4) You do NOT need to edit the "script.sh" file, unless you are creating skim files and want to save them. Otherwise, it will automatically save all results (danarest REST files, ROOT histograms, ROOT trees) (stdout & stderr saved by the job itself).

5) Create your SWIF workflow and add jobs to it by calling:

swif_gluex_analysis.py my_workflow_name min_run max_run

This will attempt to create the workflow each time you call it, so if the workflow already exists, it will give you an error message. It can be ignored.

6) Start your workflow (submit jobs) by calling:

swif run -workflow my_workflow_name -errorlimit none

7) Check the status of your workflow (jobs) with:

swif status my_workflow_name

8) Resubmit failed jobs, change resource requirements, etc. by following the instructions at:

9) Check your job output files. They will go to the location you requested in "swif_gluex_analysis.py". The log files (stdout and stderr) will be there as well.

Script Global Variables

  • Change the resource requirements for your jobs. This should ideally be the minimum necessary: the less you require, the sooner your jobs will run. However, exceed these, and the job will fail.
  • Change the source data information. This tells the script where to look for the input REST files for your jobs.
  • Change the output data location: This tells the script where to save your output files.
  • Job execution settings:
    • Change the script file path: This should the path to which you just checked out the "script.sh" file.
    • Change the environment file: This is the file that the job script sources to setup your environment prior to running hd_root.
    • Change the config file path: This is where the script will auto-generate the JANA config file used when running hd_root. It contains the command-line arguments used when running hd_root. It can be anywhere you like.
    • Change the tree names: This should be a comma-separated list of names of the root tree files that are generated by your analysis that you want to save. For example, if the output tree file will have the name "tree_klambda.root", you should have "klambda" in the list to save it. In general, these are the same names as your plugins.
  • Change the JANA config file contents: These are the command line arguments used when running hd_root. You should especially change the plugins.

SciComp Job Links (For Reference)

Main

Documentation

Job Tracking