diff --git a/test/advection1d.py b/test/advection1d.py index 962789c..7e9c2e9 100644 --- a/test/advection1d.py +++ b/test/advection1d.py @@ -49,7 +49,7 @@ # COMPILE CODE AT MULTIPLE RESOLUTIONS USING SEPARATE BUILD FILE for n,res in enumerate(RES): util.change_cparm('N{}TOT'.format(IDIM), res, TMP_BUILD) - call(['python', TMP_BUILD, '-dir', TMP_DIR, '-idim', str(IDIM)]) + call([sys.executable, TMP_BUILD, '-dir', TMP_DIR, '-idim', str(IDIM)]) call(['cp', os.path.join(os.getcwd(), TMP_DIR, 'bhlight'), '../../test/' + TMP_DIR + '/bhlight_' + str(res)]) copyfile(os.path.join(os.getcwd(), TMP_DIR, 'param_template.dat'), '../../test/' + diff --git a/test/advection2d.py b/test/advection2d.py index fcad3e7..ad0d544 100644 --- a/test/advection2d.py +++ b/test/advection2d.py @@ -71,7 +71,7 @@ def phi_true(t,x,y): if MPI: for d in [1,2]: util.change_cparm('N{}CPU'.format(d), 2, TMP_BUILD) - call(['python', TMP_BUILD, '-dir', TMP_DIR]) + call([sys.executable, TMP_BUILD, '-dir', TMP_DIR]) parm_src = os.path.join(os.getcwd(), TMP_DIR, 'param_template.dat') parm_dest = '../../test/' + TMP_DIR + '/param.dat' call(['cp', os.path.join(os.getcwd(), TMP_DIR, 'bhlight'), diff --git a/test/advection3d.py b/test/advection3d.py index 0b728bd..00deceb 100644 --- a/test/advection3d.py +++ b/test/advection3d.py @@ -74,7 +74,7 @@ def phi_true(t,x,y,z): if MPI: for d in [1,2,3]: util.change_cparm('N{}CPU'.format(d), 2, TMP_BUILD) - call(['python', TMP_BUILD, '-dir', TMP_DIR]) + call([sys.executable, TMP_BUILD, '-dir', TMP_DIR]) parm_src = os.path.join(os.getcwd(), TMP_DIR, 'param_template.dat') parm_dest = '../../test/' + TMP_DIR + '/param.dat' call(['cp', os.path.join(os.getcwd(), TMP_DIR, 'bhlight'), diff --git a/test/binning.py b/test/binning.py index 39f2e74..62beee4 100644 --- a/test/binning.py +++ b/test/binning.py @@ -32,7 +32,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -args = ['python', 'build.py', '-dir', TMP_DIR, '-idim', str(IDIM)] +args = [sys.executable, 'build.py', '-dir', TMP_DIR, '-idim', str(IDIM)] if MPI: args += ['-mpi'] call(args) diff --git a/test/bondi.py b/test/bondi.py index af4acfa..e5201fd 100644 --- a/test/bondi.py +++ b/test/bondi.py @@ -41,7 +41,7 @@ for n in xrange(len(RES)): util.change_cparm('N1TOT', RES[n], TMP_BUILD) util.change_cparm('N2TOT', RES[n], TMP_BUILD) - call(['python', TMP_BUILD, '-dir', TMP_DIR]) + call([sys.executable, TMP_BUILD, '-dir', TMP_DIR]) call(['cp', os.path.join(os.getcwd(), TMP_DIR, 'bhlight'), '../../test/' + TMP_DIR + '/bhlight_' + str(RES[n])]) copyfile(os.path.join(os.getcwd(), TMP_DIR, 'param_template.dat'), '../../test/' + diff --git a/test/brem.py b/test/brem.py index eeef6aa..11f9d9c 100644 --- a/test/brem.py +++ b/test/brem.py @@ -35,7 +35,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-dir', TMP_DIR]) +call([sys.executable, 'build.py', '-dir', TMP_DIR]) os.chdir('../../test') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/brem_mpi.py b/test/brem_mpi.py index 811193f..6e46db8 100644 --- a/test/brem_mpi.py +++ b/test/brem_mpi.py @@ -28,7 +28,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build_mpi.py', '-dir', TMP_DIR]) +call([sys.executable, 'build_mpi.py', '-dir', TMP_DIR]) os.chdir('../../test/') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/comptonization.py b/test/comptonization.py index 5d525a5..2eee871 100644 --- a/test/comptonization.py +++ b/test/comptonization.py @@ -31,7 +31,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-dir', TMP_DIR]) +call([sys.executable, 'build.py', '-dir', TMP_DIR]) os.chdir('../../test') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/entropy.py b/test/entropy.py index b2e265d..9ba1812 100644 --- a/test/entropy.py +++ b/test/entropy.py @@ -29,7 +29,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-dir', TMP_DIR]) +call([sys.executable, 'build.py', '-dir', TMP_DIR]) os.chdir('../../test') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/fornax.py b/test/fornax.py index a7c0760..0ca03d7 100644 --- a/test/fornax.py +++ b/test/fornax.py @@ -41,7 +41,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -compile_args = ['python','build.py','-dir',TMP_DIR] +compile_args = [sys.executable,'build.py','-dir',TMP_DIR] if MPI: compile_args += ['-mpi'] if EQUIL: diff --git a/test/generate_all_plots.py b/test/generate_all_plots.py index 68db9d2..5ec551b 100644 --- a/test/generate_all_plots.py +++ b/test/generate_all_plots.py @@ -48,7 +48,7 @@ for TEST in TESTS: print ' ' + util.color.BOLD + TEST + util.color.NORMAL - args = ['python', TEST] + args = [sys.executable, TEST] if TABLE: args += ['-table'] popen = sp.Popen(args, stdout=sp.PIPE, stderr=sp.PIPE, diff --git a/test/leptoneq.py b/test/leptoneq.py index c0419fe..82db28f 100644 --- a/test/leptoneq.py +++ b/test/leptoneq.py @@ -38,7 +38,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -compile_args = ['python','build.py','-dir',TMP_DIR] +compile_args = [sys.executable,'build.py','-dir',TMP_DIR] if MPI: compile_args += ['-mpi'] call(compile_args) diff --git a/test/mhdmodes1d.py b/test/mhdmodes1d.py index c0f6fb3..da54457 100644 --- a/test/mhdmodes1d.py +++ b/test/mhdmodes1d.py @@ -40,7 +40,7 @@ for n in range(len(RES)): util.change_cparm('N{}TOT'.format(IDIM), RES[n], TMP_BUILD) #util.change_cparm('RECONSTRUCTION', 'PARA', TMP_BUILD) - args = ['python', TMP_BUILD, '-dir', TMP_DIR, '-idim', str(IDIM)] + args = [sys.executable, TMP_BUILD, '-dir', TMP_DIR, '-idim', str(IDIM)] if TABLE: args += ['-table'] call(args) diff --git a/test/mhdmodes2d.py b/test/mhdmodes2d.py index 02f4849..be73007 100644 --- a/test/mhdmodes2d.py +++ b/test/mhdmodes2d.py @@ -44,7 +44,7 @@ for n in range(len(RES)): util.change_cparm('N1TOT', RES[n], TMP_BUILD) util.change_cparm('N2TOT', RES[n], TMP_BUILD) - args = ['python', TMP_BUILD, '-dir', TMP_DIR] + args = [sys.executable, TMP_BUILD, '-dir', TMP_DIR] if TABLE: args.append('-table') call(args) diff --git a/test/mhdmodes2d_mpi.py b/test/mhdmodes2d_mpi.py index 9eded7f..bf36ccc 100644 --- a/test/mhdmodes2d_mpi.py +++ b/test/mhdmodes2d_mpi.py @@ -41,7 +41,7 @@ for n in range(len(RES)): util.change_cparm('N1TOT', RES[n], TMP_BUILD) util.change_cparm('N2TOT', RES[n], TMP_BUILD) - call(['python', TMP_BUILD, '-dir', TMP_DIR]) + call([sys.executable, TMP_BUILD, '-dir', TMP_DIR]) call(['cp', os.path.join(os.getcwd(), TMP_DIR, 'bhlight'), '../../test/' + TMP_DIR + '/bhlight_' + str(RES[n])]) copyfile(os.path.join(os.getcwd(), TMP_DIR, 'param_template.dat'), '../../test/' + diff --git a/test/mhdmodes3d.py b/test/mhdmodes3d.py index f6c260e..872b9bf 100644 --- a/test/mhdmodes3d.py +++ b/test/mhdmodes3d.py @@ -54,7 +54,7 @@ util.change_cparm('N2CPU', nxcpu, TMP_BUILD) util.change_cparm('N3CPU', nxcpu, TMP_BUILD) util.change_cparm('OPENMP', 'True', TMP_BUILD) - args = ['python', TMP_BUILD, '-dir', TMP_DIR] + args = [sys.executable, TMP_BUILD, '-dir', TMP_DIR] if TABLE: args.append('-table') call(args) diff --git a/test/multiscatt.py b/test/multiscatt.py index e1d3122..be0840e 100644 --- a/test/multiscatt.py +++ b/test/multiscatt.py @@ -37,7 +37,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -args = ['python', 'build.py', '-dir', TMP_DIR] +args = [sys.executable, 'build.py', '-dir', TMP_DIR] if MPI: args += ['-mpi'] if NOREBALANCE: diff --git a/test/sod.py b/test/sod.py index ddd9a23..10152f8 100644 --- a/test/sod.py +++ b/test/sod.py @@ -36,7 +36,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -args = ['python', 'build.py', '-dir', TMP_DIR] +args = [sys.executable, 'build.py', '-dir', TMP_DIR] if TABLE: args.append('-table') if FORCE: diff --git a/test/sod_mpi.py b/test/sod_mpi.py index 5baa405..5f0fb2a 100644 --- a/test/sod_mpi.py +++ b/test/sod_mpi.py @@ -27,7 +27,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-mpi', '-dir', TMP_DIR]) +call([sys.executable, 'build.py', '-mpi', '-dir', TMP_DIR]) os.chdir('../../test/') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/table.py b/test/table.py index ab09254..b872746 100644 --- a/test/table.py +++ b/test/table.py @@ -24,7 +24,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -args = ['python', 'build.py', '-dir', TMP_DIR] +args = [sys.executable, 'build.py', '-dir', TMP_DIR] call(args) call(['mv', 'sc_eos_gamma_{}.h5'.format(str(gam).replace('.','p')), TMP_DIR]) os.chdir('../../test/') diff --git a/test/test_all.py b/test/test_all.py index 51fd9cc..5784054 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -148,7 +148,7 @@ def L1_norm(xa, ya, xb, yb): args = name_to_args(TEST) TESTNAME = args[0][:-3] if len(args) == 1 else TEST print(' ' + util.color.BOLD + TESTNAME + util.color.NORMAL) - args = ['python'] + args + ['-auto'] + args = [sys.executable] + args + ['-auto'] if TABLE: args += ['-table'] if FAST: diff --git a/test/thermalization.py b/test/thermalization.py index 4432104..437f6cc 100644 --- a/test/thermalization.py +++ b/test/thermalization.py @@ -31,7 +31,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-dir', TMP_DIR]) +call([sys.executable, 'build.py', '-dir', TMP_DIR]) os.chdir('../../test') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/thermalization_mpi.py b/test/thermalization_mpi.py index f562f56..8097c3c 100644 --- a/test/thermalization_mpi.py +++ b/test/thermalization_mpi.py @@ -39,7 +39,7 @@ os.chdir('../prob/' + 'thermalization') # COMPILE CODE -call(['python', 'build_mpi.py', '-dir', TMP_DIR]) +call([sys.executable, 'build_mpi.py', '-dir', TMP_DIR]) os.chdir('../../test') call(['mv', '../prob/' + 'thermalization' + '/' + TMP_DIR, './']) diff --git a/test/tracers1d.py b/test/tracers1d.py index 58be9c0..8aedac9 100644 --- a/test/tracers1d.py +++ b/test/tracers1d.py @@ -39,7 +39,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-dir', TMP_DIR, '-idim', +call([sys.executable, 'build.py', '-dir', TMP_DIR, '-idim', str(IDIM),'-ntot',str(RES),'-tracers']) os.chdir('../../test/') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/tracers3d.py b/test/tracers3d.py index 1136de7..469130c 100644 --- a/test/tracers3d.py +++ b/test/tracers3d.py @@ -37,7 +37,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -call(['python', 'build.py', '-dir', TMP_DIR, +call([sys.executable, 'build.py', '-dir', TMP_DIR, '-classic', '-nob', '-norenorm', '-tracertest']) os.chdir('../../test/') call(['mv', '../prob/' + PROBLEM + '/' + TMP_DIR, './']) diff --git a/test/yedecay.py b/test/yedecay.py index 1671cdf..f14c187 100644 --- a/test/yedecay.py +++ b/test/yedecay.py @@ -40,7 +40,7 @@ os.chdir('../prob/' + PROBLEM) # COMPILE CODE -compile_args = ['python','build.py','-dir',TMP_DIR] +compile_args = [sys.executable,'build.py','-dir',TMP_DIR] if MPI: compile_args += ['-mpi'] if ANTINU: