Runtime support for memory adaptation in scientific applications via local disk and remote memory