Git Product home page Git Product logo

Comments (4)

skyboximaging avatar skyboximaging commented on May 4, 2024

I am not sure if I am looking at the entire contents of your executable or if this is just the algorithm definition, but you would need to register your algorithm:

//method that's called when algorithm is registered                                                                                                                                                        
//list input and output datasets here                                                                                                                                                                      
static Algorithm* create() 
{
    RandomAccess* algo = new RandomAccess();
    algo->addInputDataset("imagesIn");
    algo->addOutputDataset("imagesOut");
    return algo;
}

 };

//this will create a global variable that registers the algorithm when its library is loaded.                                                                                                               
MR4C_REGISTER_ALGORITHM( RandomAccess , RandomAccess::create() );

from mr4c.

hyunjun avatar hyunjun commented on May 4, 2024

@skyboximaging of course, I did like below. I copied all the codes except the executeAlgorithm.

#include <iostream>
#include <string>
#include <cstring>
#include <stdlib.h>
#include "algo_dev_api.h"
#include "mr4c_geo_api.h"

using namespace MR4C;

//extend the Algorithm class
class Map : public Algorithm
{
public:
  void executeAlgorithm(AlgorithmData& data, AlgorithmContext& context)
  {
    // the same as above
  }

  static Algorithm* create()
  {
    Map* algo = new Map();
    algo->addInputDataset("input");
    algo->addOutputDataset("output");
    return algo;
  }

};

MR4C_REGISTER_ALGORITHM(map,Map::create());

from mr4c.

mitchwuzhere avatar mitchwuzhere commented on May 4, 2024

You should be able to get feedback on what your algorithm is doing from the job tracker. Your algorithm looks like it should terminate very quickly. Are tasks failing and then running over and over again? Logs are generated with each task, which you should be able to see in your job tracker. If there is an error, you should see it in the logs.

Also, have you tried running the examples? If those fail, there is most likely a problem with your cluster setup.

from mr4c.

hyunjun avatar hyunjun commented on May 4, 2024

@mitchwuzhere Of course, I ran all the examples, and I wrote that code to test just simple I/O before starting actual work.

from mr4c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.