# Many core experiment

**URL:** <https://discourse.slicer.org/t/many-core-experiment/12944>\
**Category:** Development\
**Tags:** build\
**Created:** [August 11, 2020, 6:04pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944 "2020-08-11T18:04:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 11, 2020, 6:04pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/1 "2020-08-11T18:04:39Z")

</div>

Just as a test, I created an [N2D](https://cloud.google.com/compute/docs/machine-types#n2d_machine_types) type virtual machine on Google Cloud with 224 cores running Ubuntu 20.04.

I did a [standard linux build](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/linux.html#ubuntu-20-04-focal-fossa) with the default settings, so SimpleITK and Testing enabled.

It took just under 20 minutes to build everything with `make -j 500`.

Watching `top`, there were a few places where a single `perl` or `cmake` process was a chokepoint but it was amazing to see how fast the C++ compilation went.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 11, 2020, 6:09pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/2 "2020-08-11T18:09:38Z")

</div>

Oh, and I should mention the machine costs under $6 per hour.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 11, 2020, 6:10pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/3 "2020-08-11T18:10:00Z")

</div>

Wow. On some computers, download of the binary takes longer then this build time.

It could be interesting to build with TBB support enabled.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 11, 2020, 6:12pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/4 "2020-08-11T18:12:30Z")

</div>

I wasn’t able to try running because I couldn’t set up a GPU on it. I think the limit is 16 cores if you need a GPU. But we could probably try some CLIs. Or tunnel X through ssh.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 11, 2020, 6:18pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/5 "2020-08-11T18:18:42Z")

</div>

> [@pieper](#):
>
> I couldn’t set up a GPU on it

In theory, it should be possible to use a software renderer (Mesa), but I guess it may not be trivial to set up.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 11, 2020, 6:40pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/6 "2020-08-11T18:40:05Z")

</div>

> [@lassoan](#):
>
> In theory, it should be possible to use a software renderer (Mesa), but I guess it may not be trivial to set up.

The problem I ran into is that I couldn’t start the X server without a display card on the system. It might be possible to do that with Xdummy like it is in the containerized Slicer.

Or actually, it could be interesting to just run the docker slicer version and see how it performs. It should be possible to build and run a TBB optimized Slicer inside the container environment and it should be able to access the same cores.

Is there any particular multithreaded workload that would worth trying?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 11, 2020, 6:45pm UTC](https://discourse.slicer.org/t/many-core-experiment/12944/7 "2020-08-11T18:45:57Z")

</div>

Loading a very large volume and interactively segmenting it (with 3D display) and visualizing it could be interesting. Also, Sequence registration with the sample cardiac sequence data sets (using SlicerElastix).

But I guess this massively parallel system could be best leveraged with your parallel CLI execution module.
