Re: ComputeGrid API in C++

2017-11-09 Thread Igor Sapego
Yes, this will do. Best Regards, Igor On Fri, Oct 27, 2017 at 5:49 PM, asingh wrote: > Ok, so, i first need to wrap ignite within an application that will > register > my user functions and start ignite. > I launch that application on every machine that I have. > Then, I

Re: ComputeGrid API in C++

2017-10-27 Thread asingh
Ok, so, i first need to wrap ignite within an application that will register my user functions and start ignite. I launch that application on every machine that I have. Then, I can launch another calling application that will call RunASync() and dispatch tasks to each ignite node and collect their

Re: ComputeGrid API in C++

2017-10-27 Thread Igor Sapego
Hi, Yes, you are right, Ignition::Start(cfg, "node1"). You don't need to set any specific properties, all you need to do is to register your classes on all nodes on all machines after you start them. > It just launches node1 within the same process as the application. That's right. You need to

Re: ComputeGrid API in C++

2017-10-26 Thread asingh
Ignite node = Ignition::Start("node1"); The first argument to Start() needs to be an xml file. Are there any specific properties that need to be set in the xml for this case? If I call Start(cfg, "node1"), it just launches node1 within the same process as the application. In the below diagram,

Re: ComputeGrid API in C++

2017-10-26 Thread Igor Sapego
Hi, You don't have to modify platforms/cpp/ignite/src/ignite.cpp. Why won't you modify your code, where you start the node? I mean, in *your application code* write something like this: Ignite node = Ignition::Start("node1"); IgniteBinding binding = node.GetBinding();

Re: ComputeGrid API in C++

2017-10-26 Thread asingh
Hi Igor Shouldn't be a problem, given that the source code is there. I just want to make sure that I am doing it the right way. Currently, I have modified the main() method in platforms/cpp/ignite/src/ignite.cpp and added these two lines: IgniteBinding binding = ignite.GetBinding();

Re: ComputeGrid API in C++

2017-10-26 Thread Igor Sapego
You need to have the same code on all C++ nodes to be able to execute it remotely. In other words, you need to register classes you want to invoke remotely on all three nodes. Is that a problem for you? Best Regards, Igor On Wed, Oct 25, 2017 at 6:35 PM, asingh wrote: >

Re: ComputeGrid API in C++

2017-10-25 Thread asingh
So, here is what I am trying to do: 1. Launch ignite node on one Linux machine 2. Launch another ignite node on second Linux machine 3. On one of the two machines, run the compute_example containing PrintWords() class and have its Call() method invoked via compute.RunAsync() on all three machines

Re: ComputeGrid API in C++

2017-10-24 Thread Igor Sapego
Why have you decided to modify an implementation? Are there any special requirements which making this necessary? Why can't you register all the necessary classes in user code? Best Regards, Igor On Mon, Oct 23, 2017 at 5:04 PM, asingh wrote: > That was it! > Thank you

Re: ComputeGrid API in C++

2017-10-23 Thread asingh
That was it! Thank you so much, Igor. I just had to add a call to GetBinding() and RegisterComputeFunc() in platforms/cpp/ignite/src/ignite.cpp main() method. I'm not used to modifying an implementation in order to run an example ;) Although, this means that every time I change the closure, I

Re: ComputeGrid API in C++

2017-10-23 Thread Igor Sapego
Have you registered the same function for all three nodes, or only for the one you are calling RunAsync() on? You should register it on every node, as this is a local operation. Best Regards, Igor On Fri, Oct 20, 2017 at 7:06 PM, asingh wrote: > That makes sense. > > Now

Re: ComputeGrid API in C++

2017-10-20 Thread asingh
That makes sense. Now I am using ignite.GetBinding() from within the main() function In the main function, I am populating a vector of strings and calling RunAsync() three times. The ignite node within the binary is able to process the string but the other two ignite nodes report the same

Re: ComputeGrid API in C++

2017-10-20 Thread Igor Sapego
Well, yeah you should link with -rdynamic. Actually, IgniteModuleInit is intended to be used in dynamic libraries, not in binaries. When linking binary, GCC ordinary does not add unused symbols to dynamic symbol table, so ignite can not find IgniteModuleInit on start. Consider using

Re: ComputeGrid API in C++

2017-10-20 Thread asingh
That piece of message confused me a little. Am i supposed to compile(actually, link) with -rdynamic or not? Anyway, so I did set LDFLAGS environment variable to -rdynamic and recompiled and relinked under platform/cpp as well as under examples. But still no luck. Also, I am running the ignite

Re: ComputeGrid API in C++

2017-10-20 Thread Igor Sapego
So, did you compile your program with -rdynamic as error text suggests? Best Regards, Igor On Thu, Oct 19, 2017 at 6:09 PM, asingh wrote: > Hi Igor > > I am running Red Hat Linux 6, with gcc 4.4.7 > > Thanks! > > > > -- > Sent from:

Re: ComputeGrid API in C++

2017-10-19 Thread asingh
Hi Igor I am running Red Hat Linux 6, with gcc 4.4.7 Thanks! -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: ComputeGrid API in C++

2017-10-19 Thread Igor Sapego
Hi, Are you running Linux or Windows? What is the your compiler? Best Regards, Igor On Thu, Oct 19, 2017 at 5:47 PM, asingh wrote: > compute-example.xml > t1405/compute-example.xml> > > I have attached the xml file

Re: ComputeGrid API in C++

2017-10-19 Thread asingh
compute-example.xml I have attached the xml file as well. As you can see from the various commented out sections, I have been trying different things to make it work. -- Sent from:

Re: ComputeGrid API in C++

2017-10-19 Thread asingh
Thanks for the links! So, now I am trying to run the CPP example. I have compiled CPP version of ignite and running that on two servers. The two instances of ignite are able to recognize each other: [10:20:49] Ignite node started OK (id=638a866d) [10:20:49] Topology snapshot [ver=1, servers=1,

Re: ComputeGrid API in C++

2017-10-18 Thread slava.koptilin
Hi, C++ Compute Grid API is available since Apache Ignite 2.1 version. High-level information can be found here https://apacheignite-cpp.readme.io/v2.1/docs/compute-grid C++ Compute Grid API is defined into header fle.

ComputeGrid API in C++

2017-10-18 Thread asingh
Hi There was a thread started regarding this some time back. http://apache-ignite-users.70518.x6.nabble.com/Compute-Grid-API-in-C-Scala-td4456.html It was mentioned that the C++ Compute API may come in 1.7. Did that happen? I cant seem to find any C++ code in the ComputeGrid documentation. I