Getting Segmentation Fault?

Hi,
Thanks for providing this tool. First, I should confess that I am a new user, so I might be doing something obviously wrong. Also I have read the first few pages of the Manual (up to the part regarding the input and output formats) but I have no idea regarding the details of the partitioning algorithms.

I want to partition weighted graphs (with weights only on the edges). I tried small graphs (up to approx. 30,000 edges) and everything goes fine. Now I have tried a graph of a little over a million edges (but only 1500 vertices) and it crashes. As I mentioned above, these edges are weighted edges and the vertices have no weight (or equal weight).

I run the graph checking tool, before calling either pmetis or kmetis (tried both.) The graph checking tool tells me that the graph is correct. However the partitioning tools (either pmetis or kmetis) crash with a segmentation fault under Linux and a “kmetis.exe has encountered a problem and needs to close” kind of dialog box under Win XP.

Any ideas? Or this might be a bug? Or I might just be doing something wrong. My graph is not proprietary – so I am agreeable to give this 4 MB file to anyone who wants to try it.

Thanks a lot for your replies.
Masca

RE: hello sir ……..my program

hello sir ……..my program works fine in turboc2 but it gives segmentation fault in Linux through putty………what should i do
Skiurlaub Österreich
Winterurlaub Österreich

RE: Terme di saturnia

A few causes of segmentation fault can be summarized as follows,

* attempt to execute a program that does not compile correctly. Note that most compilers will not output a binary given a compile-time error.
* Buffer overflow
* using uninitialized pointers
* dereference NULL pointers
* attempt to access memory the program does not own.
* attempt to alter memory the program does not own (storage violation).

Generally, segmentation faults occur because: a pointer is either NULL, or points to random memory (probably never initialized to anything), or points to memory that has been freed/deallocated/"deleted".

e.g.

char *p1 = NULL; // Initialized to null, which is OK,
// (but cannot be dereferenced on many systems).
char *p2; // Not initialized at all.
char *p3 = new char[20]; // Great! it's allocated,
delete [] p3; // but now it isn't anymore.

Now, dereferencing any of these variables could cause a segmentation fault.

http://www.skincarebyalana.com/TermeDiSaturnia.htm

RE: Penny Auctions Uk

You either reference memory that is non existent, or you attempt to modify memory that is read only. This is usually a result of failure to properly initialize or use pointers or arrays.
C++
C++ Experts are Ready to Help. Join Now for Free.
www.CFanatic.com/Cpp

http://www.doobids.co.uk/

RE: I run the graph checking

I run the graph checking tool, before calling either pmetis or kmetis (tried both.) The graph checking tool tells me that the graph is correct. However the partitioning tools (either pmetis or kmetis) crash with a segmentation fault under Linux and a “kmetis.exe has encountered a problem and needs to close” kind of dialog box under Win XP. My http://h1.ripway.com/earn/home-page.html. Good design, thank you...

RE: John, Did you try the 5.0

John,

Did you try the 5.0 version?

RE: This is fixed. Thank you

Thanks George for fixing this immediately. This seems to work now - at least on the graph that it crashed before.
Regards,
Masca

RE: Make sure that you build the

Make sure that you build the 64bit version, since you have integer overflow problems...

RE: Thanks George for pointing

Thanks George for pointing this out.
I actually got my graph to partition on a 32 bit Linux machine. (Wonder why I did not have a problem.) I don’t work on a 64 bit machine, and also I need a bit of time to be able to generate larger graphs.
I would keep you posted if I face any problems. Thanks again for this tool.
Masca

RE: Negative Num OK or this is an Overflow?

Dear George,
I have managed to get a 64 Bit version of this - but the results seem to be the same?? (Both don't crash, even for much larger graphs.)
I am wondering if your new version is handling the overflow by simply going on to negative numbers. I would specifically like to know if the "8-way Edge-Cut:" number (I am dividing this into 8 parts using pmetis) should always be positive. I am getting a negative number (-1878889016) so I would like to know if this OK or this is a bug.
I could post any output that you need.
Thanks a lot.
Masca

RE: Masca, I have not tried it

Masca,

I have not tried it myself, but I will not trust the values being printed by the 64Bit version of metis, as I have not modified the printf routines to print 64bit quantities--they still print 32
bit integers, which most likely are garbage.

I suggest you compute the actual cut using an external program...

george

RE: Sorry George, I did not

Sorry George, I did not notice that you had replied. I have yet to get some of my own code working regarding generation of my graphs. However the results don’t seem so bad – but I have yet to evaluate them.
Thanks again for this tool.
Masca

RE: Masca, Why don't you open an

Masca,

Why don't you open an issue item in Metis's flyspray system and upload the graph file along with the command line parameters that you use.

RE: File Uploaded on to Flyspray

Thanks George.
I did not know that you had a flyspray system. Also I was not sure if I was doing something obviously wrong.
I have put my description there, and uploaded my file (though I did not know where to upload my file when I initially posted there.)
If you get this resolved let me know.
Thanks a lot.
Masca