iGraph的配置,An In-depth Comparison of Subgraph Isomorphism Algorithms in Graph Databases

来源:互联网 发布:怎么登陆淘宝店铺 编辑:程序博客网 时间:2024/06/05 00:56

这篇博客源自于一篇论文《An In-depth Comparison of Subgraph Isomorphism Algorithms in Graph Databases》这是2013年发表在PVLDB上的一篇文章

这篇文章对比了当前子图同构领域的state-of-art算法VF2,QuickSI, GraphQL, GADDI,和SPath并且用c++重写了这几个算法,实现性能最优,在不同的数据集上对比算法性能。

我通过联系作者有幸要到了算法的实现,没想到,配置算法运行的环境很是困难。

首先Igraph(算法包的名称)运行环境是很过时的visual studio 2005,这个环境现在已很少有人在用,我电脑装的VS2010,在VS2010下再次安装VS2005,遇到了版本的兼容问题,为了运行这个系统,我忍痛,重装系统,卸掉了VS的所有环境。

装完vs2005,点击运行系统,报错,原来是该算法包引用了外部的库文件,文件已过时,关于如何编译库文件,我的上一篇博客已经详细写了,重新编译库文件,设置引用外部的include路径,和外部的库路径(小心路径名称)。

在生成解决方案 ,没有问题,但是点击运行下显示

应用程序并行配置不正确使用命令行sxstrace.exe

在网上百度了好多资料然而没有什么卵用,最后还是在靠谱的stackoverflow找到了解决方案

I wrote a C++ project called 'Foo' using Microsoft Visual Studio 2005 Verison 8.0.50727.762 (SP.050727-7600) on Windows XP Professional Version 2002 Service Pack 3. I built the project into Foo.exe. Then, I copied the file Foo.exe to a Windows Server 2003 Enterprise Edition Service Pack 2. When I tried to run it, it failed with this error,

C:\foo.exeThe application has failed to start because the application configuration is incorrect.Reinstalling the application may fix the problem.

In Event Viewer > System, three events were logged.

Event ID: 32; Source: SideBySide

Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error wasThe referenced assembly is not installed on your system.

Event ID: 59; Source: SideBySide

Resolve Partial Assembly failed for Microsoft.VC80.CRT.Reference error message: The referenced assembly is not installed on your system.

Event ID: 59; Source: SideBySide

Generate Activation Context failed for C:\foo\Foo.exe.Reference error message: The referenced assembly is not installed on your system.

Installing Microsoft Visual C++ 2005 Redistributable didn't fix it

  1. Downloaded vcredist_x86.exe from http://www.microsoft.com/download/en/details.aspx?id=3387
  2. Installed it. The installer created a folder called C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.

The version of this software as found from 'Add or Remove Programs' was '8.0.50727.42'.

On trying to run C:\foo\foo.exe, I got the same errors I described above.

Installing Microsoft Visual C++ 2005 SP1 Redistributable didn't fix it

  1. Downloaded vcredist_x86.exe from http://www.microsoft.com/download/en/details.aspx?id=5638
  2. Installed it. The installer created a folder called: C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700.

The version of this software as found from 'Add or Remove Programs' was '8.0.56336'.

On trying to run C:\foo\foo.exe, I got the same errors I described above.

