From db2d1aebd94c630a0eaf21f0ec0dabdf8a2e0a93 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Wed, 26 Oct 2016 10:36:45 +0200
Subject: [PATCH] Add some checks

---
 z_spm_genrhs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/z_spm_genrhs.c b/z_spm_genrhs.c
index 0f8ad119..25d0e17d 100644
--- a/z_spm_genrhs.c
+++ b/z_spm_genrhs.c
@@ -192,6 +192,9 @@ z_spmGenRHS( int type, int nrhs,
     if( (nrhs > 1) && (ldb < spm->n) )
         return PASTIX_ERR_BADPARAMETER;
 
+    if( spm->dof != 1 )
+        return PASTIX_ERR_BADPARAMETER;
+
     if (nrhs == 1) {
         ldb = spm->n;
         ldx = spm->n;
@@ -342,6 +345,9 @@ z_spmCheckAxb( int nrhs,
     double backward, forward, eps;
     int failure = 0;
 
+    assert( spm->nexp == spm->n );
+    assert( spm->dof == 1 );
+
     eps = LAPACKE_dlamch('e');
 
     /**
-- 
GitLab