ParBLiSS/parconnect

cannot get output partition labels for node ID's

Opened this issue · 2 comments

Hi,

Thanks for the excellent connected components benchmarking application. I am trying to use it in another piece of software and found that it seems like it is not able to produce an output file with the connected component labels per node ID yet. I noticed that it is necessary to call hash_64i in order to recover the original node ID's in a small test file such as:

      if (comm.rank() == 0)
            for (auto it = tupleVector.begin(); it != tupleVector.end(); ++it) {
              auto pc =  std::get<cclTupleIds::Pc>(*it);
              auto nid = std::get<cclTupleIds::nId>(*it);
              conn::graphGen::hash_64i(pc);
              conn::graphGen::hash_64i(nid);
              cout << pc << ' ' << nid << '\n';
            }

however when I try running the program with the larger test.list file provided on your website I found that the output looks wrong, containing negative numbers and other problematic node ID's. Can you please let me know how to get out the results of the parallel computation assigning a component label to each node ID please? Ideally I would like to see an -output type option that could be used to produce a file containing this information as two columns separated by a space similar to the input edge list generic format for input. But if that is too hard I would be happy to understand what I am doing wrong in trying to print out the results of the computation instead of only the timing and connected component count.

Thank you for any help or information you can provide.

I would want to see other parts of the code as well to see what's going on.. for example how do you initialize the object of the parconnect connected components class, and call the internal functions.

I am using an external library for hashing. I don't think I ever tested its correctness for invertibility, but I would guess it is correct for uint64_t types. I wonder what's the data type of tupleVector variable in your code snippet.

Meanwhile, if you want a quick hack to get around this, you can completely comment out the logic of the functions hash_64i and hash_64 in file ext/hash/invertible_hash.hpp. This will avoid any id transformation.

I did try that thank you @cjain7 but somehow I came to some other problems which I could not explain. It seemed like new nodes might be being introduced although I am not sure. How would you feel about adding a standard baseline output option similar to the TODO in reduceIds so that others can more easily verify, test, and use the code?