Skip to content
Snippets Groups Projects
Commit 9a2bea02 authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

shortened advection tests

parent 8917c11a
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,12 @@ fi
export PYTHONPATH="$INSTALL_DIR/lib/python2.7/site-packages"
python -c 'import hysop; print hysop'
$HYSOP_DIR/fields/tests/test_cartesian.sh
# long backend dependent tests
#python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_advection.py"
#python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_remesh.py"
python "$HYSOP_DIR/core/arrays/tests/test_array.py"
$HYSOP_DIR/fields/tests/test_cartesian.sh
python "$HYSOP_DIR/operator/tests/test_analytic.py"
python "$HYSOP_DIR/operator/tests/test_transpose.py"
python "$HYSOP_DIR/operator/tests/test_derivative.py"
......
......@@ -45,8 +45,8 @@ __TEST_ALL_OPENCL_PLATFORMS__ = get_env('TEST_ALL_OPENCL_PLATFORMS', False)
__ENABLE_LONG_TESTS__ = get_env('ENABLE_LONG_TESTS', ("OFF" is "ON"))
# OpenCL
__DEFAULT_PLATFORM_ID__ = get_env('DEFAULT_PLATFORM_ID', 0)
__DEFAULT_DEVICE_ID__ = get_env('DEFAULT_DEVICE_ID', 0)
__DEFAULT_PLATFORM_ID__ = int(get_env('DEFAULT_PLATFORM_ID', 0))
__DEFAULT_DEVICE_ID__ = int(get_env('DEFAULT_DEVICE_ID', 0))
if __MPI_ENABLED__:
......
......@@ -45,8 +45,8 @@ __TEST_ALL_OPENCL_PLATFORMS__ = get_env('TEST_ALL_OPENCL_PLATFORMS', False)
__ENABLE_LONG_TESTS__ = get_env('ENABLE_LONG_TESTS', ("@ENABLE_LONG_TESTS@" is "ON"))
# OpenCL
__DEFAULT_PLATFORM_ID__ = get_env('DEFAULT_PLATFORM_ID', @OPENCL_DEFAULT_OPENCL_PLATFORM_ID@)
__DEFAULT_DEVICE_ID__ = get_env('DEFAULT_DEVICE_ID', @OPENCL_DEFAULT_OPENCL_DEVICE_ID@)
__DEFAULT_PLATFORM_ID__ = int(get_env('DEFAULT_PLATFORM_ID', @OPENCL_DEFAULT_OPENCL_PLATFORM_ID@))
__DEFAULT_DEVICE_ID__ = int(get_env('DEFAULT_DEVICE_ID', @OPENCL_DEFAULT_OPENCL_DEVICE_ID@))
if __MPI_ENABLED__:
from hysop.core.mpi import MPI, main_rank, main_size, \
......
......@@ -546,14 +546,15 @@ class TestArray(object):
tol = atol[0]
if not close:
close = allclose(r0,r1,relaxed_precision=True,ignore_mask=mask)
tol = 1e-2
tol = 1e-1
if close:
msg='WARNING: test passed with relaxed precision for {}::{}.'
msg=msg.format(backend.__class__.__name__, opname)
print msg
if not close:
msg = '\n{}::{} returned dtypes did match (got {}) '
msg+= 'but failed to match numpy output,\n absolute tolerance was set to {}.'
msg+= 'but failed to match numpy output,'
msg+='\n absolute tolerance was set to {}.'
msg=msg.format(backend.__class__.__name__,opname,r1.dtype,tol)
print msg
if isinstance(r0, np.ndarray) and isinstance(r1, np.ndarray):
......
......@@ -59,8 +59,8 @@ class TestDirectionalAdvectionOperator(object):
else:
flt_types = (npw.float,)
time_integrators = (RK2,)
remesh_kernels = (Remesh.L4_2, Remesh.L4_2s,)
velocity_cfls = (0.62, 1.89)
remesh_kernels = (Remesh.L4_2,)
velocity_cfls = (1.89,)
domain = Box(length=(2*npw.pi,)*dim)
for dtype in flt_types:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment