From 11224884be56840788862e9f3ec00565a4ab3379 Mon Sep 17 00:00:00 2001 From: Rayne Liu <rayne.liu@atlas1> Date: Tue, 18 Aug 2020 02:27:58 +0000 Subject: [PATCH] Changes on cpus and memory --- code/RDGW150914_ptemcee1.py | 8 ++++---- code/RDGW150914_ptemcee2.py | 16 ++++++++-------- code/RDGW150914_ptemcee3.py | 4 ++-- code/RDGW150914_ptemcee4.py | 4 ++-- code/condor_submit_RdownPtemcee1.sub | 4 ++-- code/condor_submit_RdownPtemcee2.sub | 4 ++-- code/condor_submit_RdownPtemcee3.sub | 4 ++-- code/condor_submit_RdownPtemcee4.sub | 4 ++-- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/code/RDGW150914_ptemcee1.py b/code/RDGW150914_ptemcee1.py index 422dbae..5cd6ccd 100755 --- a/code/RDGW150914_ptemcee1.py +++ b/code/RDGW150914_ptemcee1.py @@ -42,7 +42,7 @@ vary_fund = True #sampler parameters npoints=1002 -nwalkers = 42 +nwalkers = 840 ntemps=12 ndim = int(4*(nmax+1)) burnin = 500 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. @@ -176,8 +176,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) @@ -320,4 +320,4 @@ plt.ylabel("h") figband.savefig(rootpath+'/git/rdstackingproject/plotsmc/vary'+str(vary_fund)+'nmax='+str(nmax)+'_tshift='+str(tshift)+'_'+str(npoints)+'pt_band.pdf', format = 'pdf') #import os -#os.system('afplay /System/Library/Sounds/Submarine.aiff') \ No newline at end of file +#os.system('afplay /System/Library/Sounds/Submarine.aiff') diff --git a/code/RDGW150914_ptemcee2.py b/code/RDGW150914_ptemcee2.py index 7eea70a..05525f6 100755 --- a/code/RDGW150914_ptemcee2.py +++ b/code/RDGW150914_ptemcee2.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -import warnings -warnings.simplefilter("ignore") #Used to suppress the RuntimeWarnings. But if you are changing the code for TESTING, MAKE SURE TO COMMENT IT OUT. +#import warnings +#warnings.simplefilter("ignore") #Used to suppress the RuntimeWarnings. But if you are changing the code for TESTING, MAKE SURE TO COMMENT IT OUT. ''' This script calculates the RDGW150914 constraints with ptemcee - specifically, the n=1 case both varying or not varying the fundamental frequencies. It produces the chain plot, corner plot, parameter constraints, and data plotted with the 1-sigma band. Since we are working specifically for the n=1 case, we also add in the corner plot the combined chain of alpha_0 and alpha_1, in order to demonstrate that the two are indistinguishable with each other. @@ -41,11 +41,11 @@ tshift=19 vary_fund = True #sampler parameters -npoints=60001 -nwalkers = 840 +npoints=102 +nwalkers = 42 ntemps=12 ndim = int(4*(nmax+1)) -burnin = 5000 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. +burnin = 20 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. #This is trivial but often forgotten: this cannot be more than npoints! Usually 1/5~1/4 npoints is what I observe. numbins = 42 #corner plot parameter - how many bins you want datacolor = '#105670' #'#4fa3a7' @@ -174,8 +174,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) @@ -320,4 +320,4 @@ plt.ylabel("h") figband.savefig(rootpath+'/git/rdstackingproject/plotsmc/vary'+str(vary_fund)+'nmax='+str(nmax)+'_tshift='+str(tshift)+'_'+str(npoints)+'pt_band.pdf', format = 'pdf') import os -os.system('afplay /System/Library/Sounds/Submarine.aiff') \ No newline at end of file +os.system('afplay /System/Library/Sounds/Submarine.aiff') diff --git a/code/RDGW150914_ptemcee3.py b/code/RDGW150914_ptemcee3.py index c77da00..6da5beb 100755 --- a/code/RDGW150914_ptemcee3.py +++ b/code/RDGW150914_ptemcee3.py @@ -175,8 +175,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) diff --git a/code/RDGW150914_ptemcee4.py b/code/RDGW150914_ptemcee4.py index f199312..0070160 100755 --- a/code/RDGW150914_ptemcee4.py +++ b/code/RDGW150914_ptemcee4.py @@ -175,8 +175,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) diff --git a/code/condor_submit_RdownPtemcee1.sub b/code/condor_submit_RdownPtemcee1.sub index 0358c84..68c9559 100755 --- a/code/condor_submit_RdownPtemcee1.sub +++ b/code/condor_submit_RdownPtemcee1.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 diff --git a/code/condor_submit_RdownPtemcee2.sub b/code/condor_submit_RdownPtemcee2.sub index f780e1f..0194194 100755 --- a/code/condor_submit_RdownPtemcee2.sub +++ b/code/condor_submit_RdownPtemcee2.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 diff --git a/code/condor_submit_RdownPtemcee3.sub b/code/condor_submit_RdownPtemcee3.sub index f9e3d38..dba2384 100755 --- a/code/condor_submit_RdownPtemcee3.sub +++ b/code/condor_submit_RdownPtemcee3.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 diff --git a/code/condor_submit_RdownPtemcee4.sub b/code/condor_submit_RdownPtemcee4.sub index 2780f90..b3a555b 100755 --- a/code/condor_submit_RdownPtemcee4.sub +++ b/code/condor_submit_RdownPtemcee4.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 -- GitLab