HPC_Merge method

Processes the result of a calculation step and inserts the processed result in the Excel workbook.


Function HPC_Merge( _
  ByVal data As any base type or VARIANT[] _



Specifies the result of a single calculation step in the Excel workbook.

The type of this parameter must match the return type for your implementation of the HPC_Execute macro.

Return value

This method does not return a value.


You implement this macro for an Excel workbook for which you want to run calculations on an HPC cluster as part of the partition, calculate, and merge macro framework. This macro represents the merge stage of that framework. The framework implements an iterative calculation model for the workbook, where different calculation steps are performed on different nodes in the HPC cluster. The merge stage of the framework processes the result of a calculation step, and then it updates the Excel workbook with that result.

The HPC Services for Excel client library calls this macro multiple times for a workbook calculation, once for each calculation step.

This macro runs on the client computer. The HPC Services for Excel client library calls this macro once for each time the client library calls HPC_Partition, but the client library does not necessarily call the HPC_Merge macro before the next call to HPC_Partition.

The HPC_Merge macro also does not necessarily receive results for the calculation steps in the same order that the HPC_Partition macro sent the data for those steps to the HPC cluster. The return value for the HPC_Execute macro should include information about the location in the workbook for which the calculation was performed, so that the HPC_Merge macro can update the appropriate location in the workbook.

To improve performance, you should minimize the work that you perform in the HPC_Merge macro, including the calculation and display tasks. For example, you should close external resources such as log files and database connections in the HPC_Finalize macro rather than in the HPC_Merge macro.


For example implementations of the HPC_Merge macro, see the following resources:



HPC Pack 2008 R2 Client Utilities

See also