Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph-conver tool segfaults when converting the graph using -gr2sortedparentdegreegr #14

Closed
vaastav opened this issue Feb 21, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@vaastav
Copy link

vaastav commented Feb 21, 2019

The graph-converter tool segfaults when converting the graph using the sort by parent degree option,
I tried with multiple graphs (twitter_rv, cit-patents).
I got the backtrace from gdb and the segfault seems to be happening at line 1399 in Galois/tools/graph-convert/graph-convert.cpp inside the call to std:sort function. The segfault only happens when the number of nodes processed (the count variable) is close to the total size (the sz variable).
In the case of cit-patents, the last print statement that was output to console was "6008832 of 6009555
" after it had found an inverse.
I have been running this on Ubuntu 16.04 with 32GB RAM, i7 3.2GHz processor.

@gurbinder533
Copy link
Contributor

gurbinder533 commented Feb 21, 2019

Hello Vaastav,
Thank you for using Galois.
Did you use the following command to convert twitter_rv edgelist to gr format before using -gr2sortedparentdegreegr option on it?

./graph-convert -edgelist2gr -edgeType=void twitter_rv.edgelist twitter_rv.gr

I have noticed that twitter_rv is an unweighted edgelist with 2 columns (sourceID destinationID), therefore edgeType void is required.
After converting to an unweighted .gr format you can add weights using -gr2randomweightgr option:

./graph-convert -gr2randomweightgr -edgeType=uint32 twitter_rv.gr twitter_rv.wgr

Try converting graph using the above-mentioned steps and then use -gr2sortedparentdegreegr:

./graph-convert -gr2sortedparentdegreegr -edgeType=uint32 twitter_rv.wgr twitter_rv.sortedwgr

See if this works. If not, please let us know.


Gurbinder

@vaastav
Copy link
Author

vaastav commented Feb 21, 2019

Hello Gurbinder,

Thank you for responding. I tried your commands on another unweighted graph which I had previously tested on as well (cit-patents). The end result is still the same as before. The conversion runs into a segmentation fault.
Regardless I am not sure as to why I need to convert an unweighted graph to a graph with random weights before I can sort the nodes in the graph according to the order of the parent's degree.

Regarding the edgetype=void usage, I did not use this initially but I was able to successfully convert the graph into bfs-sorted order and degree-sorted order and was able to successfully run connected components with -noverify option.

@vaastav
Copy link
Author

vaastav commented Feb 21, 2019

Link to the cit-Patents dataset : https://snap.stanford.edu/data/cit-Patents.html

I also get verification failures when I run lonestar/connectedcomponents/connectedcomponents on every graph so I have to use the -noverify option. It seems to me that the verification might be broken but I am not so sure if this is at all related to how I am converting the edgelists.

@gurbinder533
Copy link
Contributor

Hi Vaastav,

I was not sure which benchmark you wanted to run, therefore I suggested you to add random weights as benchmarks like sssp need edge weights.
The main point above was to pass the right value for edgeType for the conversion of edge lists. If you don't want weights you can use:
./graph-convert -edgelist2gr -edgeType=void twitter_rv.edgelist twitter_rv.gr
./graph-convert -gr2sortedparentdegreegr -edgeType=void twitter_rv.gr twitter_rv.sortedgr

Regarding connectedcomponent, algorithm expects the symmetric graph. Use the following command to convert gr to a symmetric graph:
./graph-convert -gr2sgr -edgeType=void twitter_rv.gr twitter_rv.sgr

--
Gurbinder

@vaastav
Copy link
Author

vaastav commented Feb 22, 2019

I had initially tried these 2 commands:

./graph-convert -edgelist2gr -edgeType=void twitter_rv.edgelist twitter_rv.gr 
./graph-convert -gr2sortedparentdegreegr -edgeType=void twitter_rv.gr twitter_rv.sortedgr_

and it resulted in a Segfault as I have mentioned before. This segfault is not specific to a dataset but seems to happen to every dataset I have tried.

Regarding connectedcomponent, I tried using the symmetric graph like you mentioned without the -noverify option and it still resulted in a "verification failed" error.

@l-hoang
Copy link
Member

l-hoang commented Oct 21, 2019

Hello @vaastav.

I have just pushed a fix for the segmentation fault issue that you were running into with gr2sortedparentdegreegr: there was a mistake in the iterators being used during the sort. Thank you very much for bringing this to our attention as well as for providing a test case I was able to use to replicate the error for debugging.

Since the original problem raised by this issue has been resolved, I am closing this issue. If the issue persists, please let me know and I'll reopen the issue.

Regarding the connected components issue: if it is still a problem, please open another issue and we can address it there.

Thank you,
Loc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants