Technology stack and hardware resources use

With all the various ways to use the Rhino technology stack, I’m trying to understand how to best use these and also best use the hardware usage. Since I’m only looking for using the resources efficiently and not really doing any software development, I’ll be comfortable with high level or yes/ no answers.
My typical use case scenario is large models (50k+ elements) with large meta data.
Few things I’m specifically trying to understand are:

  1. When we use the Script editor inside grasshopper to call cpython libraries/operations that can use multiple processors/ GPU (dask/ modin/ RAPIDS), do we have all the processors/ GPU available for the code to access, or just 1 processor that grasshopper/ Rhino is using? Same question when using Rhino.Inside Revit.

  2. How do the nodes such as “multiple brep intersect”, that can use multiple processors, work inside grasshopper? More broadly - what all hardware resources are available for nodes/ scripts within the Rhino environment. Some software have limit of being able to use 2 or 4 or 8 processors only.

  3. Amongst, Rhino3dm, rhino compute, rhino script … etc. what all are available within rhino grasshopper context only vs what can be used outside in 3rd party IDE’s such as VS Code. Same question when using Rhino.Inside Revit.

  4. Where does hops tie into this ecosystem with the new script editor?

  5. Can someone help me create a graphic for everyone’s reference. I have attached a canvas with some snapshots and comments that I started to put together. I was trying to upload a file, but that it not supported,

cc: @eirannejad , @AndyPayne , @stevebaer

1 - Standalone or In-Grasshopper script editor typically runs the scripts on the main thread. The code inside of each script can launch many other threads. These many threads will be handled by the operating system and placed on available CPUs to execute. Load balancing is typically under the operating system jurisdiction. (Side read: Python 3 Global Interpretter Lock (GIL))

There are ways to set the processor affinity for a process but I don’t think we set that in Rhino. @stevebaer knows more.

2 - Multithreaded Grasshopper components use the multithreading capabilities of the dotnet runtime. AFAIK there is no limitations on how many CPUs are being used for multithreading. Again the OS usually is the decision maker here.

3 -

  • RhinoScript runs inside of Rhino.
  • Rhino.Compute is an application that launches Rhino and acts as a web server for rhino functions e.g. Running a grasshopper definition remotely.
  • Rhino3dm is a library (available for multiple languages) that allows reading and writing Rhino 3dm files alongside openNurbs geometry types. This is typically used outside of Rhino e.g. A python program that can read and extract data from rhino 3dm files.

4 - Hops does not have a direct relationship with the new script editor. Hops is a Grasshopper component that can communicate with Rhino.Compute or Python Hops servers to send the input data and execute functions on remote servers and return the results in your local Grasshopper.

5 - You can zip the file and upload