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
, args :: [AppArg]
, containerName :: ContainerName
, workingDirectory :: WorkingDirectory
, manifestDir :: ManifestDir
, shareDir :: ShareDir
, manifestName :: ManifestName
, daemon :: ProcessBehavior
, cmdrun :: ProcessBehavior
......@@ -35,7 +35,7 @@ newtype AppArg = AppArg Text deriving (IsString, Show, Read)
newtype WorkingDirectory = WorkingDirectory FilePath deriving (IsString, Show)
newtype AppName = AppName 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)
data ProcessBehavior =
Test TestText StdOutLog StdErrLog
......@@ -63,7 +63,7 @@ instance Default StackArgs where
, args = []
, containerName = ContainerName "testContainer"
, workingDirectory = WorkingDirectory "_output"
, manifestDir = ManifestDir "manifests"
, shareDir = ShareDir "/tmp"
, manifestName = ManifestName "basic.json"
, daemon = DontRun
, cmdrun = DontRun
......@@ -100,12 +100,12 @@ parseExtendStackArgs sa = do
<> showDefault
<> value (workingDirectory sa)
)
manifestDir <- strOption
shareDir <- strOption
( long "manifest_directory"
<> metavar "DIR"
<> help "Manifest lookup directory"
<> showDefault
<> value (manifestDir sa)
<> value (shareDir sa)
)
manifestName <- strOption
( long "manifest_name"
......
......@@ -114,15 +114,15 @@ cmdRunI
:: AppName
-> [AppArg]
-> ContainerName
-> ManifestDir
-> ShareDir
-> ManifestName
-> ProcessBehavior
-> 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, )
<*> processBehaviorToI
( 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
)
pb
......@@ -202,7 +202,7 @@ runStack sa@StackArgs {..} = do
let milist =
[ iDaemon
, cmdRunI app args containerName manifestDir manifestName cmdrun
, cmdRunI app args containerName shareDir manifestName cmdrun
, cmdListenI containerName cmdlisten
, cmdListenPerformanceI containerName cmdlistenperformance
, cmdListenProgressI containerName cmdlistenprogress
......
......@@ -213,8 +213,8 @@ configureTest = \case
{ stackArgsUpdate = \sa -> sa
{ app = AppName "mpirun"
, args =
let (ManifestDir dirn) = manifestDir sa
Right inpath = toText (dirn </> "in.lj")
let (ShareDir dirn) = shareDir sa
Right inpath = toText (dirn </> "modified.lj")
in [ AppArg "-n"
, AppArg "24"
, AppArg "lmp_mpi"
......@@ -313,7 +313,6 @@ clean StackArgs {..} = cleanLeftovers workingDirectory
main :: IO ()
main = do
argonixShare <- getEnv "ARGONIX_SHARE"
let manifests = argonixShare ++ "/manifests"
let a = def { manifestDir = ManifestDir $ decodeString manifests }
let a = def { shareDir = ShareDir $ decodeString argonixShare }
turtle <- execParser (info (opts a <**> helper) idm)
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