diff --git a/src/stream_cdf_o.c b/src/stream_cdf_o.c
index 231c9596c787e37f0335463a8bb287df9681a5cc..22db0f36fc5703b051d7931f961135538275922d 100644
--- a/src/stream_cdf_o.c
+++ b/src/stream_cdf_o.c
@@ -1406,6 +1406,7 @@ void cdfDefZaxisUUID(stream_t *streamptr, int zaxisID)
     }
 }
 
+#ifndef USE_MPI
 static
 void cdfDefZaxisChar(stream_t *streamptr, int zaxisID, char *axisname, int *dimID, size_t dimlen, int zaxisindex)
 {
@@ -1466,6 +1467,7 @@ void cdfDefZaxisChar(stream_t *streamptr, int zaxisID, char *axisname, int *dimI
 
   streamptr->ncmode = 2;
 }
+#endif
 
 static
 void cdfDefZaxis(stream_t *streamptr, int zaxisID)
@@ -1541,8 +1543,10 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
           cdfDefineAttributes(zaxisID, CDI_GLOBAL, fileID, ncvarid);
           if ( natts > 0 && streamptr->ncmode == 2 ) cdf_enddef(fileID);
         }
+#ifndef USE_MPI
       else if ( type == ZAXIS_CHAR )
         cdfDefZaxisChar(streamptr, zaxisID, axisname, &dimID, dimlen, zaxisindex);
+#endif
       else
         {
           dimID = checkDimName(fileID, dimlen, dimname);
diff --git a/src/vlist.c b/src/vlist.c
index b0dfab6869fa6d58b4ec421c37a4dd62f7f16d29..e0ace16434307c0ee73266c3423a19d889857e1d 100644
--- a/src/vlist.c
+++ b/src/vlist.c
@@ -591,8 +591,6 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
 	      {
 		int nvct = 0;
                 double *levels = NULL;
-                char **cvals1 = NULL, **cvals2 = NULL;
-                size_t clen2 = 0;
 		double *lbounds = NULL, *ubounds = NULL;
 		const double *vct = NULL;
                 char ctemp[CDI_MAX_NAME];
@@ -627,9 +625,12 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
                     vct  = zaxisInqVctPtr(zaxisID);
                   }
 
+                size_t clen2 = 0;
+                char **cvals2 = NULL;
+#ifndef USE_MPI
                 if ( zaxisType == ZAXIS_CHAR )
                   {
-                    cvals1 = zaxisInqCValsPtr(zaxisID);
+                    char **cvals1 = zaxisInqCValsPtr(zaxisID);
                     size_t clen1 = (size_t)zaxisInqCLen(zaxisID);
                     for ( int levID = 0; levID < nlevs; ++levID )
                       if ( vars1[varID].levinfo[levID].flag )
@@ -651,6 +652,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
                           levID2++;
                         }
                   }
+#endif
 
                 if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
                   {
diff --git a/src/zaxis.c b/src/zaxis.c
index e9b5c0c81125e386330ae9817ddc6c18ade5d56d..8dd338d6dfee81771f9e05834fe1468d5e76ffcd 100644
--- a/src/zaxis.c
+++ b/src/zaxis.c
@@ -123,8 +123,10 @@ void zaxis_init(zaxis_t *zaxisptr)
   zaxisptr->p0name[0]     = 0;
   zaxisptr->p0value.defined = false;
   zaxisptr->vals          = NULL;
+#ifndef USE_MPI
   zaxisptr->cvals         = NULL;
   zaxisptr->clength       = 0;
+#endif
   zaxisptr->ubounds       = NULL;
   zaxisptr->lbounds       = NULL;
   zaxisptr->weights       = NULL;
@@ -269,13 +271,15 @@ void zaxisDestroyKernel( zaxis_t * zaxisptr )
 
   const int id = zaxisptr->self;
 
-  if ( zaxisptr->vals )    Free( zaxisptr->vals );
+  if ( zaxisptr->vals ) Free( zaxisptr->vals );
+#ifndef USE_MPI
   if ( zaxisptr->cvals )
     {
       for ( int i=0; i<zaxisptr->size; i++)
         Free(zaxisptr->cvals[i]);
       Free( zaxisptr->cvals );
     }
+#endif
   if ( zaxisptr->lbounds ) Free( zaxisptr->lbounds );
   if ( zaxisptr->ubounds ) Free( zaxisptr->ubounds );
   if ( zaxisptr->weights ) Free( zaxisptr->weights );
@@ -782,6 +786,7 @@ void zaxisDefLevels(int zaxisID, const double *levels)
 
 void zaxisDefCvals(int zaxisID, const char **cvals, int clen)
 {
+#ifndef USE_MPI
   if ( cvals && clen )
     {
       zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
@@ -798,6 +803,9 @@ void zaxisDefCvals(int zaxisID, const char **cvals, int clen)
         }
       reshSetStatus(zaxisID, &zaxisOps, RESH_DESYNC_IN_USE);
     }
+#else
+  Error("This function was disabled!");
+#endif
 }
 
 /*
@@ -996,11 +1004,13 @@ const double *zaxisInqLevelsPtr(int zaxisID)
 }
 
 
+#ifndef USE_MPI
 char **zaxisInqCValsPtr(int zaxisID)
 {
   zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
   return zaxisptr->cvals;
 }
+#endif
 
 /*
 @Function  zaxisInqLevels
@@ -1041,8 +1051,10 @@ int zaxisInqCLen(int zaxisID)
   zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
 
   int clen = 0;
+#ifndef USE_MPI
   if ( zaxisptr->cvals && zaxisptr->clength)
     clen = zaxisptr->clength;
+#endif
 
   return clen;
 }
@@ -1052,6 +1064,7 @@ int zaxisInqCVals(int zaxisID, char ***clevels)
   zaxis_t *zaxisptr = zaxis_to_pointer(zaxisID);
 
   int size = 0;
+#ifndef USE_MPI
   if ( zaxisptr->cvals )
     {
       size = zaxisptr->size;
@@ -1066,6 +1079,7 @@ int zaxisInqCVals(int zaxisID, char ***clevels)
             }
           }
     }
+#endif
 
   return size;
 }
diff --git a/src/zaxis.h b/src/zaxis.h
index 9a373d0e66efb67a723e6af841beb8d1f6672ca6..5e863a303bcec4138e0ab40f5ad72cb0195a0832 100644
--- a/src/zaxis.h
+++ b/src/zaxis.h
@@ -1,6 +1,10 @@
 #ifndef  ZAXIS_H
 #define  ZAXIS_H
 
+#ifdef  HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "cdi_att.h"
 
 typedef struct {
@@ -20,8 +24,10 @@ typedef struct {
   char     p0name[CDI_MAX_NAME];
   zkey_double_t p0value;
   double  *vals;
+#ifndef USE_MPI
   char   **cvals;
   int      clength;
+#endif
   double  *lbounds;
   double  *ubounds;
   double  *weights;
@@ -64,8 +70,9 @@ const resOps *getZaxisOps(void);
 const char *zaxisInqNamePtr(int zaxisID);
 
 const double *zaxisInqLevelsPtr(int zaxisID);
+#ifndef USE_MPI
 char **zaxisInqCValsPtr(int zaxisID);
-
+#endif
 void zaxisResize(int zaxisID, int size);
 
 #endif