winnet_monitor_run Namespace Reference

Variables

string user = "User"
 
bool use_slurm_times = False
 
string path = "."
 
string cmd = "squeue | grep "+user+" | grep R | wc -l"
 
 x = subprocess.check_output(cmd, shell=True)
 
 nr_process = int(x.strip())
 
int allTotal = 0
 
int allRem = 0
 
int allFin = 0
 
int allFail = 0
 
list eltime = []
 
 all_folders = os.listdir(path)
 
string tot_path = os.path.join(path,p)
 
string w_path = os.path.join(tot_path,"winnet")
 
string b_path = os.path.join(tot_path,"blocked")
 
string f_path = os.path.join(tot_path,"finab.dat")
 
string h_path = os.path.join(tot_path,"WinNet_data.h5")
 
string o_path = os.path.join(tot_path,"OUT")
 
 w = winnet(tot_path)
 
 ftmp = h5py.File(h_path,"r")
 
 times = x.split("\n")
 
list ttt = []
 
 days = t.split("-")
 
int tottime = float(days[0])*24
 
 av_time = np.average(ttt)
 
int av_per_h = 1./(np.nanmean(eltime)/60./60./allRem)
 
bool finished = False
 
int rest_runs = allTotal-allFin-allFail
 
int est_time = rest_runs/av_per_h
 
 secs = int(est_time % 60)
 
 mins = int(est_time % 60)
 
int hours = est_time
 
string timestr = str(hours).zfill(2)+":"+str(mins).zfill(2)+":"+str(secs).zfill(2)
 
 date_object = timedelta(hours=hours,minutes=mins,seconds=secs)
 
 now = datetime.now()
 
 finishtime = now+date_object
 
 secs2 = int(est_time % 60)
 
 mins2 = int(est_time % 60)
 
int hours2 = est_time
 
string timestr2 = str(hours2).zfill(2)+":"+str(mins2).zfill(2)+":"+str(secs2).zfill(2)
 
string outstr = ""
 

Variable Documentation

◆ all_folders

winnet_monitor_run.all_folders = os.listdir(path)

Definition at line 39 of file winnet_monitor_run.py.

◆ allFail

int winnet_monitor_run.allFail = 0

Definition at line 36 of file winnet_monitor_run.py.

◆ allFin

int winnet_monitor_run.allFin = 0

Definition at line 35 of file winnet_monitor_run.py.

◆ allRem

int winnet_monitor_run.allRem = 0

Definition at line 34 of file winnet_monitor_run.py.

◆ allTotal

int winnet_monitor_run.allTotal = 0

Definition at line 33 of file winnet_monitor_run.py.

◆ av_per_h

int winnet_monitor_run.av_per_h = 1./(np.nanmean(eltime)/60./60./allRem)

Definition at line 110 of file winnet_monitor_run.py.

◆ av_time

int winnet_monitor_run.av_time = np.average(ttt)

Definition at line 105 of file winnet_monitor_run.py.

◆ b_path

string winnet_monitor_run.b_path = os.path.join(tot_path,"blocked")

Definition at line 46 of file winnet_monitor_run.py.

◆ cmd

string winnet_monitor_run.cmd = "squeue | grep "+user+" | grep R | wc -l"

Definition at line 28 of file winnet_monitor_run.py.

◆ date_object

winnet_monitor_run.date_object = timedelta(hours=hours,minutes=mins,seconds=secs)

Definition at line 154 of file winnet_monitor_run.py.

◆ days

winnet_monitor_run.days = t.split("-")

Definition at line 89 of file winnet_monitor_run.py.

◆ eltime

list winnet_monitor_run.eltime = []

Definition at line 38 of file winnet_monitor_run.py.

◆ est_time

tuple winnet_monitor_run.est_time = rest_runs/av_per_h

Definition at line 138 of file winnet_monitor_run.py.

◆ f_path

string winnet_monitor_run.f_path = os.path.join(tot_path,"finab.dat")

Definition at line 47 of file winnet_monitor_run.py.

◆ finished

bool winnet_monitor_run.finished = False

Definition at line 121 of file winnet_monitor_run.py.

◆ finishtime

winnet_monitor_run.finishtime = now+date_object

Definition at line 159 of file winnet_monitor_run.py.

◆ ftmp

winnet_monitor_run.ftmp = h5py.File(h_path,"r")

Definition at line 63 of file winnet_monitor_run.py.

◆ h_path

string winnet_monitor_run.h_path = os.path.join(tot_path,"WinNet_data.h5")

Definition at line 48 of file winnet_monitor_run.py.

◆ hours

int winnet_monitor_run.hours = est_time

Definition at line 145 of file winnet_monitor_run.py.

◆ hours2

int winnet_monitor_run.hours2 = est_time

Definition at line 167 of file winnet_monitor_run.py.

◆ mins

int winnet_monitor_run.mins = int(est_time % 60)

Definition at line 143 of file winnet_monitor_run.py.

◆ mins2

winnet_monitor_run.mins2 = int(est_time % 60)

Definition at line 165 of file winnet_monitor_run.py.

◆ now

winnet_monitor_run.now = datetime.now()

Definition at line 156 of file winnet_monitor_run.py.

◆ nr_process

winnet_monitor_run.nr_process = int(x.strip())

Definition at line 30 of file winnet_monitor_run.py.

◆ o_path

string winnet_monitor_run.o_path = os.path.join(tot_path,"OUT")

Definition at line 49 of file winnet_monitor_run.py.

◆ outstr

string winnet_monitor_run.outstr = ""

Definition at line 173 of file winnet_monitor_run.py.

◆ path

winnet_monitor_run.path = "."

Definition at line 23 of file winnet_monitor_run.py.

◆ rest_runs

int winnet_monitor_run.rest_runs = allTotal-allFin-allFail

Definition at line 136 of file winnet_monitor_run.py.

◆ secs

int winnet_monitor_run.secs = int(est_time % 60)

Definition at line 141 of file winnet_monitor_run.py.

◆ secs2

winnet_monitor_run.secs2 = int(est_time % 60)

Definition at line 163 of file winnet_monitor_run.py.

◆ times

winnet_monitor_run.times = x.split("\n")

Definition at line 84 of file winnet_monitor_run.py.

◆ timestr

string winnet_monitor_run.timestr = str(hours).zfill(2)+":"+str(mins).zfill(2)+":"+str(secs).zfill(2)

Definition at line 151 of file winnet_monitor_run.py.

◆ timestr2

string winnet_monitor_run.timestr2 = str(hours2).zfill(2)+":"+str(mins2).zfill(2)+":"+str(secs2).zfill(2)

Definition at line 168 of file winnet_monitor_run.py.

◆ tot_path

string winnet_monitor_run.tot_path = os.path.join(path,p)

Definition at line 41 of file winnet_monitor_run.py.

◆ tottime

int winnet_monitor_run.tottime = float(days[0])*24

Definition at line 91 of file winnet_monitor_run.py.

◆ ttt

int winnet_monitor_run.ttt = []

Definition at line 85 of file winnet_monitor_run.py.

◆ use_slurm_times

bool winnet_monitor_run.use_slurm_times = False

Definition at line 19 of file winnet_monitor_run.py.

◆ user

string winnet_monitor_run.user = "User"

Definition at line 15 of file winnet_monitor_run.py.

◆ w

winnet_monitor_run.w = winnet(tot_path)

Definition at line 58 of file winnet_monitor_run.py.

◆ w_path

string winnet_monitor_run.w_path = os.path.join(tot_path,"winnet")

Definition at line 45 of file winnet_monitor_run.py.

◆ x

winnet_monitor_run.x = subprocess.check_output(cmd, shell=True)

Definition at line 29 of file winnet_monitor_run.py.