bugfix of isend, solve segfault in index_mapping invoking
upgrade mf.hpp to add dynamic weights to average