diff --git a/spm.c b/spm.c
index 1f35b85e729b60b87024d2b0ae3a4090cf7dc738..483aea249ebac8b8189705679623d3b84447b89b 100644
--- a/spm.c
+++ b/spm.c
@@ -766,6 +766,45 @@ spmCopy( const pastix_spm_t *spm )
     return newspm;
 }
 
+/**
+ *******************************************************************************
+ *
+ * @ingroup pastix_spm
+ *
+ * @brief Print an spm matrix into into a given file.
+ *
+ *******************************************************************************
+ *
+ * @param[in] f
+ *          File to print the spm matrix
+ *
+ * @param[in] spm
+ *          The sparse matrix to copy.
+ *
+ *******************************************************************************/
+void
+spmPrint(FILE *f, const pastix_spm_t* spm)
+{
+    switch(spm->flttype)
+    {
+    case PastixPattern:
+        //return p_f, spmPrint(f, spm);
+        break;
+    case PastixFloat:
+        s_spmPrint(f, spm);
+        break;
+    case PastixComplex32:
+        c_spmPrint(f, spm);
+        break;
+    case PastixComplex64:
+        z_spmPrint(f, spm);
+        break;
+    case PastixDouble:
+    default:
+        d_spmPrint(f, spm);
+    }
+}
+
 /**
  *******************************************************************************
  *
diff --git a/spm.h b/spm.h
index d065d9116fb8f08e47ce94b86a54af622f7ef67b..4851b549f77ee63948a1305cb8ddd480e79d3363 100644
--- a/spm.h
+++ b/spm.h
@@ -136,6 +136,8 @@ static inline void s_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, float
 int spmLoad( pastix_spm_t *spm, FILE *infile );
 int spmSave( pastix_spm_t *spm, FILE *outfile );
 
+void spmPrint( FILE *f, const pastix_spm_t *spm );
+
 int spmGenRHS(int type, int nrhs, const pastix_spm_t *spm, void *x, int ldx, void *b, int ldb );
 int spmCheckAxb( int nrhs, const pastix_spm_t *spm, void *x0, int ldx0, void *b, int ldb, const void *x, int ldx );
 
diff --git a/z_spm_print.c b/z_spm_print.c
index 5c4b3888334e8d7b0ccbce30572f57c84b671246..7f1ae291ab6e96c789825cfab26a6acfaa5fce8a 100644
--- a/z_spm_print.c
+++ b/z_spm_print.c
@@ -32,7 +32,7 @@ z_spmCSCPrint( FILE *f, const pastix_spm_t *spm )
     pastix_complex64_t *valptr;
     pastix_int_t *colptr, *rowptr, *dofs;
 
-    assert( (spm->fmttype == PastixCSC) || (spm->fmttype == PastixCSR) );
+    assert( spm->fmttype == PastixCSC );
     assert( spm->flttype == PastixComplex64 );
 
     baseval = spmFindBase( spm );