* [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status @ 2021-09-13 15:31 ` Bogdan Lezhepekov via ltp 0 siblings, 0 replies; 6+ messages in thread From: Bogdan Lezhepekov @ 2021-09-13 15:31 UTC (permalink / raw) To: ltp The original version always returned 0. Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com> --- testcases/realtime/func/matrix_mult/matrix_mult.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testcases/realtime/func/matrix_mult/matrix_mult.c b/testcases/realtime/func/matrix_mult/matrix_mult.c index 61ab887fc..e702c0ff9 100644 --- a/testcases/realtime/func/matrix_mult/matrix_mult.c +++ b/testcases/realtime/func/matrix_mult/matrix_mult.c @@ -188,7 +188,7 @@ void *concurrent_thread(void *thread) return NULL; } -void main_thread(void) +int main_thread(void) { int ret, i, j; nsec_t start, end; @@ -308,7 +308,7 @@ void main_thread(void) criteria); printf("Result: %s\n", ret ? "FAIL" : "PASS"); - return; + return ret; } int main(int argc, char *argv[]) @@ -319,7 +319,7 @@ int main(int argc, char *argv[]) numcpus = sysconf(_SC_NPROCESSORS_ONLN); /* the minimum avg concurrent multiplier to pass */ criteria = pass_criteria * numcpus; - int new_iterations; + int new_iterations, ret; if (iterations <= 0) { fprintf(stderr, "iterations must be greater than zero\n"); @@ -348,7 +348,7 @@ int main(int argc, char *argv[]) printf("Number of CPUs: %u\n", numcpus); set_priority(PRIO); - main_thread(); + ret = main_thread(); - return 0; + return ret; } -- 2.32.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status @ 2021-09-13 15:31 ` Bogdan Lezhepekov via ltp 0 siblings, 0 replies; 6+ messages in thread From: Bogdan Lezhepekov via ltp @ 2021-09-13 15:31 UTC (permalink / raw) To: ltp The original version always returned 0. Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com> --- testcases/realtime/func/matrix_mult/matrix_mult.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testcases/realtime/func/matrix_mult/matrix_mult.c b/testcases/realtime/func/matrix_mult/matrix_mult.c index 61ab887fc..e702c0ff9 100644 --- a/testcases/realtime/func/matrix_mult/matrix_mult.c +++ b/testcases/realtime/func/matrix_mult/matrix_mult.c @@ -188,7 +188,7 @@ void *concurrent_thread(void *thread) return NULL; } -void main_thread(void) +int main_thread(void) { int ret, i, j; nsec_t start, end; @@ -308,7 +308,7 @@ void main_thread(void) criteria); printf("Result: %s\n", ret ? "FAIL" : "PASS"); - return; + return ret; } int main(int argc, char *argv[]) @@ -319,7 +319,7 @@ int main(int argc, char *argv[]) numcpus = sysconf(_SC_NPROCESSORS_ONLN); /* the minimum avg concurrent multiplier to pass */ criteria = pass_criteria * numcpus; - int new_iterations; + int new_iterations, ret; if (iterations <= 0) { fprintf(stderr, "iterations must be greater than zero\n"); @@ -348,7 +348,7 @@ int main(int argc, char *argv[]) printf("Number of CPUs: %u\n", numcpus); set_priority(PRIO); - main_thread(); + ret = main_thread(); - return 0; + return ret; } -- 2.32.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status @ 2021-09-14 5:15 ` Petr Vorel 0 siblings, 0 replies; 6+ messages in thread From: Petr Vorel @ 2021-09-14 5:15 UTC (permalink / raw) To: ltp Hi Bogdan, > The original version always returned 0. Good catch, merged! Kind regards, Petr ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status @ 2021-09-14 5:15 ` Petr Vorel 0 siblings, 0 replies; 6+ messages in thread From: Petr Vorel @ 2021-09-14 5:15 UTC (permalink / raw) To: Bogdan Lezhepekov; +Cc: ltp Hi Bogdan, > The original version always returned 0. Good catch, merged! Kind regards, Petr -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status 2021-09-13 15:31 ` Bogdan Lezhepekov via ltp (?) (?) @ 2021-11-12 12:07 ` Joerg Vehlow 2021-11-12 13:04 ` Bogdan Lezhepekov via ltp -1 siblings, 1 reply; 6+ messages in thread From: Joerg Vehlow @ 2021-11-12 12:07 UTC (permalink / raw) To: Bogdan Lezhepekov, ltp Hi, is the test even returning any valid results anywhere? I don't know if systems are running too fast for the test nowadays, but in my tests, they always divide by 0, even with very high iteration counts even in qemu. e.g: $ matrix_mult -i10000000 --------------------------------------- Matrix Multiplication (SMP Performance) --------------------------------------- Running 10000000 iterations Matrix Dimensions: 100x100 Calculations per iteration: 8 Number of CPUs: 4 Running sequential operations Min: 0 us Max: 160 us Avg: 0.0000 us StdDev: 0.2082 us Running concurrent operations Min: 0 us Max: 1693 us Avg: 0.0000 us StdDev: 0.6652 us Concurrent Multipliers: Min: -nan Max: 0.0945 Avg: -nan Criteria: 3.00 * average concurrent time < average sequential time Result: FAIL If this is not a result of my test system, we should probably remove the test from the profile, at least as long as it was not fixed. Joerg On 9/13/2021 5:31 PM, Bogdan Lezhepekov via ltp wrote: > The original version always returned 0. > > Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com> > --- > testcases/realtime/func/matrix_mult/matrix_mult.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/testcases/realtime/func/matrix_mult/matrix_mult.c b/testcases/realtime/func/matrix_mult/matrix_mult.c > index 61ab887fc..e702c0ff9 100644 > --- a/testcases/realtime/func/matrix_mult/matrix_mult.c > +++ b/testcases/realtime/func/matrix_mult/matrix_mult.c > @@ -188,7 +188,7 @@ void *concurrent_thread(void *thread) > return NULL; > } > > -void main_thread(void) > +int main_thread(void) > { > int ret, i, j; > nsec_t start, end; > @@ -308,7 +308,7 @@ void main_thread(void) > criteria); > printf("Result: %s\n", ret ? "FAIL" : "PASS"); > > - return; > + return ret; > } > > int main(int argc, char *argv[]) > @@ -319,7 +319,7 @@ int main(int argc, char *argv[]) > numcpus = sysconf(_SC_NPROCESSORS_ONLN); > /* the minimum avg concurrent multiplier to pass */ > criteria = pass_criteria * numcpus; > - int new_iterations; > + int new_iterations, ret; > > if (iterations <= 0) { > fprintf(stderr, "iterations must be greater than zero\n"); > @@ -348,7 +348,7 @@ int main(int argc, char *argv[]) > printf("Number of CPUs: %u\n", numcpus); > > set_priority(PRIO); > - main_thread(); > + ret = main_thread(); > > - return 0; > + return ret; > } -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status 2021-11-12 12:07 ` Joerg Vehlow @ 2021-11-12 13:04 ` Bogdan Lezhepekov via ltp 0 siblings, 0 replies; 6+ messages in thread From: Bogdan Lezhepekov via ltp @ 2021-11-12 13:04 UTC (permalink / raw) To: Joerg Vehlow, ltp@lists.linux.it [-- Attachment #1.1: Type: text/plain, Size: 3181 bytes --] Hi Joerg, No, this is a braindead test. Our results are pretty consistent with ours and that's why we excluded one from the regression loop. The return value was fixed just because I was fixing it everywhere wherever it caught my eye 🙂 -Bogdan ________________________________ From: Joerg Vehlow <lkml@jv-coder.de> Sent: Friday, November 12, 2021 14:07 To: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>; ltp@lists.linux.it <ltp@lists.linux.it> Subject: Re: [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status Hi, is the test even returning any valid results anywhere? I don't know if systems are running too fast for the test nowadays, but in my tests, they always divide by 0, even with very high iteration counts even in qemu. e.g: $ matrix_mult -i10000000 --------------------------------------- Matrix Multiplication (SMP Performance) --------------------------------------- Running 10000000 iterations Matrix Dimensions: 100x100 Calculations per iteration: 8 Number of CPUs: 4 Running sequential operations Min: 0 us Max: 160 us Avg: 0.0000 us StdDev: 0.2082 us Running concurrent operations Min: 0 us Max: 1693 us Avg: 0.0000 us StdDev: 0.6652 us Concurrent Multipliers: Min: -nan Max: 0.0945 Avg: -nan Criteria: 3.00 * average concurrent time < average sequential time Result: FAIL If this is not a result of my test system, we should probably remove the test from the profile, at least as long as it was not fixed. Joerg On 9/13/2021 5:31 PM, Bogdan Lezhepekov via ltp wrote: > The original version always returned 0. > > Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com> > --- > testcases/realtime/func/matrix_mult/matrix_mult.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/testcases/realtime/func/matrix_mult/matrix_mult.c b/testcases/realtime/func/matrix_mult/matrix_mult.c > index 61ab887fc..e702c0ff9 100644 > --- a/testcases/realtime/func/matrix_mult/matrix_mult.c > +++ b/testcases/realtime/func/matrix_mult/matrix_mult.c > @@ -188,7 +188,7 @@ void *concurrent_thread(void *thread) > return NULL; > } > > -void main_thread(void) > +int main_thread(void) > { > int ret, i, j; > nsec_t start, end; > @@ -308,7 +308,7 @@ void main_thread(void) > criteria); > printf("Result: %s\n", ret ? "FAIL" : "PASS"); > > - return; > + return ret; > } > > int main(int argc, char *argv[]) > @@ -319,7 +319,7 @@ int main(int argc, char *argv[]) > numcpus = sysconf(_SC_NPROCESSORS_ONLN); > /* the minimum avg concurrent multiplier to pass */ > criteria = pass_criteria * numcpus; > - int new_iterations; > + int new_iterations, ret; > > if (iterations <= 0) { > fprintf(stderr, "iterations must be greater than zero\n"); > @@ -348,7 +348,7 @@ int main(int argc, char *argv[]) > printf("Number of CPUs: %u\n", numcpus); > > set_priority(PRIO); > - main_thread(); > + ret = main_thread(); > > - return 0; > + return ret; > } [-- Attachment #1.2: Type: text/html, Size: 6791 bytes --] [-- Attachment #2: Type: text/plain, Size: 60 bytes --] -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-12 13:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-09-13 15:31 [LTP] [PATCH v1] realtime:matrix_multi: main function to return exit status Bogdan Lezhepekov 2021-09-13 15:31 ` Bogdan Lezhepekov via ltp 2021-09-14 5:15 ` Petr Vorel 2021-09-14 5:15 ` Petr Vorel 2021-11-12 12:07 ` Joerg Vehlow 2021-11-12 13:04 ` Bogdan Lezhepekov via ltp
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.