description1 = """ Building the scale free version of the setup mri and running it on one processor. """ description2 = """ Building the MKS version of the setup mri and running it on one processor. """ flags1 = "SETUP=mri PARALLEL=0 FARGO_DISPLAY=NONE GPU=0 RESCALE=0 UNITS=0" flags2 = "SETUP=mri PARALLEL=0 FARGO_DISPLAY=NONE GPU=0 RESCALE=1 UNITS=MKS" DimTest = T.GenericTest(testname = "DIM_TEST", flags1 = flags1, launch1 = "./fargo3d -m", description1 = description1, flags2 = flags2, launch2 = "./fargo3d -m", description2 = description2, parfile = "setups/mri/mri.par", verbose = False, clean=True, plot=False, restore=False, field = "gasdens", compact = True, parameters = {'dt':0.4, 'ninterm':1, 'ntot':1, 'nx':60, 'ny':40, 'nz':12, 'eta':1e-4}) DimTest.run()
with forced migration of the planet. """ flags1 = "SETUP=fargo PARALLEL=1 MPICUDA=1 FARGO_DISPLAY=NONE GPU=1 RESCALE=0 UNITS=0" flags2 = "SETUP=fargo PARALLEL=1 MPICUDA=0 FARGO_DISPLAY=NONE GPU=0 RESCALE=1 UNITS=CGS" DimTest = T.GenericTest(testname="DIM_TEST", flags1=flags1, launch1="mpirun -np 2 ./fargo3d -m -D 0 ", description1=description1, flags2=flags2, launch2="mpirun -np 3 ./fargo3d -m ", description2=description2, parfile="setups/fargo/fargo.par", verbose=False, clean=True, plot=False, restore=False, field="gasdens", compact=True, parameters={ 'dt': 1.0, 'ninterm': 10, 'ntot': 20, 'nx': 64, 'ny': 64, 'releasedate': 10, 'releaseradius': 1.1, 'semimajoraxis': 0.9 }) DimTest.run()
OTTest = T.GenericTest(testname="OT_VORTEX_YZ-XZ", flags1=flags, launch1="./fargo3d", description1=description1, flags2=flags, launch2="./fargo3d", description2=description2, parfile="setups/otvortex/otvortex.par", verbose=False, plot=False, field="gasdens", compact=True, parameters1={ 'dt': 0.01, 'ninterm': 1, 'ntot': 1, 'ny': 128, 'nz': 128, 'nx': 1 }, parameters2={ 'dt': 0.01, 'ninterm': 1, 'ntot': 1, 'ny': 1, 'nz': 128, 'nx': 128 }, parameters=None, clean=True, keep=True, restore=False)
and running it with one processor. """ description2 = """ Running the setup Orszag-Tang Vortex with four processors. """ flags = "SETUP=otvortex PARALLEL=1 FARGO_DISPLAY=NONE GPU=0" MpiTest = T.GenericTest(testname="MPI_TEST", flags1=flags, launch1="./fargo3d", description1=description1, flags2=flags, launch2="mpirun -np 4 ./fargo3d", description2=description2, parfile="setups/otvortex/otvortex.par", verbose=False, clean=True, plot=False, field="gasdens", compact=True, parameters={ 'dt': 0.2, 'ninterm': 1, 'ntot': 1, 'ny': 64, 'nz': 64, 'nx': 1 }) MpiTest.run()
import test as T except ImportError: print "\nError!!! test module can not be imported. Be sure that you're executing the test from the main directory, using make for that.\n" description1 = """Testing a restart with the p3diso setup (including Stockholm's damping, a mobile massive planet and the indirect term) Initial run is on 2 processors.\n""" description2 = """Restarting the simulation with 4 processors.\n""" RestartTest = T.GenericTest(testname = "RESTART_TESTMOV", flags1 = "SETUP=p3diso PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch1 = "mpirun -np 2 ./fargo3d", description1 = description1, flags2 = "SETUP=p3diso PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch2 = "mpirun -quiet -np 4 ./fargo3d -S 1", description2 = description2, parfile = "setups/p3diso/p3diso.par", verbose = False, plot=False, field = "gasdens", compact = True, parameters = {'dt':0.4, 'ninterm':2 ,'ntot':5, 'nx':80, 'ny':35, 'nz':10, 'sigma0':3.1e-3, 'PlanetConfig':"planets/MobileJupiter.cfg", 'IndirectTerm':"YES"}, clean = False, restore = False, n = 2) RestartTest.set_commands(command1 = "mkdir RESTART_TESTMOV/test2; cp RESTART_TESTMOV/test1/* RESTART_TESTMOV/test2/", command2 = None) RestartTest.run()
description2 = """ Building the MKS parallel version of the setup p3diso and running it with four processors. """ flags1 = "SETUP=p3diso PARALLEL=1 FARGO_DISPLAY=NONE GPU=0 RESCALE=0 UNITS=0" flags2 = "SETUP=p3diso PARALLEL=1 FARGO_DISPLAY=NONE GPU=0 RESCALE=1 UNITS=MKS" DimTestp3d = T.GenericTest(testname="P3DISO_TEST", flags1=flags1, launch1="mpirun -np 2 ./fargo3d -m", description1=description1, flags2=flags2, launch2="mpirun -np 4 ./fargo3d -m", description2=description2, parfile="setups/p3diso/p3diso.par", verbose=False, clean=True, plot=False, field="gasdens", compact=True, parameters={ 'dt': 0.8, 'ninterm': 1, 'ntot': 1, 'ny': 20, 'nz': 8, 'nx': 30 }) DimTestp3d.run()
description1 = """Testing a restart with the mri setup Initial run is on 3 processors.\n""" description2 = """Restarting the simulation with 4 processors.\n""" RestartTest = T.GenericTest( testname="RESTART_TEST", flags1="SETUP=mri UNITS=0 PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch1="mpirun -np 3 ./fargo3d", description1=description1, flags2="SETUP=mri PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch2="mpirun -quiet -np 4 ./fargo3d -S 1", description2=description2, parfile="setups/mri/mri.par", verbose=False, plot=False, field="gasdens", compact=True, parameters={ 'dt': 0.4, 'ninterm': 2, 'ntot': 5, 'nx': 50, 'ny': 25, 'nz': 10 }, clean=True, restore=False, n=2) RestartTest.set_commands( command1= "mkdir RESTART_TEST/test2; cp RESTART_TEST/test1/* RESTART_TEST/test2/",
try: import test as T except ImportError: print "\nError!!! test module can not be imported. Be sure that you're executing the test from the main directory, using make for that.\n" description1 = """Running otvortex on the CPU.\n""" description2 = """Running otvortex on the GPU.\n""" CPUGPUTest = T.GenericTest( testname="CPU_vs_GPU_TEST", flags1="SETUP=otvortex PARALLEL=0 FARGO_DISPLAY=NONE GPU=0", launch1="./fargo3d", description1=description1, flags2="SETUP=otvortex PARALLEL=0 FARGO_DISPLAY=NONE GPU=1", launch2="./fargo3d -D 0", description2=description2, parfile="setups/otvortex/otvortex.par", verbose=False, plot=False, field="gasdens", compact=True, parameters={ 'dt': 0.2, 'ninterm': 1, 'ntot': 1, 'ny': 64, 'nz': 64, 'nx': 1 }, clean=True) CPUGPUTest.run()
RestartTest = T.GenericTest( testname="SYMDISK_TEST", flags1="SETUP=p3diso PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch1="mpirun -np 3 ./fargo3d", description1=description1, flags2="SETUP=p3disof PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch2="mpirun -quiet -np 4 ./fargo3d", description2=description2, parfile="setups/p3diso/p3diso.par", verbose=False, plot=False, field="gasdens", compact=True, parameters1={ 'dt': 0.4, 'ninterm': 1, 'ntot': 1, 'nx': 80, 'ny': 35, 'nz': 10 }, parameters2={ 'dt': 0.4, 'ninterm': 1, 'ntot': 1, 'nx': 80, 'ny': 35, 'nz': 20, 'zmax': "1.72079632679489661922", 'setup': "p3disof" }, clean=True, restore=False)
description1 = """Testing a restart with the p3diso setup. Initial run is on one processor only.\n""" description2 = """Restarting the simulation with 4 processors.\n""" RestartTest = T.GenericTest( testname="RESTART_TESTP3D", flags1="SETUP=p3diso PARALLEL=0 FARGO_DISPLAY=NONE GPU=0", launch1="./fargo3d", description1=description1, flags2="SETUP=p3diso PARALLEL=1 FARGO_DISPLAY=NONE GPU=0", launch2="mpirun -np 4 ./fargo3d -S 1", description2=description2, parfile="setups/p3diso/p3diso.par", verbose=False, plot=False, field="gasdens", compact=True, parameters={ 'dt': 0.5, 'ninterm': 1, 'ntot': 2, 'nx': 80, 'ny': 35, 'nz': 10 }, clean=True, n=2) RestartTest.set_commands( command1= "mkdir RESTART_TESTP3D/test2; cp RESTART_TESTP3D/test1/* RESTART_TESTP3D/test2/",
try: import test as T except ImportError: print "\nError!!! test module can not be imported. Be sure that you're executing the test from the main directory, using make for that.\n" description1 = """Running p3diso setup without ghostsX on the GPU.\n""" description2 = """Running p3diso setup with ghostsX on the CPU.\n""" Ghostsp3disoTest = T.GenericTest( testname="p3diso_Ghosts_TEST", flags1="SETUP=p3diso GHOSTSX=0 PARALLEL=0 FARGO_DISPLAY=NONE GPU=1", launch1="./fargo3d -D 0 -m", description1=description1, flags2="SETUP=p3diso GHOSTSX=1 PARALLEL=0 FARGO_DISPLAY=NONE GPU=0", launch2="./fargo3d -m", description2=description2, parfile="setups/p3diso/p3diso.par", verbose=False, plot=False, field="gasdens", compact=True, parameters={ 'dt': 0.2, 'ninterm': 1, 'ntot': 1, 'ny': 64, 'nx': 64, 'nz': 10 }, clean=True) Ghostsp3disoTest.run()