diff --git a/src/hydro/Gadget2/hydro_iact.h b/src/hydro/Gadget2/hydro_iact.h
index b112184e89c59d41c4b5b930ac9d339865ebc7ae..3da92d0c9431a766142f9a97b3b0e54881847323 100644
--- a/src/hydro/Gadget2/hydro_iact.h
+++ b/src/hydro/Gadget2/hydro_iact.h
@@ -382,6 +382,7 @@ runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
 #endif
 }
 
+#ifdef WITH_VECTORIZATION
 /**
  * @brief Density interaction computed using 2 interleaved vectors (non-symmetric vectorized version).
  */
@@ -505,6 +506,7 @@ runner_iact_nonsym_2_vec_density(float *R2, float *Dx, float *Dy, float *Dz, vec
   curlvzSum->v += vec_and(vec_mul(mj2.v, vec_mul(curlvrz2.v, wi_dx2.v)),mask2.v);
 #endif
 }
+#endif
 
 /**
  * @brief Force loop
diff --git a/src/runner_doiact_vec.c b/src/runner_doiact_vec.c
index 6c2bd2e63a7fd1650d4db2d1286b202476aed4f2..8911c432096a847c45057afb809e2a9c78d2b8cc 100644
--- a/src/runner_doiact_vec.c
+++ b/src/runner_doiact_vec.c
@@ -27,6 +27,7 @@
 #define NUM_VEC_PROC 2
 #define C2_CACHE_SIZE (NUM_VEC_PROC * VEC_SIZE * 6) + (NUM_VEC_PROC * VEC_SIZE)
 
+#ifdef WITH_VECTORIZATION
 __attribute__((always_inline)) INLINE static void calcRemInteractions(const struct cache *const cell_cache, float *r2q, float *dxq, float *dyq, float *dzq, float *mq, float *vxq, float *vyq, float *vzq, const int icount, vector *rhoSum, vector *rho_dhSum, vector *wcountSum, vector *wcount_dhSum, vector *div_vSum, vector *curlvxSum,vector *curlvySum, vector *curlvzSum, vector v_hi_inv, vector v_vix, vector v_viy, vector v_viz, int *icount_align) {
 
 #ifdef HAVE_AVX512_F
@@ -153,6 +154,7 @@ __attribute__((always_inline)) INLINE static void storeInteractions(const int ma
 
 #endif
 }
+#endif
 
 /**
  * @brief Compute the cell self-interaction (non-symmetric) vec.