Commit f9f2ed35 authored by Valentin Reis's avatar Valentin Reis

adding assets, bumping dhrun

parent 17f73e9d
Pipeline #6410 failed with stages
in 3 minutes and 24 seconds
Wed Apr 17 17:52:09 2019 chacal argo_nodeos_config[pid:19817]|INFO: [user:0] Normal termination
......@@ -4,7 +4,7 @@ in let message = "HelloWorld"
in let cn = "testContainer"
in let basicManifest = lib.argopkgsManifestDirPath ++ "basic.json"
in let basicManifest = lib.manifestDir ++ "basic.json"
in let argIfTest =
λ(isTest : Bool)
......@@ -13,7 +13,7 @@ in let argIfTest =
, timeout =
if isTest
then [ 60 ] : Optional Natural
then [ 600 ] : Optional Natural
else [] : Optional Natural
}
......@@ -53,8 +53,9 @@ in let apps =
"mpiexec"
[ "-n", if isTest then "2" else "24", "openmc" ]
⫽ argIfTest isTest
⫽ { passvars = [ "OPENMC_CROSS_SECTIONS" ] }
)
⫽ { pre = [ "cp -r \$OPENMC_PWD/* ." ] }
⫽ { pre = [ "cp -r " ++ lib.openmcDir ++ " ." ] }
, amg =
λ(isTest : Bool)
→ lib.progressAppTest
......@@ -132,13 +133,13 @@ in { hello =
]
, power =
lib.appTest
( lib.emptyFilterTestArgs "power"
⫽ { timeout = [ 60 ] : Optional Natural }
( lib.emptyFilterTestArgs "power" "sleep"
⫽ { timeout = [ 60 ] : Optional Natural, args = [ "15" ] }
)
, performance =
lib.appTest
( lib.emptyFilterTestArgs "performance"
⫽ { timeout = [ 60 ] : Optional Natural }
( lib.emptyFilterTestArgs "performance" "sleep"
⫽ { timeout = [ 60 ] : Optional Natural, args = [ "15" ] }
)
, stream =
apps.stream True
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
# 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
# 3d Lennard-Jones melt
variable x index 1
variable y index 1
variable z index 1
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 100000
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version='1.0' encoding='utf-8'?>
<plots>
<plot basis="xy" color_by="cell" filename="plot" id="13" type="slice">
<origin>-7.56439 6.0891e-05 82.0</origin>
<width>1.65 1.44</width>
<pixels>1000 872</pixels>
<background>0 0 0</background>
</plot>
</plots>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>60</batches>
<inactive>1</inactive>
<source strength="1.0">
<space type="fission">
<parameters>-10.751819999999999 -10.751819999999999 36.007 10.751819999999999 10.751819999999999 236.0066</parameters>
</space>
</source>
<output>
<summary>false</summary>
</output>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="material">
<bins>16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279</bins>
</filter>
<tally id="1" name="flux tally">
<filters>1</filters>
<scores>flux</scores>
</tally>
</tallies>
<?xml version="1.0"?>
<simulation>
<project id="H2O" series="1">
<application name="qmcapp" role="molecu" class="serial" version="0.2">
Simple Example of moleculear H2O
</application>
</project>
<particleset name="e">
<group name="u" size="4">
<parameter name="charge">-1</parameter>
<attrib name="position" datatype="posArray">
2.9151687332e-01 -6.5123272502e-01 -1.2188463918e-01
5.8423636048e-01 4.2730406357e-01 -4.5964306231e-03
3.5228575807e-01 -3.5027014639e-01 5.2644808295e-01
-5.1686250912e-01 -1.6648002292e+00 6.5837023441e-01
</attrib>
</group>
<group name="d" size="4">
<parameter name="charge">-1</parameter>
<attrib name="position" datatype="posArray">
3.1443445436e-01 6.5068682609e-01 -4.0983449009e-02
-3.8686061749e-01 -9.3744432997e-02 -6.0456005388e-01
2.4978241724e-02 -3.2862514649e-02 -7.2266047173e-01
-4.0352404772e-01 1.1927734805e+00 5.5610824921e-01
</attrib>
</group>
</particleset>
<particleset name="ion0" size="3">
<group name="O">
<parameter name="charge">6</parameter>
<parameter name="valence">4</parameter>
<parameter name="atomicnumber">8</parameter>
</group>
<group name="H">
<parameter name="charge">1</parameter>
<parameter name="valence">1</parameter>
<parameter name="atomicnumber">1</parameter>
</group>
<attrib name="position" datatype="posArray">
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 -1.4308249289e+00 1.1078707576e+00
0.0000000000e+00 1.4308249289e+00 1.1078707576e+00
</attrib>
<attrib name="ionid" datatype="stringArray">
O H H
</attrib>
</particleset>
<include href="H2O.HF.wfs.xml"/>
<!-- Hamiltonian -->
<hamiltonian name="h0" type="generic" target="e">
<pairpot name="ElecElec" type="coulomb" source="e" target="e"/>
<pairpot name="ELEMENT-ECP" type="pseudo" source="ion0" target="e" format="xml" wavefunction="psi0" >
<pseudo elementType="O" format="xml" href="O.BFD.xml" />
<pseudo elementType="H" format="xml" href="H.BFD.xml" />
</pairpot>
<constant name="IonIon" type="coulomb" source="ion0" target="ion0"/>
</hamiltonian>
<init source="ion0" target="e"/>
<qmc method="vmc" move="pbyp" gpu="yes">
<estimator name="LocalEnergy" hdf5="no"/>
<parameter name="walkers"> 1 </parameter>
<parameter name="samplesperthread"> 64 </parameter>
<parameter name="stepsbetweensamples"> 1 </parameter>
<parameter name="substeps"> 5 </parameter>
<parameter name="warmupSteps"> 100 </parameter>
<parameter name="blocks"> 1 </parameter>
<parameter name="timestep"> 0.3 </parameter>
<parameter name="usedrift"> no </parameter>
</qmc>
<qmc method="dmc" move="pbyp" checkpoint="-1" gpu="yes">
<estimator name="LocalEnergy" hdf5="no"/>
<parameter name="minimumtargetwalkers"> 128 </parameter>
<parameter name="reconfiguration"> no </parameter>
<parameter name="warmupSteps"> 100 </parameter>
<parameter name="timestep"> 0.005 </parameter>
<parameter name="steps"> 10 </parameter>
<parameter name="blocks"> 200 </parameter>
<parameter name="nonlocalmoves"> yes </parameter>
</qmc>
</simulation>
let values = ./../../dhrun/resources/package.dh
let values =
https://xgitlab.cels.anl.gov/argo/dhrun/raw/master/resources/package.dh
in let types = ./../../dhrun/resources/types.dh
in let types =
https://xgitlab.cels.anl.gov/argo/dhrun/raw/master/resources/types.dh
in let argopkgsManifestDirPath =
"/home/fre/workspace/argopkgs/dhrun/manifests/"
in let dataDir = "./"
in let qmcPackDir = "toto"
in let manifestDir = dataDir ++ "manifests/"
in let lammpsDir = "toto"
in let assetDir = dataDir ++ "assets/"
in let openmcDir = assetDir ++ "openmc/"
in let lammpsDir = assetDir
in let qmcPackDir = assetDir
in let basicCommand =
λ(args : { name : Text, outprefix : Text, outwants : List Text })
......@@ -52,6 +59,8 @@ in let MakeBaseArgs =
List Text
, vars :
List types.EnvVar
, passvars :
List Text
, timeout :
Optional Natural
}
......@@ -74,6 +83,8 @@ in let emptyMakeBaseArgs =
[] : List Text
, vars =
values.emptyVars
, passvars =
[] : List Text
}
in let addVerbose = λ(v : Bool) → if v then [ "--verbose" ] else [] : List Text
......@@ -99,30 +110,33 @@ in let makeBase =
}
]
}
, basicCommand
{ name =
"cmd"
, outprefix =
"cmdrun"
, outwants =
args.cmdwants
}
⫽ { args =
[ "run"
, "-u"
, args.containerName
, args.manifest
, args.cmd
]
# args.args
, passvars =
[ "PATH" ]
, timeout =
args.timeout
}
, let b =
basicCommand
{ name =
"cmd"
, outprefix =
"cmdrun"
, outwants =
args.cmdwants
}
in b
⫽ { args =
[ "run"
, "-u"
, args.containerName
, args.manifest
, args.cmd
]
# args.args
, passvars =
b.passvars # args.passvars
, timeout =
args.timeout
}
]
, verbosity =
values.Normal
, verbose =
True
, workdir =
"./_dhrun_out"
, pre =
......@@ -143,11 +157,13 @@ in let FilterTestArgs =
{ filter :
Text
, cmd :
OptionalSleep
Text
, args :
List Text
, vars :
List types.EnvVar
, passvars :
List Text
, isTest :
Bool
, timeout :
......@@ -156,50 +172,44 @@ in let FilterTestArgs =
in let emptyFilterTestArgs =
λ(filter : Text)
→ { filter =
→ λ(cmd : Text)
→ { cmd =
cmd
, filter =
filter
, cmd =
< Sleep = {=} | Cmd : Text >
, args =
[] : List Text
, vars =
values.emptyVars
, passvars =
[] : List Text
, isTest =
False
, timeout =
[] : Optional Natural
}
in let sleepArgs =
λ(l : List Text)
→ if Natural/isZero (List/length Text l) then [ "15" ] else l
in let sleep =
λ(x : OptionalSleep)
→ let handlers =
{ Sleep = λ(_ : {}) → "cmd", Cmd = λ(b : Text) → b }
in merge handlers x
in let appTest =
λ(args : FilterTestArgs)
→ let cn = "testContainer"
in makeExtended
{ manifest =
argopkgsManifestDirPath ++ "perfwrap.json"
manifestDir ++ "perfwrap.json"
, containerName =
cn
, cmd =
sleep args.cmd
args.cmd
, args =
sleepArgs args.args
args.args
, verbose =
True
, cmdwants =
[] : List Text
, vars =
args.vars
, passvars =
args.passvars
, timeout =
args.timeout
}
......@@ -238,6 +248,8 @@ in let ProgressAppTestArg =
List Text
, vars :
List types.EnvVar
, passvars :
List Text
, isTest :
Bool
, timeout :
......@@ -253,6 +265,8 @@ in let emptyProgressAppTestArg =
args
, vars =
[] : List types.EnvVar
, passvars =
[] : List Text
, isTest =
False
, timeout =
......@@ -263,15 +277,15 @@ in let emptyProgressAppTestArg =
in let progressAppTest =
λ(args : ProgressAppTestArg)
→ appTest
( emptyFilterTestArgs "progress"
⫽ { cmd =
< Cmd = args.cmd | Sleep : {} >
, args =
( emptyFilterTestArgs "progress" args.cmd
⫽ { args =
args.args
, vars =
args.vars
, passvars =
args.passvars
, isTest =
False
True
, timeout =
args.timeout
}
......@@ -293,10 +307,12 @@ in { values =
emptyFilterTestArgs
, qmcPackDir =
qmcPackDir
, openmcDir =
openmcDir
, lammpsDir =
lammpsDir
, argopkgsManifestDirPath =
argopkgsManifestDirPath
, manifestDir =
manifestDir
, emptyProgressAppTestArg =
emptyProgressAppTestArg
}
let all = ../all-tests.dh in all.hello
let all = ../all-tests.dh in all.listen
......@@ -25,8 +25,7 @@
, stream-src ? fetched stream/pin.json
, lammps-src ? fetched lammps/pin.json
, #source overrides: tooling
argotk-src ? builtins.fetchGit {inherit (fetched argotk/pin.json) url rev;}
#source overrides: tooling
, repoquality-src ? builtins.fetchGit {inherit (fetched repoquality/pin.json) url rev;}
, dhrun-src ? builtins.fetchGit {inherit (fetched dhrun/pin.json) url rev;}
, powerplots-src ? builtins.fetchGit {inherit (fetched powerplots/pin.json) url rev;}
......@@ -112,8 +111,6 @@ let
panhandle = (self.callCabal2nix "panhandle" (builtins.fetchGit {
inherit (panhandle-src) url rev; })) {};
inline-r = dontCheck super.inline-r;
#argo tools
argotk = (self.callCabal2nix "argotk" argotk-src ) {};
argonix = (self.callCabal2nix "argonix" argonix-src ) {};
repoquality = (self.callCabal2nix "repoquality" repoquality-src ) {};
dhrun = (self.callCabal2nix "dhrun" dhrun-src ) {};
......@@ -123,20 +120,12 @@ let
};
# re-export from hpkgs and add non-haskell build rule specialization
inherit (haskellPackages) repoquality dhrun;
inherit (haskellPackages) repoquality;
argotk = haskellPackages.argotk.overrideAttrs (old:{
buildInputs=old.buildInputs ++ [pkgs.hwloc];
dhrun = haskellPackages.dhrun.overrideAttrs (old:{
installPhase = old.installPhase + ''
mkdir $out/share/
ARGOTK_SHARE=share $out/bin/argotk --bash-completion-script argotk > $out/share/argotk.sh
cp -r share/* $out/share/
substituteInPlace $out/share/simple-H2O.xml --replace \
H2O.HF.wfs.xml $out/share/H2O.HF.wfs.xml
substituteInPlace $out/share/simple-H2O.xml --replace \
O.BFD.xml $out/share/O.BFD.xml
substituteInPlace $out/share/simple-H2O.xml --replace \
H.BFD.xml $out/share/H.BFD.xml
mkdir -p $out/share/
cp -r resources $out/share/
'';
});
......@@ -187,9 +176,8 @@ let
name = "testEnv";
buildInputs = [
# argotk runs mpiexec:
# tooling may run mpiexec or hwloc:
pkgs.mpich2
# argotk uses hwloc to choose CPU counts:
pkgs.hwloc
# these are needed for some reason:
pkgs.coreutils
......@@ -213,13 +201,10 @@ let
echo "ENTERING ENVIRONMENT: Moreover, sandboxing is disabled, in particular because of:"
echo "ENTERING ENVIRONMENT: /tmp/nrm-* sockets, /etc/argo, /var/run/, /var/lock/ which all need read access. "
echo "ENTERING ENVIRONMENT: until these components are patched to allow for alternative paths, no sandbox use is possible."
source ${argotk}/share/argotk.sh # bash completion
echo ""
'';
#argotk uses this environment variable.
ARGOTK_SHARE = "${argotk}/share";
OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml";
OPENMC_PWD = "${argotk}/share/openmc";
#OPENMC_PWD = "${argotk}/share/openmc";
};
testApplications = test.overrideAttrs (old:{
......@@ -358,29 +343,55 @@ let
'';
});
doArgotk = drv: command: drv.overrideAttrs (old:{
buildPhase = "argotk "+command+" --verbose";
dhrunSpecs = pkgs.stdenv.mkDerivation rec {
name = "dhrunSpecs";
src = ../dhrun ;
installPhase = ''
mkdir -p $out
cp -r $src/* $out
substituteInPlace $out/assets/simple-H2O.xml --replace \
H2O.HF.wfs.xml $out/assets/H2O.HF.wfs.xml
substituteInPlace $out/assets/simple-H2O.xml --replace \
O.BFD.xml $out/assets/O.BFD.xml
substituteInPlace $out/assets/simple-H2O.xml --replace \
H.BFD.xml $out/assets/H.BFD.xml
substituteInPlace $out/lib.dh --replace \
"dataDir = \"./\"" "dataDir = \"$out/\""
substituteInPlace $out/lib.dh --replace \
"https://xgitlab.cels.anl.gov/argo/dhrun/raw/master/" "${dhrun}/share/"
'';
unpackPhase = "true";
};
doDhrun = drv: command: drv.overrideAttrs (old:{
buildPhase = ''
dhrun run $DHRUNSPECS/tests/${command}.dh
'';
DHRUNSPECS = "${dhrunSpecs}";
installPhase = ''
mkdir -p $out
cp _output/* $out/
'';
});
testHello = doArgotk test "TestHello";
testListen = doArgotk test "TestListen";
testPerfwrapper = doArgotk test "TestPerfwrapper";
testPower = doArgotk test "TestPower";
testSTREAM = doArgotk (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ stream ];})) "TestSTREAM";
testAMG = doArgotk (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ amg ];})) "TestAMG";
testOpenMC = doArgotk (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ openmc ];})) "TestOpenMC";
testLAMMPS = doArgotk (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ lammps ];})) "TestLAMMPS";
testQMCPack = doArgotk (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ qmcpack ];})) "TestQMCPack";
testAll = doArgotk test "tests";
testHello = doDhrun test "hello";
testListen = doDhrun test "listen";
testPerfwrapper = doDhrun test "performance";
testPower = doDhrun test "power";
testSTREAM = doDhrun (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ stream ];})) "stream";
testAMG = doDhrun (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ amg ];})) "amg";
testOpenMC = doDhrun (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ openmc ];
OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml";
})) "openmc";
testLAMMPS = doDhrun (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ lammps ];})) "lammps";
testQMCPack = doDhrun (test.overrideAttrs
(old:{buildInputs=old.buildInputs++[ qmcpack ];})) "qmcpack";
testAll = doDhrun (test.overrideAttrs
(old:{OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml";})) "tests";
};
# re-exporting a full nixpkgs-like package set
in pkgs // argopkgs
......@@ -2,8 +2,8 @@
"fetch": {
"args": {
"fetchSubmodules": false,
"rev": "c11e1d3ec1bc172fea34e4c7a45f331b43c53067",
"sha256": "1cq7gk6f32h2gy80s1xmzrxm2dglhfakhs2f4p3ak820384vzhzx",
"rev": "8e68e170199c850b4d6eca95e9ed617657f3245f",
"sha256": "1h2b935b73icsizzbhsfry2k7iaan9x83krwqswg41by1ay11bjk",
"url": "https://xgitlab.cels.anl.gov/vreis/dhall-executor.git"
},
"fn": "fetchgit"
......
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