diff --git a/configure.ac b/configure.ac
index ac2c07f01025354ecfe0285fd968e958cafc1f00..cbe906fa0171bdb5e139b39d6e23b8cae77244e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -957,7 +957,7 @@ if test "x$with_velociraptor" != "xno"; then
    AC_PROG_FC
    AC_FC_LIBRARY_LDFLAGS
    if test "x$with_velociraptor" != "xyes" -a "x$with_velociraptor" != "x"; then
-      VELOCIRAPTOR_LIBS="-L$with_velociraptor -lvelociraptor -lstdc++ -lhdf5_cpp"
+      VELOCIRAPTOR_LIBS="-L$with_velociraptor -lvelociraptor -lmpi -lstdc++ -lhdf5_cpp"
       CFLAGS="$CFLAGS -fopenmp"
    else
       VELOCIRAPTOR_LIBS=""
diff --git a/examples/main.c b/examples/main.c
index 8327248f1bafac23981d59871cf5ce83987528a7..9c6fd9655b172763502e0ac713ee3c5ce3b29d97 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -462,11 +462,6 @@ int main(int argc, char *argv[]) {
   if (with_limiter) error("Can't run with time-step limiter over MPI (yet)");
 #endif
 
-#if defined(WITH_MPI) && defined(HAVE_VELOCIRAPTOR)
-  if (with_structure_finding && nr_nodes > 1)
-    error("VEOCIraptor not yet enabled over MPI.");
-#endif
-
     /* Temporary early aborts for modes not supported with hand-vec. */
 #if defined(WITH_VECTORIZATION) && !defined(CHEMISTRY_NONE)
   error(
diff --git a/src/velociraptor_dummy.c b/src/velociraptor_dummy.c
index 8f14a3230d341993122f09f2bccf3d8232550fd9..15ad1feb19f71571713ee30f8c302e7e83953f55 100644
--- a/src/velociraptor_dummy.c
+++ b/src/velociraptor_dummy.c
@@ -44,7 +44,7 @@ int InitVelociraptor(char *config_name, char *output_name,
   return 0;
 }
 int InvokeVelociraptor(const size_t num_gravity_parts,
-                       const size_t num_hydro_parts,
+                       const size_t num_hydro_parts, const int snapnum,
                        struct swift_vel_part *swift_parts,
                        const int *cell_node_ids, char *output_name) {
 
diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c
index 7756fe4b937986c108d223c56183f7d31cdfaa98..f60a18d86604af2c2e4fd3706a603cbf6ce27199 100644
--- a/src/velociraptor_interface.c
+++ b/src/velociraptor_interface.c
@@ -113,7 +113,7 @@ int InitVelociraptor(char *config_name, char *output_name,
                      struct cosmoinfo cosmo_info, struct unitinfo unit_info,
                      struct siminfo sim_info);
 int InvokeVelociraptor(const size_t num_gravity_parts,
-                       const size_t num_hydro_parts,
+                       const size_t num_hydro_parts, const int snapnum,
                        struct swift_vel_part *swift_parts,
                        const int *cell_node_ids, char *output_name);
 
@@ -264,6 +264,7 @@ void velociraptor_invoke(struct engine *e) {
   const int nr_cells = s->nr_cells;
   int *cell_node_ids = NULL;
   static int stf_output_count = 0;
+  int active_stf_output_count;
 
   /* Allow thread to run on any core for the duration of the call to
    * VELOCIraptor so that
@@ -293,13 +294,15 @@ void velociraptor_invoke(struct engine *e) {
   /* Append base name with either the step number or time depending on what
    * format is specified in the parameter file. */
   char outputFileName[PARSER_MAX_LINE_SIZE + 128];
-  if (e->stf_output_freq_format == io_stf_steps) {
-    snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
-             e->stfBaseName, e->step);
-  } else if (e->stf_output_freq_format == io_stf_time) {
-    snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
-             e->stfBaseName, stf_output_count);
-  }
+  if (e->stf_output_freq_format == io_stf_steps)
+    active_stf_output_count = e->step;
+  else if (e->stf_output_freq_format == io_stf_time)
+    active_stf_output_count = stf_output_count;
+  else
+    active_stf_output_count = 0;
+
+  snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
+           e->stfBaseName, active_stf_output_count);
 
   /* Allocate and populate an array of swift_vel_parts to be passed to
    * VELOCIraptor. */
@@ -347,8 +350,8 @@ void velociraptor_invoke(struct engine *e) {
   }
 
   /* Call VELOCIraptor. */
-  if (!InvokeVelociraptor(nr_gparts, nr_hydro_parts, swift_parts, cell_node_ids,
-                          outputFileName))
+  if (!InvokeVelociraptor(nr_gparts, nr_hydro_parts, active_stf_output_count,
+                          swift_parts, cell_node_ids, outputFileName))
     error("Exiting. Call to VELOCIraptor failed on rank: %d.", e->nodeID);
 
   /* Reset the pthread affinity mask after VELOCIraptor returns. */