next up previous contents
Next: Message passing mechanism and Up: Parallel version of ALIAS-Maple Previous: Introduction   Contents


Stopping an ALIAS-C++ procedure

For using the previous mechanism it is necessary to be able to stop an ALIAS-C++ procedure and recover the current state of the process i.e. the solutions if any and the remaining unprocessed boxes.

There are different mechanisms to stop the bisection process of an algorithm:

  1. the number of boxes still to be processed is greater than a given threshold $N$ (this is obtained by setting the global ALIAS-C++ variable ALIAS_Parallel_Max_Bisection to $N-1$). This is the mechanism that is used when the master starts processing the initial search box. .
  2. as it may be necessary to perform a large number of bisection before obtaining $N$ boxes it is necessary to have a safety mechanism that will limit the number of bisection (otherwise a slave may be stuck in a lengthy computation while the other slaves are free). The maximal number of bisection may be indicated by setting the global ALIAS-C++ variable ALIAS_Parallel_Max_Split and the algorithm will return if this number is reached and the number of unprocessed boxes is lower than ALIAS_Parallel_Max_Bisection (otherwise the process will continue until this number is reached).
  3. the number of performed bisection is greater than a given threshold $M$ whatever is the number of boxes still to be processed: this is obtained by setting the global variable ALIAS_Parallel_Max_Bisection to $-M$
  4. the number of performed bisection is greater than a given threshold $M$ and the number of boxes still to be processed is lower than a given threshold $N$: this is obtained by setting the global ALIAS-C++ variable ALIAS_Parallel_Max_Bisection to $-M$ and the global ALIAS-C++ variable ALIAS_Parallel_Max_Box to $N$ . A safety mechanism is enforced in that case to avoid that only one of the slave computer will perform all the computation: if $M \times S$ bisections have been done and there is more than $N$ boxes to be processed the algorithm will return the error code -1. The value of $S$ is given by the global C++ variable ALIAS_Safety_Factor` with a default value of 2
  5. if we are using the reverse storage mode we may indicate that the number of performed bisection must be greater than a given threshold $M$ and the number of boxes still to be processed is lower than a given threshold $N$: this is obtained by setting the global ALIAS-C++ variable ALIAS_Parallel_Max_Bisection to $N$ and the global ALIAS-C++ variable ALIAS_Parallel_Max_Reverse to $M$
  6. the slave computation time has exceeded a fixed amount of time, which probably indicate that it will be preferable to distribute the treatment of the processed box among different slaves. This could be done using the ALIAS-C++ variable ALIAS_TimeOut which indicates the maximum amount of time (in minutes) during which a slave may run (this amount will be respected only approximately).

Using this stop criteria we may implement a parallel version of the ALIAS-Maple procedures.


next up previous contents
Next: Message passing mechanism and Up: Parallel version of ALIAS-Maple Previous: Introduction   Contents
Jean-Pierre Merlet 2012-12-20