diff --git a/compute/ztpgqrt.c b/compute/ztpgqrt.c index e5b09415383cad31a463c81f06388aa33fda2479..1cdab39d879bfe7d19355e55a7e60e33a8af37fe 100644 --- a/compute/ztpgqrt.c +++ b/compute/ztpgqrt.c @@ -391,7 +391,7 @@ int MORSE_ztpgqrt_Tile_Async( int L, morse_error("MORSE_ztpgqrt_Tile", "only square tiles supported"); return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE); } - if (((Q2->m - L) % Q2->mb) != 0) { + if ( (L != 0) && (((Q2->m - L) % Q2->mb) != 0) ) { morse_error("MORSE_ztpgqrt_Tile", "Triangular part must be aligned with tiles"); return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE); } diff --git a/compute/ztpqrt.c b/compute/ztpqrt.c index f7c95881575bad2bc97965eb056c6854f59f5c13..adb72fe9aef7004c9eae4548e30859802c55b7fd 100644 --- a/compute/ztpqrt.c +++ b/compute/ztpqrt.c @@ -348,7 +348,7 @@ int MORSE_ztpqrt_Tile_Async( int L, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc morse_error("MORSE_ztpqrt_Tile", "only square tiles supported"); return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE); } - if (((B->m - L) % B->mb) != 0) { + if ( (L != 0) && (((B->m - L) % B->mb) != 0) ) { morse_error("MORSE_ztpqrt_Tile", "Triangular part must be aligned with tiles"); return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE); }