Copying CRT DLLs and manifest from the same machine (where I'm running the EXE) didn't fix it.

  1. I copied msvcm80.dllmsvcp80.dll and msvcr80.dll from C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd toC:\foo.
  2. Next, I copied C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.manifest to C:\foo and renamed it to Microsoft.VC80.CRT.manifest.

The fourth line of the manifest file looked like this:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.42"                  processorArchitecture="x86"                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

When I tried running C:\foo\foo.exe this time, it didn't work. I repeated this thing again with the DLLs in C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 and the corresponding manifest file. It didn't help as well. I got the same error.

In both cases, I got the following errors in Event Viewer > System.

Event ID: 34; Source: SideBySide

Component identity found in manifest does not match the identity of the component requested

Event ID: 58; Source: SideBySide

Syntax error in manifest or policy file "C:\foo\Microsoft.VC80.CRT.MANIFEST" on line 4.

Event ID: 59; Source: SideBySide

Generate Activation Context failed for C:\foo\Foo.exe. Reference error message: The manifest file contains one or more syntax errors.

Copying CRT DLLs and manifest from the Windows XP machine (where I built the EXE) didn't fix it.

  1. I copied msvcm80.dllmsvcp80.dll and msvcr80.dll from C:\winnt\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 of Windows XP machine (where I developed and built foo.exe) to C:\foo of Windows Server 2003 (where I am trying to run foo.exe).
  2. Next, I copied C:\winnt\winsxs\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700.manifest to C:\foo and renamed it to Microsoft.VC80.CRT.manifest.

The fourth line of the manifest file looked like this:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762"                  processorArchitecture="x86"                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

On trying to run C:\foo\foo.exe now I got the same errors mentioned in the previous section.

Copying CRT DLLs and manifest from Visual Studio folder fixed it.

  1. Copied msvcm80.dllmsvcp80.dllmsvcr80.dll and Microsoft.VC80.CRT.manifest from C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT of Windows XP machine (where I developed and built foo.exe) to C:\foo of Windows Server 2003 machine (where I am trying to run it).

The fourth line of the manifest file looked like this:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195"                  processorArchitecture="x86"                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

This time I could run C:\foo\foo.exe without any issues.

Question

I was expecting that installing 'Microsoft Visual C++ 2005 SP1 Redistributable' (vcredist_x86.exe) as described in the second approach would fix it. But it didn't. Copying the DLLs and manifest files from the C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT folder of the development machine fixed it. Why was it so?

Build options

In case, it helps you to answer my question. Here is the compiler and linker options I picked up from Visual Studio project properties:

Configuration properties > C/C++ > Command Line:

/O2 /GL /D "_MBCS" /FD /EHsc /MD /Fo"Release\\" /Fd"Release\vc80.pdb" /W3 /nologo /c /Wp64 /Zi /TP /errorReport:prompt

Configuration properties > Linker > Command Line:

/OUT:"C:\MixedBag\Release\Foo.exe" /NOLOGO /MANIFEST /MANIFESTFILE:"Release\Foo.exe.intermediate.manifest" /DEBUG /PDB:"c:\MixedBag\release\Foo.pdb" /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib




I'll answer my own question. Comments to the question by Hans Passant and Luke helped.

I downloaded Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update and installed it on the system where I was trying to run C:\foo\foo.exe. The EXE ran fine after this.

The installer placed the CRT DLLs in C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86. So, yes, 8.0.50727.6195 was the version of the CRT DLLs I was looking for as Hans Passant rightly said.

The easiest way to figure this version was by looking at the manifest file generated by Visual Studio while building my project on the development system. Mine was located at C:\Foo\Release\Foo.exe.intermediate.manifest. It had a tag like this:

<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195'                  processorArchitecture='x86'                  publicKeyToken='1fc8b3b9a1e18e3b' />

So, this is a clue that I needed 8.0.50727.6195 version of the DLLs. The rest was a matter of searching for the right vcredist_x86.exe which happened to be in the URL I have mentioned in the second paragraph. The page in that URL contains a link to KB2538242 which shows the version numbers of the DLLs that would be installed by the installer.

Note: As Elie has mentioned in a different answer to this question, since this is a 32-bit application, it is necessary to install vcredist_x86.exe (not vcredist_x64.exe) on the system where this application is supposed to be run irrespective of whether that system is a 32-bit Windows system or a 64-bit Windows system. Once again, the .manifest file provides this clue in the processorArchitectureattribute.

答案就是,安装VS2005 sp1,并安装一个更新包
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=26347

0 0
原创粉丝点击