Parallelism in the Private Cloud

Roman E. Maeder
Wolfram Research

All EPC (Enterprise Private Cloud) products can now be configured to support parallel computation.

The option allows for parallelism on the EPC host itself, as well as on any additional compute nodes provided.

We discuss technical and licensing aspects of HPC Accelerator for Private Cloud and give a demonstration of cloud parallel computations.

Join the Conversation #WolframTechConf

HPC Accelerator for Private Cloud

HPC Accelerator for Private Cloud provides support for parallel computing in the private cloud. It consists of

software support in cloud kernels to allow launching subkernels for parallel computing
(a specially configured version of Parallel Tools and kernel launchers).

licensing options for parallel subkernels

The parallel computing experience in the cloud should be the same as on the desktop.

Parallel Computations on the Desktop

Use additional subkernels to speed up a computation issued on the master kernel (which is usually connected to the front end, as is done here).

Launch Kernels:

LaunchKernels[4]

Do something:

Parallelize[Select[Range[500],PrimeQ[2^Prime[#]-1]&]]

Clean up:

CloseKernels[];

Kernels can be launched locally, or on other machines. Remote kernels are launched by issuing an SSH command to launch the kernels.

Parallel Computations in the Private Cloud

HPC Accelerator for Private Cloud supports the same two models of parallelism for master kernels that run in the private cloud, connected to the cloud front end displayed in your web browser (session kernels).

Parallel subkernels can be launched on the (virtual) machine that hosts the cloud.

Parallel kernels can be launched on any compute nodes provided by customer

Technical Requirements for Localhost Parallelism

To support parallelism in the cloud VM itself, you need:

Enough compute cores (backed by hardware cores) to support the desired number of parallel subkernels,
besides the kernels needed for the cloud itself (this number is configurable)

Licenses for these extra kernels

A typical configuration looks like this:

$CloudConfiguration["ParallelComputing"]=
<|
"AllowParallelComputing"->True,
"ParallelComputeNodes"->"localhost",
"ParallelKernelsPerNode"->8
|>;

Technical Requirements for Cluster Parallelism

To use other available hardware for parallelism, you need:

Compute nodes capable of running the Wolfram engine

Network allowing remote login via ssh from the cloud machine to the compute nodes
(Ideally both are on the same LAN)

gridMathematica licenses for the compute nodes

A typical configuration looks like this:

$CloudConfiguration["ParallelComputing"]=
<|
"AllowParallelComputing"->True,
"ParallelComputeNodes"->"node1.example.com, node2.example.com, node3.example.com, node4.example.com",
"ParallelKernelsPerNode"->8,
"ParallelLinkHost"->Automatic
|>;

Setup of the Compute Nodes

Any supported Linux OS capable of running the Wolfram Engine

A login for the cloud to use

Wolfram Engine or network Mathematica installed on a local disk

A fast network between the cloud and the compute nodes

SSH Configuration

The ~tomcat user on the cloud VM needs to be able to log into the compute nodes without password prompts.

The easiest configuration is a (password-less) SSH public/private key pair. The public key goes into all compute nodes, the private key into the cloud VM.

The network must allow the ssh connections to the compute nodes, and the backwards TCP connections to the cloud host.

Resource Management

Kernel Configurations

The cloud sets up a default configuration for parallel computing that is activated simply with LaunchKernels[].

$ConfiguredKernels

You can use fewer/more/different kernels by specifying kernels in LaunchKernels[], as you would in desktop Parallel Tools:

For localhost parallelism

LaunchKernels[4]

For cluster parallelism

Needs["SubKernels`ClusterKernels`"]

mykernels=ClusterKernels[{"node1.example.com","node2.example.com"},2]

LaunchKernels[mykernels]

The local system administrator can pre-define several configurations to choose from.

Allocation

The configured parallel kernels are a shared resource. There is, by design, no resource management; the private cloud is a collaborative environment, where the use of these kernels is expected to happen by agreement or prior reservation.

What happens if more than the configured number of kernels are used by several cloud users simultaneously?

additional kernels may fail to launch due to licensing limits

if there are enough licenses: no problem, but of course, performance will decrease if there are more kernels than compute cores.

Deployment

Every private cloud will support the configuration for parallelism.

To actually use it, you need the required licenses, and in the case of cluster parallelism, manual configuration of the additional hardware and ssh setup.
Your account manager will be happy to give you a quote.