-
Notifications
You must be signed in to change notification settings - Fork 6
Progress
10/15/14
Added python interface for taking graph inputs. To use please do the following:
1. ‘source start.sh’. The file is in the project root directory. It sets up environments for python.
2. Added a python_kit folder in the root directory. Let it stay there. It has some system files, most importantly Python.h
3. ROOT/scripts contains the python scripts for random graph generation. In file graphGenClass.py, you can set the number of vertices to a desired value. The code generates random edges between those nodes. The edge density can be configured also.
4. The main chare constructor calls the python script and reads the generated graph into map<int, list >. So, no recompilation is needed to get a new graph.
5. For debugging purposes, it may be desired that the python script generates the same graph as in the last run. For this, there is an option while running the charm program. If you specify —newGraph=no, the graph from previous run is provided. See ‘run.sh’ in the Source folder as an example. This is done by saving a JSON image of the previously generated graph. —newGraph=yes generates new random graph.
- Command line parsing activated: Graph is populated by parsing an input.txt.
- The graph implementation is the same that is shared by Tanmay.
- To allow compilation of c11 constructs std=c++11 need to be added in charmc.
- The entire code base is kept much distributed so as to have less contention while collaborating.
- The read-only graph is represented as map<int,list>. Reasons: Otherwise making this read-only will have unnecessary efforts. Also we need to read the graph structure only. No traversals is required.
- pup::er is added to the class State.
- The options of bitvector in the order of increasing memory consumption is : unsigned int < bitset < vector bool. Obviously bitset will be easier to use.
- As existing pup_stl.h is not supporting bitset, I have used a unsigned long as a bitvector for storing the possible colors. NB: This limits the number of colors possible to 32 only.
- Tested that the readonly ’s are shared by chares and the vector is properly marshalled and passed on to other chares.
- Put empty functions to be filled in later. Also comments are there to help.
- Created a directory Tests which currently hosts a single test case with expected output. Please follow the following steps:
- Before getting started on coding, make sure the existing test case is passing.
- Once you are done with coding augment the test case with new features that worth testing or add new test cases and modify the ALL the expected output accordingly.
- Before cheking make sure the build is successful.