2012-05-09 36 views
1

是否有可能在Azure上使用Code Numerics仅用于标准偏差等计算,不使用其分布式功能并绕过HPC?我用一些强大的数学和图表测试了一个MVC Web角色,我添加了Cloud Numerics程序集的引用,并且整个事情在模拟器中工作(只是一些计算,没有分布的东西),但是当我向Azure鼓吹时,它会报告依赖关系问题数字dlls?我真的很感激一些建议。 (我知道最好是使用一些标准的数学库,但我真的需要知道这是否可能)。 我最初认为这可能是体系结构问题:整个项目是AnyCpu(它只能是AnyCpu或x64,因为Azure只允许这两个conf),而某些CLoud Numerics库是为x64编译的。但我的开发机器是x64 win 7,我再说一遍:它在EMULATOR中工作,但不在云中。是否可以在Azure上部署WebRole,并使用用于计算的Cloud Numerics?

以下是异常的详细信息:

Could not load file or assembly 'Microsoft.Numerics.DistributedDenseArrays.DLL' or one of its dependencies. The specified module could not be found. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Numerics.DistributedDenseArrays.DLL' or one of its dependencies. The specified module could not be found. 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 


[FileNotFoundException: Could not load file or assembly 'Microsoft.Numerics.DistributedDenseArrays.DLL' or one of its dependencies. The specified module could not be found.] 
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567 
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192 
    System.Reflection.Assembly.Load(String assemblyString) +35 
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +123 

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Numerics.DistributedDenseArrays.DLL' or one of its dependencies. The specified module could not be found.] 
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11567856 
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +485 
    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +79 
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +337 
    System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280 
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167 

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Numerics.DistributedDenseArrays.DLL' or one of its dependencies. The specified module could not be found.] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11700592 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4868789 

所提到的DLL Microsoft.Numerics.DistributedDenseArrays自然包括作为副本总是伴随着作为依赖行走工具陈述其他依赖。

回答

0

好的,问题解决了。

解决方案:有某事。从Cloud Numerics中缺少一个(来自Cloud Numerics的另一个本地库安装目录),更有趣的是:在Web.config中有一个额外的DevExpress Printing.Core库引用,但它并未作为对我的项目的引用添加。为什么它更有趣?主要是因为我必须在我的WebRoles上使用ProcMon来承认这一事实,并且在填充空白后,我得到了一个更有用的错误,指出我的部署中缺少来自Cloud Numerics的精确库。

结论: ProcMon是一个非常有用的工具,RDP for Azure虚拟机是无价的。

提示:如果你曾经尝试部署在Azure上的一个项目,利用CN库,不要忘记从Microsoft HPC Pack附件msmpi.dll为CopyAlways内容,还要注意什么类型的msmpi.dll的你正在引用(x32或x64)。

谢谢你们,每个答案都让我更接近解决方案。这个功劳也归功于Cloud Numerics Lab团队,尤其是Roonie Hoogerwerf。

2

如果我偶然发现这种问题,我的第一个检查是如果引用的库的属性copy local = true。下一步是实现en configure diagnosticts如果您只部署到一个实例进行开发和测试,则可以使用RDP来检查事件日志。

阅读Introducing Microsoft Codename “Cloud Numerics” from SQL Azure Labs在先决条件章节需要Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)。这不是在Windows Azure提供的基本虚拟机上实现的。这个软件包可以安装在你的instace中进行星型任务。确保msi以静默模式启动(不需要用户交互)。

米希尔

+0

感谢您的回答。这也是我的第一个方法:我使用了一个依赖walker工具,我已经添加了所有可能的缺失引用,所有事项都被双重检查为Always Copy,但仍然不行。但是,我已经跟踪了关于Visual C++ Redist的提示,并将该安装添加为启动任务(尽管我已将Microsoft.ViusalC的引用添加为Always,但可能还有其他来自redist的程序集)。我已经通过RDP进行了检查,它在无提示的情况下安装成功,它在安装的程序列表中可见,但仍然没有运气。 – Tobiasz

2

我会建议得到一个融合日志:

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

然后,你可以看到它试图加载从文件,并找出问题到底是什么。如果您无法确定,请在此处发布这些详细信息,以便我们查看它。

相关问题