When reading the input parameters, if `mat` array size > 1 and != `nmat`, this should be reported as a error and abort immediately.