是否可以在Azure上使用Code Numerics进行某些计算,例如标准偏差等,而不是使用其分布式功能并绕过HPC?我正在使用一些强大的数学和图表测试MVC Web角色,我添加了对Cloud Numerics程序集的引用,整个过程在模拟器中工作(只是一些计算,没有分布式的东西)但是当我向Azure报告它报告依赖性问题与云数字dll?我真的很感激一些建议。 (我知道最好只使用一些标准的数学库,但我真的需要知道这种方式是否可行)。 我最初认为这可能是架构问题:整个项目是AnyCpu(它只能是AnyCpu或x64,因为Azure只允许这两个confs)并且一些CLoud Numerics库是为x64编译的。但我的开发机器是x64 win 7,我再说一遍:它在EMULATOR中工作,但不在云端。
以下是例外情况:
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 :(得分:2)
如果我偶然发现这类问题,我首先检查的是引用的库是否具有属性copy local = true。下一步是实现配置诊断如果只部署到一个实例进行开发和测试,则可以使用RDP检查事件日志。
在前提条件章节中阅读Introducing Microsoft Codename “Cloud Numerics” from SQL Azure Labs,需要Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)。这不是在Windows Azure提供的基本VM上实现的。该软件包可以安装在您的实例中。确保msi以静默模式启动(无需用户交互)。
米希尔
答案 1 :(得分:2)
我建议您获取Fusion日志:
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].
然后,您可以看到它从哪里尝试加载文件,并确切地找出问题所在。如果您无法确定,请在此处发布这些详细信息,以便我们查看。
答案 2 :(得分:0)
好的,问题解决了。
解决方案:有某事。来自Cloud Numerics的缺失(来自Cloud Numerics的另一个本地库安装目录),更有趣的是:在Web.config中有一个额外的DevExpress Printing.Core库引用,但它没有被添加为我的项目的引用。为什么它更有趣?主要是因为我不得不在我的WebRoles上使用ProcMon来承认这个事实,在填补空白后我得到了一个更有用的错误,说明我的部署中缺少来自Cloud Numerics的精确库。
结论: ProcMon是一个非常有用的工具,Azure VM的RDP是无价的。
提示:如果您尝试在使用CN库的Azure上部署项目时不要忘记将Microsoft HPC Pack中的msmpi.dll作为CopyAlways内容添加,还要注意哪种类型的您正在引用的msmpi.dll(x32或x64)。
谢谢大家,每一个回答都让我更接近解决方案。此功能也归功于Cloud Numerics Lab团队,尤其是Roonie Hoogerwerf。