Changeset View
Changeset View
Standalone View
Standalone View
examples/runCoordinatorRooFitTask.sh
- This file was moved from examples/runMasterRooFitSlave.sh.
Show All 16 Lines | |||||
# Laura++ package authors: | # Laura++ package authors: | ||||
# John Back | # John Back | ||||
# Paul Harrison | # Paul Harrison | ||||
# Thomas Latham | # Thomas Latham | ||||
if [ $# -lt 1 ] | if [ $# -lt 1 ] | ||||
then | then | ||||
echo "Usage: $0 <nExpt> [firstExpt = 0] [numSlaves = 2]" | echo "Usage: $0 <nExpt> [firstExpt = 0] [numTasks = 2]" | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
nexpt=$1 | nexpt=$1 | ||||
firstexpt=0 | firstexpt=0 | ||||
numslaves=2 | numtasks=2 | ||||
if [ $# -gt 1 ] | if [ $# -gt 1 ] | ||||
then | then | ||||
firstexpt=$2 | firstexpt=$2 | ||||
if [ $# -gt 2 ] | if [ $# -gt 2 ] | ||||
then | then | ||||
numslaves=$3 | numtasks=$3 | ||||
fi | fi | ||||
fi | fi | ||||
# Do whatever you need to do to setup your ROOT environment | # Do whatever you need to do to setup your ROOT environment | ||||
# Generate the toy MC | # Generate the toy MC | ||||
#echo "Generating MC" | #echo "Generating MC" | ||||
#./SlaveRooFit gen DD $nexpt $firstexpt > gen-log-DD.out 2>&1 | #./SimFitTaskRooFit gen DD $nexpt $firstexpt > gen-log-DD.out 2>&1 | ||||
#./SlaveRooFit gen LL $nexpt $firstexpt > gen-log-LL.out 2>&1 | #./SimFitTaskRooFit gen LL $nexpt $firstexpt > gen-log-LL.out 2>&1 | ||||
# Do the simultaneous fit | # Do the simultaneous fit | ||||
./Master 0 $nexpt $firstexpt $numslaves > master-log.out 2>&1 & | ./SimFitCoordinator 0 $nexpt $firstexpt $numtasks > coordinator-log.out 2>&1 & | ||||
sleep 5 | sleep 5 | ||||
port=`tail -1 master-log.out | awk '{print $NF}'` | port=`tail -1 coordinator-log.out | awk '{print $NF}'` | ||||
echo $port | echo $port | ||||
./SlaveRooFit fit DD $port > slave-dd-log.out 2>&1 & | ./SimFitTaskRooFit fit DD $port > task-dd-log.out 2>&1 & | ||||
sleep 1 | sleep 1 | ||||
./SlaveRooFit fit LL $port > slave-ll-log.out 2>&1 | ./SimFitTaskRooFit fit LL $port > task-ll-log.out 2>&1 | ||||