From 0d56113590d815e848e4434c5883861ed320f6c0 Mon Sep 17 00:00:00 2001 From: "James A. Ross" Date: Sun, 8 Sep 2019 05:28:13 +0000 Subject: [PATCH] update constants --- test/alltoall64.c | 12 ++++++------ test/atomic_add.c | 5 +++-- test/atomic_compare_swap_eq.c | 5 +++-- test/atomic_compare_swap_neq.c | 5 +++-- test/atomic_fetch.c | 5 +++-- test/atomic_fetch_add.c | 5 +++-- test/atomic_fetch_inc.c | 6 +++--- test/atomic_inc.c | 6 +++--- test/atomic_set.c | 6 +++--- test/atomic_swap.c | 6 +++--- test/barrier.c | 5 +++-- test/broadcast32.c | 4 ++-- test/broadcast64.c | 4 ++-- test/collect32.c | 2 +- test/collect64.c | 2 +- test/fcollect32.c | 2 +- test/fcollect64.c | 2 +- test/get.c | 4 ++-- test/get_ipi.c | 4 ++-- test/get_nb.c | 6 +++--- test/get_nb_dual.c | 4 ++-- test/hello.c | 2 +- test/put.c | 4 ++-- test/put32.c | 4 ++-- test/put64.c | 4 ++-- test/put_nb.c | 7 +++---- test/put_nb_dual.c | 4 ++-- test/reduce.c | 4 ++-- 28 files changed, 67 insertions(+), 62 deletions(-) diff --git a/test/alltoall64.c b/test/alltoall64.c index 1bb6cd3..a2d7575 100644 --- a/test/alltoall64.c +++ b/test/alltoall64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,7 +29,6 @@ /* * Performance test for shmem_alltoall64 - * */ #include @@ -39,7 +38,7 @@ #define MAXBYTES 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -82,10 +81,10 @@ int main (void) ctimer_start(); unsigned int t = ctimer(); - for (i = 0; i < NLOOP; i += 2) { - shmem_alltoall64 (target, source, nelement, 0, 0, npes, pSyncA); - shmem_alltoall64 (target, source, nelement, 0, 0, npes, pSyncB); + for (i = 0; i < NLOOP; i += 2) { + shmem_alltoall64(target, source, nelement, 0, 0, npes, pSyncA); + shmem_alltoall64(target, source, nelement, 0, 0, npes, pSyncB); } t -= ctimer(); @@ -97,6 +96,7 @@ int main (void) unsigned int nsec = ctimer_nsec(tsum / (npes * NLOOP)); host_printf("%5d %7u\n", bytes, nsec); } + unsigned int err = 0; for (j = 0; j < npes; j++) { for (i = 0; i < nelement; i++) { diff --git a/test/atomic_add.c b/test/atomic_add.c index f4719c6..f4e0b64 100644 --- a/test/atomic_add.c +++ b/test/atomic_add.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -91,6 +91,7 @@ int main (void) if (dest != 0) host_printf("# %d: ERROR %d\n", me, dest); } } + shmem_finalize(); return 0; diff --git a/test/atomic_compare_swap_eq.c b/test/atomic_compare_swap_eq.c index 9a53f85..b73ec14 100644 --- a/test/atomic_compare_swap_eq.c +++ b/test/atomic_compare_swap_eq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -86,6 +86,7 @@ int main (void) host_printf("%5d %7u\n", npe, nsec); } } + shmem_finalize(); return 0; diff --git a/test/atomic_compare_swap_neq.c b/test/atomic_compare_swap_neq.c index 2b6fc60..634386e 100644 --- a/test/atomic_compare_swap_neq.c +++ b/test/atomic_compare_swap_neq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -86,6 +86,7 @@ int main (void) host_printf("%5d %7u\n", npe, nsec); } } + shmem_finalize(); return 0; diff --git a/test/atomic_fetch.c b/test/atomic_fetch.c index 3d303b8..7545cad 100644 --- a/test/atomic_fetch.c +++ b/test/atomic_fetch.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -83,6 +83,7 @@ int main (void) host_printf("%5d %7u\n", npe, nsec); } } + shmem_finalize(); return 0; diff --git a/test/atomic_fetch_add.c b/test/atomic_fetch_add.c index 1a8244f..3822488 100644 --- a/test/atomic_fetch_add.c +++ b/test/atomic_fetch_add.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -95,6 +95,7 @@ int main (void) } } } + shmem_finalize(); return 0; diff --git a/test/atomic_fetch_inc.c b/test/atomic_fetch_inc.c index 79f92ef..19f50b3 100644 --- a/test/atomic_fetch_inc.c +++ b/test/atomic_fetch_inc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -78,12 +78,12 @@ int main (void) shmem_int_sum_to_all(&tsum, &ti, 1, 0, 0, npe, pWrk, pSync); } - if (me == 0) { unsigned int nsec = ctimer_nsec(tsum / (npe * NLOOP)); host_printf("%5d %7u\n", npe, nsec); } } + shmem_finalize(); return 0; diff --git a/test/atomic_inc.c b/test/atomic_inc.c index 7fadd68..845e5c5 100644 --- a/test/atomic_inc.c +++ b/test/atomic_inc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -79,7 +79,6 @@ int main (void) shmem_int_sum_to_all(&tsum, &ti, 1, 0, 0, npe, pWrk, pSync); } - if (me == 0) { unsigned int nsec = ctimer_nsec(tsum / (npe * NLOOP)); host_printf("%5d %7u\n", npe, nsec); @@ -91,6 +90,7 @@ int main (void) if (dest != 0) host_printf("# %d: ERROR %d\n", me, dest); } } + shmem_finalize(); return 0; diff --git a/test/atomic_set.c b/test/atomic_set.c index 157dbb8..102f22b 100644 --- a/test/atomic_set.c +++ b/test/atomic_set.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -79,7 +79,6 @@ int main (void) shmem_int_sum_to_all(&tsum, &ti, 1, 0, 0, npe, pWrk, pSync); } - if (me == 0) { unsigned int nsec = ctimer_nsec(tsum / (npe * NLOOP)); host_printf("%5d %7u\n", npe, nsec); @@ -95,6 +94,7 @@ int main (void) } } } + shmem_finalize(); return 0; diff --git a/test/atomic_swap.c b/test/atomic_swap.c index dddcc48..cf6fda1 100644 --- a/test/atomic_swap.c +++ b/test/atomic_swap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -80,7 +80,6 @@ int main (void) shmem_int_sum_to_all(&tsum, &ti, 1, 0, 0, npe, pWrk, pSync); } - if (me == 0) { unsigned int nsec = ctimer_nsec(tsum / (npe * NLOOP)); host_printf("%5d %7u\n", npe, nsec); @@ -94,6 +93,7 @@ int main (void) if (prev != 0 && NLOOP == 1) host_printf("# %d: ERROR prev = %d\n", me, prev); } } + shmem_finalize(); return 0; diff --git a/test/barrier.c b/test/barrier.c index d5d51e0..1a7eecb 100644 --- a/test/barrier.c +++ b/test/barrier.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -35,7 +35,7 @@ #include "ctimer.h" #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -86,6 +86,7 @@ int main (void) host_printf("%5d %7u\n", npe, nsec); } } + shmem_finalize(); return 0; diff --git a/test/broadcast32.c b/test/broadcast32.c index c75379d..869564f 100644 --- a/test/broadcast32.c +++ b/test/broadcast32.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 2048 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/broadcast64.c b/test/broadcast64.c index 92f631d..a1538d4 100644 --- a/test/broadcast64.c +++ b/test/broadcast64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 1024 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/collect32.c b/test/collect32.c index f206667..da3c3dd 100644 --- a/test/collect32.c +++ b/test/collect32.c @@ -38,7 +38,7 @@ #define NELEMENT 256 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/collect64.c b/test/collect64.c index 817347a..31ee1d2 100644 --- a/test/collect64.c +++ b/test/collect64.c @@ -38,7 +38,7 @@ #define NELEMENT 128 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/fcollect32.c b/test/fcollect32.c index 301eae2..de67dc6 100644 --- a/test/fcollect32.c +++ b/test/fcollect32.c @@ -38,7 +38,7 @@ #define NELEMENT 256 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/fcollect64.c b/test/fcollect64.c index 58d87f3..e4e6d89 100644 --- a/test/fcollect64.c +++ b/test/fcollect64.c @@ -38,7 +38,7 @@ #define NELEMENT 128 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/get.c b/test/get.c index 0389a5f..62d79ad 100644 --- a/test/get.c +++ b/test/get.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/get_ipi.c b/test/get_ipi.c index 2c3b048..5ec0312 100644 --- a/test/get_ipi.c +++ b/test/get_ipi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -39,7 +39,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/get_nb.c b/test/get_nb.c index b1c98af..d222031 100644 --- a/test/get_nb.c +++ b/test/get_nb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -83,9 +83,9 @@ int main (void) for (i = 0; i < NLOOP; i++) { shmem_getmem_nbi(target, source, nelement, nxtpe); + shmem_quiet(); } - shmem_quiet(); t -= ctimer(); ti = (int)t; shmem_int_sum_to_all(&tsum, &ti, 1, 0, 0, npes, pWrk, pSync); diff --git a/test/get_nb_dual.c b/test/get_nb_dual.c index fc3e159..b78c1ec 100644 --- a/test/get_nb_dual.c +++ b/test/get_nb_dual.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/hello.c b/test/hello.c index a0109cc..0661ec1 100644 --- a/test/hello.c +++ b/test/hello.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/test/put.c b/test/put.c index c687244..1a64636 100644 --- a/test/put.c +++ b/test/put.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/put32.c b/test/put32.c index 5deabbd..a70e19d 100644 --- a/test/put32.c +++ b/test/put32.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 2048 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/put64.c b/test/put64.c index c2d287c..b32bb61 100644 --- a/test/put64.c +++ b/test/put64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 1024 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/put_nb.c b/test/put_nb.c index 523a008..7b21af0 100644 --- a/test/put_nb.c +++ b/test/put_nb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) @@ -84,10 +84,9 @@ int main (void) for (i = 0; i < NLOOP; i++) { shmem_putmem_nbi(target, source, nelement, nxtpe); + shmem_quiet(); } - shmem_quiet(); - t -= ctimer(); ti = (int)t; shmem_int_sum_to_all(&tsum, &ti, 1, 0, 0, npes, pWrk, pSync); diff --git a/test/put_nb_dual.c b/test/put_nb_dual.c index e706deb..ba55abf 100644 --- a/test/put_nb_dual.c +++ b/test/put_nb_dual.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 8192 #ifndef NLOOP -#define NLOOP 1000 +#define NLOOP 1024 #endif int main (void) diff --git a/test/reduce.c b/test/reduce.c index 8217080..3594254 100644 --- a/test/reduce.c +++ b/test/reduce.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 U.S. Army Research laboratory. All rights reserved. + * Copyright (c) 2016 U.S. Army Research laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -38,7 +38,7 @@ #define NELEMENT 2048 #ifndef NLOOP -#define NLOOP 100 +#define NLOOP 128 #endif int main (void)