Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 72 additions & 30 deletions cscs-checks/libraries/gridtools/gridtools_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@


@rfm.parameterized_test(['vertical_advection_dycore_naive'],
['vertical_advection_dycore_mc'],
['simple_hori_diff_naive'], ['simple_hori_diff_mc'],
['vertical_advection_dycore_cuda'],
['simple_hori_diff_cuda'])
['vertical_advection_dycore_cpu_ifirst'],
['vertical_advection_dycore_cpu_kfirst'],
['simple_hori_diff_naive'],
['simple_hori_diff_cpu_ifirst'],
['simple_hori_diff_cpu_kfirst'],
['vertical_advection_dycore_gpu'],
['simple_hori_diff_gpu'])
class GridToolsCheck(rfm.RegressionTest):
def __init__(self, variant):
# Check if this is a device check
self.descr = 'GridTools test base'
self.valid_prog_environs = ['builtin']
self.modules = ['CMake', 'Boost']
is_cuda_test = 'cuda' in variant
is_cuda_test = 'gpu' in variant
if is_cuda_test:
self.modules.append('craype-accel-nvidia60')

Expand All @@ -32,6 +35,9 @@ def __init__(self, variant):
'-DBUILD_SHARED_LIBS:BOOL=OFF',
'-DGT_GCL_ONLY:BOOL=OFF',
'-DCMAKE_CXX_COMPILER=CC',
'-DCMAKE_C_COMPILER=cc',
'-DCMAKE_CXX_FLAGS=-openmp',
'-DCMAKE_Fortran_COMPILER=ftn',
'-DGT_USE_MPI:BOOL=OFF',
'-DGT_SINGLE_PRECISION:BOOL=OFF',
'-DGT_ENABLE_PERFORMANCE_METERS:BOOL=ON',
Expand All @@ -50,6 +56,7 @@ def __init__(self, variant):
'-DGT_ENABLE_BACKEND_MC=OFF',
'-DGT_ENABLE_BACKEND_CUDA:BOOL=ON',
'-DCUDA_ARCH:STRING=sm_60',
'-DCMAKE_CUDA_COMPILER=nvcc',
'-DCMAKE_CUDA_HOST_COMPILER:STRING=CC'
]
else:
Expand All @@ -60,6 +67,8 @@ def __init__(self, variant):
'-DGT_ENABLE_BACKEND_CUDA:BOOL=OFF'
]

self.build_system.flags_from_environ = False

self.valid_systems = ['daint:gpu', 'dom:gpu']
if is_cuda_test:
self.num_gpus_per_node = 1
Expand All @@ -75,92 +84,125 @@ def __init__(self, variant):
self.stdout, 'timer', int)
}
self.build_system.max_concurrency = 2

self.variant_data = {
'vertical_advection_dycore_naive': {
'executable_opts': ['150', '150', '150'],
'reference': {
'daint:mc': {
'wall_time': (3400, None, 0.1, 'ms')
'wall_time': (2540, None, 0.1, 'ms')
},
'daint:gpu': {
'wall_time': (2170, None, 0.1, 'ms')
},
'dom:mc': {
'wall_time': (2540, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (2170, None, 0.1, 'ms')
}
}
},
'vertical_advection_dycore_cpu_ifirst': {
'executable_opts': ['150', '150', '150'],
'reference': {
'daint:mc': {
'wall_time': (3260, None, 0.1, 'ms')
},
'daint:gpu': {
'wall_time': (3800, None, 0.1, 'ms')
'wall_time': (2320, None, 0.1, 'ms')
},
'dom:mc': {
'wall_time': (3400, None, 0.1, 'ms')
'wall_time': (3260, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (3800, None, 0.1, 'ms')
'wall_time': (2320, None, 0.1, 'ms')
}
}
},
'vertical_advection_dycore_mc': {
'vertical_advection_dycore_cpu_kfirst': {
'executable_opts': ['150', '150', '150'],
'reference': {
'daint:mc': {
'wall_time': (3500, None, 0.1, 'ms')
'wall_time': (3090, None, 0.1, 'ms')
},
'daint:gpu': {
'wall_time': (3700, None, 0.1, 'ms')
'wall_time': (2290, None, 0.1, 'ms')
},
'dom:mc': {
'wall_time': (3500, None, 0.1, 'ms')
'wall_time': (3090, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (3700, None, 0.1, 'ms')
'wall_time': (2290, None, 0.1, 'ms')
}
}
},
'simple_hori_diff_naive': {
'executable_opts': ['100', '100', '100'],
'reference': {
'daint:mc': {
'wall_time': (3200, None, 0.1, 'ms')
'wall_time': (2470, None, 0.1, 'ms')
},
'daint:gpu': {
'wall_time': (3700, None, 0.1, 'ms')
'wall_time': (2860, None, 0.1, 'ms')
},
'dom:mc': {
'wall_time': (3200, None, 0.1, 'ms')
'wall_time': (2470, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (3700, None, 0.1, 'ms')
'wall_time': (2860, None, 0.1, 'ms')
}
}
},
'simple_hori_diff_mc': {
'simple_hori_diff_cpu_ifirst': {
'executable_opts': ['100', '100', '100'],
'reference': {
'daint:mc': {
'wall_time': (3300, None, 0.1, 'ms')
'wall_time': (2870, None, 0.1, 'ms')
},
'daint:gpu': {
'wall_time': (3700, None, 0.1, 'ms')
'wall_time': (3010, None, 0.1, 'ms')
},
'dom:mc': {
'wall_time': (3300, None, 0.1, 'ms')
'wall_time': (2870, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (3700, None, 0.1, 'ms')
'wall_time': (3010, None, 0.1, 'ms')
}
}
},
'vertical_advection_dycore_cuda': {
'simple_hori_diff_cpu_kfirst': {
'executable_opts': ['100', '100', '100'],
'reference': {
'daint:mc': {
'wall_time': (2880, None, 0.1, 'ms')
},
'daint:gpu': {
'wall_time': (3020, None, 0.1, 'ms')
},
'dom:mc': {
'wall_time': (2880, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (3020, None, 0.1, 'ms')
}
}
},
'vertical_advection_dycore_gpu': {
'executable_opts': ['200', '200', '200'],
'reference': {
'daint:gpu': {
'wall_time': (12000, None, 0.1, 'ms')
'wall_time': (8690, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (12000, None, 0.1, 'ms')
'wall_time': (8690, None, 0.1, 'ms')
}
}
},
'simple_hori_diff_cuda': {
'simple_hori_diff_gpu': {
'executable_opts': ['150', '150', '150'],
'reference': {
'daint:gpu': {
'wall_time': (19000, None, 0.1, 'ms')
'wall_time': (10870, None, 0.1, 'ms')
},
'dom:gpu': {
'wall_time': (19000, None, 0.1, 'ms')
Expand All @@ -170,7 +212,7 @@ def __init__(self, variant):
}

self.build_system.make_opts = [variant]
self.executable = os.path.join('regression', variant)
self.executable = os.path.join('tests/regression/', variant)
self.executable_opts = self.variant_data[variant]['executable_opts']
self.reference = self.variant_data[variant]['reference']
self.tags = {'scs', 'benchmark'}
Expand Down