[Swift-commit] r8355 - in SwiftApps/ematter: . galaxy

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Tue Jan 13 09:05:44 CST 2015


Author: ketan
Date: 2015-01-13 09:05:43 -0600 (Tue, 13 Jan 2015)
New Revision: 8355

Added:
   SwiftApps/ematter/galaxy/
   SwiftApps/ematter/galaxy/apps
   SwiftApps/ematter/galaxy/cf
   SwiftApps/ematter/galaxy/genfdf.xml
   SwiftApps/ematter/galaxy/lammps.xml
   SwiftApps/ematter/galaxy/pasta.xml
   SwiftApps/ematter/galaxy/pizza.xml
   SwiftApps/ematter/galaxy/sites.blues.xml
   SwiftApps/ematter/galaxy/sites.local.xml
   SwiftApps/ematter/galaxy/smeagol0.xml
   SwiftApps/ematter/galaxy/smeagol_lead.xml
   SwiftApps/ematter/galaxy/smeagoln.xml
   SwiftApps/ematter/galaxy/swiftlammps.py
   SwiftApps/ematter/galaxy/workflow.full.swift
Log:
galaxyfication

Added: SwiftApps/ematter/galaxy/apps
===================================================================
--- SwiftApps/ematter/galaxy/apps	                        (rev 0)
+++ SwiftApps/ematter/galaxy/apps	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,23 @@
+localhost cat /bin/cat null null null
+localhost python /usr/bin/python null null null
+localhost bash /bin/bash null null null
+#
+cluster bgsh /home/ketan/SwiftApps/subjobs/bg.sh null null null
+cluster2 bgsh /home/ketan/SwiftApps/subjobs/bg.sh null null null
+#
+blues dsp /lcrc/project/NEXTGENOPT/DSP/Dsp null null null
+blues plotme /home/ketan/SwiftApps/dsp-swift/plotme null null null
+#
+blues lammps lmp_blues null null null
+blues smeagol /home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg null null null
+blues bash /bin/bash null null null
+blues python /soft/python/2.7.6/bin/python null null null
+blues genfdf /home/ketan/ematter/smallrun/swift null null null
+blues mpiexec mpiexec null null null
+#
+localblues lammps lmp_blues null null null
+localblues smeagol /home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg null null null
+localblues mpiexec mpiexec null null null
+localblues bash /bin/bash null null null
+localblues python /soft/python/2.7.6/bin/python null null null
+localblues dsp /lcrc/project/NEXTGENOPT/DSP/Dsp null null null

Added: SwiftApps/ematter/galaxy/cf
===================================================================
--- SwiftApps/ematter/galaxy/cf	                        (rev 0)
+++ SwiftApps/ematter/galaxy/cf	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,7 @@
+use.provider.staging=false
+wrapperlog.always.transfer=false
+execution.retries=0
+provider.staging.pin.swiftfiles=false
+sitedir.keep=false
+use.wrapper.staging=false
+

Added: SwiftApps/ematter/galaxy/genfdf.xml
===================================================================
--- SwiftApps/ematter/galaxy/genfdf.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/genfdf.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,60 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    <!--
+         ToDo:
+         1. Option if the counter should be an argument, first one or last one.
+         2. Option to add files (in Galaxy dataset format) as arguments. These files then be added to Swift app as arguments.
+         3. Allow the tool to select another tool and run it.
+         4. Allow user to add more than one resource to run a job for load balancing.
+         5. Add ability to run Swift/T.
+         6. Let the localhost option be selected by default        
+    -->
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
+
+    <command interpreter="python">
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${local_or_compute}"
+        "${resloc}"
+        "${outlist}"
+        "${outlogfile}"
+    </command>
+    <inputs>
+        <param name="inlocation" size="60" type="text" label="inlocation" value="/home/ketan/SwiftApps/dsp-swift/dcap" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="30" type="text" label="aval" value="1" help="Enter the value of a" />
+        <param name="n" size="30" type="text" label="nval" value="1" help="Enter the value of n" />
+        <param name="p" size="30" type="text" label="pval" value="1" help="Enter the value of p" />
+        <param name="I" size="30" type="text" label="Ival" value="10" help="Enter the value of I" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+        <param name="resloc" size="60" type="text" label="Location for results" value="/tmp/outdir"  help="Enter the path to a directory to put results in, eg. /tmp/outdir"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outlist" type="data" label="Output List" />
+        <data format="txt" name="outlogfile" type="data" label="Swift Progress" />
+    </outputs>
+<help>
+**What is this?**
+
+A tool to run dsp in parallel parameter sweeps.
+
+**What it does?**
+
+Runs dsp in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+

