smatrix_write stub
smatrix_write
use smatrix_malloc everywhere
smatrix_rmap_free