Microsoft Releases Local, Distributed and Cloud Numerics Library, with F# Samples

 

At last, Microsoft have released its long awaited Cloud Numerics library!!! A huge congratulations to the Cloud Numerics team (follow their blog!), and I encourage everyone in the F# community to be looking at the use of these wonderful technologies together.

The recently announced library is a great fit for F# analytical computing. The Cloud Numerics team have posted some examples of how to use this library in F#, and learn how to do distributed numerics on Azure with F#.

This post walks through the steps required to use the “Cloud Numerics” distributed numerical and data analytics library from F#. While the “Cloud Numerics” lab focuses on C#, a few additional setup steps enable you to:

  • Write F# applications that use the “Cloud Numerics” lab libraries.
  • Use the deployment utility to scale-out your F# application to the Windows Azure cloud.

...calling these methods from F# methods feels natural. For example, consider the following F# source code example:

 open Microsoft.Numerics
  // Compute the standard deviation for each time series
let stdev =  
 let sum = ArrayMath.Sum(timeSeriesNormalized * timeSeriesNormalized, 0L) 
 let sqrt = BasicMath.Sqrt(sum / float(timeSeriesNormalized.Shape.[0])) 
 Operations.MatrixMultiply(sqrt.Transpose(), sqrt) 

Before You Begin

Before you begin to write “Cloud Numerics” F# code, complete the instructions in the “Cloud Numerics” Getting Started wiki post to:

  • Create an Azure account (if do not have one already)
  • Install “Cloud Numerics” on your local computer where you develop your F# applications
  • Configure and deploy a cluster in Azure
  • Submit the sample C# “Cloud Numerics” program to Azure.

Once you are able to build and run the sample C# application provided with the “Cloud Numerics” project template, you are ready to follow the steps in this post to create an F# “Cloud Numerics” application.

If you are interested in testing your “Cloud Numerics” F# project locally, on your local development machine, follow the steps in the Getting Started wiki post to run the sample application locally.

Of course, before you begin, you also need to have F# installed: go to <fsharp.net> and install the Visual F# CTP (April 2011).

Read more here

 

....