Added: SwiftApps/ematter/galaxy/lammps.xml
===================================================================
--- SwiftApps/ematter/galaxy/lammps.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/lammps.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,63 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    
+    <!--
+         ToDo:
+         1. 
+    -->
+
+    <description>A Galaxy tool to run lammps via Swift</description>
+
+    <command interpreter="python">
+        swiftlammps.py
+        "${_in}"
+        "${_geo}" 
+        "${_eam}"
+        "${_dump}"
+        "${local_or_compute}"
+    </command>
+    <inputs>
+        <param name="_in" size="30" type="data" label="in.lammps" help="Select data for lammps in" />
+        <param name="_geo" size="30" type="data" label="geo" help="Select data for geo" />
+        <param name="_eam" size="30" type="data" label="eam" help="Select data for eam" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data format="txt" name="_dump" type="data" label="lammps output" />
+    </outputs>
+    
+    <help>
+**What is this?**
+
+A tool to run lammps in parallel parameter sweeps.
+
+**What it does?**
+
+Runs lammps in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+
+<!--
+type file;
+
+
+/* == App function definitions == */
+
+/* == Lammps app definition == */
+app (file _dump) lammps_app (file _in, file _geo, file _eam)
+{
+   lammps "-in" @_in; 
+}
+-->
+

Added: SwiftApps/ematter/galaxy/pasta.xml
===================================================================
--- SwiftApps/ematter/galaxy/pasta.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/pasta.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,68 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    <!--
+         ToDo:
+         1. Option if the counter should be an argument, first one or last one.
+         2. Option to add files (in Galaxy dataset format) as arguments. These files then be added to Swift app as arguments.
+         3. Allow the tool to select another tool and run it.
+         4. Allow user to add more than one resource to run a job for load balancing.
+         5. Add ability to run Swift/T.
+         6. Let the localhost option be selected by default        
+    -->
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
+
+    <command interpreter="python">
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${local_or_compute}"
+        "${resloc}"
+        "${outlist}"
+        "${outlogfile}"
+    </command>
+    <inputs>
+        <param name="inlocation" size="60" type="text" label="inlocation" value="/home/ketan/SwiftApps/dsp-swift/dcap" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="30" type="text" label="aval" value="1" help="Enter the value of a" />
+        <param name="n" size="30" type="text" label="nval" value="1" help="Enter the value of n" />
+        <param name="p" size="30" type="text" label="pval" value="1" help="Enter the value of p" />
+        <param name="I" size="30" type="text" label="Ival" value="10" help="Enter the value of I" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+        <param name="resloc" size="60" type="text" label="Location for results" value="/tmp/outdir"  help="Enter the path to a directory to put results in, eg. /tmp/outdir"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outlist" type="data" label="Output List" />
+        <data format="txt" name="outlogfile" type="data" label="Swift Progress" />
+    </outputs>
+<help>
+**What is this?**
+
+A tool to run dsp in parallel parameter sweeps.
+
+**What it does?**
+
+Runs dsp in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+
+type file;
+
+/* == Pasta app definition == */
+app (file _fdf) pasta_app (file _pasta_src, file _xyz, file _fdf_tmp)
+{
+  bash @_pasta_src @_xyz @_fdf_tmp @_fdf;
+}
+

