diff --git a/runtime/starpu/codelets/codelet_zgemm.c b/runtime/starpu/codelets/codelet_zgemm.c index 93d2335244b5677cd5ed51cb019fa435659a1cda..1e3689f5f338d8d8ed756e9117bf6ba6388c6fce 100644 --- a/runtime/starpu/codelets/codelet_zgemm.c +++ b/runtime/starpu/codelets/codelet_zgemm.c @@ -54,11 +54,16 @@ void MORSE_TASK_zgemm(MORSE_option_t *options, int rank_changed=0; // force execution on the rank owning the largest data (tile) - // the numerical facto 10 should be an environnement variable - if ( sizeA > 10*sizeC ){ + int threshold; + char* env = getenv("MORSE_COMM_FACTOR_THRESHOLD"); + if (env != NULL) + threshold = (unsigned)atoi(env); + else + threshold = 10; + if ( sizeA > threshold*sizeC ){ execution_rank = A->get_rankof( A, Am, An ); rank_changed = 1; - }else if( sizeB > 10*sizeC ){ + }else if( sizeB > threshold*sizeC ){ execution_rank = B->get_rankof( B, Bm, Bn ); rank_changed = 1; } diff --git a/runtime/starpu/codelets/codelet_ztrsm.c b/runtime/starpu/codelets/codelet_ztrsm.c index 2ed832347a7ffa3dfbad0386785138443430186f..a920ce770cdc4a07f428ab40f88ad2d3d43bae57 100644 --- a/runtime/starpu/codelets/codelet_ztrsm.c +++ b/runtime/starpu/codelets/codelet_ztrsm.c @@ -52,8 +52,13 @@ void MORSE_TASK_ztrsm(MORSE_option_t *options, int rank_changed=0; // force execution on the rank owning the largest data (tile) - // the numerical facto 10 should be an environnement variable - if ( sizeA > 10*sizeB ){ + int threshold; + char* env = getenv("MORSE_COMM_FACTOR_THRESHOLD"); + if (env != NULL) + threshold = (unsigned)atoi(env); + else + threshold = 10; + if ( sizeA > threshold*sizeB ){ execution_rank = A->get_rankof( A, Am, An ); rank_changed=1; }