-
Notifications
You must be signed in to change notification settings - Fork 751
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
GUNROCK - Hi-performance Graph processing backend engine #641
Comments
Welcome back :) It has a C API, that should be pretty easy to map. Give it a try with this new guide: |
@saudet - ok, I prepared project skeleton with cppbuil.sh and created general infomapper class, now I strugle little bit, but I will come with real questions and possibly multiple :-) |
@saudet - I kicked off the module creation at: I will go trought the output, there is just something related to some JSON mapping comming from gunrock which generated some mess. When you have minute, could you quickly check whats wrong. Additionally I don't much understand from documentation what the link property means. At some projects I look at it has value like "hdf5@1", wasn't able to find much explained about this. Thx for kick me further to finish this piece of preset. |
We should be mapping only the C/C++ API, not anything related to JSON. What do you mean? The "link" value is just the name of the library, and if something is attached to the suffix, like the version, we put it after |
@saudet - link is clear. Regarding json, I will paste here what has been produced by javacpp, just jump on cigarette... |
@saudet - Ok, so I successfully generated the JNI wrapper, but its non-compilable:
Current state is available here: https://github.com/archenroot/javacpp-presets Any comments welcomed. |
That doesn't look like the C API. Start with that, it'll be easier.
|
Anyway I will play with that a little first, this is also good studdy of javacpp after some time I used it last time... |
No, like this: https://github.com/gunrock/gunrock/tree/master/shared_lib_tests |
I see, thx. Will start with that. |
Ok, mvn clean install success. I will add to the cppbuild.sh some condition to check if directory already exists, to prevent download and build, could be handy for debugging purposes. Additionally it looks like I might not need any other header file then gunrock.h, but I am going to do some java test and maybe will provide some Info objects to remap some functions. Again thanks for help buddy! |
The cppbuild.sh builds in the presets already don't redownload or rebuild, please use the same pattern! Yes, if the C API is enough for your needs, let's go with that at first. I'm sure it will be useful to others, or if not maybe they'll help out and enhance it. :) |
I go with same pattern or at least try, I have now finished first translated program from C to Java like following (already committed progress - of course once all works I will squash commits into single one before merge request back to master javacpp-presets). The code - is Javoized version of https://github.com/gunrock/gunrock/blob/master/shared_lib_tests/shared_lib_sssp.c:
Line: Throws an exception(I am not sure about using fill() method... could be reason or bug in glibc?):
error report file is here: Have you seen something like this on your journeys across C to Java world? I have Gentoo stable glibc: |
Ok, my mistake, the problematic line should be: |
@saudet - the example is working fine - it executes on GPU without any error, but from C example:
I don't know how to get the actual array. grapho.node_value1 is type of Pointer, how to obtain an array which it points to? This is last piece of sample code to print out distance. And I am there thanks to you. |
Cast it by creating a new IntPointer.
|
I am playing around and being not able to find right way... Case 1:
produces:
Case 2:
Case 3;
|
I am tired, its 5:20 am here :-), but thx for help my navigation... I mean I will continue on saturday. |
I'm not sure why they allocate memory, assign it to |
There is actually the python counter example I found which imports ctype lib:
labels is out parameter type of Pointer javacpp in my case at moment. Maybe I might enforce it in the parser directly to IntPointer? |
There are 2 versions of sssp, one returns drGraph(C sample) and one int pointer(python sample with ctype lib), the header file define methods like:
|
I tried to rewrite now python example with sssp method:
Its also throwing some errors:
|
Allocating arrays with lengths |
The same with the other example, those there should be something like: grGraphI.row_offsets(new IntPointer(row_offsets));
... |
Yeah I got it, hm, actually I do now python vs c code result merging as they differ on same set, could be some graph algo customization sssp vs gunrock_sssp, but that is off topic here as relates to gunrock internals. The important thing is:
JavaCPP rocks 🥇 just for additional info what I observe when running on same data the PYTHON sample which uses sssp method:
I will probably look into the other header files but only after some analysis. Anyway I will clean up the project, squash commits and create merge request. But it will require few days, I will also consider remapping C methods to some Java looking methods, etc. (cosmetics). Not sure which of other header files will be useful, and or handy to cover as well, but will ask at gunrock itself first. They were thinking long time ago about having jgunrock, but due to resources (and not being probably aware of javacpp) it remained unfinished (never started), so they are also happy to have this. Thx a lot for asistence with this. I will leave this open for any kind of discussion until we merge this into presets main branch... |
@saudet - just small update. I will commit as soon as possible the Gunrock. I now work on integrate Gunrock Java API into Neo4j as custom algorithm, additionally I look at compression sparse column for graph data in binary format, etc... |
@saudet - Could you review: https://github.com/archenroot/javacpp-presets?organization=archenroot&organization=archenroot Or should I do merge requests, etc. The library requires CUDA and Boost 1.58-1.6* installed. Is there any way for such kind of dependencies to enforce by JavaCPP (it might be hard as per distro package manager...) |
We can install Boost in the cppbuild.sh file as with Caffe, and for CUDA just make sure install-travis.sh downloads and installs it. |
@saudet - will check and update it. |
Some time passed I got back to JavaCPP :-)
In my current scope there is now: https://gunrock.github.io/docs/
Is it somethink you might be interested at Skymind projects with deeplearning4j as well, in such case maybe you could help me with preset generation :-)
Let me know and all the best.
NOTE: Guys were discussing to bind it to fasade like Apache TinkerPop back in time...
gunrock/gunrock#111
but is related to my current research focus to show what we can do on single Nvidia DGX-2 beast as Gunrock supports OpenMP, maybe in future they will support MPI to distribute accross gpu cluster..., but lets start small better now.
Ladislav
The text was updated successfully, but these errors were encountered: