def CheckDomain(domain, fatal=True):
    """
    Reports statistics and performs quality checks of the domain:
        - number of blocks is divisible by `nproc`

    Returns list of failed checks or aborts if fatal=True.
    """
    checks = [
        "(domain.bx * domain.by * domain.bz) % domain.nproc == 0",
    ]
    failed = []
    for check in checks:
        if not eval(check):
            failed.append(check)
    assert not failed, \
            "While checking domain\n{:}\nthe following checks failed\n{:}".format(
        domain, failed)
    return failed