SciFlow 0.5.0 → 0.5.1
raw patch · 3 files changed
+21/−9 lines, 3 files
Files
- SciFlow.cabal +1/−1
- src/Scientific/Workflow/Builder.hs +10/−8
- src/Scientific/Workflow/Main.hs +10/−0
SciFlow.cabal view
@@ -1,5 +1,5 @@ name: SciFlow-version: 0.5.0+version: 0.5.1 synopsis: Scientific workflow management system description: SciFlow is to help programmers design complex workflows
src/Scientific/Workflow/Builder.hs view
@@ -79,9 +79,11 @@ {-# INLINE node #-} --- | Declare a function that can be called on remote---function :: ToExpQ q => T.Text -> q -> Builder ()---function funcName fn =+{-+ Declare a function that can be called on remote+function :: ToExpQ q => T.Text -> q -> Builder ()+function funcName fn =+-} -- | many-to-one generalized link function@@ -103,9 +105,9 @@ -- | Build the workflow. This function will first create functions defined in -- the builder. These pieces will then be assembled to form a function that will--- execute each individual function in a correct order, named $prefix$_sciflow.--- Lastly, a function table will be created with the name $prefix$_function_table.-buildWorkflow :: String -- ^ prefix+-- execute each individual function in a correct order, named $name$.+-- Lastly, a function table will be created with the name $name$_function_table.+buildWorkflow :: String -- ^ name -> Builder () -> Q [Dec] buildWorkflow prefix b = mkWorkflow prefix $ mkDAG b@@ -173,8 +175,8 @@ -- Generate codes from a DAG. This function will create functions defined in -- the builder. These pieces will be assembled to form a function that will -- execute each individual function in a correct order.--- Lastly, a function table will be created with the name $prefix$_function_table.-mkWorkflow :: String -- prefix+-- Lastly, a function table will be created with the name $name$_function_table.+mkWorkflow :: String -- name -> DAG -> Q [Dec] mkWorkflow workflowName dag = do -- write node funcitons
src/Scientific/Workflow/Main.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE CPP #-} module Scientific.Workflow.Main ( defaultMain@@ -16,6 +17,11 @@ import qualified Data.Map as M import qualified Data.Text as T import qualified Data.Text.Lazy.IO as T++#ifdef SGE+import DRMAA (withSGESession)+#endif+ import Language.Haskell.TH import qualified Language.Haskell.TH.Lift as T import Options.Applicative hiding (runParser)@@ -62,7 +68,11 @@ ( long "remote" <> help "Submit jobs to remote machines.") runExe initialize (Run opts n r) wf+#ifdef SGE+ | r = initialize $ withSGESession $ runWorkflow wf $ RunOpt (dbPath opts) n True+#else | r = initialize $ runWorkflow wf $ RunOpt (dbPath opts) n True+#endif | otherwise = runWorkflow wf $ RunOpt (dbPath opts) n False runExe _ _ _ = undefined {-# INLINE runExe #-}