Commit 002fea6e authored by Guillaume Sylvand's avatar Guillaume Sylvand

timing: better handles the return codes (and the failures...)

parent 212339b4
......@@ -160,7 +160,8 @@ Test(int64_t n, int *iparam) {
gflops = 0.0;
if ( iparam[IPARAM_WARMUP] ) {
RunTest( iparam, dparam, &(t[0]));
int status = RunTest( iparam, dparam, &(t[0]));
if (status != MORSE_SUCCESS) return status;
}
sumgf = 0.0;
......@@ -178,15 +179,17 @@ Test(int64_t n, int *iparam) {
if ( iparam[IPARAM_PROFILE] )
iparam[IPARAM_PROFILE] = 2;
RunTest( iparam, dparam, &(t[iter]));
int status = RunTest( iparam, dparam, &(t[iter]));
if (status != MORSE_SUCCESS) return status;
iparam[IPARAM_TRACE] = 0;
iparam[IPARAM_DAG] = 0;
iparam[IPARAM_PROFILE] = 0;
}
else
RunTest( iparam, dparam, &(t[iter]));
else {
int status = RunTest( iparam, dparam, &(t[iter]));
if (status != MORSE_SUCCESS) return status;
}
gflops = flops / t[iter];
#if defined (CHAMELEON_SCHED_STARPU)
......@@ -677,7 +680,8 @@ main(int argc, char *argv[]) {
if (step < 1) step = 1;
Test( -1, iparam ); /* print header */
int status = Test( -1, iparam ); /* print header */
if (status != MORSE_SUCCESS) return status;
for (i = start; i <= stop; i += step)
{
if ( nx > 0 ) {
......@@ -691,7 +695,9 @@ main(int argc, char *argv[]) {
iparam[IPARAM_M] = i;
iparam[IPARAM_N] = i;
}
success += Test( iparam[IPARAM_N], iparam );
int status = Test( iparam[IPARAM_N], iparam );
if (status != MORSE_SUCCESS) return status;
success += status;
}
MORSE_Finalize();
......
......@@ -106,13 +106,15 @@ enum dparam_timing {
/* Paste code to allocate a matrix in desc if cond_init is true */
#define PASTE_CODE_ALLOCATE_MATRIX_TILE(_desc_, _cond_, _type_, _type2_, _lda_, _m_, _n_) \
MORSE_desc_t *_desc_ = NULL; \
int status ## _desc_ ; \
if( _cond_ ) { \
if (!bigmat) \
MORSE_Desc_Create_User(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
status ## _desc_ = MORSE_Desc_Create_User(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q, morse_getaddr_null, NULL, NULL);\
else \
MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
status ## _desc_ = MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q);\
if (status ## _desc_ != MORSE_SUCCESS) return (status ## _desc_); \
}
#define PASTE_CODE_FREE_MATRIX(_desc_) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment