# vtkStreamTracer recent changes

**URL:** https://discourse.vtk.org/t/vtkstreamtracer-recent-changes/7325
**Category:** Development
**Created:** [December 3, 2021, 12:20pm UTC](https://discourse.vtk.org/t/vtkstreamtracer-recent-changes/7325 "2021-12-03T12:20:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [December 3, 2021, 12:20pm UTC](https://discourse.vtk.org/t/vtkstreamtracer-recent-changes/7325/1 "2021-12-03T12:20:37Z")

</div>

FYI vtkStreamTracer had been threaded (one thread per streamline). This is a complex change and there may be residual issues - please let me know if you come across anything.

One issue I am seeing on a few Rogue Research testing machines (e.g., wrt TestEvenlySpacedStreamlines2D). It appears that these machines do not build a “Sequential” backend which I think is a problem. It means that code like that below does not work properly. There are some situations where serial execution is required (note the SerialExecution flag) and without a sequential backend the system uses std::thread which results in a sigabrt

```auto
  if (numSeeds < VTK_ST_THREADING_THRESHOLD || this->SerialExecution)
  { // Serial
    vtkSMPTools::LocalScope(vtkSMPTools::Config{ static_cast<std::string>("Sequential") },
      [&]() { vtkSMPTools::For(0, numSeeds, ti); });
  }
  else
  {
    vtkSMPTools::For(0, numSeeds, ti);
  }

```

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [December 3, 2021, 12:38pm UTC](https://discourse.vtk.org/t/vtkstreamtracer-recent-changes/7325/2 "2021-12-03T12:38:41Z")

</div>

Will. for the sequential part, you could just manually invoke the operator and give it the range (0, numSeeds), no? You might need to call Reduce as well. That way you won’t need to depend on a Sequential backend build option being enabled. Or is it not that easy?

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [December 3, 2021, 12:55pm UTC](https://discourse.vtk.org/t/vtkstreamtracer-recent-changes/7325/3 "2021-12-03T12:55:18Z")

</div>

It’s easy and I will do it this afternoon when I return to the office…

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [December 4, 2021, 4:30pm UTC](https://discourse.vtk.org/t/vtkstreamtracer-recent-changes/7325/4 "2021-12-04T16:30:42Z")

</div>

Yes, handling the case properly rather than assuming the backend is present would be nice. If you want to do the check properly, `#if VTK_SMP_ENABLE_SEQUENTIAL` from `vtkSMP.h` is the thing to check.
