<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Torsten&#039;s Blog Space</title>
	<atom:link href="http://doctortorsten.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://doctortorsten.wordpress.com</link>
	<description>Cool Technical Computing Stuff</description>
	<lastBuildDate>Fri, 06 Jan 2012 15:15:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='doctortorsten.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/bcd6c8747aeb4448c8a1518e407ff294?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Torsten&#039;s Blog Space</title>
		<link>http://doctortorsten.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://doctortorsten.wordpress.com/osd.xml" title="Torsten&#039;s Blog Space" />
	<atom:link rel='hub' href='http://doctortorsten.wordpress.com/?pushpress=hub'/>
		<item>
		<title>HPC Cloud Bursting to Windows Azure&#8230; Published!</title>
		<link>http://doctortorsten.wordpress.com/2012/01/03/hpc-cloud-bursting-to-windows-azure-published/</link>
		<comments>http://doctortorsten.wordpress.com/2012/01/03/hpc-cloud-bursting-to-windows-azure-published/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 18:50:23 +0000</pubDate>
		<dc:creator>torstenlangner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://doctortorsten.wordpress.com/?p=76</guid>
		<description><![CDATA[Happy New Year! Just happy that the book is available on Amazon now. Will publish the related code samples in a few days&#8230; Someone told me that HPC can save lives&#8230; so, let&#8217;s be pragmatic: all gains will be donated &#8230; <a href="http://doctortorsten.wordpress.com/2012/01/03/hpc-cloud-bursting-to-windows-azure-published/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doctortorsten.wordpress.com&amp;blog=18997236&amp;post=76&amp;subd=doctortorsten&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:small;">Happy New Year!</span></p>
<p><span style="font-size:small;">Just happy that the <a title="Book Link" href="http://www.amazon.com/s/ref=nb_sb_ss_i_9_4/180-1048756-5988414?url=search-alias%3Daps&amp;field-keywords=hpc+cloud+bursting&amp;sprefix=hpc+&amp;x=0&amp;y=0">book is available on Amazon</a> now. Will publish the related code samples in a few days&#8230;</span></p>
<p><span style="font-size:small;">Someone told me that HPC can save lives&#8230; so, let&#8217;s be pragmatic: <span style="color:#ff0000;"><strong>all gains will be donated</strong></span> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </span></p>
<div class="wp-caption alignnone" style="width: 310px"><a href="http://www.amazon.com/HPC-Cloud-Bursting-Windows-Azure/dp/1466395311/ref=sr_1_2?ie=UTF8&amp;qid=1325616306&amp;sr=8-2"><img title="HPC Cloud Bursting to Windows Azure" src="http://ecx.images-amazon.com/images/I/414oqnm1I9L._SL500_AA300_.jpg" alt="" width="300" height="300" /></a><p class="wp-caption-text">HPC Cloud Bursting to Windows Azure</p></div>
<h1>Code Samples:</h1>
<p>Download from my <a title="Code Samples @ Skydrive" href="https://skydrive.live.com/redir.aspx?cid=5cb1ca0a907aa69a&amp;resid=5CB1CA0A907AA69A!1770&amp;parid=5CB1CA0A907AA69A!120&amp;authkey=!AN2HgJVtV06UgDM">Skydrive</a></p>
<h1>Content:</h1>
<p>Cloud Bursting &#8211; Introduction. 9<br />
Internal &amp; External Cloud Concepts. 10<br />
Installation and Configuration of HPC Server 2008 R2 On-Premise. 13<br />
Architecture of HPC Server 2008 R2. 14<br />
Typical HPC Architecture #1: Automotive Industries = HPC. 16<br />
Typical HPC Architecture #2: Financial Services Industry (FSI) = Grid. 18<br />
Installation of High Available head nodes. 19<br />
Prepare a Lab Environment with Hyper-V. 20<br />
Cluster Configuration &#8211; To Do List 33<br />
Create an On-Premise Node Template. 37<br />
Create Node Templates. 38<br />
Cluster Management 50<br />
Configure Azure. 52<br />
Add Azure Nodes to Your Head Node. 56<br />
Deploy Standard Azure Nodes. 57<br />
Deploy Virtual Machines as Azure Nodes. 61<br />
Azure Connect: Connect your Extneral with the Internal Cloud. 68<br />
Azure HPC Scheduler 70<br />
Core Development of SOA Based Applications. 71<br />
Prepare the Development Environment 71<br />
Prepare the Cluster Environment 72<br />
SOA: Architectural Overview.. 73<br />
How Does Message Submission Work?. 74<br />
Analysing the Difference Between Interactive and Durable Sessions. 75<br />
Durable or Interactive?. 75<br />
Before Developing the First Application. 77<br />
Develop the First Interactive Application. 78<br />
The Service. 78<br />
The Interactive Client 78<br />
Run the Application. 90<br />
Debug the Application. 91<br />
Develop the First Durable Application. 92<br />
The Service. 92<br />
The Durable Client 92<br />
Run &amp; Debug the Application. 96<br />
Understand the Core Classes &amp; Concepts. 96<br />
Parameters to Create a Session. 96<br />
Parameters to Attach to an Existing Session. 97<br />
Working With Broker Clients in a Shared Session. 100<br />
Real Life Scenario: 2 Independent Clients Need To Share a Session. 103<br />
Client Based Failover – Resubmitting Tasks. 115<br />
Exception Handling. 116<br />
Add Tracing Logic. 120<br />
Catch the Exit Event of a Service Instance. 125<br />
Understand the Behavior of SOA Services. 126<br />
Full Speed with “Hot” Sessions: Minimize the Send &amp; Response Time. 134<br />
Flush: Minimize the Send &amp; Response Time of Durable Sessions. 139<br />
Understand the Different Scheduler Policies. 140<br />
Queued Mode. 142<br />
Queued Mode | Preemption. 143<br />
Queued Mode | No Preemption. 144<br />
Queued Mode | Graceful Preemption. 145<br />
Queued Mode | Immediate Preemption. 147<br />
Balanced Mode. 149<br />
Lend &amp; Borrow Through Resource Pools. 153<br />
Concepts of Stateful Computation. 158<br />
The State Management 159<br />
On-Premise Based State Management 161<br />
Azure Blob Based State Management 162<br />
Azure AppFabric Cache Based State Management 165<br />
The Stateful Service implementation. 169<br />
Reduce the Total Computation Time. 172<br />
Concepts of Common Data. 173<br />
On-Premise Hosted Common Data. 174<br />
Azure Hosted Common Data. 178<br />
Deploy the Application to the Cluster 181<br />
HPC SOA Configuration Files. 183<br />
SOA Service Versioning. 190<br />
Deploy On-Premise. 191<br />
Deploy in Azure. 191<br />
Deploy both in Azure and On-Premise. 193<br />
Remote UDFs with Excel 2010 – On-Premise and Azure Based. 193<br />
Start the C# Coding. 194<br />
The UDF Part 194<br />
Configure Excel-DNA. 196<br />
Use the UDF in Excel 2010 &#8211; Local UDF Run. 196<br />
Use the UDF in Excel 2010 &#8211; Remote UDF Run. 197<br />
Run Excel 2010 VBA Based Apps – On-Premise and Azure Based. 199<br />
Core Development of Batch Based HPC Applications. 199<br />
Create the Windows Azure Package &amp; Upload It 200<br />
Deploy the Package Content Locally. 201<br />
Run the Mixed Workload. 201</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/doctortorsten.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/doctortorsten.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/doctortorsten.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/doctortorsten.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/doctortorsten.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/doctortorsten.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/doctortorsten.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/doctortorsten.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doctortorsten.wordpress.com&amp;blog=18997236&amp;post=76&amp;subd=doctortorsten&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doctortorsten.wordpress.com/2012/01/03/hpc-cloud-bursting-to-windows-azure-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e97140421d18c9deeede979176e57a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">torstenlangner</media:title>
		</media:content>

		<media:content url="http://ecx.images-amazon.com/images/I/414oqnm1I9L._SL500_AA300_.jpg" medium="image">
			<media:title type="html">HPC Cloud Bursting to Windows Azure</media:title>
		</media:content>
	</item>
		<item>
		<title>Bring Excel 2010 to Speed: Remote UDFs with Excel 2010 and HPC Server 2008 R2</title>
		<link>http://doctortorsten.wordpress.com/2011/01/10/remoteudfs/</link>
		<comments>http://doctortorsten.wordpress.com/2011/01/10/remoteudfs/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 14:04:44 +0000</pubDate>
		<dc:creator>torstenlangner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://doctortorsten.wordpress.com/?p=26</guid>
		<description><![CDATA[A typical sceanrio in the Financial Services world is the following: A user wants to calculate some heavy stuff. In most of the cases it&#8217;s thousands of Monte Carlo scenarios. He uses Excel to read real-time data from feeds like &#8230; <a href="http://doctortorsten.wordpress.com/2011/01/10/remoteudfs/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doctortorsten.wordpress.com&amp;blog=18997236&amp;post=26&amp;subd=doctortorsten&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="text-align:justify;"><a href="http://doctortorsten.files.wordpress.com/2011/01/capture1.jpg"></a><a href="http://doctortorsten.files.wordpress.com/2011/01/capture12.jpg"></a><a href="http://doctortorsten.files.wordpress.com/2011/01/capture2.jpg"></a>A typical sceanrio in the Financial Services world is the following: A user wants to calculate some heavy stuff. In most of the cases it&#8217;s thousands of Monte Carlo scenarios. He uses Excel to read real-time data from feeds like Reuters or Bloomberg and uses a function to calculate portfolio values.</div>
<div style="text-align:justify;">The multi-core features of Excel 2010 might help to scale the distribute workload and reduce the total calculation time. But in many cases it is not enough. Assuming a single simulation takes 1 second to calculate and assuming further you need 1,000 different simulations to calculate a portfolio then the whole calculation won&#8217;t finish before <em>1,000 / cores available</em> seconds.</div>
<div style="text-align:justify;">User Defined Functions are a key technology of Excel extensibility. UDFs allow users to create their own mathematical functions and use them in formulas just like they use Excel’s built-in functions sum, avg etc. With the introduction of Excel 2010 and HPC Server 2008 R2 users are now able to distribute UDF workload accross hundreds of physical servers inside an HPC cluster.</div>
<div style="text-align:justify;">UDF programming is usually done in C++. I&#8217;m not a C++ expert. A customer in the banking space pointed me to an open source project called <a title="Codeplex" href="http://excel-dna.codeplex.com" target="_blank">Excel DNA</a> that he uses to implement portfolio evaluation UDFs in .NET code. Please have a look at Govert&#8217;s <a href="http://excel-dna.net/2010/12/09/cluster-udf-support/" target="_blank">blog</a> for updates regarding his project.</div>
<div style="text-align:justify;">I&#8217;ll use the Excel DNA project now to demonstrate the functionality of remote UDFs, Excel 2010 and HPC Server 2008 R2:</div>
<h1 style="text-align:justify;">Start the C# Coding</h1>
<div style="text-align:justify;">The sample application I&#8217;m going to develop now contains 2 parts: a math part and the UDF part. The application will allow users to forecast stock prices based on historical prices. Assuming the Microsoft stock price was 23$, 23.45$, 24.12$, 23.23$ etc. in the past days, the application will predict the stock price by using a magic glass bowl <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </div>
<div style="text-align:justify;">The .NET code will we implemented in a simple class library.</div>
<h2 style="text-align:justify;">The Math Part</h2>
<div style="text-align:justify;">The math part of the application was not written by a Quant. It was written by me &#8211; and I am the worst mathematican you can find on earth. I&#8217;m creating some code that will put some workload on the CPU now.</div>
<div style="text-align:justify;">The core part of the application is a forecast tool that tries to predict tomorrow&#8217;s stock price based on a double array of historic input prices.</div>
<div style="text-align:justify;"><pre class="brush: csharp; light: true;">

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MySuperCoolRemoteUDF.MathTools
{
 public class MCForecastTool
 {
  ...
  public MCForecastTool(List&lt;double&gt; Prices)
  {
    ...
    Initialize();
  }

  public double PedictNextPrice()
  {
    double absolutePriceChange = lastPrice - beforeLastPrice;

    double rnd1 = RandomNumberGenerator.NextSystem();
    double rnd2 = RandomNumberGenerator.NextSystem();

    double propUpTomorrow = 1d - IndicatorState.ProbUp;
    double propDownTomorrow = IndicatorState.ProbUp;

    short tomorrowsDirection = (short)0;
    short direction = absolutePriceChange &lt; 0 ? (short)-1 : (short)1;
    ...
    double priceChange = CalculateCurrentAVG();

    double lambda = 1d / priceChange;

    double rnd3 = RandomNumberGenerator.NextExponential(lambda);
    double priceTomorrow = ...;

    return priceTomorrow;
  }

  ...
 }
}

</pre></p>
</div>
<h2 style="text-align:justify;">The UDF Part</h2>
<div style="text-align:justify;">After implementing the mathematical part it is now time to create a UDF using .NET and Excel-DNA. To enable an integration add the Excel-DNA integration <em>.dll</em> to the current Visual Studio project.</div>
<div style="text-align:justify;">Excel-DNA will publish all <em>public static</em> methods as UDFs in Excel that are tagged as <em>ExcelFunction</em> (line 11). Remote UDFs need to set the <em>IsClusterSafe</em>-attribute to <em>true</em>. The UDF named <em>NextPricePlease</em> will accept two parameters: the number of Monte Carlo runs (<em>iterations</em>) and the historical prices that arrive from cell values as a multi-dimensional object array (<em>HistoricalPrices</em>). That&#8217;s pretty it! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </div>
<div style="text-align:justify;"><pre class="brush: csharp; highlight: [11]; light: true; wrap-lines: false;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySuperCoolRemoteUDF.MathTools;
using ExcelDna.Integration;
namespace MySuperCoolRemoteUDF
{
 public class MonteCarloRunner
 {
   [ExcelFunction(Description = &quot;Glass bowls the next stock price&quot;,
Category = &quot;My UDFs&quot;, IsClusterSafe=true)]
   public static double NextPricePlease(double Iterations, object[,] HistoricalPrices)
   {
     List&lt;double&gt; Prices = new List&lt;double&gt;(HistoricalPrices.Length);
     // read the Excel Cells:
     foreach (object HistoricalPriceObj in HistoricalPrices)
     {
        double Price = (double) HistoricalPriceObj;
        Prices.Add(Price);
     }
     int IterationsInt = (int)Iterations;
     List&lt;MCForecastTool&gt; MCToolList = new List&lt;MCForecastTool&gt;(IterationsInt);
     // Create N-many forecast tools:
     for (int i = 0; i &lt; IterationsInt; i++)
        MCToolList.Add(new MCForecastTool(Prices));
     double tempSum = 0d;
     // Predict N-many forecast prices
     foreach (MCForecastTool MCFT in MCToolList)
         tempSum += MCFT.PedictNextPrice();
     // Tomorrow's price is the mean of all predictions:
     double NextPrice = tempSum / (double)IterationsInt;
     return NextPrice;
   }
}
}
</pre></p>
</div>
<h2 style="text-align:justify;">Configure Excel-DNA</h2>
<div style="text-align:justify;">After compiling the C# code it&#8217;s time to configure Excel-DNA in the right way. Since the code was compiled to a <em>*.dll </em>we just need to crate an XML file with a unique name:  <em>MySuperCoolRemoteUDF.dna</em>. Further we need to copy the <em>ExcelDna.xll</em> as <em>MySuperCoolRemoteUDF.dll</em> to the same directory (see <a href="http://doctortorsten.files.wordpress.com/2011/01/capture12.jpg" target="_blank">picture</a>). A more detailed Excel-DNA how-to is discussed in Govert&#8217;s <a title="DNA Group" href="http://groups.google.com/group/exceldna/web/getting-started-with-exceldna" target="_blank">forum</a>.</div>
<div style="text-align:justify;"><pre class="brush: xml; light: true;">

&lt;DnaLibrary&gt;
 &lt;ExternalLibrary Path=&quot;MySuperCoolRemoteUDF.dll&quot; /&gt;
&lt;/DnaLibrary&gt;
</pre></p>
<p><a href="http://doctortorsten.files.wordpress.com/2011/01/capture12.jpg"><img title="Package Content" src="http://doctortorsten.files.wordpress.com/2011/01/capture12.jpg?w=640&#038;h=300" alt="" width="640" height="300" /></a></p>
<p><a href="http://doctortorsten.files.wordpress.com/2011/01/capture31.jpg"></a></p>
<h1>Use the UDF in Excel 2010</h1>
<h2>Local UDF Run</h2>
<p>By default every UDF will be executed locally. A user must explicitely activate remote UDF execution on an HPC Server 2008 R2 cluster. Let&#8217;s use a local run first to create a new Excel 2010 workbook. As you can see in the screenshot below the spreadsheet will contain historical prices of 20 stocks. These prices could be real- or near-time prices but in our sample they are randomized. Starting from <em>Now </em>we will use the <em>SuperCoolRemoteUDF</em> to predict tomorrows price of every stock. The day after tomorrow will be predicted based on the historical prices from row B to row L plus the predicted price of row M. Thus we have dependencies between every cell starting from row N to row Q.</p>
<p>The local computation of one cell (like M8) takes approximately 6.8 seconds using 250,000 iterations. To calculate every cell row M, N, O, P and Q in parallel we need at least a 20 core machine. Assuming a typical 4 core workstation the whole matrix will be calculated within 20 / 4 * 5 * 6,8 = 170 seconds.</p>
<p><a href="http://doctortorsten.files.wordpress.com/2011/01/capture31.jpg"><img title="Excel UDF Usage" src="http://doctortorsten.files.wordpress.com/2011/01/capture31.jpg?w=640&#038;h=384" alt="" width="640" height="384" /></a></p>
<h2>Remote UDF Run</h2>
<p>Using an HPC Server 2008 R2 cluster we can scale the computational power to thousands of cores. If there were no dependencies between the cells we would be able to calculate every cell in parallel within the cluster. But since there are dependencies between the rows M to Q we can only calculate row by row.</p>
<p>To enable a parallel run we just need to allow user-defined XLL functions to run on a cluster. That&#8217;s it. The spreadsheet will immediately re-calculate its values once they update on a cluster. This reduces the pure computational time from 170 seconds to 20 / 20 * 5 * 6,8 = 35 seconds. Approximately 3-5 seconds need to be added to create a session and send and receive the message requests.</p>
<p><a href="http://doctortorsten.files.wordpress.com/2011/01/capture2.jpg"><img title="Activate Remote UDF Support" src="http://doctortorsten.files.wordpress.com/2011/01/capture2.jpg?w=538&#038;h=182" alt="" width="538" height="182" /></a></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/doctortorsten.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/doctortorsten.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/doctortorsten.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/doctortorsten.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/doctortorsten.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/doctortorsten.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/doctortorsten.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/doctortorsten.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doctortorsten.wordpress.com&amp;blog=18997236&amp;post=26&amp;subd=doctortorsten&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doctortorsten.wordpress.com/2011/01/10/remoteudfs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e97140421d18c9deeede979176e57a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">torstenlangner</media:title>
		</media:content>

		<media:content url="http://doctortorsten.files.wordpress.com/2011/01/capture12.jpg" medium="image">
			<media:title type="html">Package Content</media:title>
		</media:content>

		<media:content url="http://doctortorsten.files.wordpress.com/2011/01/capture31.jpg" medium="image">
			<media:title type="html">Excel UDF Usage</media:title>
		</media:content>

		<media:content url="http://doctortorsten.files.wordpress.com/2011/01/capture2.jpg" medium="image">
			<media:title type="html">Activate Remote UDF Support</media:title>
		</media:content>
	</item>
		<item>
		<title>Run Batch Workload on a Mixed Infrastructure (Windows Azure Worker Nodes &amp; On-Premise HPC Server 2008 R2 Compute Nodes)</title>
		<link>http://doctortorsten.wordpress.com/2011/01/10/12/</link>
		<comments>http://doctortorsten.wordpress.com/2011/01/10/12/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 12:33:32 +0000</pubDate>
		<dc:creator>torstenlangner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://doctortorsten.wordpress.com/?p=12</guid>
		<description><![CDATA[With the introduction of SP1 of HPC Server 2008 R2 it is possible to run workload on Windows Azure. If you want to be able to off-burst your batch application (= extending the infrastructure from classic on-premise servers to cloud based Azure worker &#8230; <a href="http://doctortorsten.wordpress.com/2011/01/10/12/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doctortorsten.wordpress.com&amp;blog=18997236&amp;post=12&amp;subd=doctortorsten&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">With the introduction of SP1 of HPC Server 2008 R2 it is possible to run workload on Windows Azure. If you want to be able to off-burst your batch application (= extending the infrastructure from classic on-premise servers to cloud based Azure worker nodes) you need to set specific environment variables within the on-premise server infrastructure.</p>
<p style="text-align:justify;">Here is a sample of how to upload a batch based application (<em>azuretestbatch.exe</em>) to Azure workder nodes and run a parametric sweep workload across the full cluster (on-premise compute nodes + Azure worker nodes):</p>
<h1>Create the Windows Azure Package &amp; Upload It</h1>
<p style="text-align:justify;">Use the <em>hpcpack create</em> command to create a *.zip file. Once the package got created, upload it to the Windows Azure storage by using the <em>hpcpack upload</em> command. Specify the node template of your Windows Azure worker nodes. Additionally specify a relative path &#8211; in our sample its named <em>test</em>. This forces the <em>hpc sync</em> command which we call later to unzip the package content to the folder named <em>test: </em></p>
<pre>C:\Users\tlangner&gt;hpcpack create AzureTestPackage.zip
C:\temp\folder1

C:\Users\tlangner&gt;hpcpack upload AzureTestPackage.zip
/nodetemplate:AzureNodeTemplate /relativepath:test</pre>
<p style="text-align:justify;">You can test your upload by calling the <em>hpcpack view </em>command. As you can see in the lines below the targeted physical directory on the Windows Azure worker node disks is <em>%CCP_PACKAGE_ROOT%\test</em>. The environment variable <em>%CCP_PACKAGE_ROOT% </em>only exists on Windows Azure worker nodes.</p>
<pre>C:\Users\tlangner&gt;hpcpack view azuretestpackage.zip
/nodetemplate:AzureNodeTemplate
Connecting to head node: head
Querying for Windows Azure Worker Role node template "AzureNodeTemplate"
Windows Azure Worker Role node template found.
Retrieving Azure account name and key.
Found account: hpc*** and key: ********
Package Name:           azuretestpackage.zip
Uploaded:               06.01.2011 10:43:44
Description:            Node
Template:               AzureNodeTemplate
Target Azure Dir:       %CCP_PACKAGE_ROOT%\test</pre>
<p style="text-align:justify;">After the <em>hpcpack upload</em> command has finished, it is time to deploy the package content to the Windows Azure worker nodes (ie. local disks of the cloud machines). This is done by calling the <em>hpcsync </em>command:</p>
<pre>C:\Users\tlangner&gt;hpcsync /nodetemplate:AzureNodeTemplate</pre>
<h1>Deploy the Package Content Locally</h1>
<p style="text-align:justify;">In order to run the batch workload on the &#8220;classic&#8221; compute nodes, too, it is helpful to deploy the package using the same environment variables as they are are available in Windows Azure. In this sample we want the <em>CCP_PACKAGE_ROOT</em> variable link to the local <em>C:\TEMP</em> folder of every machine in the cluster:</p>
<pre>C:\Users\tlangner&gt;cluscfg setenvs "CCP_PACKAGE_ROOT=C:\TEMP"</pre>
<p style="text-align:justify;">Then, let&#8217;s copy the zip package content to the target directory of every &#8220;classic&#8221; compute node in the cluster. The content will be deployed to the <em>C:\TEMP\test</em> directory:</p>
<pre>C:\Users\tlangner&gt;clusrun /nodegroup:computenodes xcopy
\\head\temp\AzureTestBatch\AzureTestBatch\bin\Debug\*.*
^%CCP_PACKAGE_ROOT%^\test</pre>
<h1>Run the Mixed Workload</h1>
<p style="text-align:justify;">After deploying the package content to the whole cluster it&#8217;s time to run the batch job:</p>
<pre>C:\Users\tlangner&gt;job submit /nodegroup:X
/parametric:1-1000 /workdir:^%CCP_PACKAGE_ROOT%^\test
azuretestbatch.exe 5000</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/doctortorsten.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/doctortorsten.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/doctortorsten.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/doctortorsten.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/doctortorsten.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/doctortorsten.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/doctortorsten.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/doctortorsten.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doctortorsten.wordpress.com&amp;blog=18997236&amp;post=12&amp;subd=doctortorsten&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doctortorsten.wordpress.com/2011/01/10/12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e97140421d18c9deeede979176e57a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">torstenlangner</media:title>
		</media:content>
	</item>
	</channel>
</rss>