Added: SwiftApps/ematter/galaxy/pizza.xml
===================================================================
--- SwiftApps/ematter/galaxy/pizza.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/pizza.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,69 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    <!--
+         ToDo:
+         1. Option if the counter should be an argument, first one or last one.
+         2. Option to add files (in Galaxy dataset format) as arguments. These files then be added to Swift app as arguments.
+         3. Allow the tool to select another tool and run it.
+         4. Allow user to add more than one resource to run a job for load balancing.
+         5. Add ability to run Swift/T.
+         6. Let the localhost option be selected by default        
+    -->
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
+
+    <command interpreter="python">
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${local_or_compute}"
+        "${resloc}"
+        "${outlist}"
+        "${outlogfile}"
+    </command>
+    <inputs>
+        <param name="inlocation" size="60" type="text" label="inlocation" value="/home/ketan/SwiftApps/dsp-swift/dcap" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="30" type="text" label="aval" value="1" help="Enter the value of a" />
+        <param name="n" size="30" type="text" label="nval" value="1" help="Enter the value of n" />
+        <param name="p" size="30" type="text" label="pval" value="1" help="Enter the value of p" />
+        <param name="I" size="30" type="text" label="Ival" value="10" help="Enter the value of I" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+        <param name="resloc" size="60" type="text" label="Location for results" value="/tmp/outdir"  help="Enter the path to a directory to put results in, eg. /tmp/outdir"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outlist" type="data" label="Output List" />
+        <data format="txt" name="outlogfile" type="data" label="Swift Progress" />
+    </outputs>
+<help>
+**What is this?**
+
+A tool to run dsp in parallel parameter sweeps.
+
+**What it does?**
+
+Runs dsp in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+
+
+type file;
+
+/* == Pizza app definition == */
+app (file _xyz) pizza_app (file _pizza_src, file _dump)
+{
+   python @_pizza_src @_dump @_xyz; 
+}
+

Added: SwiftApps/ematter/galaxy/sites.blues.xml
===================================================================
--- SwiftApps/ematter/galaxy/sites.blues.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/sites.blues.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config xmlns="http://www.ci.uchicago.edu/swift/SwiftSites">
+<pool handle="blues">
+  <execution provider="coaster" jobmanager="local:pbs"/>
+  <filesystem provider="local" url="none" />
+  <!--
+  <profile namespace="globus" key="maxtime">10400</profile>
+  <profile namespace="globus" key="maxWalltime">02:40:00</profile>
+  -->
+  <profile namespace="globus" key="maxtime">370</profile>
+  <profile namespace="globus" key="maxWalltime">00:05:00</profile>
+  <profile namespace="globus" key="jobsPerNode">1</profile>
+  <profile namespace="globus" key="slots">1</profile>
+  <profile namespace="globus" key="ppn">1</profile>
+  <profile namespace="globus" key="nodeGranularity">1</profile>
+  <profile namespace="globus" key="maxnodes">1</profile>
+  <profile namespace="karajan" key="jobThrottle">2.20</profile>
+  <profile namespace="karajan" key="initialScore">10000</profile>
+  <workdirectory>{user.home}/swift.workdir</workdirectory>
+</pool>
+</config>
+

Added: SwiftApps/ematter/galaxy/sites.local.xml
===================================================================
--- SwiftApps/ematter/galaxy/sites.local.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/sites.local.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  This is a sites file. This file defines
+  the properties of an execution site used by Swift
+-->
+<config xmlns="http://www.ci.uchicago.edu/swift/SwiftSites">
+<pool handle="localblues">
+<execution provider="local" url="none" />
+<profile namespace="globus" key="maxwalltime">09:55:00</profile>
+<profile namespace="globus" key="walltime">35000</profile>
+<profile namespace="globus" key="maxTime">36000</profile>
+<workdirectory>{user.home}/swiftwork</workdirectory>
+<profile namespace="karajan" key="jobThrottle">0.09</profile>
+<filesystem provider="local"/>
+</pool>
+</config>
+

