clstartsim 621 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. echo Starte Simulation
  3. date
  4. NAME=minimal
  5. SIMDIR=$HOME/prog/objsim/$NAME/
  6. BINARY=sim$NAME
  7. PDATADIR=$HOME/data/sim/csim/$NAME/
  8. echo "clstartsim script"
  9. echo "running on "
  10. hostname
  11. JOBNUM=0
  12. if [ $# -gt 0 ]
  13. then
  14. JOBNUM=$1
  15. fi
  16. echo "SIMNAME=$NAME jobnum=$JOBNUM "
  17. shift
  18. echo "command line parameters: $*"
  19. DATADIR="/scratch/$NAME$JOBNUM/"
  20. mkdir $DATADIR
  21. pwd
  22. # ls -l
  23. cd $SIMDIR
  24. pwd
  25. echo $BINARY
  26. $SIMDIR/$BINARY --DataDirectory $DATADIR $* >$DATADIR/simoutput.txt 2>$DATADIR/simerror.txt
  27. date
  28. echo "Simulation fertig"
  29. echo "kopiere Daten"
  30. cp -r $DATADIR $PDATADIR
  31. date
  32. echo "Kopieren fertig. Ende"