Skip to content

Commit

Permalink
update constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesaross committed Sep 8, 2019
1 parent 496b1f5 commit 0d56113
Show file tree
Hide file tree
Showing 28 changed files with 67 additions and 62 deletions.
12 changes: 6 additions & 6 deletions test/alltoall64.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -29,7 +29,6 @@

/*
* Performance test for shmem_alltoall64
*
*/

#include <host_stdio.h>
Expand All @@ -39,7 +38,7 @@
#define MAXBYTES 8192

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -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();
Expand All @@ -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++) {
Expand Down
5 changes: 3 additions & 2 deletions test/atomic_add.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -91,6 +91,7 @@ int main (void)
if (dest != 0) host_printf("# %d: ERROR %d\n", me, dest);
}
}

shmem_finalize();

return 0;
Expand Down
5 changes: 3 additions & 2 deletions test/atomic_compare_swap_eq.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -86,6 +86,7 @@ int main (void)
host_printf("%5d %7u\n", npe, nsec);
}
}

shmem_finalize();

return 0;
Expand Down
5 changes: 3 additions & 2 deletions test/atomic_compare_swap_neq.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -86,6 +86,7 @@ int main (void)
host_printf("%5d %7u\n", npe, nsec);
}
}

shmem_finalize();

return 0;
Expand Down
5 changes: 3 additions & 2 deletions test/atomic_fetch.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -83,6 +83,7 @@ int main (void)
host_printf("%5d %7u\n", npe, nsec);
}
}

shmem_finalize();

return 0;
Expand Down
5 changes: 3 additions & 2 deletions test/atomic_fetch_add.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -95,6 +95,7 @@ int main (void)
}
}
}

shmem_finalize();

return 0;
Expand Down
6 changes: 3 additions & 3 deletions test/atomic_fetch_inc.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions test/atomic_inc.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -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);
Expand All @@ -91,6 +90,7 @@ int main (void)
if (dest != 0) host_printf("# %d: ERROR %d\n", me, dest);
}
}

shmem_finalize();

return 0;
Expand Down
6 changes: 3 additions & 3 deletions test/atomic_set.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -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);
Expand All @@ -95,6 +94,7 @@ int main (void)
}
}
}

shmem_finalize();

return 0;
Expand Down
6 changes: 3 additions & 3 deletions test/atomic_swap.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -36,7 +36,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions test/barrier.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -35,7 +35,7 @@
#include "ctimer.h"

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down Expand Up @@ -86,6 +86,7 @@ int main (void)
host_printf("%5d %7u\n", npe, nsec);
}
}

shmem_finalize();

return 0;
Expand Down
4 changes: 2 additions & 2 deletions test/broadcast32.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 2048

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
4 changes: 2 additions & 2 deletions test/broadcast64.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 1024

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
2 changes: 1 addition & 1 deletion test/collect32.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 256

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
2 changes: 1 addition & 1 deletion test/collect64.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 128

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
2 changes: 1 addition & 1 deletion test/fcollect32.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 256

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
2 changes: 1 addition & 1 deletion test/fcollect64.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 128

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
4 changes: 2 additions & 2 deletions test/get.c
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -38,7 +38,7 @@
#define NELEMENT 8192

#ifndef NLOOP
#define NLOOP 1000
#define NLOOP 1024
#endif

int main (void)
Expand Down
Loading

0 comments on commit 0d56113

Please sign in to comment.