[Swift-commit] r8306 - SwiftApps/ematter

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon Nov 24 12:38:28 CST 2014


Author: ketan
Date: 2014-11-24 12:38:28 -0600 (Mon, 24 Nov 2014)
New Revision: 8306

Modified:
   SwiftApps/ematter/apps
   SwiftApps/ematter/genfdf
   SwiftApps/ematter/workflow.blues.swift
Log:
comments in swift source

Modified: SwiftApps/ematter/apps
===================================================================
--- SwiftApps/ematter/apps	2014-11-24 00:50:37 UTC (rev 8305)
+++ SwiftApps/ematter/apps	2014-11-24 18:38:28 UTC (rev 8306)
@@ -9,9 +9,11 @@
 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
 #
 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 genfdf /home/ketan/ematter/smallrun/swift/genfdf null null null

Modified: SwiftApps/ematter/genfdf
===================================================================
--- SwiftApps/ematter/genfdf	2014-11-24 00:50:37 UTC (rev 8305)
+++ SwiftApps/ematter/genfdf	2014-11-24 18:38:28 UTC (rev 8306)
@@ -1,11 +1,7 @@
 #!/bin/bash
 
-startrng=$1
-endrng=$2
-infdf=$3
+i=$1
+infdf=$2
 
-for i in $(seq $startrng $endrng)
-do
-sed -e "s/VInitial[[:space:]]* 1.D0 eV/VInitial                  $i.D0 eV/" -e "s/VFinal[[:space:]]* 1.D0 eV/VFinal                    $i.D0 eV/" $infdf > $i.fdf
-done
+sed -e "s/VInitial[[:space:]]* 1.D0 eV/VInitial                  $i.D0 eV/" -e "s/VFinal[[:space:]]* 1.D0 eV/VFinal                    $i.D0 eV/" $infdf
 

Modified: SwiftApps/ematter/workflow.blues.swift
===================================================================
--- SwiftApps/ematter/workflow.blues.swift	2014-11-24 00:50:37 UTC (rev 8305)
+++ SwiftApps/ematter/workflow.blues.swift	2014-11-24 18:38:28 UTC (rev 8306)
@@ -1,93 +1,87 @@
 type file;
 
-// Lammps app definition
-app (file _dump) lammps_app (file _in,
-                            file _geo, file _eam)
+/* == Lammps app definition == */
+app (file _dump) lammps_app (file _in, file _geo, file _eam)
 {
-   lammps "-in" @_in stdout=@_out stderr=@_err; 
+   lammps "-in" @_in; 
 }
 
-// Pizza app definition
+/* == Pizza app definition == */
 app (file _xyz) pizza_app (file _pizza_src, file _dump)
 {
-   python @_pizza_src @_dump @_xyz stdout=@_out stderr=@_err;
+   python @_pizza_src @_dump @_xyz; 
 }
 
-// Pasta app definition
+/* == 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
+/* == 
+smeagol lead inputs
 Au.psf Au.sic.psf input.fdf
-O.psf O.sic.psf Ti.psf Ti.sic.psf */
+O.psf O.sic.psf Ti.psf Ti.sic.psf
+== */
 
-//Smeagol lead app definition
+/* == 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)
+     file _out) smeagol_lead_app (file _aupsf, file _ausicpsf,
+                                  file _inputfdf, file _opsf,
+                                  file _osicpsf, file _tipsf,
+                                  file _tisicpsf)
 {
-   //smeagol stdin=@_inputfdf stdout=@_out stderr=@_err; 
-   mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out stderr=@_err; 
+   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
+/* == 
+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 */
+Ti.psf Ti.sic.psf
+== */
 
-//Smeagol transport V0 app definition
+/* == 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 )
+     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 )
 {
-  //smeagol stdin=@_inputfdf stdout=@_out stderr=@_err; 
-  mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out stderr=@_err; 
+  mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
 }
 
-app (file[] _fdf) gen_fdf(file _infdf, int _rstart, int _rend){
-  genfdf _rstart _rend @_infdf;
+/* == Generate fdfs app definition == */
+app (file _fdf) gen_fdf(int _r, file _infdf)
+{
+  genfdf _r @_infdf stdout=@_fdf;
 }
 
 
