Assignment 1: TSP, parallel solution, memory allocation

Assignment 1: TSP, parallel solution, memory allocation

by Dmitry Maklakov -
Number of replies: 1

Good evening!

I have a question regarding memory allocation / time calculation in the parallel solution of the TSP in the first assignments: in the description / hints it is written that every thread should have its own private stack. Will it be okay if this part will be already done after storing the start time or should the programm be constructed in such a manner that these private stacks are allocated before starting time (for example, with some "array" of stacks and than accessing it with thread number)?

Best regards,
Dmitry Maklakov

In reply to Dmitry Maklakov

Re: Assignment 1: TSP, parallel solution, memory allocation

by Wolfgang Schreiner -

All aspects of the parallel computation must be included in the time measurement, so the start time is before the allocation of the stacks. Furthermore, please note that the stack should be allocated on the node where the thread runs, so it should be the thread itself that allocates it.