def exit(): """Exit OP2 and clean up""" if configuration['print_cache_size'] and COMM_WORLD.rank == 0: from caching import report_cache, Cached, ObjectCached print '**** PyOP2 cache sizes at exit ****' report_cache(typ=ObjectCached) report_cache(typ=Cached) configuration.reset() if backends.get_backend() != 'pyop2.void': backends.unset_backend()
def exit(): """Exit OP2 and clean up""" if configuration['print_cache_size'] and MPI.comm.rank == 0: from caching import report_cache, Cached, ObjectCached print '**** PyOP2 cache sizes at exit ****' report_cache(typ=ObjectCached) report_cache(typ=Cached) if configuration['print_summary'] and MPI.comm.rank == 0: from profiling import summary print '**** PyOP2 timings summary ****' summary() configuration.reset() if backends.get_backend() != 'pyop2.void': backends.unset_backend()
def exit(): """Exit OP2 and clean up""" configuration.reset() if backends.get_backend() != "pyop2.void": backends.unset_backend()
def exit(): """Exit OP2 and clean up""" cfg.reset() if backends.get_backend() != 'pyop2.void': backends.unset_backend()