Using Graphlab C++ project an extend it

User 1768 | 4/17/2015, 9:48:18 AM

I need your guidance. I need to run and extend one source code in Graphlab by C++, on my Macbook (single machine) or one PC. I know Graphlab Create and I try it before. and Also, I know the ability of Graphlab Cpp SDK to use some functions in Graphlab Create. But, since in that code, they use some library of graph lab as the following, How I can extend that code and run it and change it? If I install Graphchi on my macbook, is it possible to use his code and change it? <pre><code>#include <graphlab.hpp>

include <graphlab/graph/distributed_graph.hpp>

include <graphlab/ui/metrics_server.hpp>

include <graphlab/macros_def.hpp>

</code></pre> What is your suggestion?


User 1592 | 4/17/2015, 1:46:54 PM

Hi It is not clear from your question what is the task you are trying to complete. GraphLab Create SDK documentation is <a href="">here</a>. The main idea behind the SDK that some operations you can do in python can be significantly sped up if you implement them in C++ instead.

User 1768 | 4/17/2015, 4:40:56 PM

Thanks for your answer dear Danny. I need to run that code and add some functions to it. I couldn't run that code in mac. Because mac has different c compiler. so I got compilation error on Graphlab libraries. There are difference in defining the primitive datatypes in g++ (the one used in graph lab) and Xcode (the c environment on Mac). Before, I install Graphlab VM in my PC. But, it doesn't allow me to run Sudo command to install Graphlab and give me this error when I want to "sudo: unable to change to root gid: Operation not permitted". Because Graphlab VM just give me the Guest User . What I need to do? Please guide me. I need to extend this code and really I need your guide.

User 1774 | 4/18/2015, 8:20:31 AM

Hi Naoomi,

Let's get down to the details: when you try to compile the examples shipped with the SDK:

1) What errors do you get? Also, do you have the requirements instealled? Copying and pasting from the SDK's page: On mac: -- GraphLab Create >= 1.1 installation -- XCode 6.1 Command Line Tools. (Apple LLVM version 6.0 (clang-600.0.54))

2) Regarding GraphChi - it is different from GraphLab Create and irrelevant to what you are trying to do (if I got it right).

3) Can you share a link to your code so that we'll try to compile it as well? I have a MacBook Pro and a PC running Ubuntu 14.04 so I can try both options.

User 1768 | 4/19/2015, 7:10:06 PM

Dear Guyrap, Thanks for the response. I have the following issues:

1- Yes, I install already all requirements. and I can run the example of SDK in tutorial by creating the example.cpp file in glextensions folder and call it and run it in terminal. But, this project has some functions and main method in C++. Based on GraphCreateSDK, when I put my cpp project to the glextensions folder, and run it in mac, it gives me this error: <pre><code>Error: Test.cpp:6:10: fatal error: 'graphlab.hpp' file not found

include <graphlab.hpp>


1 error generated.</code></pre> Because this C++ project use some graphlab libraries. How I can solve this problem?

2- When I try to run in my PC as well, by installing graphlabVM for Ubuntu, it doesn't allow me to run Sudo command to install Graphlab and give me this error "sudo: unable to change to root gid: Operation not permitted". Why Graphlab VM just give me the Guest User?

User 1768 | 4/20/2015, 8:38:45 AM

For example this code is similar to the code that I need to change, if you run this CPP code in SDK, you will again get the same error:

Can you please guide me,

User 4 | 4/21/2015, 7:10:46 AM

Hi @naoomi, the code sample from Google Code you are referring to is part of the GraphLab <a href="">PowerGraph</a> project, an academic project from CMU that GraphLab Create is based on. However, these two codebases have diverged and are not intended to be compatible; code written for the PowerGraph project cannot simply be dropped into the SDK, since the data structures and such underneath have changed quite a bit.

For this particular file, instead of including: <pre><code>#include <graphlab.hpp>

include <graphlab/graph/distributed_graph.hpp>


You would want to include (from the <a href="">GraphLab Create SDK</a>): <pre><code>#include <graphlab/sdk/toolkitfunctionmacros.hpp>

include <graphlab/sdk/toolkitclassmacros.hpp>

include <graphlab/sdk/gl_sgraph.hpp>


There will also be significant changes to the contents of the file to fit the new APIs; you might be better off rewriting the same algorithm on top of the newer data structures like SGraph, using the <a href="">SDK documentation</a>. Here is a sample you can work from:

User 1768 | 4/22/2015, 3:21:11 AM

Dear @Zach , thanks a lot for your nice guidance. Yes, exactly this is what I was trying to explain in my first comment. And now, in my situation, Graphlab Create and SDK can not be a good choice. Since I need to expand my friend's Cpp code by PowerGraph. and for me that I just arrive to Graphlab environment, it is not easy to change the contend of the original code to be compatible with SDK. That's why I ask you to help me for PowerGraph tutorial. Because you remove all tutorial documentations about PowerGraph to avoid any confusion for newcomers as I saw in other comments. But, I want to kindly ask you, if you have any documentation tutorial about PowerGraph in your local PC that can help me to understand how to create a new project and how to do and expand one project. I will be so appreciated if someone send me these tutorial documents.

User 1592 | 4/22/2015, 7:57:49 AM

Hi Naoomi We did not remove PowerGraph tutorials they are here. As we have deprecated PowerGraph support we do not have enough resource to support your use case. We assume you must have C++ programming experience to be able to properly compile and run the code before you try to change it.

User 1768 | 4/22/2015, 9:27:45 AM

Hi dear @Danny , Thanks again for your answer. Since before I was reading the other comments, I see that some of the links such as "" and " " are not available any more and I thought you remove them. Actually I was trying to find something like this to start that I found it here ""

Thanks again for your help,