Interactive Job Script


#!/bin/sh
#
# L. Duflot: adapted from a script by Gustaaf
# A. Stone: removed outdated variables, simplified script.  Changed "Project" to "Dataset".
#           added batch parameters and/or interactive flag

# Defined dataset d0db.fnal.gov/sam_data_browsing/ProjectDefinitions.html
export  SAM_DATASET=june19_v12_cal_entpl

# Note: SAM_PROJECT _has_ to be unique!!!
# derived from SAM_DATASET and the current date
export  SAM_PROJECT=${SAM_DATASET}_`date +%m_%d_%y_%H_%M` 

# group name
export  GROUP=cal

# Dataset version is a number, e.g. "1", "2", "3", etc., or term, e.g. "last", "new"
export  SNAP_VERSION="last"

# info on the framework job to be run 
export  EXEC=bin/IRIX6-KCC_3_4/CalElecNtupleMaker

# full rcp parameter set defined between double quotes
export  FRAME_RCP="-rcp framework.rcp"

# some printouts
echo SAM_PROJECT $SAM_PROJECT
echo SAM_DATASET $SAM_DATASET
echo GROUP $GROUP
echo SNAP_VERSION $SNAP_VERSION
echo EXEC $EXEC
echo FRAME_RCP $FRAME_RCP

# start sam  - Pay careful attention to "--", "-", "=" or "_"
# submit interactively
sam submit --project=$SAM_PROJECT --defname=$SAM_DATASET --group=$GROUP --dataset-version=$SNAP_VERSION 
--framework-exe=$EXEC --framework-params="$FRAME_RCP" --cpu-per-event=1 --interactive