Add postprocessing hist tool
This commit is contained in:
parent
fd47044bfb
commit
61a2db03dc
25
garlic/postprocess/hist/default.nix
Normal file
25
garlic/postprocess/hist/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
stdenv
|
||||
, ministat
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "hist";
|
||||
preferLocalBuild = true;
|
||||
src = ./.;
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
inherit ministat;
|
||||
|
||||
patchPhase = ''
|
||||
substituteAllInPlace hist.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp hist.sh $out/bin/hist
|
||||
chmod +x $out/bin/hist
|
||||
'';
|
||||
}
|
36
garlic/postprocess/hist/hist.sh
Normal file
36
garlic/postprocess/hist/hist.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Use it either reading from stdin or by specifing
|
||||
# multiple files as arguments
|
||||
|
||||
# xeon07$ hist stdout.log
|
||||
# x <stdin>
|
||||
# +------------------------------------------------------------------------+
|
||||
# | x |
|
||||
# | x |
|
||||
# | x |
|
||||
# | x |
|
||||
# | x |
|
||||
# | xxx |
|
||||
# | xxx |
|
||||
# | xxxxx |
|
||||
# | xxxxxx |
|
||||
# | xxxxxxx x|
|
||||
# ||________M_A___________| |
|
||||
# +------------------------------------------------------------------------+
|
||||
# N Min Max Median Avg Stddev
|
||||
# x 30 3.585183 3.763913 3.591559 3.5973344 0.031719975
|
||||
|
||||
ministat=@ministat@/bin
|
||||
|
||||
export PATH="$PATH:$ministat"
|
||||
|
||||
files="$@"
|
||||
if [ -z "$files" ]; then
|
||||
files=/proc/self/fd/0
|
||||
fi
|
||||
|
||||
for file in "$files"; do
|
||||
awk '/^time /{print $2}' $file | \
|
||||
ministat -w72
|
||||
done
|
@ -197,6 +197,9 @@ let
|
||||
mpi = self.bsc.mpi;
|
||||
};
|
||||
|
||||
# Post processing tools
|
||||
hist = callPackage ./garlic/postprocess/hist { };
|
||||
|
||||
exp = {
|
||||
noise = callPackage ./garlic/exp/noise.nix { };
|
||||
nbody = {
|
||||
|
Loading…
Reference in New Issue
Block a user