random.seed(7524019) plot = False sys.stdout = Tee(script_output_filename(tmpdir)) # algs = ['fftw', 'sfft2-eth', 'sfft2-mit', 'sfft1-eth', 'sfft1-mit', 'aafft'] algs = ["sfft3-eth"] for k in kvals: print "k = {}".format(k) print " generating input data ..." input_filename = [] for instance in range(1, num_instances + 1): print " instance {}".format(instance) dataf = data_filename(tmpdir, n, k, instance) gen_input(n, k, dataf, random.randint(0, 2000000000), stats_file=data_stats_filename(tmpdir, n, k, instance)) input_filename.append(dataf) print " writing index file ..." indexf = index_filename(tmpdir, n, k) write_index_file(indexf, input_filename) for alg in algs: resultsf = results_filename(tmpdir, alg, n, k) print " algorithm: {}".format(alg) r = run_experiment(n, k, indexf, alg, l0_eps, num_trials, resultsf) ne = num_l0_errors(r) if ne > 0: print " {} L0-errors occurred.".format(ne) for f in input_filename: os.remove(f) time_results = {}
algs = ['fftw', 'sfft2-eth', 'sfft2-mit', 'sfft1-eth', 'sfft1-mit', 'aafft'] #algs = ['sfft3-eth', 'sfft2-eth'] for k in kvals: print 'k = {}'.format(k) print ' generating input data ...' input_filename = [] for instance in range(1, num_instances + 1): print ' instance {}'.format(instance) dataf = data_filename(tmpdir, n, k, instance) gen_input(n, k, dataf, random.randint(0, 2000000000), stats_file=data_stats_filename(tmpdir, n, k, instance)) input_filename.append(dataf) print ' writing index file ...' indexf = index_filename(tmpdir, n, k) write_index_file(indexf, input_filename) for alg in algs: resultsf = results_filename(tmpdir, alg, n, k) print ' algorithm: {}'.format(alg) r = run_experiment(n, k, indexf, alg, l0_eps, num_trials, resultsf) ne = num_l0_errors(r) if ne > 0: print ' {} L0-errors occurred.'.format(ne) for f in input_filename: os.remove(f) time_results = {}
plot = False sys.stdout = Tee(script_output_filename(tmpdir)) algs = ['fftw', 'sfft2-eth', 'sfft2-mit', 'sfft1-eth', 'sfft1-mit', 'aafft'] #algs = ['sfft3-eth', 'sfft2-eth'] for k in kvals: print 'k = {}'.format(k) print ' generating input data ...' input_filename = [] for instance in range(1, num_instances + 1): print ' instance {}'.format(instance) dataf = data_filename(tmpdir, n, k, instance) gen_input(n, k, dataf, random.randint(0, 2000000000), stats_file=data_stats_filename(tmpdir, n, k, instance)) input_filename.append(dataf) print ' writing index file ...' indexf = index_filename(tmpdir, n, k) write_index_file(indexf, input_filename) for alg in algs: resultsf = results_filename(tmpdir, alg, n, k) print ' algorithm: {}'.format(alg) r = run_experiment(n, k, indexf, alg, l0_eps, num_trials, resultsf) ne = num_l0_errors(r) if ne > 0: print ' {} L0-errors occurred.'.format(ne) for f in input_filename: os.remove(f) time_results = {}