<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>HPC and Azure Observations and Hints</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/hpc_and_azure_observations_and_hints/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/hpc_and_azure_observations_and_hints/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:24:20 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Super Powers for Excel – Offloading Excel Calculations to a Cluster or the Cloud</title>
      <link>https://docs.microsoft.com/archive/blogs/hpc_and_azure_observations_and_hints/super-powers-for-excel-offloading-excel-calculations-to-a-cluster-or-the-cloud</link>
      <pubDate>Fri, 04 May 2012 12:25:11 GMT</pubDate>
      <dc:creator><![CDATA[thomasquinn]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hpc_and_azure_observations_and_hints/2012/05/04/super-powers-for-excel-offloading-excel-calculations-to-a-cluster-or-the-cloud/</guid>
      <description><![CDATA[Background
&nbsp;
Many, many companies and individuals use Excel.&nbsp; Informal estimates have...]]></description>
      <content:encoded><![CDATA[<p><b>Background</b></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Many, many companies and individuals use Excel.&nbsp; Informal estimates have the number of Excel users at over 500 million. Excel is used for everything from making a grocery list to managing a 15 billion dollar portfolio of complex financial instruments to mission planning for the de-orbiting of a satellite.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">It is the ubiquitous application in financial services across the Insurance, Capital Markets and Banking verticals is Excel.&nbsp;&nbsp; Other industries, including Pharmaceutical, Health Care and finance departments within large multinationals also are significant users of Excel.&nbsp; </span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Some users of Excel stretch the limits of its capabilities, both of the application itself and also the limitations of the hardware they are using to perform their calculations.&nbsp; These aren&rsquo;t typical users of Excel but &ldquo;Power users&rdquo; that are creating spreadsheets that are so big and complicated that many of them run for hours, days and sometimes weeks.&nbsp; They are in great need of a solution that enables them to reach their answer significantly sooner than they are currently able. </span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Today, such users are going through great pains to optimize their solutions to reduce the time to solution but have limited methods and solutions to do so.&nbsp; Most will opt for the traditional approach of simply buying a bigger, more powerful machine to run on.&nbsp; In the past, going from a single core desktop running at 1 GHz and 1 GB of ram and moving to a single core desktop running at 3 Ghz and 3 GB of ram provided a very attractive performance multiplier without ever having to &ldquo;touch&rdquo; the spreadsheet that was suffering.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">The problem is that clock speeds have leveled off over the past 2-5 years and computers with significantly higher clock speeds just aren&rsquo;t available.&nbsp; In 1989, some of the earliest PC-based servers were running on the order of 33Mhz.&nbsp; Fast forward to 2005, just as dual-core processors were going mainstream, you could buy a Pentium 4 x86 server that ran at 3.4GHz. This increase in clock speed allowed a very simple/affordable path by which a user could easily &ldquo;scale up&rdquo;. </span></p>
<p><span style="font-size: small;" size="3">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/7041.moores_law.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/7041.moores_5F00_law.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/7041.moores_law.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/7041.moores_5F00_law.png" /></a></span></p>
<p><span style="font-size: small;" size="3">While Moore&rsquo;s law has been going and continues to go strong, clock frequencies have stopped increasing due to the basic physics of power density on silicon.&nbsp; Moore&rsquo;s law states that the number of transistors that can be placed on an IC doubles every 2 yrs.&nbsp; For example, today you could buy an &nbsp;x86 server running up to four 6-core Intel Xeon processors, at 2.67 GHz, slower than our single-core x86 servers 5 years ago.&nbsp; </span></p>
<p><span style="font-size: small;" size="3"></span></p>
<p><span style="font-size: small;" size="3">The traditional &ldquo;scale up&rdquo; approach has now turned into a parallel, or &ldquo;scale out&rdquo; problem.&nbsp; Scaling out could be running in parallel across multiple cores and/or scaling out beyond the computer/node to running in parallel across multiple computers/nodes and lastly, scaling out could be scaling out from your environment to run in parallel across multiple virtual machines in the cloud.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Many applications like Excel and the applications written for Excel, weren&rsquo;t originally designed to run in parallel and need to be re-engineered and re-thought in order to take advantage of a parallel architecture.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<div>
<p><b>HPC (High Performance Computing) Services for Excel</b><b></b></p>
</div>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Many organizations expressed their challenges with long running workbooks and asked Microsoft to look into tools/methods Microsoft could provide in order to reduce run times.&nbsp; The result was HPC Services for Excel.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">HPC Services for Excel is a comprehensive set of tools for running Excel spreadsheet calculations on a Windows HPC 2008 R2 cluster.&nbsp; With HPC Services for Excel, you can build applications that run Excel workbooks in parallel for faster overall calculation.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">The basic premise behind HPC Services for Excel is being able to take calculations that are taking too long to perform in Excel running on a single computer and &ldquo;offloading&rdquo; or moving those calculations to run on computers that are part of a High Performance Computer cluster.&nbsp; Microsoft has a product, Windows HPC 2008 Server, R2 which can be installed and configured on a group of commodity computers aka &ldquo;nodes&rdquo;, networked together, to run computationally intense work.&nbsp; A Windows HPC system is comprised of a head or &ldquo;master&rdquo; node and one or more &ldquo;compute&rdquo; nodes.&nbsp; The Master node acts as the brains of the cluster managing what work gets scheduled to be run on the compute nodes and &nbsp;providing a single point of management and administration of the cluster.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><b><i>Example: </i></b><b><i></i></b></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Below is an example of results from a project for a firm in the capital markets industry.&nbsp; The firm has spreadsheet based calculation designed to price 250 derivative securities.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">The securities are complex.&nbsp; The models used to price them are also complex &ndash; in addition to the spreadsheet calculations, each valuation includes some VBA code, and some third party and external libraries that are called during each pricing calculation. </span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">For 250 securities, the spreadsheet takes over an hour on the desktop.&nbsp; By moving the calculations to a 64 core cluster, the firm is able to reduce this to 65 seconds.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">For each security, the calculation to price it originally took approximately 15 seconds.&nbsp; The graph below show that by going to a 4 core cluster, on average each security takes about 4 seconds.&nbsp; You can see as the application is moved to a greater number of cores, scaling is not linear and this is due to overhead and structuring the calculations.&nbsp; Even though the result isn&rsquo;t get straight line performance scaling, exceptional performance improvement is gained as cores are added.&nbsp; The increase achieved by this method permits the firm to change how they use this spreadsheet in practice.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/2311.HPC_services_perf_example.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/2311.HPC_5F00_services_5F00_perf_5F00_example.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/2311.HPC_services_perf_example.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/2311.HPC_5F00_services_5F00_perf_5F00_example.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/7041.moores_law.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/7041.moores_5F00_law.png"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/5315.Moore's%20law.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/5315.Moore_2700_s-law.png"></a></span></p>
<p><span style="font-size: small;" size="3"></span></p>
<p><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3">&nbsp;</span></p>
<div>
<p><b>Two Distinct Methods of Calculations: Cluster-Enabled User Defined Functions (UDFs) and HPC Workbook calculations</b></p>
</div>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><b><i>Method 1:&nbsp; Cluster enabled User Defined Functions (UDFs)</i></b></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">The first method for accelerating an Excel spreadsheet is by &ldquo;offloading&rdquo; certain long running, parallelizable calculations via UDFs to external compute resources.&nbsp; </span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">This method works as follows:&nbsp; A user has a spreadsheet that has a few long running functions that can be run in parallel as UDFs.&nbsp; &nbsp;From the client, the user will execute the calculation of the workbook.&nbsp; When the workbook goes to execute the UDF function that is to be run in parallel, Excel will send a request to the HPC scheduler to execute the UDFs on the cluster.&nbsp; The scheduler will then dispatch a request to one or more compute nodes.&nbsp; On each compute node, the UDF will execute and return its value to the users excel spreadsheet.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><b>What is a UDF?</b>&nbsp; A function created by a user that can be included in an excel extension library which in turn allows it to be called from excel like any other excel function.&nbsp; UDFs have been around since 1992 in Excel 4.0.&nbsp; Multi-threading for UDFs was added in Excel 2007 and now Cluster-Enabled UDFs are possilbe in Excel 2010.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><b>How do they work?</b>&nbsp; In this case, the UDFs are in XLL files (which are windows Dynamic Link Library (DLL) files with extensions to support the excel interface).&nbsp; When a UDF &nbsp;XLL file is loaded using the excel XLL add-in manager, the DLL will be loaded into the excel process running on the desktop.&nbsp; Using the Excel API, Excel will find the names of the functions that can be typed in the spreadsheet and it will get function pointers to those functions in the library code.&nbsp; XLL use is widespread including many commercially available XLL's for specific uses, particularly prevalent in the financial services industry.&nbsp; The user defined functions can be very flexible.&nbsp; The API supports writing functions that take a wide range of parameters (max. 30)&nbsp; (discrete values, references to cells, ranges, any excel data type) and can return any excel data type.</span></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<p><b><span style="font-size: small;" size="3">Overview of running a (cluster enabled) UDF:</span></b></p>
<p><span style="font-size: small;" size="3">Beginning with the 2007&nbsp;Microsoft Office system, Excel provided support for multi-threaded recalculation (MTR)&ndash;enabled UDFs. Office Excel&nbsp;2007 was the first Excel release to support multi-threaded calculation on client computers with more than one processing core. MTR-enabled UDFs can be run in parallel on multiple processing cores, resulting in better workbook performance.&nbsp; This was one of Microsoft&rsquo;s first steps in providing a &ldquo;scale out&rdquo; method of parallelizing a spreadsheet albeit on a single computer.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Office Excel&nbsp;2010 extends this model to the cluster by enabling Office Excel&nbsp;2010 UDFs to run in a Windows HPC cluster. In the cluster, UDFs work much like traditional UDFs, except that the calculation is performed by one or more servers. This offers much more flexible potential than running multi-threaded MTR enabled UDF&rsquo;s in that the scaling can be much greater given the ability to scale beyond a single shared memory computer. &nbsp;Multiple servers can be used to evaluate functions simultaneously. As far as users are concerned, there is no difference between a client computer function and a function running in the cluster.</span></p>
<p><b><span style="font-size: small;" size="3">&nbsp; </span></b></p>
<p><b><span style="font-size: small;" size="3">Pros and Cons of Cluster-Enabled UDFs </span></b></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="340">
<p><b><span style="font-size: small;" size="3">Cluster-Enabled UDF Pros</span></b></p>
</td>
<td valign="top" width="340">
<p><b><span style="font-size: small;" size="3">Cluster-Enabled UDF Cons</span></b></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Performance scaling</span></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Limited on functions (subset of Excel API)</span></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Readily enabled or disabled</span></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Has some overhead</span></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Can Re-use/Modify existing UDF&rsquo;s/C/C++ codes</span></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Requires some development (C/C++)</span></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Requires (re)compilation</span></p>
</td>
</tr>
</tbody>
</table>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<p><b><i>Method 2:&nbsp; HPC Workbook Calculations</i></b><i> </i></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">The second method of increasing the performance of Excel spreadsheets is to run entire workbooks on cluster compute nodes.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><b>This method works as follows: </b>&nbsp;A user has a spreadsheet that some portion of which can be run in parallel.&nbsp; From the client, the user will execute the calculation of the workbook.&nbsp; Excel will send a request to the HPC scheduler to execute the workbook on the cluster.&nbsp; The scheduler will then dispatch a request to one or more compute nodes.&nbsp; The entire work book is sent to each selected compute node.&nbsp; On each compute node, the service will start an instance of excel (a full excel process will run on the node).&nbsp; It will load the excel workbook and then it will calculate the portion of the spreadsheet that the user wants to have executed in parallel.&nbsp; It is essentially using excel on the compute nodes as a calculation engine.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">For this method, HPC Workbook Calculations, there are two important things to keep in mind:</span></p>
<ol>
<li><span style="font-size: small;" size="3">1.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: small;" size="3">The entire workbook will be calculated on each of the cluster compute nodes</span></li>
<li><span style="font-size: small;" size="3">2.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: small;" size="3">For this to work, the calculation(s) must be able to be partitioned in some way so they can be run in parallel and those parallel components can be re-assembled</span></li>
</ol>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">Offloading entire workbooks can offer some unique advantages and flexibility because a user can basically run anything and do anything that they would do on the desktop - run VBA, add-ins, XLLs, UDFs.&nbsp; A user can utilize external resources such as databases, files, dependent workbooks, etc. as part of the offloaded calculations.&nbsp; The integrity of the calculations is assured given the same workbook is run on the cluster as is run on the desktop.&nbsp; They are calculated the same way and will get the same results</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><b><span style="font-size: small;" size="3">&nbsp; </span></b></p>
<p><b><span style="font-size: small;" size="3">Pros and Cons of HPC Workbook Calculations </span></b></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="340">
<p><b><span style="font-size: small;" size="3">HPC Workbook Calculation Pros</span></b></p>
</td>
<td valign="top" width="340">
<p><b><span style="font-size: small;" size="3">HPC Workbook Calculation Cons</span></b></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Performance increase provided by running parallel calculations</span></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Requires workbook modifications/development</span></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Multiple programming models are available</span></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Only improves iterative calculation portion of workbooks&nbsp; &ndash; Monte Carlo simulations, stochastic calculations, parametric sweeps, etc.&nbsp; </span></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Can be programmed by Users/VBA developers</span></p>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
</td>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Requires full instance of Excel to be installed on each compute node</span></p>
</td>
</tr>
<tr>
<td valign="top" width="340">
<p><span style="font-size: small;" size="3">Provides full API access</span></p>
</td>
<td valign="top" width="340">
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
</td>
</tr>
</tbody>
</table>
<p><b><span style="font-size: small;" size="3">&nbsp;</span></b></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<div>
<p><b>When is HPC Services for Excel the appropriate solution?</b><b></b></p>
</div>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">The answer to this is both simple and complex.&nbsp; In a nutshell, the first and most important qualifier is that HPC Services for Excel is likely an appropriate solution if a user has an Excel spreadsheet that takes too long to calculate.&nbsp; How long is too long?&nbsp; That completely depends on the use case.&nbsp; In some cases too long may be days, in others it may be hours, in others it may be minutes.&nbsp; In any case, this solution is only appropriate if some significant portion of calculation time is being taken by a portion of the spreadsheet that can be run in parallel.&nbsp; HPC Services for Excel is also best suited for groups that want to support legacy Excel code and legacy models and ideally have models that are used repeatedly i.e. it may not be worthwhile to the time to create a solution that is only executed one time. </span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<div>
<p><b>UDFs or Workbook Model?&nbsp; Which method is appropriate?</b><b></b></p>
</div>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">UDFs tend to be most appropriate when there is a calculation or function in the spreadsheet that is very computationally intensive and time consuming.&nbsp; Ideally, it would be mostly independent and does not require interaction with external data.&nbsp; Workbook calculations tend to be a good solution when the spreadsheet calculation involves complex interaction between the cells, VBA and potentially external resources.&nbsp; Running Workbook calculations tend to be a bit more flexible in that you can essentially do anything you would do on the desktop on the cluster.&nbsp; </span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<div>
<p><b>Getting Beyond the Box &ndash; Offloading to a Cluster or Cloud </b><b></b></p>
</div>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">All methods of offloading Excel to increase performance require a resource to offload to.&nbsp; Most of what has been described has been offloading to a Microsoft Windows Server High Performance Computing (HPC) cluster.&nbsp; This is the simplest approach for a user to use HPC Services for Excel, in particular if the user is part of the same corporate network as the cluster.&nbsp; The implementation is simpler and there is minimal/no concern over security.&nbsp; Another option is to offload to a local HPC cluster, in particular connect and offload to a local HPC Server headnode which in turn offloads the work to Azure based compute nodes.&nbsp; This provides a great deal of flexibility for scaling in particular if the local HPC cluster is used heavily and doesn&rsquo;t provide the resources needed to achieve the user&rsquo;s desired performance.&nbsp; A third option is to offload computations directly to Azure.&nbsp; This requires a HPC cluster to be configured in Azure including a head node and (one or more) compute nodes.&nbsp; The Excel client would connect to and offload work to the Azure cloud based HPC cluster in a similar manner in which it would utilize a local HPC cluster.&nbsp; This third method is will become much simpler to implement in the near future, than it currently is, given the availability of persistent Virtual Machines and VPN capabilities in Azure.</span></p>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<div>
<p><b>Summary</b></p>
</div>
<p><span style="font-size: small;" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3">It is important in either case that the solution fits in with user&rsquo;s workflow and user&rsquo;s environment as seamlessly as possible.&nbsp; They should be able to run the same spreadsheet as before, with minimal interaction, just simply have it run much faster.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Using Azure for HPC Disaster Recovery</title>
      <link>https://docs.microsoft.com/archive/blogs/hpc_and_azure_observations_and_hints/using-azure-for-hpc-disaster-recovery</link>
      <pubDate>Fri, 30 Dec 2011 09:27:04 GMT</pubDate>
      <dc:creator><![CDATA[thomasquinn]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hpc_and_azure_observations_and_hints/2011/12/30/using-azure-for-hpc-disaster-recovery/</guid>
      <description><![CDATA[&nbsp;&nbsp;
Using Azure for HPC Disaster Recovery
&nbsp;
Microsoft Corporation &ndash;...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;&nbsp;</p>
<p align="center"><span style="text-decoration: underline;"><strong><span style="font-family: Calibri; font-size: large;" face="Calibri">Using Azure for HPC Disaster Recovery</span></strong></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Microsoft Corporation &ndash; Azure/HPC</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri"><b><span style="text-decoration: underline;">Overview:</span></b>&nbsp; The purpose of this document is to provide an overview of using Azure resources to provide an incredibly cost effective method for providing a versatile HPC disaster recovery resource.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Introduction:</span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Disaster recovery is a serious topic and a thorn in the side of IT organizations and CIO&rsquo;s.&nbsp; While being given a shrinking budget, IT organizations are also being told that risks and downtime are unacceptable creating an impossible situation!&nbsp; &ldquo;What if&hellip;&rdquo; and &ldquo;If this site goes down..&rdquo; scenarios are easy for CEO&rsquo;s and executive management to put on the table but they typically don&rsquo;t realize the scope and impact of their need to have each scenario addressed.&nbsp; Day to day IT operations with a high degree of reliability and resiliency are challenging enough and costly enough without having to have answers to the multitude of disaster &ldquo;what if&rdquo; questions that can be, and frankly should be, examined. </span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The challenge is that designing, implementing, and maintaining a traditional disaster recovery system is incredibly costly and time consuming.&nbsp; A brute force, &ldquo;simplistic&rdquo; (which is never as simple as it sounds), approach of maintaining cold, warm, or hot redundant system(s) at an offsite location is typically out of the realm of possibility for most smaller organizations and for large companies, the expense of such a system is incredible given the actual return on investment, which is essentially a loss.&nbsp; The capital expense of keeping the failover system up to date constantly to stay on par with the increasing capacity of production systems, ever increasing power and facility costs, increasing labor rates, and the software infrastructure costs can all add up to an amount that will eat up a huge chunk of an IT budget.&nbsp; The value is never realized until a failure or disaster occurs and even then, its value is at best just maintaining some semblance of continuity of operations. </span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Just what is disaster recovery and disaster recovery planning?&nbsp; </span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Sometimes disaster recovery planning is a subset of a larger concept of business continuity planning.&nbsp; Business continuity planning will include the resumption of communications, data, hardware, applications and other IT infrastructure after a critical failure.&nbsp; A disaster recovery plan typically refers to the IT related infrastructure recovery and continuity aspects of the broader business continuity plan.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">What needs to be &ldquo;recovered&rdquo;?&nbsp; </span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The first thing to mind when business heads think of disaster recovery is data, and rightly so.&nbsp; A business&rsquo;s data, its financials, internal records, customer information, transactional information, etc. are essentially the backbone of most businesses today and the loss of which could be catastrophic to continued operation and could possibly result in the demise of the business entirely.&nbsp; Disaster recovery with respect to business critical data has been of such great importance for such a long period of time that most companies have implemented some form or forms of disaster recovery solution for their data whether it be offsite data replication/storage, tape/disk backups created daily then shipped out for archival, or a manager making dvd backups of his/her critical information and taking them home with him/her.&nbsp; Disaster recovery is so critical and there is such a market demand for solutions that it has spawned a large industry/market segment of its own with many system providers, offsite hosted solutions, and software/hardware products available. &nbsp;Many businesses have requirements that extend well beyond basic data recovery and have a critical need for some level of operational continuity and this requires a greater degree of redundant offsite IT infrastructure than a basic data recovery solution.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Cloud Computing as an Option:</span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The advent of cloud computing resources such as the Microsoft Windows Azure environment have provided another option for disaster recovery planners to use as part of their overall disaster recovery solution.&nbsp; Cloud resources, given their &ldquo;built in&rdquo; resiliency, failover, and disaster recovery mechanisms provide an incredibly cost effective and powerful answer as compared to more traditional physical disaster recovery methods for data and additionally for ongoing continuity of business operation.&nbsp; For companies that require more than simple data recovery, the cloud is providing a plethora of compute options not previously available to meet their IT, computation, and operational needs.&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">HPC&nbsp; and Disaster Recovery:</span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">One system that can be a significant hardware expenditure with respect to the numbers of servers it requires is High Performance Computing (HPC).&nbsp; Also, unless it is central to an organization&rsquo;s mainstream business, HPC may not be on the &ldquo;top of the list&rdquo; of requirements for disaster recovery.&nbsp; Between the expense of the hardware required for a traditional physical disaster recovery approach and the priority of HPC most businesses, HPC can sometimes be relegated to an afterthought and/or simply dismissed when it comes to general disaster recovery planning.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The advent of cloud computing as a key component of a strategy for disaster recovery allows a much greater latitude and ability to implement HPC as part of a robust disaster recovery model.&nbsp; The ability to have essentially unlimited capacity made available immediately only paying for compute cycle&rsquo;s utilization can change the entire dynamic of HPC disaster recovery (and potentially on premise HPC production).&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Example:</span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">For example, insurance company X runs their entire portfolio risk calculations for compliance purposes at the end of each day.&nbsp; Their current disaster recovery plan consists of offsite, warm standby systems for all customer data, internal financials, internal communications, and investment data.&nbsp; Their planning, however, does not include the ability to run their current risk calculations that have been required for them to run as part of new set of government regulations.&nbsp; Their current, onsite HPC system, includes over 200 servers and is stretched thin already with increasing demands from the actuaries, investment, and other business units.&nbsp; It is based on Windows HPC Server 2008 and runs a variety of commercial ISV applications and internally developed codes.&nbsp; To implement a solution that will provide the minimum capacity required to run the calculations will require a major infrastructure upgrade to their current physical disaster recovery site, requiring at least 100 additional servers that aren&rsquo;t in their current budget.&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Solution:</span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">A simple solution is to leverage Microsoft&rsquo;s Azure platform as part of their disaster recovery plan to meet their HPC needs.&nbsp; Microsoft&rsquo;s HPC system design and Microsoft&rsquo;s Azure implementation have been architected to work as a continuum of capability seamlessly allowing the use of on-premise servers as HPC compute resources as well as Azure servers as HPC compute resources &ndash; all running the same software as part of the same HPC system.&nbsp; If the on-premise system compute servers fail, more Azure compute nodes could be added via a few clicks on the HPC management console.&nbsp; If there is a head node failure, Azure can be used to replicate head node functionality or a head node could be kept as a backup system, local to the disaster recovery data stores, as part of an existing disaster recovery solution but connecting to Azure for compute node resources.&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The figure below depicts three basic sites; &ldquo;On-Premise&rdquo;, a &ldquo;Physical DR (Disaster Recovery) Site&rdquo;, and the &ldquo;Azure&rdquo; Cloud.&nbsp; The dotted lines represent optional components and data paths available for disaster recovery purposes.&nbsp; Almost every combination of components and paths is functionally possible and the optimal combination of which depends on the system, budgetary, and failure scenario requirements that are trying to be covered.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><br />&nbsp;&nbsp;<br />&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/2021.HPC_AZURE_DR_Options.PNG" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/2021.HPC_5F00_AZURE_5F00_DR_5F00_Options.PNG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/91/80/2021.HPC_AZURE_DR_Options.PNG" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-91-80/2021.HPC_5F00_AZURE_5F00_DR_5F00_Options.PNG" /></a><br />&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Benefits of leveraging Azure Cloud for HPC disaster recovery:</span></span></span></b></p>
<ol>
<li><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Cost savings &ndash; Probably the most important reason to leverage cloud resources as your primary option for disaster recovery HPC capability.&nbsp; You pay for what you need when you need it i.e. eliminate the costs of purchasing and maintaining a separate physical plant for disaster recovery. </span></span></li>
<li><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Versatile system configuration &ndash; system size, location of management/head node, data location and connectivity to HPC system, data security - levels of encryption and data persistence </span></span></li>
<li><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Continual testing of compute node failure &ndash; essentially provide &ldquo;hot&rdquo; standby getting the value of exercising the system while performing calculations</span></span></li>
<li><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Can exercise multiple data paths and configurations without major infrastructure changes &ndash; as long as a path/pipe via the internet can be established, the HPC portion of the disaster recovery plan can connect to it.&nbsp; Note, even this not required if your disaster recovery implementation is entirely in the cloud.</span></span></li>
<li><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Can connect to data source from either on-premise location, physical disaster recovery site, and/or cloud based recovery site </span></span></li>
<li><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Leverage the benefits of Azure:&nbsp; built in resiliency, robustness, updates, failover, physical security, and disaster recovery of disaster recovery (data replication and ability to leverage multiple geographic locations, etc.)</span></span></li>
</ol>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p><b><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Summary:</span></span></span></b></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Disaster recovery is of tantamount importance and absolutely needs to be considered, at least to a minimal degree, for every organization that leverages IT, which is essentially every modern company/organization.&nbsp; Traditional Disaster Recovery methods can be clunkey, time consuming to implement, and costly. &nbsp;Given the cost benefit and the other benefits/flexibility of the Azure cloud, using Azure resources as part of a robust disaster recovery plan is strongly advisable.&nbsp; &nbsp;&nbsp;The ability, with a minimum of time and expense, to be able to address a multitude of &ldquo;what if&rdquo; disaster scenarios, is appealing for most IT managers that need to answer to a broad range of questions from managers while having to operate under a constrained budget.&nbsp; High Performance Computing is system that can easily leverage Azure cloud computing for disaster recovery and is often &ldquo;low hanging fruit&rdquo; when considering using the cloud for disaster recovery.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Running Matlab in Parallel on a Windows Cluster using compiled Matlab* Code and the Matlab Compiler Runtime (MCR)</title>
      <link>https://docs.microsoft.com/archive/blogs/hpc_and_azure_observations_and_hints/running-matlab-in-parallel-on-a-windows-cluster-using-compiled-matlab-code-and-the-matlab-compiler-runtime-mcr</link>
      <pubDate>Mon, 12 Dec 2011 07:37:38 GMT</pubDate>
      <dc:creator><![CDATA[thomasquinn]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/hpc_and_azure_observations_and_hints/2011/12/12/running-matlab-in-parallel-on-a-windows-cluster-using-compiled-matlab-code-and-the-matlab-compiler-runtime-mcr/</guid>
      <description><![CDATA[&nbsp;
General Overview:
The MATLAB Compiler uses the MATLAB Compiler Runtime (MCR), a standalone...]]></description>
      <content:encoded><![CDATA[<p><span style="text-decoration: underline;"></span>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">General Overview:</span></strong></p>
<p>The MATLAB Compiler uses the MATLAB Compiler Runtime (MCR), a standalone set of shared libraries that enables the execution of MATLAB files on computers without an installed version of MATLAB.&nbsp; For many HPC users, this provides a means for Matlab to be executed across many nodes of a system for commonly used Matlab applications/codes that do not require interaction and are used repeatedly.</p>
<p>&nbsp;The other, more traditional method of running parallel Matlab on a cluster, is to use the Mathworks &ldquo;Parallel Computing Toolkit&rdquo; which is part of the MATLAB Distributed Computing Server (MDCS) environment.&nbsp; This type of architecture is more robust in particular for development and single/short time execution of a model(s).&nbsp;It allows the user to run their parallel MATLAB applications from within the MATLAB client.</p>
<p>&nbsp;&nbsp;</p>
<p><strong><span style="text-decoration: underline;">USING MATLAB ON AN HPC CLUSTER VIA COMPILED MATLAB CODE AND THE<br />MATLAB Compiler Runtime (MCR):</span></strong></p>
<p>&nbsp;</p>
<p>For many users that want to run a matlab code repeatedly and/or at large scales on an HPC cluster, they choose to run compiled Matlab applications leveraging the MCR.&nbsp;</p>
<p>&nbsp;</p>
<p>The general work flow for this type of operation is as follows:</p>
<p>&nbsp;</p>
<ol>
<li>A user will generate, test, and compile their Matlab code using the Matlab client on their desktop/workstation.</li>
<li>To run on the HPC cluster, the user will copy (if not available to the cluster via some type of share storage) their Matlab executable and data they wish to execute to the HPC system.</li>
<li>They will submit their application to the HPC cluster as a &ldquo;Job&rdquo; which will consist of one or more &ldquo;tasks&rdquo;&nbsp; (note, for an Windows HPC cluster a &ldquo;job&rdquo; is comprised of one or ore &ldquo;tasks&rdquo; which are individual groups of work &ndash; usually an application/script that operates on a set of data).</li>
<li>The HPC scheduler will execute the user&rsquo;s &ldquo;Job&rdquo; which includes their Matlab executable as a task or a set of tasks (usually just the command line .exe of their Matlab code) on the compute resources the user requested as part of their job submission.</li>
<li>The compiled Matlab executables are then initiated and run on each compute node, leveraging the locally installed MATLAB Compiler Runtime (MCR), typically enerating output files to local storage.</li>
<li>Depending on configuration of the system, the output data will be collected/moved to a shared storage device (if not already writing to a shared device), the head<br />node, and generate another form of output.</li>
<li>User collects results, many times copying to their local machine for further analysis and data reduction.</li>
</ol>
<p>General Setup:</p>
<ol>
<li>Install the MCR on each of the nodes (many ways to do this)</li>
<ol>
<li>Use ClusterCopy to copy installer to each node and then run the installer silently basic on the Mathworks instructions,</li>
<li>RDP directly to each node, copy and install,</li>
<li>Ceate an HPC job with a script to copy and install the MCR silently,</li>
<li>Use a fileshare that is accessible by each node.</li>
</ol>
<li>Copy input data and compiled matlab application to each node (or have them available to each node via a fileshare).</li>
<li>Execute via clusrun utility ( as shown in the link <a href="http://technet.microsoft.com/en-us/library/cc947685(WS.10).aspx)">http://technet.microsoft.com/en-us/library/cc947685(WS.10).aspx)</a> and/or submit job/task to the scheduler via<br />gui, command line, or powershell (as shown in the link <a href="http://technet.microsoft.com/en-us/library/ee783562(WS.10).aspx">http://technet.microsoft.com/en-us/library/ee783562(WS.10).aspx</a>). <br /><br /><br /><br /></li>
</ol>]]></content:encoded>
    </item>
  </channel>
</rss>