parsec
parsec copied to clipboard
Missing support when task class execution scope from a .. b where b < a
Original report by Qinglei Cao (Bitbucket: Qinglei_Cao, ).
If the execution scope of a task class is defined like this:
281 potrf_dtrsm(m, k) [high_priority = on]
282
283 // Execution space
284 k = 0 .. descA->mt-2
285 m = [ mi = 0 .. %{ return analysis->trsm_num[k]-1; %} ] %{ return analysis->trsm[k][mi]; %}
where analysis->trsm_num[k]
could be 0 (mi = 0 .. -1), and in this case no task exist for this iteration k.
However, it seems it’s not the case, at least in the internal_init when counting the number of local tasks. For instance,
static int HiCMA_dpotrf_L_2flow_sparse_potrf_dtrsm_internal_init(parsec_execution_stream_t * es,
__parsec_HiCMA_dpotrf_L_2flow_sparse_potrf_dtrsm_task_t
* this_task)
{
...........
for (k = __jdf2c_k_start; k <= __jdf2c_k_end; k += __jdf2c_k_inc) {
assignments.k.value = k;
{ /* block for the local variable 'mi' */
int __jdf2c__loop_mi = 1;
int mi;
for (assignments.ldef[0].value = mi = 0; __jdf2c__loop_mi == 1; assignments.ldef[0].value = mi += 1) { /* Arbitrary iterator on mi */
if (mi == HiCMA_dpotrf_L_2flow_sparse_potrf_dtrsm_inline_c_expr26_line_285(__parsec_tp, &assignments))
__jdf2c__loop_mi = 0; /* Execute once only when reaching the end */
...........
}
BTW, this issue also happens in the startup for each taskclass.