-//Smeagol transport Vn app definition
+/* == Smeagol transport Vn app definition == */
 app (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 stderr=@_err; 
+                   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; 
 }
 
-// Files
+/* == Input and output files definition and mappings == */
 file lammps_in <"in.lammps">;
 file lammps_geo <"AuTiO.geo">;
 file lammps_eam <"Au_u3.eam">;
 
 file lammps_dump <"lammps.dump">;
 
-//Invoke lammps
-(lammps_dump) = lammps_app (lammps_in,
-                                                    lammps_geo, lammps_eam);
-
 file pizza_src<"lastlammpsdump2xyz.py">;
 
 file xyz <"forsmeagol.xyz">;
 
-//Invoke pizza
-(xyz) = pizza_app(pizza_src, lammps_dump);
-
 file fdf_in<"input_leads.fdf">;
 
 file pasta_src<"pasta">;
@@ -105,19 +99,39 @@
 file tipsf <"Ti.psf">;
 file tisicpsf <"Ti.sic.psf">;
 
-//Invoke smeagol lead
+
+file fdf_v0<"input_t0.fdf">;
+file smeagol_transport_out<"out.smeagol_transport">;
+file tio2auhm<"TiO2Au.HM">;
+file tio2audm<"TiO2Au.DM">;
+
+file fdf_v1<"input_t1.fdf">;
+file fdf_proc_v1<"input_proc_t1.fdf">;
+
+
+file smeagol_transport_outn[]<simple_mapper; location="smeagol_outn",
+                              prefix="smeagol.", suffix=".out">;
+
+int rstart=1;
+int rend=2;
+file fdf_proc_vn[];
+
+/* == 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_in,
                                        opsf, osicpsf,
                                        tipsf, tisicpsf);
 
-file fdf_v0<"input_t0.fdf">;
-file smeagol_transport_out<"out.smeagol_transport">;
-file tio2auhm<"TiO2Au.HM">;
-file tio2audm<"TiO2Au.DM">;
 
-//Invoke smeagol transport V0
+/* == Invoke smeagol transport V0 == */
 (tio2auhm, tio2audm, 
  smeagol_transport_out) = smeagol_v0_app(au3dm, au3hst,
                                          aupsf, ausicpsf,
@@ -125,23 +139,24 @@
                                          fdf_v0, opsf, osicpsf,
                                          tipsf, tisicpsf);
 
+/* == Invoke pasta == */
+(fdf_proc_v1) = pasta_app(pasta_src, xyz, fdf_v1);
 
-file fdf_v1<"input_t1.fdf">;
-file fdf_proc_v1<"input_proc_t1.fdf">;
 
-//Invoke pasta
-(fdf_proc_v1) = pasta_app(pasta_src, xyz, fdf_v1);
+/* ==
+In a parallel 'foreach' loop, invoke gen_fdf and smeagol for the n V calculations
+== */
 
-file smeagol_transport_out2<"out.smeagol_transport2">;
-
-int rstart=1;
-int rend=2;
 foreach i in [rstart:rend]
 {
 
-(smeagol_transport_out2) = smeagol_vn_app(au3dm, au3hst,
+fdf_proc_vn[i]=gen_fdf(i,fdf_proc_v1);
+
+(smeagol_transport_outn[i]) = smeagol_vn_app(au3dm, au3hst,
                                           aupsf, ausicpsf,
                                           bulklft, bulkrgt,
-                                          fdf_proc_v1, opsf, osicpsf,
-                                          tipsf, tisicpsf);
+                                          fdf_proc_vn[i], opsf,
+                                          osicpsf, tipsf,
+                                          tisicpsf);
 }
+




More information about the Swift-commit mailing list