Skip to content

Commit c6818da

Browse files
committed
Slate testing: add a test that checks if Firedrake breaks if logging the flops is turned on.
1 parent a68e5d0 commit c6818da

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/slate/test_local_logging.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import os
22

33

4-
def test_slate_logging():
4+
def test_slate_logging_flame():
55
"""This only checks that logging does not break Firedrake, it does not check for correctness."""
66
path = os.path.dirname(os.path.abspath(__file__))
77
pyop2_cache = os.environ['PYOP2_CACHE_DIR']
88
err = os.system(f'python {path}/script_logging.py -log_view :{pyop2_cache}/test.txt:ascii_flamegraph')
99
assert err == 0
10+
11+
12+
def test_slate_logging_flops():
13+
"""This only checks that flop counting does not break Firedrake, it does not check for correctness."""
14+
path = os.path.dirname(os.path.abspath(__file__))
15+
pyop2_cache = os.environ['PYOP2_CACHE_DIR']
16+
os.system('export PYOP2_COMPUTE_KERNEL_FLOPS=1')
17+
err = os.system(f'python {path}/script_logging.py -log_view :{pyop2_cache}/test.txt')
18+
assert err == 0
19+
os.system('export PYOP2_COMPUTE_KERNEL_FLOPS=0')

0 commit comments

Comments
 (0)