Code Monkey home page Code Monkey logo

graphlite's People

Contributors

niusj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphlite's Issues

在compute函数里用pmsgs->getValue()取一个结构体时,超步会卡死

for (; ! pmsgs->done(); pmsgs->next()){ Neighbor myneighbor; memcpy(&myneighbor,&pmsgs->getValue(),sizeof(Neighbor)); }

如果改成
for (; ! pmsgs->done(); pmsgs->next()){ Neighbor myneighbor; memcpy(&myneighbor,&pmsgs->getValue(),sizeof(Neighbor)); memset(&myneighbor,0,sizeof(Neighbor)); }
则没用问题,但没有意义了

bin/setenv换行符问题

bin/setenv的换行符是用\r\n结尾的,直接下载下来并拷贝到虚拟机上,在我的电脑上出现了无法正确配置环境变量的问题

加载图节点的value值, 只有一部分被正确初始化了, 另一部分为0。

void loadGraph() {
        unsigned long long last_vertex;
        unsigned long long from;
        unsigned long long to;
        double weight = 0;
        
        double value = INF;         //init value as INF
        int outdegree = 0;
        
        const char *line= getEdgeLine();

        // Note: modify this if an edge weight is to be read
        //       modify the 'weight' variable

        sscanf(line, "%lld %lld %lf", &from, &to, &weight);
        addEdge(from, to, &weight);

        last_vertex = from;
        ++outdegree;
        for (int64_t i = 1; i < m_total_edge; ++i) {
            line= getEdgeLine();

            // Note: modify this if an edge weight is to be read
            //       modify the 'weight' variable

            sscanf(line, "%lld %lld %lf", &from, &to, &weight);
            if (last_vertex != from) {
                addVertex(last_vertex, &value, outdegree);
                last_vertex = from;
                outdegree = 1;
            } else {
                ++outdegree;
            }
            addEdge(from, to, &weight);
        }
        addVertex(last_vertex, &value, outdegree);
    }
};

定义 INF = 1000000

在compute()函数中打印每个节点的value值,发现只有一部分是预先设置的INF, 另一部分节点的value为0。

image

没能发现我所写代码的逻辑问题, 所以提出这个可能的issue。

Bug of input in example/PageRankVertex.cc

For example, if I have a graph like this:

7
8
0 1
0 2
1 2
3 1
3 2
4 5
4 6
5 6

It will be divided into 4 part as default. So the input for the third worker will be:

2
0

So there will be no edge in this input, and this will be invalid input of the program according to the code in loadGraph() function. But obviously it should not be invalid input because it is possible to have a graph like this. When I run the program, it will show me "Sender: connect: Connection refused".

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.