updated omp tests for all combinations

This commit is contained in:
Bryan Herman 2013-09-29 17:21:10 -04:00
parent 0f95311f47
commit 99d9118eca
2 changed files with 107 additions and 15 deletions

View file

@ -67,12 +67,17 @@ sys.path.append(pwd)
# Set list of tests, either default or from command line
flags = []
tests = ['compile', 'normal', 'debug', 'optimize', 'hdf5', 'hdf5-debug',
'hdf5-optimize', 'mpi', 'mpi-debug', 'mpi-optimize', 'omp',
'phdf5', 'phdf5-debug', 'phdf5-optimize', 'mpi-omp', 'omp-hdf5',
'petsc', 'petsc-debug', 'petsc-optimize', 'phdf5-petsc',
'phdf5-petsc-debug', 'phdf5-petsc-optimize',
'omp-phdf5-petsc-optimize']
tests = ['compile', 'normal', 'debug', 'optimize',
'omp', 'omp-debug', 'omp-optimize',
'hdf5', 'hdf5-debug', 'hdf5-optimize',
'omp-hdf5', 'omp-hdf5-debug', 'omp-hdf5-optimize',
'mpi', 'mpi-debug', 'mpi-optimize',
'mpi-omp', 'mpi-omp-debug', 'mpi-omp-optimize',
'phdf5', 'phdf5-debug', 'phdf5-optimize',
'phdf5-omp', 'phdf5-omp-debug', 'phdf5-omp-optimize',
'petsc', 'petsc-debug', 'petsc-optimize',
'phdf5-petsc', 'phdf5-petsc-debug', 'phdf5-petsc-optimize',
'omp-phdf5-petsc', 'omp-phdf5-petsc-debug', 'omp-phdf5-petsc-optimize']
if len(sys.argv) > 1:
flags = [i for i in sys.argv[1:] if i.startswith('-')]
tests_ = [i for i in sys.argv[1:] if not i.startswith('-')]
@ -117,13 +122,19 @@ results = []
for name in tests:
if name == 'compile':
run_compile()
elif name in ['normal', 'debug', 'optimize', 'omp'
'hdf5', 'hdf5-debug', 'hdf5-optimize', 'omp-hdf5']:
elif name in ['normal', 'debug', 'optimize',
'hdf5', 'hdf5-debug', 'hdf5-optimize',
'omp', 'omp-debug', 'omp-optimize',
'omp-hdf5', 'omp-hdf5-debug', 'omp-hdf5-optimize']:
run_suite(name=name)
elif name in ['mpi', 'mpi-debug', 'mpi-optimize', 'mpi-omp', 'phdf5',
'phdf5-debug', 'phdf5-optimize', 'petsc', 'petsc-debug',
'petsc-optimize', 'phdf5-petsc', 'phdf5-petsc-debug',
'phdf5-petsc-optimize', 'omp-phdf5-petsc-optimize']:
elif name in ['mpi', 'mpi-debug', 'mpi-optimize',
'mpi-omp', 'mpi-omp-debug', 'mpi-omp-optimize',
'phdf5', 'phdf5-debug', 'phdf5-optimize',
'phdf5-omp', 'phdf5-omp-debug', 'phdf5-omp-optimize',
'petsc', 'petsc-debug', 'petsc-optimize',
'phdf5-petsc', 'phdf5-petsc-debug', 'phdf5-petsc-optimize',
'omp-phdf5-petsc', 'omp-phdf5-petsc-debug',
'omp-phdf5-petsc-optimize']:
run_suite(name=name, mpi=True)
# print out summary of results

View file

@ -81,6 +81,20 @@ def test_omp():
shutil.move('openmc', 'openmc-omp')
def test_omp_debug():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'OPENMP=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-debug')
def test_omp_optimize():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'OPENMP=yes', 'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-optimize')
def test_hdf5():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'HDF5=yes'])
@ -102,6 +116,27 @@ def test_hdf5_optimize():
shutil.move('openmc', 'openmc-hdf5-optimize')
def test_omp_hdf5():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'OPENMP=yes', 'HDF5=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-hdf5')
def test_omp_hdf5_debug():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'OPENMP=yes', 'HDF5=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-hdf5-debug')
def test_omp_hdf5_optimize():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'OPENMP=yes', 'HDF5=yes', 'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-hdf5-optimize')
def test_petsc():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes'])
@ -131,11 +166,18 @@ def test_mpi_omp():
shutil.move('openmc', 'openmc-mpi-omp')
def test_omp_hdf5():
def test_mpi_omp_debug():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes', 'HDF5=yes'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-hdf5')
shutil.move('openmc', 'openmc-mpi-omp-debug')
def test_mpi_omp_optimize():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes', 'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-mpi-omp-optimize')
def test_mpi_hdf5():
@ -159,6 +201,29 @@ def test_mpi_hdf5_optimize():
shutil.move('openmc', 'openmc-phdf5-optimize')
def test_mpi_omp_hdf5():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes', 'HDF5=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-omp')
def test_mpi_omp_hdf5_debug():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes', 'HDF5=yes',
'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-omp-debug')
def test_mpi_omp_hdf5_optimize():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes', 'HDF5=yes',
'OPTIMIZE=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-phdf5-omp-optimize')
def test_mpi_hdf5_petsc():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes'])
@ -182,6 +247,22 @@ def test_mpi_hdf5_petsc_optimize():
shutil.move('openmc', 'openmc-phdf5-petsc-optimize')
def test_mpi_omp_hdf5_petsc():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OMP=yes', 'HDF5=yes',
'PETSC=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-phdf5-petsc')
def test_mpi_omp_hdf5_petsc_debug():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OMP=yes', 'HDF5=yes',
'PETSC=yes', 'DEBUG=yes'])
assert returncode == 0
shutil.move('openmc', 'openmc-omp-phdf5-petsc-debug')
def test_mpi_omp_hdf5_petsc_optimize():
returncode = run(['make', 'distclean'])
returncode = run(['make', compiler, 'MPI=yes', 'OMP=yes', 'HDF5=yes',