Problem with running Metis on Wondows 7 (Visual Studio 10)


I just installed Metis for the first time on my Windows laptop using the latest code and the instructions for cmake
> .\vsgen -G "Visual Studio 10"

This seems to build a 32-bit project by default which should be fine I assume. I opened up the project and typed F7 to build it. I got the following output which also looked ok:

9>------ Skipped Build: Project: ALL_BUILD, Configuration: Release Win32 ------
9>Project not selected to build for this solution configuration
========== Build: 8 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

Then I went into the directory where the 6 executables are (gpmetis.exe is 136KB). I ran gpmetis with an example graph.
The program starts but crashes with an error message that gpmetis.exe has stopped working and options to close or debug.
The details of the run are show below.

I must be doing something wrong.



D:\Program Files\Metis\metis-5.1.0\build\windows\programs\Release>gpmetis "D:\Program Files\Metis\metis-5.1.0\graphs\4el
t.graph" 10
METIS 5.0 Copyright 1998-13, Regents of the University of Minnesota
(HEAD: , Built on: Mar 12 2014, 07:13:51)
size of idx_t: zubits, real_t: zubits, idx_t *: zubits

Graph Information -----------------------------------------------------------
Name: D:\Program Files\Metis\metis-5.1.0\graphs\4elt.graph, #Vertices: 15606, #Edges: 45878, #Parts: 10

Options ---------------------------------------------------------------------
ptype=kway, objtype=cut, ctype=shem, rtype=greedy, iptype=metisrb
dbglvl=0, ufactor=1.030, no2hop=NO, minconn=NO, contig=NO, nooutput=NO
seed=-1, niter=10, ncuts=1

Direct k-way Partitioning ---------------------------------------------------

RE: Patch available


I can reproduce the crashes on a Windows 7 machine. They're caused by stack allocations of about one megabyte. I patched Metis and uploaded the changes to a GitHub, forking from another user to reduce the number of Metis versions floating around. They can be found here:

So, after cloning that repo, you only need to "git checkout pk". Then, for paranoia, run a diff -r against the official Metis package to see that these are the only changes.

Hope this helps,

RE: Works!

Hello all,
Had the same problem with gpmetis and ndmetis crashing and just used Philipp's patch. (Windows 7 x64, MS Visual studio 11 2012)
Works like a charm.
So, if anybody else has the same problem with windows, this is the solution.
Thanks a lot to Philip, you made my day :D :D

RE: Hi Philip and Stefanos, I

Hi Philip and Stefanos,

I decided to check after a while if anyone has experienced the same problem and
was pleasantly surprised by your messages. I was able to download Philip's
patch and it worked. Thank you Philip.


RE: New info related to "Problem with running Metis on Windows 7"

In case this helps I have some additional information related to the problem of running Metis on Windows.

In addition to gpmetis I have now tried the other programs and had the following results:

- gpmetis: aborts
- graphchk: runs fine
- ndmetis: aborts
- mpmetis: runs fine w/ metis.mesh
- m2gmetis: runs fine w/ metis.mesh

I hope this might help in solving my gpmetis problem.

I would appreciate any suggestions.

Ivan Vukovic

RE: Unfortunately, I do not have

Unfortunately, I do not have access to a windows machine any more, so I cannot help you with that.