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