def run_set( name, V_list, N_list, T_list ): outfile.write( '%s = [\n' % name ) for i in range( len( V_list ) ): outfile.write( '# T=%g, N=%g, V=%g\n' % ( T_list[i], N_list[i], V_list[i] ) ) outfile.write( '[' ) for c in range( 3 ): runtime = run_single.run_single( T_list[i], V_list[i], N_list[i] ) runtime *= T/T_list[i] outfile.write( '%g,' % runtime ) outfile.write( '],\n' ) outfile.flush() outfile.write( ']\n' )
def run_set(outfile, name, V_list, N_list, T_list): outfile.write('%s = [\n' % name) for i in range(len(V_list)): outfile.write('# T=%g, N=%g, V=%g\n' % (T_list[i], N_list[i], V_list[i])) run_times = [] est_times = [] for c in range(REPEAT): run_time = run_single.run_single(T_list[i], V_list[i], N_list[i], R, D) est_time = run_time * (T / T_list[i]) run_times.append(run_time) est_times.append(est_time) outfile.write('# run_times = %s\n' % str(run_times)) outfile.write('%s,\n' % str(est_times)) outfile.flush() outfile.write(']\n')
def run_set(outfile, name, V_list, N_list, T_list): outfile.write('%s = [\n' % name) for i in range(len(V_list)): outfile.write('# T=%g, N=%g, V=%g\n' % (T_list[i], N_list[i], V_list[i])) run_times = [] est_times = [] for c in range(REPEAT): run_time, steps, stepspersec = run_single.run_single( T_list[i], V_list[i], N_list[i]) est_time = run_time * (T / T_list[i]) run_times.append(run_time) est_times.append(est_time) outfile.write('# steps= %d, steps/sec= %f, steps/N= %f\n'\ % (steps, stepspersec, float(steps) / N_list[i])) outfile.write('# run_times = %s\n' % str(run_times)) outfile.write('%s,\n' % str(est_times)) outfile.flush() outfile.write(']\n')
def run_set(outfile, name, V_list, N_list, T_list): outfile.write('%s = [\n' % name) for i in range(len(V_list)): outfile.write('# T=%g, N=%g, V=%g\n' % (T_list[i], N_list[i], V_list[i])) run_times = [] est_times = [] for c in range(REPEAT): run_time, steps, stepspersec = run_single.run_single(T_list[i], V_list[i], N_list[i]) est_time = run_time * (T / T_list[i]) run_times.append(run_time) est_times.append(est_time) outfile.write('# steps= %d, steps/sec= %f, steps/N= %f\n'\ % (steps, stepspersec, float(steps) / N_list[i])) outfile.write('# run_times = %s\n' % str(run_times)) outfile.write('%s,\n' % str(est_times)) outfile.flush() outfile.write(']\n')
nminutes = 1 if len(sys.argv) > 4: run_type = sys.argv[4] else: run_type = 'run_single' last_experiment_time = time.time() while True: print('\n\n\n======================================================') print('New experiment burst. Initiated at ' + strftime('%Y-%m-%d %H:%M:%S')) print('======================================================') if run_type == 'run_single': run_single([input_metadata_file_path, data_file_path, 'localhost', '0', False]) elif run_type == 'run_sweep': run_sweep([input_metadata_file_path, data_file_path, 'localhost', '0', False]) else: break try: print('Waiting for next experiment burst... (press ctrl-c to stop)') while time.time() - last_experiment_time < nminutes*60: sleep(1) last_experiment_time = time.time() except KeyboardInterrupt: print('\nThe bursts experiment has ended.\n')