Commit e10043cd authored by Valentin Reis's avatar Valentin Reis
Browse files

Added share directory.

parent d301ff1f
Pipeline #5109 passed with stage
in 1 minute and 22 seconds
.argo_nodeos_config_exit_message
.direnv
dist
_output
result
......
......@@ -17,6 +17,7 @@ executable argonix
optparse-applicative,
unix,
text,
neat-interpolation,
system-filepath
hs-source-dirs: src
default-language: Haskell2010
......
......@@ -24,6 +24,8 @@ let
];
in rec
{
share = ./share;
argonix = hpkgs.argonix.overrideAttrs (old:{
installPhase = old.installPhase + ''
mkdir $out/share/
......
# 3d Lennard-Jones melt
variable x index 1
variable y index 1
variable z index 1
variable t index 100
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"
}
}
]
}
}
{-# language RecordWildCards #-}
{-# LANGUAGE QuasiQuotes #-}
{-# language ApplicativeDo #-}
{-# language OverloadedStrings #-}
......@@ -6,15 +7,76 @@ module Main where
import Data.Default
import Turtle hiding ( header
, text
, arguments
)
import Options.Applicative
import Data.Maybe
import Prelude hiding ( FilePath )
import Data.Text ( pack )
import Data.Text ( pack
, unpack
, Text
)
import NeatInterpolation
import System.Posix.Process
nixExpression :: Text
nixExpression =
[text|
let
hostPkgs = import <nixpkgs> {};
in
{
argopkgs ? import (hostPkgs.nix-update-source.fetch ./argopkgs.json).src {},
argotk-src ? argopkgs.argotk.src,
nrm-src ? argopkgs.nodelevel.nrm.src,
containers-src ? argopkgs.nodelevel.containers.src,
libnrm-src ? argopkgs.nodelevel.libnrm.src,
amg-src ? argopkgs.applications.nrm.amg.src,
lammps-src ? argopkgs.applications.nrm.lammps.src,
qmcpack-src ? argopkgs.applications.nrm.qmcpack.src,
stream-src ? argopkgs.applications.nrm.stream.src,
dgemm_randomwalk-src ? argopkgs.applications.nrm.dgemm_randomwalk.src,
}:
rec {
argotk = argopkgs.argotk.overrideAttrs (old: {src = argotk-src;} );
nrm = argopkgs.nodelevel.nrm.overrideAttrs (old: {src = nrm-src;} );
libnrm = argopkgs.nodelevel.libnrm.overrideAttrs (old: {src = libnrm-src;} );
containers = argopkgs.nodelevel.containers.overrideAttrs (old: {src = containers-src;} );
amg = (argopkgs.applications.nrm.amg.overrideAttrs (old: {src = amg-src;} )).override {libnrm = libnrm;};
qmcpack = (argopkgs.applications.nrm.qmcpack.overrideAttrs (old: {src = qmcpack-src;} )).override {libnrm = libnrm;};
stream-test = (argopkgs.applications.nrm.stream.overrideAttrs (old: {src = stream-src;} )).override {libnrm = libnrm; iterationCount = "20";};
stream = (argopkgs.applications.nrm.stream.overrideAttrs (old: {src = stream-src;} )).override {libnrm = libnrm; iterationCount = "20000";};
lammps = (argopkgs.applications.nrm.lammps.overrideAttrs (old: {src = lammps-src;} )).override {libnrm = libnrm;};
test = argopkgs.stdenv.mkDerivation rec {
name = "testEnv";
installPhase = "true";
unpackPhase = "true";
buildInputs = [
argopkgs.coreutils
argopkgs.utillinux
argopkgs.mpich2
argotk
containers
stream-test
nrm
];
shellHook = ''
source $${argotk}/share/argotk.sh
echo "Installed bash completion."
'';
MANIFESTS = ./manifests;
};
expe = test.overrideAttrs (old:{
buildInputs = old.buildInputs ++ [amg lammps qmcpack stream];
}
);
}
|]
data StackArgs = StackArgs
{ verbosity :: Verbosity
, targetMachine :: Maybe String
......@@ -78,7 +140,7 @@ main = sh $ do
a@StackArgs {..} <- liftIO $ execParser opts
let arguments = argumentsBuilder a
case targetMachine of
Nothing -> liftIO $ executeFile "nix-shell" True arguments Nothing
Nothing -> liftIO $ executeFile "nix-shell" True (["-E", unpack nixExpression] ++ arguments) Nothing
Just host -> do
printf s "argonix.hs: creating a derivation in the local store:\n"
......
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