Project

General

Profile

Beam Sim Files » History » Version 71

« Previous - Version 71/91 (diff) - Next » - Current version
Brandon Soubasis, 09/08/2016 04:56 PM


Beam Sim Files

Set up the environment:

source /grid/fermiapp/products/common/etc/setups.sh                                                                                  
source /grid/fermiapp/products/larsoft/setup
export GROUP=lariat
export JOBSUB_GROUP=lariat
export PRODUCTS=/grid/fermiapp/products/lariat/:${PRODUCTS}
setup jobsub_client
setup G4beamline v2_16 -q e6:prof:nu
setup git
setup jobsub_client

Move to your working directory (probably within your app area) and set up your beamline simulation working area:
git clone -b develop ssh://p-lariatsoft@cdcvs.fnal.gov/cvs/projects/lariatsoft
cd lariatsoft/BeamlineSim/
sed -i "s/MYUSERNAME/$USER/g" jobdir_SurveyedGeom/*

Example: Generate 1k spills with 2ndary: pi+ 8 GeV, magnets @+50 Amps
Now make a new job directory from your template:
./MakeNewJobDir.py jobdir_SurveyedGeom -A 50.0 -E 08 --jobsize 1000 --jobcount 10 --spillsize 1000

You can first run 100 interactive events and check that the output is sensible:
g4bl jobdir_SurveyedGeom_10jobsof1k_64GeV_pos100Amps/LAriaT_13degProdxn_10degAna_SurveyedGeom_10jobsof1k_64GeV_pos100Amps.in first=0 last=100

Make sure you have a directory in /pnfs/lariat/scratch/ for the grid job output files:
mkdir /pnfs/lariat/scratch/users/$USER
mkdir /pnfs/lariat/scratch/users/$USER/MCdata

Now run a number of grid jobs:
cd jobdir_SurveyedGeom_10jobsof1k_64GeV_pos100Amps
./Jobsubmit.sh input LAriaT_13degProdxn_10degAna_SurveyedGeom_10jobsof1k_64GeV_pos100Amps.in $PWD

Keep an eye on your jobs:
jobsub_q --user=$USER

If they run within a few minutes then they probably failed. In that case use jobsub_fetchlog to get the logfiles and investigate.
jobsub_fetchlog -J YourJobID

Once jobs are complete merge all data files
./MergeFiles.sh

Troubleshooting

jobsub_fetchlog and other commands useful for telling what's going on when something's not right: https://cdcvs.fnal.gov/redmine/projects/jobsub/wiki