Added: SwiftApps/ematter/galaxy/smeagol0.xml
===================================================================
--- SwiftApps/ematter/galaxy/smeagol0.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/smeagol0.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,255 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    <!--
+         ToDo:
+         1. Option if the counter should be an argument, first one or last one.
+         2. Option to add files (in Galaxy dataset format) as arguments. These files then be added to Swift app as arguments.
+         3. Allow the tool to select another tool and run it.
+         4. Allow user to add more than one resource to run a job for load balancing.
+         5. Add ability to run Swift/T.
+         6. Let the localhost option be selected by default        
+    -->
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
+
+    <command interpreter="python">
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${local_or_compute}"
+        "${resloc}"
+        "${outlist}"
+        "${outlogfile}"
+    </command>
+    <inputs>
+        <param name="inlocation" size="60" type="text" label="inlocation" value="/home/ketan/SwiftApps/dsp-swift/dcap" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="30" type="text" label="aval" value="1" help="Enter the value of a" />
+        <param name="n" size="30" type="text" label="nval" value="1" help="Enter the value of n" />
+        <param name="p" size="30" type="text" label="pval" value="1" help="Enter the value of p" />
+        <param name="I" size="30" type="text" label="Ival" value="10" help="Enter the value of I" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+        <param name="resloc" size="60" type="text" label="Location for results" value="/tmp/outdir"  help="Enter the path to a directory to put results in, eg. /tmp/outdir"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outlist" type="data" label="Output List" />
+        <data format="txt" name="outlogfile" type="data" label="Swift Progress" />
+    </outputs>
+<help>
+**What is this?**
+
+A tool to run dsp in parallel parameter sweeps.
+
+**What it does?**
+
+Runs dsp in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+
+/* ==
+This is a Swift workflow script for the ematter application. The script contains the following parts:
+
+-- A one-line type declaration
+-- App function definitions
+-- Input files and variables definitions
+-- Output files definitions
+-- Invocation of app functions
+== */
+
+type file;
+
+
+/* == App function definitions == */
+
+/* == Lammps app definition == */
+app (file _dump) lammps_app (file _in, file _geo, file _eam)
+{
+   lammps "-in" @_in; 
+}
+
+/* == Pizza app definition == */
+app (file _xyz) pizza_app (file _pizza_src, file _dump)
+{
+   python @_pizza_src @_dump @_xyz; 
+}
+
+/* == Pasta app definition == */
+app (file _fdf) pasta_app (file _pasta_src, file _xyz, file _fdf_tmp)
+{
+  bash @_pasta_src @_xyz @_fdf_tmp @_fdf;
+}
+
+/* == 
+smeagol lead inputs
+Au.psf Au.sic.psf input.fdf
+O.psf O.sic.psf Ti.psf Ti.sic.psf
+== */
+
+/* == Smeagol lead app definition == */
+app (file _au3dm, file _au3hst, 
+     file _bulklft, file _bulkrgt,
+     file _out) smeagol_lead_app (file _aupsf, file _ausicpsf,
+                                  file _inputfdf, file _opsf,
+                                  file _osicpsf, file _tipsf,
+                                  file _tisicpsf)
+{
+   mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+
+/* == 
+smeagol transport V0 inputs
+Au3.DM Au3.HST Au.psf
+Au.sic.psf bulklft.DAT bulkrgt.DAT
+input.fdf O.psf O.sic.psf
+Ti.psf Ti.sic.psf
+== */
+
+/* == Smeagol transport V0 app definition == */
+app (file _tio2auhm, file _tio2audm,
+     file _out) smeagol_v0_app ( file _au3dm, file _au3hst, file _aupsf,
+                                 file _ausicpsf, file _bulklft, file _bulkrgt,
+                                 file _inputfdf, file _opsf, file _osicpsf,
+                                 file _tipsf, file _tisicpsf )
+{
+  mpiexec  "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+
+/* == Generate fdfs app definition == */
+app (file _fdf) gen_fdf(file _genfdf_src, float _r, file _infdf)
+{
+  bash @_genfdf_src _r @_infdf stdout=@_fdf;
+}
+
+/* == Smeagol transport Vn app definition == */
+app (file _trc_out, file _out) smeagol_vn_app ( file _au3dm,
+                   file _au3hst, file _aupsf,
+                   file _ausicpsf, file _bulklft,
+                   file _bulkrgt, file _inputfdf,
+                   file _opsf, file _osicpsf, 
+                   file _tipsf, file _tisicpsf )
+{
+  mpiexec  "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+
+/* == Input files definitions: Make sure these files are available in the current directory == */
+file lammps_in <"in.lammps">;
+file lammps_geo <"AuTiO.geo">;
+file lammps_eam <"Au_u3.eam">;
+
+file fdf_leads<"input_leads.fdf">;
+file fdf_v0<"input_t0.fdf">;
+
+file aupsf <"Au.psf">;
+file ausicpsf <"Au.sic.psf">;
+file opsf <"O.psf">;
+file osicpsf <"O.sic.psf">;
+file tipsf <"Ti.psf">;
+file tisicpsf <"Ti.sic.psf">;
+
+file pizza_src<"lastlammpsdump2xyz.py">;
+file pasta_src<"pasta">;
+file genfdf_src<"genfdf">;
+
+/* == Output files definitions == */
+file xyz <"forsmeagol.xyz">;
+file lammps_dump <"lammps.dump">;
+file fdf_proc<"input_proc.fdf">;
+
+file smeagol_lead_out <"smeagol_out/smeagol.lead.out">;
+file smeagol_transport_out<"smeagol_out/smeagol.transport.out">;
+file au3dm <"Au3.DM">;
+file au3hst <"Au3.HST">;
+
+file bulklft <"bulklft.DAT">;
+file bulkrgt <"bulkrgt.DAT">;
+
+file tio2auhm<"TiO2Au.HM">;
+file tio2audm<"TiO2Au.DM">;
+
+/* == unused
+file[] smeagol_transport_outn<simple_mapper; location="smeagol_out",
+                              prefix="smeagol.", suffix=".out">;
+file[] fdf_proc_vn;
+== */
+
+
+/* == unused for now
+float Vstart=0.1; //== Change this value to change the starting voltage ==
+float Vend=1.0; //== Change this value to change the ending voltage ==
+float Vstep=0.1;
+== */
+
+string Vs[]=["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"];
+
+/* == End files and variable declaration == */
+
+
+/* == Invocation of apps == */
+
+/* == Invoke lammps == */
+(lammps_dump) = lammps_app (lammps_in, lammps_geo, lammps_eam);
+
+/* == Invoke pizza == */
+(xyz) = pizza_app(pizza_src, lammps_dump);
+
+
+/* == Invoke smeagol lead == */
+(au3dm, au3hst, 
+ bulklft, bulkrgt,
+ smeagol_lead_out) = smeagol_lead_app (aupsf, ausicpsf, fdf_leads,
+                                       opsf, osicpsf,
+                                       tipsf, tisicpsf);
+
+
+/* == Invoke smeagol transport V0 == */
+(tio2auhm, tio2audm, 
+ smeagol_transport_out) = smeagol_v0_app(au3dm, au3hst,
+                                         aupsf, ausicpsf,
+                                         bulklft, bulkrgt,
+                                         fdf_v0, opsf, osicpsf,
+                                         tipsf, tisicpsf);
+
+/* == Invoke pasta == */
+(fdf_proc) = pasta_app(pasta_src, xyz, fdf_v0);
+
+
+/* ==
+In a parallel 'foreach' loop, invoke gen_fdf and smeagol for the n V calculations
+== */
+
+foreach v,i in Vs
+{
+/* == generate fdfs for different voltages == */
+string fdfname = strcat("input_", v, ".fdf");
+file fdf_proc_vn <single_file_mapper; file=fdfname>;
+
+fdf_proc_vn = gen_fdf(genfdf_src, toFloat(v), fdf_proc);
+
+string outname = strcat("smeagol_out/bias_", v, ".out");
+file smeagol_transport_outn <single_file_mapper; file=outname>;
+
+file smeagol_trc_out <single_file_mapper; file=strcat("0.TiO2Au_", v, ".TRC")>;
+
+(smeagol_trc_out, smeagol_transport_outn) = smeagol_vn_app(au3dm, au3hst,
+                                            aupsf, ausicpsf,
+                                            bulklft, bulkrgt,
+                                            fdf_proc_vn, opsf,
+                                            osicpsf, tipsf,
+                                            tisicpsf);
+
+
+}
+
+

Added: SwiftApps/ematter/galaxy/smeagol_lead.xml
===================================================================
--- SwiftApps/ematter/galaxy/smeagol_lead.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/smeagol_lead.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,75 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    <!--
+         ToDo:
+         1. Option if the counter should be an argument, first one or last one.
+         2. Option to add files (in Galaxy dataset format) as arguments. These files then be added to Swift app as arguments.
+         3. Allow the tool to select another tool and run it.
+         4. Allow user to add more than one resource to run a job for load balancing.
+         5. Add ability to run Swift/T.
+         6. Let the localhost option be selected by default        
+    -->
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
+
+    <command interpreter="python">
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${local_or_compute}"
+        "${resloc}"
+        "${outlist}"
+        "${outlogfile}"
+    </command>
+    <inputs>
+        <param name="inlocation" size="60" type="text" label="inlocation" value="/home/ketan/SwiftApps/dsp-swift/dcap" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="30" type="text" label="aval" value="1" help="Enter the value of a" />
+        <param name="n" size="30" type="text" label="nval" value="1" help="Enter the value of n" />
+        <param name="p" size="30" type="text" label="pval" value="1" help="Enter the value of p" />
+        <param name="I" size="30" type="text" label="Ival" value="10" help="Enter the value of I" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+        <param name="resloc" size="60" type="text" label="Location for results" value="/tmp/outdir"  help="Enter the path to a directory to put results in, eg. /tmp/outdir"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outlist" type="data" label="Output List" />
+        <data format="txt" name="outlogfile" type="data" label="Swift Progress" />
+    </outputs>
+<help>
+**What is this?**
+
+A tool to run dsp in parallel parameter sweeps.
+
+**What it does?**
+
+Runs dsp in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+
+
+type file;
+
+
+/* == Smeagol lead app definition == */
+app (file _au3dm, file _au3hst, 
+     file _bulklft, file _bulkrgt,
+     file _out) smeagol_lead_app (file _aupsf, file _ausicpsf,
+                                  file _inputfdf, file _opsf,
+                                  file _osicpsf, file _tipsf,
+                                  file _tisicpsf)
+{
+   mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+

Added: SwiftApps/ematter/galaxy/smeagoln.xml
===================================================================
--- SwiftApps/ematter/galaxy/smeagoln.xml	                        (rev 0)
+++ SwiftApps/ematter/galaxy/smeagoln.xml	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,75 @@
+<tool id="swiftjumpdsp" name="dsp swift">
+    <!--
+         ToDo:
+         1. Option if the counter should be an argument, first one or last one.
+         2. Option to add files (in Galaxy dataset format) as arguments. These files then be added to Swift app as arguments.
+         3. Allow the tool to select another tool and run it.
+         4. Allow user to add more than one resource to run a job for load balancing.
+         5. Add ability to run Swift/T.
+         6. Let the localhost option be selected by default        
+    -->
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
+
+    <command interpreter="python">
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${local_or_compute}"
+        "${resloc}"
+        "${outlist}"
+        "${outlogfile}"
+    </command>
+    <inputs>
+        <param name="inlocation" size="60" type="text" label="inlocation" value="/home/ketan/SwiftApps/dsp-swift/dcap" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="30" type="text" label="aval" value="1" help="Enter the value of a" />
+        <param name="n" size="30" type="text" label="nval" value="1" help="Enter the value of n" />
+        <param name="p" size="30" type="text" label="pval" value="1" help="Enter the value of p" />
+        <param name="I" size="30" type="text" label="Ival" value="10" help="Enter the value of I" />
+        <param name="local_or_compute" type="select" display="radio" label="choose target execution location">
+           <option value="local" selected="true">local</option>
+           <option value="compute">compute</option>
+        </param>
+        <param name="resloc" size="60" type="text" label="Location for results" value="/tmp/outdir"  help="Enter the path to a directory to put results in, eg. /tmp/outdir"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="outlist" type="data" label="Output List" />
+        <data format="txt" name="outlogfile" type="data" label="Swift Progress" />
+    </outputs>
+<help>
+**What is this?**
+
+A tool to run dsp in parallel parameter sweeps.
+
+**What it does?**
+
+Runs dsp in parallel over a user provided input dataset and parameters.
+
+**How does it do?**
+
+The user provides input to the tool which is then delivered to the
+underlying Swift script. The script is then invoked on local/login or
+compute nodes as selected by the user. Once the tool has run, the output is
+produced in the directory location provided by the user. 
+
+More description to come.
+</help>
+</tool>
+
+
+type file;
+
+
+/* == Smeagol transport Vn app definition == */
+app (file _trc_out, file _out) smeagol_vn_app ( file _au3dm,
+                   file _au3hst, file _aupsf,
+                   file _ausicpsf, file _bulklft,
+                   file _bulkrgt, file _inputfdf,
+                   file _opsf, file _osicpsf, 
+                   file _tipsf, file _tisicpsf )
+{
+  mpiexec  "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+

Added: SwiftApps/ematter/galaxy/swiftlammps.py
===================================================================
--- SwiftApps/ematter/galaxy/swiftlammps.py	                        (rev 0)
+++ SwiftApps/ematter/galaxy/swiftlammps.py	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+
+"""
+This is the Swift driver for Galaxy. It receives inputs from the Swift
+Galaxy tool and depending on the options specified, builds a
+canonical Swift/K or Swift/T script and runs over specified computational
+environment.
+
+  swiftlammps.py
+   "${_in}"
+   "${_geo}" 
+   "${_eam}"
+   "${_dump}"
+   "${local_or_compute}"
+
+"""
+
+import subprocess
+import sys
+import os
+import distutils.spawn
+import traceback
+import fnmatch
+import re
+from os.path import expanduser
+
+def setwdir():
+    return subprocess.check_output(["mktemp", "-d", "/tmp/swift-gal.XXXX"])
+
+def genargs(args):
+    for a in args:
+        yield a
+
+def main():
+    myargs = genargs(sys.argv)
+    try:
+        this=next(myargs)
+        infile = next(myargs)
+        geo = next(myargs)
+        eam = next(myargs)
+        dump = next(myargs)
+        local_or_compute = next(myargs)
+    except:
+        traceback.print_exc()
+        sys.exit(1)
+
+    homedir = expanduser("~")
+        
+    baseloc = homedir+"/SwiftApps/ematter/galaxy"
+    #which swift
+    swift = homedir+"/swift-0.95/cog/modules/swift/dist/swift-svn/bin/swift"
+    swiftargs="-infile="+infile+" -geo="+geo+" -eam="+eam+" -dump="+dump
+    siteval=baseloc+"/sites.local.xml"
+
+    if local_or_compute == "compute":
+        siteval=baseloc+"/sites.blues.xml"
+
+    #Invocation
+    exitcode=subprocess.check_call([swift, "-sites.file", siteval, "-tc.file", baseloc+"/apps", "-config", baseloc+"/cf", baseloc+"/lammps.swift", swiftargs])
+    #print exitcode
+
+    #Populate output file
+    #outlist=subprocess.check_output(["find", outloc, "-type", "f", "-iname", "*.out"])
+    #f=open(outlistfile, "wb")
+    #f.write("The results files are as follows:\n")
+    #f.write(outlist)
+    #f.close()
+
+if __name__=='__main__':
+    main()


Property changes on: SwiftApps/ematter/galaxy/swiftlammps.py
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/ematter/galaxy/workflow.full.swift
===================================================================
--- SwiftApps/ematter/galaxy/workflow.full.swift	                        (rev 0)
+++ SwiftApps/ematter/galaxy/workflow.full.swift	2015-01-13 15:05:43 UTC (rev 8355)
@@ -0,0 +1,195 @@
+/* ==
+This is a Swift workflow script for the ematter application. The script contains the following parts:
+
+-- A one-line type declaration
+-- App function definitions
+-- Input files and variables definitions
+-- Output files definitions
+-- Invocation of app functions
+== */
+
+type file;
+
+
+/* == App function definitions == */
+
+/* == Lammps app definition == */
+app (file _dump) lammps_app (file _in, file _geo, file _eam)
+{
+   lammps "-in" @_in; 
+}
+
+/* == Pizza app definition == */
+app (file _xyz) pizza_app (file _pizza_src, file _dump)
+{
+   python @_pizza_src @_dump @_xyz; 
+}
+
+/* == Pasta app definition == */
+app (file _fdf) pasta_app (file _pasta_src, file _xyz, file _fdf_tmp)
+{
+  bash @_pasta_src @_xyz @_fdf_tmp @_fdf;
+}
+
+/* == 
+smeagol lead inputs
+Au.psf Au.sic.psf input.fdf
+O.psf O.sic.psf Ti.psf Ti.sic.psf
+== */
+
+/* == Smeagol lead app definition == */
+app (file _au3dm, file _au3hst, 
+     file _bulklft, file _bulkrgt,
+     file _out) smeagol_lead_app (file _aupsf, file _ausicpsf,
+                                  file _inputfdf, file _opsf,
+                                  file _osicpsf, file _tipsf,
+                                  file _tisicpsf)
+{
+   mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+
+/* == 
+smeagol transport V0 inputs
+Au3.DM Au3.HST Au.psf
+Au.sic.psf bulklft.DAT bulkrgt.DAT
+input.fdf O.psf O.sic.psf
+Ti.psf Ti.sic.psf
+== */
+
+/* == Smeagol transport V0 app definition == */
+app (file _tio2auhm, file _tio2audm,
+     file _out) smeagol_v0_app ( file _au3dm, file _au3hst, file _aupsf,
+                                 file _ausicpsf, file _bulklft, file _bulkrgt,
+                                 file _inputfdf, file _opsf, file _osicpsf,
+                                 file _tipsf, file _tisicpsf )
+{
+  mpiexec  "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+
+/* == Generate fdfs app definition == */
+app (file _fdf) gen_fdf(file _genfdf_src, float _r, file _infdf)
+{
+  bash @_genfdf_src _r @_infdf stdout=@_fdf;
+}
+
+/* == Smeagol transport Vn app definition == */
+app (file _trc_out, file _out) smeagol_vn_app ( file _au3dm,
+                   file _au3hst, file _aupsf,
+                   file _ausicpsf, file _bulklft,
+                   file _bulkrgt, file _inputfdf,
+                   file _opsf, file _osicpsf, 
+                   file _tipsf, file _tisicpsf )
+{
+  mpiexec  "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
+}
+
+/* == Input files definitions: Make sure these files are available in the current directory == */
+file lammps_in <"in.lammps">;
+file lammps_geo <"AuTiO.geo">;
+file lammps_eam <"Au_u3.eam">;
+
+file fdf_leads<"input_leads.fdf">;
+file fdf_v0<"input_t0.fdf">;
+
+file aupsf <"Au.psf">;
+file ausicpsf <"Au.sic.psf">;
+file opsf <"O.psf">;
+file osicpsf <"O.sic.psf">;
+file tipsf <"Ti.psf">;
+file tisicpsf <"Ti.sic.psf">;
+
+file pizza_src<"lastlammpsdump2xyz.py">;
+file pasta_src<"pasta">;
+file genfdf_src<"genfdf">;
+
+/* == Output files definitions == */
+file xyz <"forsmeagol.xyz">;
+file lammps_dump <"lammps.dump">;
+file fdf_proc<"input_proc.fdf">;
+
+file smeagol_lead_out <"smeagol_out/smeagol.lead.out">;
+file smeagol_transport_out<"smeagol_out/smeagol.transport.out">;
+file au3dm <"Au3.DM">;
+file au3hst <"Au3.HST">;
+
+file bulklft <"bulklft.DAT">;
+file bulkrgt <"bulkrgt.DAT">;
+
+file tio2auhm<"TiO2Au.HM">;
+file tio2audm<"TiO2Au.DM">;
+
+/* == unused
+file[] smeagol_transport_outn<simple_mapper; location="smeagol_out",
+                              prefix="smeagol.", suffix=".out">;
+file[] fdf_proc_vn;
+== */
+
+
+/* == unused for now
+float Vstart=0.1; //== Change this value to change the starting voltage ==
+float Vend=1.0; //== Change this value to change the ending voltage ==
+float Vstep=0.1;
+== */
+
+string Vs[]=["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"];
+
+/* == End files and variable declaration == */
+
+
+/* == Invocation of apps == */
+
+/* == Invoke lammps == */
+(lammps_dump) = lammps_app (lammps_in, lammps_geo, lammps_eam);
+
+/* == Invoke pizza == */
+(xyz) = pizza_app(pizza_src, lammps_dump);
+
+
+/* == Invoke smeagol lead == */
+(au3dm, au3hst, 
+ bulklft, bulkrgt,
+ smeagol_lead_out) = smeagol_lead_app (aupsf, ausicpsf, fdf_leads,
+                                       opsf, osicpsf,
+                                       tipsf, tisicpsf);
+
+
+/* == Invoke smeagol transport V0 == */
+(tio2auhm, tio2audm, 
+ smeagol_transport_out) = smeagol_v0_app(au3dm, au3hst,
+                                         aupsf, ausicpsf,
+                                         bulklft, bulkrgt,
+                                         fdf_v0, opsf, osicpsf,
+                                         tipsf, tisicpsf);
+
+/* == Invoke pasta == */
+(fdf_proc) = pasta_app(pasta_src, xyz, fdf_v0);
+
+
+/* ==
+In a parallel 'foreach' loop, invoke gen_fdf and smeagol for the n V calculations
+== */
+
+foreach v,i in Vs
+{
+/* == generate fdfs for different voltages == */
+string fdfname = strcat("input_", v, ".fdf");
+file fdf_proc_vn <single_file_mapper; file=fdfname>;
+
+fdf_proc_vn = gen_fdf(genfdf_src, toFloat(v), fdf_proc);
+
+string outname = strcat("smeagol_out/bias_", v, ".out");
+file smeagol_transport_outn <single_file_mapper; file=outname>;
+
+file smeagol_trc_out <single_file_mapper; file=strcat("0.TiO2Au_", v, ".TRC")>;
+
+(smeagol_trc_out, smeagol_transport_outn) = smeagol_vn_app(au3dm, au3hst,
+                                            aupsf, ausicpsf,
+                                            bulklft, bulkrgt,
+                                            fdf_proc_vn, opsf,
+                                            osicpsf, tipsf,
+                                            tisicpsf);
+
+
+}
+
+




More information about the Swift-commit mailing list