The dataset that gets created in dsmerge.cpp defaults to DYNASET_SAVE mode
and the 'data' matrix is never allocated in dataset::allocate. dataset::merge tries to operate on the empty variable, data, which raises an error.
Modifying merge() in dsmerge.cpp will correct this behavior.
dataset<Tdata> ds0(ds0_name.c_str());
ds0.set_save(DATASET_SAVE);
ds0.merge(ds1_name.c_str(), ds2_name.c_str(), inroot);