aboutsummaryrefslogtreecommitdiffstats
path: root/submitter
diff options
context:
space:
mode:
Diffstat (limited to 'submitter')
-rw-r--r--submitter/contour_dag.py73
-rw-r--r--submitter/contour_emcee_dag.py77
-rw-r--r--submitter/contour_emcee_submit.sub42
-rw-r--r--submitter/contour_submit.sub42
-rw-r--r--submitter/sens_dag.py4
5 files changed, 236 insertions, 2 deletions
diff --git a/submitter/contour_dag.py b/submitter/contour_dag.py
new file mode 100644
index 0000000..634801b
--- /dev/null
+++ b/submitter/contour_dag.py
@@ -0,0 +1,73 @@
+#! /usr/bin/env python
+
+import os
+import numpy as np
+
+gfsource = os.environ['GOLEMSOURCEPATH'] + '/GolemFit'
+condor_script = gfsource + '/scripts/flavour_ratio/submitter/contour_submit.sub'
+
+injected_ratios = [
+ (1, 1, 1),
+ (1, 0, 0),
+ (0, 1, 0),
+ (0, 0, 1)
+]
+
+GLOBAL_PARAMS = {}
+
+GLOBAL_PARAMS.update(dict(
+ threads = 1,
+ save_measured_fr = 'False',
+ output_measured_fr = './frs/',
+ seed = None
+))
+
+# MultiNest
+GLOBAL_PARAMS.update(dict(
+ mn_live_points = 5000,
+ mn_tolerance = 0.3,
+))
+
+# Likelihood
+GLOBAL_PARAMS.update(dict(
+ likelihood = 'golemfit',
+))
+
+# GolemFit
+GLOBAL_PARAMS.update(dict(
+ ast = 'p2_0',
+ # data = 'realisation'
+ # data = 'asimov'
+ data = 'real'
+))
+
+# Plot
+GLOBAL_PARAMS.update(dict(
+ plot_chains = 'False',
+ plot_triangle = 'False'
+))
+
+outfile = 'dagman_FR_CONTOUR_{0}'.format(GLOBAL_PARAMS['data'])
+outfile += '.submit'
+output = '/data/user/smandalia/flavour_ratio/data/contour/{0}/{1}/'.format(
+ GLOBAL_PARAMS['likelihood'], GLOBAL_PARAMS['data']
+)
+# output += 'nosyst/'
+# output += 'noprompt/'
+# output += 'strictpriors/'
+
+with open(outfile, 'w') as f:
+ job_number = 1
+ for inj in injected_ratios:
+ print 'inj', inj
+ f.write('JOB\tjob{0}\t{1}\n'.format(job_number, condor_script))
+ f.write('VARS\tjob{0}\tir0="{1}"\n'.format(job_number, inj[0]))
+ f.write('VARS\tjob{0}\tir1="{1}"\n'.format(job_number, inj[1]))
+ f.write('VARS\tjob{0}\tir2="{1}"\n'.format(job_number, inj[2]))
+ for key in GLOBAL_PARAMS.iterkeys():
+ f.write('VARS\tjob{0}\t{1}="{2}"\n'.format(job_number, key, GLOBAL_PARAMS[key]))
+ f.write('VARS\tjob{0}\toutfile="{1}"\n'.format(job_number, output))
+ job_number += 1
+ if GLOBAL_PARAMS['data'] == 'real': break
+
+print 'dag file = {0}'.format(outfile)
diff --git a/submitter/contour_emcee_dag.py b/submitter/contour_emcee_dag.py
new file mode 100644
index 0000000..b16312a
--- /dev/null
+++ b/submitter/contour_emcee_dag.py
@@ -0,0 +1,77 @@
+#! /usr/bin/env python
+
+import os
+import numpy as np
+
+gfsource = os.environ['GOLEMSOURCEPATH'] + '/GolemFit'
+condor_script = gfsource + '/scripts/flavour_ratio/submitter/contour_emcee_submit.sub'
+
+injected_ratios = [
+ (1, 1, 1),
+ (1, 0, 0),
+ (0, 1, 0),
+ (0, 0, 1)
+]
+
+GLOBAL_PARAMS = {}
+
+GLOBAL_PARAMS.update(dict(
+ threads = 1,
+))
+
+# Emcee
+GLOBAL_PARAMS.update(dict(
+ run_mcmc = 'True',
+ burnin = 250,
+ nsteps = 500,
+ nwalkers = 60,
+ seed = 25,
+ mcmc_seed_type = 'uniform'
+))
+
+# Likelihood
+GLOBAL_PARAMS.update(dict(
+ likelihood = 'golemfit',
+))
+
+# GolemFit
+GLOBAL_PARAMS.update(dict(
+ ast = 'p2_0',
+ # data = 'realisation'
+ # data = 'asimov'
+ data = 'real'
+))
+
+# Plot
+GLOBAL_PARAMS.update(dict(
+ plot_angles = 'False',
+ plot_elements = 'False',
+))
+
+outfile = 'dagman_FR_CONTOUR_EMCEE_{0}'.format(GLOBAL_PARAMS['data'])
+outfile += 'more_sys_flat'
+outfile += '.submit'
+
+output = '/data/user/smandalia/flavour_ratio/data/contour_emcee/{0}/{1}/'.format(
+ GLOBAL_PARAMS['likelihood'], GLOBAL_PARAMS['data']
+)
+# output += 'more_sys/'
+output += 'more_sys_flat/'
+# output += 'noprompt/'
+# output += 'strictpriors/'
+
+with open(outfile, 'w') as f:
+ job_number = 1
+ for inj in injected_ratios:
+ print 'inj', inj
+ f.write('JOB\tjob{0}\t{1}\n'.format(job_number, condor_script))
+ f.write('VARS\tjob{0}\tir0="{1}"\n'.format(job_number, inj[0]))
+ f.write('VARS\tjob{0}\tir1="{1}"\n'.format(job_number, inj[1]))
+ f.write('VARS\tjob{0}\tir2="{1}"\n'.format(job_number, inj[2]))
+ for key in GLOBAL_PARAMS.iterkeys():
+ f.write('VARS\tjob{0}\t{1}="{2}"\n'.format(job_number, key, GLOBAL_PARAMS[key]))
+ f.write('VARS\tjob{0}\toutfile="{1}"\n'.format(job_number, output))
+ job_number += 1
+ if GLOBAL_PARAMS['data'] == 'real': break
+
+print 'dag file = {0}'.format(outfile)
diff --git a/submitter/contour_emcee_submit.sub b/submitter/contour_emcee_submit.sub
new file mode 100644
index 0000000..df47cb7
--- /dev/null
+++ b/submitter/contour_emcee_submit.sub
@@ -0,0 +1,42 @@
+Executable = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/contour_emcee.py
+Arguments = "--ast $(ast) --data $(data) --likelihood $(likelihood) --injected-ratio $(ir0) $(ir1) $(ir2) --outfile $(outfile) --seed $(seed) --threads $(threads) --run-mcmc $(run_mcmc) --burnin $(burnin) --nsteps $(nsteps) --nwalkers $(nwalkers) --seed $(seed) --mcmc-seed-type $(mcmc_seed_type) --plot-angles $(plot_angles) --plot-elements $(plot_elements)"
+
+# All logs will go to a single file
+log = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/logs/job_$(Cluster).log
+output = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/logs/job_$(Cluster).out
+error = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/logs/job_$(Cluster).err
+
+getenv = True
+# environment = "X509_USER_PROXY=x509up_u14830"
+
+# Stage user cert to the node (Gridftp-Users is already on CVMFS)
+# transfer_input_files = /tmp/x509up_u14830
+
+# but do not try to copy outputs back (see: https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=3081)
+# +TransferOutput=""
+Transfer_output_files = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/metaouts/
+
+request_memory = 3GB
+request_cpus = 1
+
+Universe = vanilla
+Notification = never
+
+# +AccountingGroup="sanctioned.$ENV(USER)"
+# run on both SL5 and 6
+# +WantRHEL6 = True
+# +WantSLC6 = False
+
+# # run on OSG
+# +WantGlidein = True
+
+# +TransferOutput=""
+
++NATIVE_OS = True
+# Requirements = IS_GLIDEIN && HAS_CVMFS_icecube_opensciencegrid_org && (OpSysAndVer =?= "CentOS6" || OpSysAndVer =?= "RedHat6" || OpSysAndVer =?= "SL6")
+# Requirements = IS_GLIDEIN
+# Requirements = (OpSysMajorVer =?= 6)
+
+# GO!
+queue
+
diff --git a/submitter/contour_submit.sub b/submitter/contour_submit.sub
new file mode 100644
index 0000000..f4e13e9
--- /dev/null
+++ b/submitter/contour_submit.sub
@@ -0,0 +1,42 @@
+Executable = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/contour.py
+Arguments = "--ast $(ast) --data $(data) --likelihood $(likelihood) --injected-ratio $(ir0) $(ir1) $(ir2) --outfile $(outfile) --seed $(seed) --threads $(threads) --mn-live-points $(mn_live_points) --mn-tolerance $(mn_tolerance) --plot-chains $(plot_chains) --plot-triangle $(plot_triangle) --save-measured-fr $(save_measured_fr) --output-measured-fr=$(output_measured_fr)"
+
+# All logs will go to a single file
+log = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/logs/job_$(Cluster).log
+output = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/logs/job_$(Cluster).out
+error = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/logs/job_$(Cluster).err
+
+getenv = True
+# environment = "X509_USER_PROXY=x509up_u14830"
+
+# Stage user cert to the node (Gridftp-Users is already on CVMFS)
+# transfer_input_files = /tmp/x509up_u14830
+
+# but do not try to copy outputs back (see: https://htcondor-wiki.cs.wisc.edu/index.cgi/tktview?tn=3081)
+# +TransferOutput=""
+Transfer_output_files = /data/user/smandalia/GolemTools/sources/GolemFit/scripts/flavour_ratio/submitter/metaouts/
+
+request_memory = 3GB
+request_cpus = 1
+
+Universe = vanilla
+Notification = never
+
+# +AccountingGroup="sanctioned.$ENV(USER)"
+# run on both SL5 and 6
+# +WantRHEL6 = True
+# +WantSLC6 = False
+
+# # run on OSG
+# +WantGlidein = True
+
+# +TransferOutput=""
+
++NATIVE_OS = True
+# Requirements = IS_GLIDEIN && HAS_CVMFS_icecube_opensciencegrid_org && (OpSysAndVer =?= "CentOS6" || OpSysAndVer =?= "RedHat6" || OpSysAndVer =?= "SL6")
+# Requirements = IS_GLIDEIN
+# Requirements = (OpSysMajorVer =?= 6)
+
+# GO!
+queue
+
diff --git a/submitter/sens_dag.py b/submitter/sens_dag.py
index 7423d34..2046efb 100644
--- a/submitter/sens_dag.py
+++ b/submitter/sens_dag.py
@@ -35,8 +35,8 @@ GLOBAL_PARAMS.update(dict(
# MultiNest
GLOBAL_PARAMS.update(dict(
- mn_live_points = 1000,
- # mn_live_points = 500,
+ # mn_live_points = 1000,
+ mn_live_points = 600,
# mn_live_points = 300,
# mn_tolerance = 0.1,
mn_tolerance = 0.3,