Commit 4c86e9c6 authored by Valentin Reis's avatar Valentin Reis

adding

parent 925ea3bd
# 3d Lennard-Jones melt
variable x index 100
variable y index 100
variable z index 100
variable t index 10000
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
units lj
atom_style atomic
lattice fcc 0.8442
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
mass 1 1.0
velocity all create 1.44 87287 loop geom
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 all nve
thermo 100
run $t
{
"acKind": "ImageManifest",
"acVersion": "0.6.0",
"name": "test",
"app": {
"isolators": [
{
"name": "argo/scheduler",
"value": {
"policy": "SCHED_OTHER",
"priority": "0"
}
},
{
"name": "argo/container",
"value": {
"cpus": "1",
"mems": "1"
}
},
{
"name": "argo/perfwrapper",
"value": {
"enabled": "0"
}
},
{
"name": "argo/power",
"value": {
"enabled": "0",
"profile": "0",
"policy": "NONE",
"damper": "0.1",
"slowdown": "1.1"
}
}
]
}
}
{
"acKind": "ImageManifest",
"acVersion": "0.6.0",
"name": "test",
"app": {
"isolators": [
{
"name": "argo/scheduler",
"value": {
"policy": "SCHED_OTHER",
"priority": "0"
}
},
{
"name": "argo/container",
"value": {
"cpus": "24",
"mems": "1"
}
},
{
"name": "argo/perfwrapper",
"value": {
"enabled": "1"
}
},
{
"name": "argo/power",
"value": {
"enabled": "0",
"profile": "0",
"policy": "NONE",
"damper": "0.1",
"slowdown": "1.1"
}
}
]
}
}
{
"acKind": "ImageManifest",
"acVersion": "0.6.0",
"name": "test",
"app": {
"isolators": [
{
"name": "argo/scheduler",
"value": {
"policy": "SCHED_OTHER",
"priority": "0"
}
},
{
"name": "argo/container",
"value": {
"cpus": "1",
"mems": "1"
}
},
{
"name": "argo/perfwrapper",
"value": {
"enabled": "1"
}
},
{
"name": "argo/power",
"value": {
"enabled": "0",
"profile": "0",
"policy": "NONE",
"damper": "0.1",
"slowdown": "1.1"
}
}
]
}
}
# 3d Lennard-Jones melt
variable x index 100000
variable y index 100000
variable z index 100000
variable t index 10000
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
units lj
atom_style atomic
lattice fcc 0.8442
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
mass 1 1.0
velocity all create 1.44 87287 loop geom
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 all nve
thermo 100
run $t
...@@ -19,7 +19,7 @@ data StackArgs = StackArgs ...@@ -19,7 +19,7 @@ data StackArgs = StackArgs
, args :: [AppArg] , args :: [AppArg]
, containerName :: ContainerName , containerName :: ContainerName
, workingDirectory :: WorkingDirectory , workingDirectory :: WorkingDirectory
, manifestDir :: ManifestDir , shareDir :: ShareDir
, manifestName :: ManifestName , manifestName :: ManifestName
, daemon :: ProcessBehavior , daemon :: ProcessBehavior
, cmdrun :: ProcessBehavior , cmdrun :: ProcessBehavior
...@@ -35,7 +35,7 @@ newtype AppArg = AppArg Text deriving (IsString, Show, Read) ...@@ -35,7 +35,7 @@ newtype AppArg = AppArg Text deriving (IsString, Show, Read)
newtype WorkingDirectory = WorkingDirectory FilePath deriving (IsString, Show) newtype WorkingDirectory = WorkingDirectory FilePath deriving (IsString, Show)
newtype AppName = AppName Text deriving (IsString, Show, Read) newtype AppName = AppName Text deriving (IsString, Show, Read)
newtype ContainerName = ContainerName Text deriving (IsString, Show, Read) newtype ContainerName = ContainerName Text deriving (IsString, Show, Read)
newtype ManifestDir = ManifestDir FilePath deriving (IsString, Show) newtype ShareDir = ShareDir FilePath deriving (IsString, Show)
newtype ManifestName = ManifestName FilePath deriving (IsString, Show) newtype ManifestName = ManifestName FilePath deriving (IsString, Show)
data ProcessBehavior = data ProcessBehavior =
Test TestText StdOutLog StdErrLog Test TestText StdOutLog StdErrLog
...@@ -63,7 +63,7 @@ instance Default StackArgs where ...@@ -63,7 +63,7 @@ instance Default StackArgs where
, args = [] , args = []
, containerName = ContainerName "testContainer" , containerName = ContainerName "testContainer"
, workingDirectory = WorkingDirectory "_output" , workingDirectory = WorkingDirectory "_output"
, manifestDir = ManifestDir "manifests" , shareDir = ShareDir "/tmp"
, manifestName = ManifestName "basic.json" , manifestName = ManifestName "basic.json"
, daemon = DontRun , daemon = DontRun
, cmdrun = DontRun , cmdrun = DontRun
...@@ -100,12 +100,12 @@ parseExtendStackArgs sa = do ...@@ -100,12 +100,12 @@ parseExtendStackArgs sa = do
<> showDefault <> showDefault
<> value (workingDirectory sa) <> value (workingDirectory sa)
) )
manifestDir <- strOption shareDir <- strOption
( long "manifest_directory" ( long "manifest_directory"
<> metavar "DIR" <> metavar "DIR"
<> help "Manifest lookup directory" <> help "Manifest lookup directory"
<> showDefault <> showDefault
<> value (manifestDir sa) <> value (shareDir sa)
) )
manifestName <- strOption manifestName <- strOption
( long "manifest_name" ( long "manifest_name"
......
...@@ -114,15 +114,15 @@ cmdRunI ...@@ -114,15 +114,15 @@ cmdRunI
:: AppName :: AppName
-> [AppArg] -> [AppArg]
-> ContainerName -> ContainerName
-> ManifestDir -> ShareDir
-> ManifestName -> ManifestName
-> ProcessBehavior -> ProcessBehavior
-> Maybe (StackI, Instrumentation) -> Maybe (StackI, Instrumentation)
cmdRunI (AppName app) args (ContainerName cn) (ManifestDir md) (ManifestName mn) pb cmdRunI (AppName app) args (ContainerName cn) (ShareDir md) (ManifestName mn) pb
= Just (Run, ) = Just (Run, )
<*> processBehaviorToI <*> processBehaviorToI
( P.proc "cmd" ( P.proc "cmd"
$ ["run", "-u", T.unpack cn, encodeString $ md </> mn, T.unpack app] $ ["run", "-u", T.unpack cn, encodeString $ md <> "manifests" </> mn, T.unpack app]
++ fmap (T.unpack . argToText) args ++ fmap (T.unpack . argToText) args
) )
pb pb
...@@ -202,7 +202,7 @@ runStack sa@StackArgs {..} = do ...@@ -202,7 +202,7 @@ runStack sa@StackArgs {..} = do
let milist = let milist =
[ iDaemon [ iDaemon
, cmdRunI app args containerName manifestDir manifestName cmdrun , cmdRunI app args containerName shareDir manifestName cmdrun
, cmdListenI containerName cmdlisten , cmdListenI containerName cmdlisten
, cmdListenPerformanceI containerName cmdlistenperformance , cmdListenPerformanceI containerName cmdlistenperformance
, cmdListenProgressI containerName cmdlistenprogress , cmdListenProgressI containerName cmdlistenprogress
......
...@@ -213,8 +213,8 @@ configureTest = \case ...@@ -213,8 +213,8 @@ configureTest = \case
{ stackArgsUpdate = \sa -> sa { stackArgsUpdate = \sa -> sa
{ app = AppName "mpirun" { app = AppName "mpirun"
, args = , args =
let (ManifestDir dirn) = manifestDir sa let (ShareDir dirn) = shareDir sa
Right inpath = toText (dirn </> "in.lj") Right inpath = toText (dirn </> "modified.lj")
in [ AppArg "-n" in [ AppArg "-n"
, AppArg "24" , AppArg "24"
, AppArg "lmp_mpi" , AppArg "lmp_mpi"
...@@ -313,7 +313,6 @@ clean StackArgs {..} = cleanLeftovers workingDirectory ...@@ -313,7 +313,6 @@ clean StackArgs {..} = cleanLeftovers workingDirectory
main :: IO () main :: IO ()
main = do main = do
argonixShare <- getEnv "ARGONIX_SHARE" argonixShare <- getEnv "ARGONIX_SHARE"
let manifests = argonixShare ++ "/manifests" let a = def { shareDir = ShareDir $ decodeString argonixShare }
let a = def { manifestDir = ManifestDir $ decodeString manifests }
turtle <- execParser (info (opts a <**> helper) idm) turtle <- execParser (info (opts a <**> helper) idm)
sh turtle sh turtle
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment