- Timestamp:
- 05/12/16 16:43:10 (9 years ago)
- Location:
- TOOLS/ConsoGENCMIP6
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
r2717 r2849 46 46 skip_header=1, 47 47 converters={ 48 0: string_to_date, 49 1: string_to_float, 50 2: string_to_percent, 51 3: string_to_percent, 52 4: string_to_float, 53 5: string_to_float, 54 6: string_to_float, 55 7: string_to_float, 48 0: string_to_date, 49 1: string_to_float, 50 2: string_to_percent, 51 3: string_to_percent, 52 4: string_to_float, 53 5: string_to_float, 54 6: string_to_float, 55 7: string_to_float, 56 8: string_to_float, 57 9: string_to_float, 58 10: string_to_float, 59 11: string_to_float, 56 60 }, 57 61 missing_values="nan", … … 62 66 63 67 for date, conso, real_use, theo_use, \ 64 run_mean, pen_mean, run_std, pen_std in data: 68 run_mean, pen_mean, run_std, pen_std, \ 69 _, _, _, _ in data: 65 70 if date in self: 66 71 self.add_item( -
TOOLS/ConsoGENCMIP6/bin/plot_bilan_jobs.py
r2717 r2849 46 46 skip_header=1, 47 47 converters={ 48 0: string_to_date, 49 1: string_to_float, 50 2: string_to_percent, 51 3: string_to_percent, 52 4: string_to_float, 53 5: string_to_float, 54 6: string_to_float, 55 7: string_to_float, 48 0: string_to_date, 49 1: string_to_float, 50 2: string_to_percent, 51 3: string_to_percent, 52 4: string_to_float, 53 5: string_to_float, 54 6: string_to_float, 55 7: string_to_float, 56 8: string_to_float, 57 9: string_to_float, 58 10: string_to_float, 59 11: string_to_float, 56 60 }, 57 61 missing_values="nan", … … 62 66 63 67 for date, conso, real_use, theo_use, \ 64 run_mean, pen_mean, run_std, pen_std in data: 68 run_mean, pen_mean, run_std, pen_std, \ 69 _, _, _, _ in data: 65 70 if date in self: 66 71 self.add_item( -
TOOLS/ConsoGENCMIP6/bin/plot_jobs.py
r2717 r2849 196 196 label="jobs running" 197 197 ) 198 if args.mode == "machine": 199 label = "jobs pending\n(Ressources & Priority)" 200 else: 201 label = "jobs pending" 198 202 ax.bar( 199 203 xcoord, pen_jobs, bottom=run_jobs, width=width, 200 204 linewidth=line_width, align="center", 201 205 color="firebrick", antialiased=True, 202 label="jobs pending" 203 ) 204 # ax.step( 205 # xcoord, run_jobs, where="mid", 206 # linewidth=1, color="black", label="jobs running" 207 # ) 208 # ax.step( 209 # xcoord, pen_jobs+run_jobs, where="mid", 210 # linewidth=1, color="black", label="jobs running" 211 # ) 206 label=label 207 ) 212 208 213 209 … … 223 219 # ---------------------------- 224 220 multialloc = False 225 if conso_per_day_2: 226 date_inter = projet.date_init + dt.timedelta(days=projet.days//2) 227 if projet.date_init in dates: 228 xi = dates.index(projet.date_init) 229 else: 230 xi = 0 231 232 if projet.deadline in dates: 233 xf = dates.index(projet.deadline) 234 else: 235 xf = len(dates) 236 237 if date_inter in dates: 238 xn = dates.index(date_inter) 239 yi = conso_per_day 240 yf = conso_per_day_2 241 multialloc = True 242 else: 243 if dates[-1] < date_inter: 244 xn = xf 221 222 if args.mode == "machine": 223 xi = 0 224 xn = xi 225 xf = len(dates) 226 yi = 80000. 227 yf = yi 228 else: 229 if conso_per_day_2: 230 date_inter = projet.date_init + dt.timedelta(days=projet.days//2) 231 if projet.date_init in dates: 232 xi = dates.index(projet.date_init) 233 else: 234 xi = 0 235 236 if projet.deadline in dates: 237 xf = dates.index(projet.deadline) 238 else: 239 xf = len(dates) 240 241 if date_inter in dates: 242 xn = dates.index(date_inter) 245 243 yi = conso_per_day 246 yf = conso_per_day247 elif dates[0] > date_inter:248 xn = xi249 yi = conso_per_day_2250 244 yf = conso_per_day_2 245 multialloc = True 246 else: 247 if dates[-1] < date_inter: 248 xn = xf 249 yi = conso_per_day 250 yf = conso_per_day 251 elif dates[0] > date_inter: 252 xn = xi 253 yi = conso_per_day_2 254 yf = conso_per_day_2 251 255 252 256 # ... Config axes ... … … 294 298 295 299 yticks = list(ax.get_yticks()) 296 yticks.append(conso_per_day) 297 if multialloc: 298 yticks.append(conso_per_day_2) 300 if args.mode == "machine": 301 yticks.append(yi) 302 else: 303 yticks.append(conso_per_day) 304 if multialloc: 305 yticks.append(conso_per_day_2) 299 306 ax.set_yticks(yticks) 300 301 307 302 308 for x, d in zip(xcoord, dates): … … 339 345 parser.add_argument("-d", "--dods", action="store_true", 340 346 help="copy output on dods") 347 parser.add_argument("-m", "--mode", action="store", 348 choices=["project", "machine"], 349 default="project", 350 help="copy output on dods") 341 351 342 352 return parser.parse_args() … … 375 385 get_input_files(DIR["SAVEDATA"], [OUT["PARAM"], OUT["UTHEO"]]) 376 386 377 file_list = glob.glob(os.path.join(DIR["SAVEDATA"], 378 "OUT_JOBS_PENDING_*")) 379 380 img_name = "jobs" 387 if args.mode == "project": 388 pattern = "OUT_JOBS_PENDING_" 389 else: 390 pattern = "OUT_JOBS_PEN_FULL_" 391 file_list = glob.glob( 392 os.path.join(DIR["SAVEDATA"], pattern + "*") 393 ) 394 395 img_name = "jobs_{}".format(args.mode) 381 396 382 397 today = dt.datetime.today() -
TOOLS/ConsoGENCMIP6/launch_conso.sh
r2845 r2849 64 64 fi 65 65 66 script="plot_jobs_daily" 67 printf "\n${script}\n" 68 echo "--------------------" 69 bin/${script}.py -fv 70 rc=$? 71 if [ ${rc} -ne 0 ] ; then 72 echo "${script} terminated abnormally" 73 else 74 echo "${script} OK" 75 fi 76 66 77 script="plot_login" 67 78 printf "\n${script}\n" … … 109 120 rsync -var ${ROOT_DIR}/web/* igcmg@ciclad.ipsl.jussieu.fr:dods/ConsoGENCMIP6 110 121 122 111 123 printf "\nEnd of script OK\n" 112 124 -
TOOLS/ConsoGENCMIP6/launch_jobs.sh
r2845 r2849 21 21 cd ${ROOT_DIR} 22 22 23 # Main script to get data 24 # ======================= 23 # Main script to get data for gencmip6 24 # ==================================== 25 25 script="run_pen_v2" 26 printf "${script}\n" 27 echo "--------------------" 28 bin/${script}.sh 29 rc=$? 30 if [ ${rc} -ne 0 ] ; then 31 echo "${script} terminated abnormally" 32 exit 33 else 34 echo "${script} OK" 35 fi 36 37 # Main script to get data for whole Curie 38 # ======================================= 39 script="run_pen_full" 26 40 printf "${script}\n" 27 41 echo "--------------------" … … 38 52 # ============================= 39 53 # -d : copy plot on dods 54 # -m : mode, 'project' (=default) or 'machine' 40 55 script="plot_jobs" 41 56 printf "\n${script}\n" 42 57 echo "--------------------" 43 58 bin/${script}.py -v 59 rc=$? 60 if [ ${rc} -ne 0 ] ; then 61 echo "${script} terminated abnormally" 62 else 63 echo "${script} OK" 64 fi 65 66 printf "\n${script}\n" 67 echo "--------------------" 68 bin/${script}.py -vm machine 69 rc=$? 70 if [ ${rc} -ne 0 ] ; then 71 echo "${script} terminated abnormally" 72 else 73 echo "${script} OK" 74 fi 75 76 script="plot_jobs_hourly" 77 printf "\n${script}\n" 78 echo "--------------------" 79 bin/${script}.py -vd 44 80 rc=$? 45 81 if [ ${rc} -ne 0 ] ; then
Note: See TracChangeset
for help on using the changeset viewer.