High Performance Computing with Erlang + Nvidia + Elixir

New blog post on the ElixirLuthier regarding high performance computing with an Nvidia GPU
https://lute.io/hpc-erlang-ecode-gpu/

7 Likes

How is a cnode different from a nif?

Simplified:

Nifs are functions called with arguments and cnodes are processes receiving messages.

There is a much deeper explanation in the erlang manuals but I’m on a mobile and have a hard time browsing them on this device…

1 Like

Interesting, do cnodes suffer the same limitations in terms of blocking the erlang scheduler?

The writeup suggest to me that the “C Node” runs in it’s own OS process - basically servicing a single receive loop written in C - so BEAM processes within Erlang nodes can interact with that receive loop as if it was just another Erlang process running on another node.

So that C Node should have no impact whatsoever on schedulers in actual Erlang nodes - apart from it’s BEAM processes potentially hanging if they are waiting for a response from a C Node that has gone unresponsive (and the C Node’s OS process potentially hogging the CPU).

JInterface seems to do the same kind of thing for Java.

(FYI: .NET through NFX)

2 Likes

That’s correct. C nodes are nothing more than external executables that know how to talk with BEAM nodes.

Thanks, that was a great explanation. I’ll have to read the writeup too.