.. (לתיקייה המכילה) | ||
should threads with rank > 0 finish with 'return -1', or finish in some other way? | |
they should return as regular ( why to use -1?). |
what does "O(1) with respect to the number of MPI processes invoked" mean (in part 2)? | |
It means it doesn't depend on how many processes you use , your memory usage should be constant (and not O(p).. or whatever ..). The only thing that can be allocated for every thread is the coordinations Arrays ( that is still ok). |
may we use DSs from STL? | |
No, you must implement with c. |
may we use helper files, or should we put all our code in tsp_static.c and tsp.c? | |
You should put all the code in tsp_static.c and tsp.c , because we will use our make file ,and you won't be able to modify the it. |
may we assume that there are more cities than processors? | |
No. |
in part 1: if we have 10 cities and 8 threads, would the following division be considered 'equal chunks': decide which city will follow city 0, and RR the options between the threads (so one thread actually checks 2 subtrees, while all the others check 1)? | |
It doesn't depend on number of cities , with 10 cities you may get to 10! (or 9!) chunks.., think about the solution and you will answer this by your self. |
In the part two , its written "Workers must not exit before the master" we can't satisfy it , some workers still return before maste | |
It is okay if they only return before master, but they MUST NOT return while the master and other threads is still working. it means of some worker finished his job , he mustn't return immediatly ,but it should wait for the others to finish , and only then returns. |
in part 1 we mustn't use point to point communication , but this way we will need to send the shortest path found from every thread (including those who doesn't find a min. path), that won't be efficient. | |
Right. after passing the min_length (value) using collective comm,you may use point to point comm. only to pass the shortest path from the thread found it to thread 0. this is the ONLY case you may use it. |
How can we build a data_type with an array with dynamic size inside , should we use pointers? or what can we do? | |
No. you can't do so , the data type size and structure must not change after building it. use of pointer won't work , this is not a shared memory model. Remember that you can send more than one value using send (you may send n) , that is how it should be done. |
should the static solution finish with 18 cities input? and in part 2 ? | |
No. the static solution will be checked with up to 14 cities input. the dynamic solution should finish up-to 18 cities. both must finish within not more than 5 minutes. |
There can be more than one minimal path , can we return any minimal path or a specific one? | |
Right there may be several minimal paths, you may return any one of them. |
may the master do prune too , or only the workers? | |
if a worker found a new bound and made a jump , hey may tell the master about both (the bound and the jump) ,and the master may do the same jump. |