-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a .gitignore file to prevent reading of output files to git. Al…
…so added shell scripts to execute and quickly run the script. Mainly for use in a batch job submission script
- Loading branch information
Showing
6 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data/LundFiles/ | ||
data/RootFiles/ | ||
*.root | ||
*.lund | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
// This is an exmaple Json configuration file that will accept | ||
// parameters for both EIC and Solid simulation. | ||
//Config | ||
// All values should use units of MeV for energies and momenta, | ||
// and degrees for angles. | ||
// n_events indicates number of attempts | ||
// "experiment" : "eic" or "solid" | ||
// "experiment" : "solid", | ||
"experiment" : "eic", | ||
|
||
"file_name" : "DEMPGen_1000000_1", | ||
"n_events" : 1000000, | ||
"output_file" : "RootFiles/Test.root", | ||
|
||
//************************************** | ||
/// This section if for EIC simulation only | ||
"Targ_dir" : 1, // Target Direction (1->Up, 2->Down) | ||
"Kinematics_type" : 1, // Kinematics type (1->FF, 2->TSSA) | ||
|
||
//************************************** | ||
/// This section is Solid only | ||
|
||
"beam_energy": 11000, | ||
"targ_pol_x": 0, | ||
"targ_pol_y": 0, | ||
"targ_pol_z": 0, | ||
"scat_elec_Emin": 1100.0, | ||
"scat_elec_Emax": 9900.0, | ||
"scat_elec_thetamin": 5.0, | ||
"scat_elec_thetamax": 27.0, | ||
"prod_pion_thetamin": 5.0, | ||
"prod_pion_thetamax": 20.0, | ||
"multiple_scattering": false, | ||
"ionization": false, | ||
"bremsstrahlung": false, | ||
"final_state_interaction": false, | ||
"fermi_momentum": false, | ||
"weight_cut": true, | ||
"w_cut": true, | ||
"w_min": 2, | ||
"Qsq_cut": true, | ||
"Qsq_min": 4, | ||
"t_cut": true, | ||
"t_min": -1.2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#! /bin/bash | ||
# Batch submission job script, executes run_EIC_batch.csh script | ||
|
||
echo "Running as ${USER}" # Checks who you're running this as' | ||
NumFiles=$1 | ||
NumEvents=$2 | ||
|
||
NumFiles = `expr $NumFiles + 1` | ||
##Output history file## | ||
historyfile=hist.$( date "+%Y-%m-%d_%H-%M-%S" ).log # Creates a log file | ||
##Output batch script## | ||
batch="${USER}_Job.txt" # The name of the job submission script it'll create each time | ||
auger="augerID.tmp" | ||
|
||
i=1 | ||
while [[ $i -le $NumFiles ]]; do | ||
echo "Running ${batch} for file ${i}" | ||
cp /dev/null ${batch} | ||
echo "#!/bin/csh" >> ${batch} # Tells your job which shell to run in | ||
echo "#PBS -N DEMPGen_${NumEvents}_${i}" >> ${batch} # Name your job | ||
echo "#PBS -m abe" >> ${batch} # Email you on job start, end or error | ||
echo "#PBS -M ${USER}@jlab.org" >>${batch} # Your email address, change it to be what you like | ||
echo "#PBS -r n" >> ${batch} # Don't re-run if it crashes | ||
echo "#PBS -o /home/${USER}/trq_output/DEMPGen_${NumEvents}_${i}.out" >> ${batch} # Output directory and file name, set to what you like | ||
echo "#PBS -e /home/${USER}/trq_output/DEMPGen_${NumEvents}_${i}.err" >> ${batch} # Error output directory and file name | ||
echo "date" >> ${batch} | ||
echo "cd /home/apps/eic_evgen/" >> ${batch} # Tell your job to go to the directory with the script you want to run | ||
echo "./run_EIC_Batch.csh ${i} ${NumEvents}" >> ${batch} # Run your script, change this to what you like | ||
echo "date">>${batch} | ||
echo "exit">>${batch} # End of your job script | ||
echo "Submitting batch" | ||
eval "qsub ${batch} 2>/dev/null" # Use qsub to actually submit your job | ||
echo " " | ||
i=$(( $i + 1 )) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/csh | ||
|
||
set FileNum=$1 | ||
set NumEvents=$2 | ||
echo "Running target polarisation up, FF setting for file $FileNum with $NumEvents events per file" | ||
sed -i 's/"file_name" \:.*/"file_name" \: "DEMPGen_'$NumEvents'_'$FileNum'",/' Config_EIC.json | ||
sed -i 's/"n_events" \:.*/"n_events" \: '$NumEvents',/' Config_EIC.json | ||
cd data/ | ||
./../build/DEMPgen ../Config_EIC.json | ||
sleep 5 | ||
mv "LundFiles/eic_input_DEMPGen_"$NumEvents"_"$FileNum".dat" "LundFiles/eic_DEMPGen_"$NumEvents"_"$FileNum".lund" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/csh | ||
#PBS -N DEMPGen_1000000_5 | ||
#PBS -m abe | ||
#PBS -M [email protected] | ||
#PBS -r n | ||
#PBS -o /home/sjdkay/trq_output/DEMPGen_1000000_5.out | ||
#PBS -e /home/sjdkay/trq_output/DEMPGen_1000000_5.err | ||
date | ||
cd /home/apps/eic_evgen/ | ||
./run_EIC_Batch.csh 5 1000000 | ||
date | ||
exit |