Previous slide Next slide Back to the index View Graphic Version

NEMO: sample shell script

#! /bin/csh -f
#
#   benchmark of some snapshot I/O related operations
#   to show the difference between disk based and pipe based I/O
#

#   set default keywords
set nbody=16384
set tmp=tmp
set pipe=1

#   read commandline where defaults can be overriden
foreach a ($argv)
  set $a
end

rm -f $tmp.* >& /dev/null

if ($pipe) then
  mkplummer - $nbody zerocm=f |\
    snapscale - - 0.1 |\
    snapcenter - - report=f |\
    snapshift - - 1,1,1 |\
    snapspin - - 0.1 |\
    snaprotate - $tmp.1 45 z 
else
  mkplummer $tmp.1 $nbody zerocm=f    
  snapscale $tmp.1 $tmp.2 0.1           ; mv $tmp.2 $tmp.1
  snapcenter $tmp.1 $tmp.2 report=f     ; mv $tmp.2 $tmp.1
  snapshift $tmp.1 $tmp.21,1,1          ; mv $tmp.2 $tmp.1
  snapspin $tmp.1 $tmp.2 0.1            ; mv $tmp.2 $tmp.1
  snaprotate $tmp.1 $tmp.2 45 z         ; mv $tmp.2 $tmp.1
endif


Notes:

on-the fly vs. post-run analysis.