prepare dir sparse for sample_c and sample_fortran