[erlang-questions] EPMD and multi-user distributed computation

Michael Truog mjtruog@REDACTED
Thu Sep 3 20:28:35 CEST 2009

Erickson, John wrote:
> I have an erlang program that is run similar to an MPI program, where it is deployed over many nodes and erlang starts up on those nodes and must be shut down when the program terminates.  I cannot leave erlang or epmd running on these computers.  Furthermore, many users would like to be able to use this program simultaneously.  I am having problems with epmd run by different users conflicting on the available ports.  Currently I am statically allocating these ports to users with ERL_EPMD_PORT, but this is a pretty cumbersome solution.
> Is there a better way to do this?  I could dynamically allocate the port on a single node, but since epmd has to be run on every node in the system, I don't see an easy way to do this.  Why does there need to be an epmd on every node anyway?  Wouldn't a single one suffice?
You might want to try automating the startup/teardown process with the
slave module in stdlib, or something similar.  You would be able to pass
ERL_EPMD_PORT as an argument and might need a separate step to manage
starting/stopping epmd with ssh/rsh, depending on how you are doing
things.  If you pass ERL_EPMD_PORT to the first VM on the command line,
you will not be able to find it in the command line through a module
function, so you should probably use some configuration item that sets
ERL_EPMD_PORT, in addition to specifying it on the command line (i.e.,
ERL_EPMD_PORT configuration is driven from the configuration item, not
the environmental variable or the specification of an environmental
variable on the command line).

More information about the erlang-questions mailing list