From 20979d7906a730a94baf477eb4268a3ef7474587 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 24 Apr 2021 07:26:04 -0700 Subject: [PATCH 1/3] Fix a bunch of compiler warnings in "make check" There were many compiler warnings, making it difficult to read if there were real issues that needed to be addressed. Signed-off-by: Jeff Squyres --- test/asm/atomic_cmpset.c | 128 +++++++++++++++++++++++++++++------ test/class/ompi_rb_tree.c | 38 +++++------ test/class/opal_proc_table.c | 8 +-- test/datatype/ddt_lib.c | 4 +- test/datatype/opal_ddt_lib.c | 12 ++++ test/datatype/partial.c | 18 ++--- test/datatype/reduce_local.c | 93 +++++++++++-------------- test/datatype/to_self.c | 82 +++++++++++----------- test/datatype/unpack_ooo.c | 2 +- 9 files changed, 236 insertions(+), 149 deletions(-) diff --git a/test/asm/atomic_cmpset.c b/test/asm/atomic_cmpset.c index 9f6d84588da..d3c2d566a8e 100644 --- a/test/asm/atomic_cmpset.c +++ b/test/asm/atomic_cmpset.c @@ -101,35 +101,47 @@ int main(int argc, char *argv[]) /* -- cmpset 32-bit tests -- */ - vol32 = 42, old32 = 42, new32 = 50; + vol32 = 42; + old32 = 42; + new32 = 50; assert(opal_atomic_compare_exchange_strong_32(&vol32, &old32, new32) == true); opal_atomic_rmb(); assert(vol32 == new32); assert(old32 == 42); - vol32 = 42, old32 = 420, new32 = 50; + vol32 = 42; + old32 = 420; + new32 = 50; assert(opal_atomic_compare_exchange_strong_32(&vol32, &old32, new32) == false); opal_atomic_rmb(); assert(vol32 == 42); assert(old32 == 42); - vol32 = 42, old32 = 42, new32 = 50; + vol32 = 42; + old32 = 42; + new32 = 50; assert(opal_atomic_compare_exchange_strong_32(&vol32, &old32, new32) == true); assert(vol32 == new32); assert(old32 == 42); - vol32 = 42, old32 = 420, new32 = 50; + vol32 = 42; + old32 = 420; + new32 = 50; assert(opal_atomic_compare_exchange_strong_acq_32(&vol32, &old32, new32) == false); assert(vol32 == 42); assert(old32 == 42); - vol32 = 42, old32 = 42, new32 = 50; + vol32 = 42; + old32 = 42; + new32 = 50; assert(opal_atomic_compare_exchange_strong_rel_32(&vol32, &old32, new32) == true); opal_atomic_rmb(); assert(vol32 == new32); assert(old32 == 42); - vol32 = 42, old32 = 420, new32 = 50; + vol32 = 42; + old32 = 420; + new32 = 50; assert(opal_atomic_compare_exchange_strong_rel_32(&vol32, &old32, new32) == false); opal_atomic_rmb(); assert(vol32 == 42); @@ -137,35 +149,47 @@ int main(int argc, char *argv[]) /* -- cmpset 64-bit tests -- */ - vol64 = 42, old64 = 42, new64 = 50; + vol64 = 42; + old64 = 42; + new64 = 50; assert(opal_atomic_compare_exchange_strong_64(&vol64, &old64, new64) == true); opal_atomic_rmb(); assert(new64 == vol64); assert(old64 == 42); - vol64 = 42, old64 = 420, new64 = 50; + vol64 = 42; + old64 = 420; + new64 = 50; assert(opal_atomic_compare_exchange_strong_64(&vol64, &old64, new64) == false); opal_atomic_rmb(); assert(vol64 == 42); assert(old64 == 42); - vol64 = 42, old64 = 42, new64 = 50; + vol64 = 42; + old64 = 42; + new64 = 50; assert(opal_atomic_compare_exchange_strong_acq_64(&vol64, &old64, new64) == true); assert(vol64 == new64); assert(old64 == 42); - vol64 = 42, old64 = 420, new64 = 50; + vol64 = 42; + old64 = 420; + new64 = 50; assert(opal_atomic_compare_exchange_strong_acq_64(&vol64, &old64, new64) == false); assert(vol64 == 42); assert(old64 == 42); - vol64 = 42, old64 = 42, new64 = 50; + vol64 = 42; + old64 = 42; + new64 = 50; assert(opal_atomic_compare_exchange_strong_rel_64(&vol64, &old64, new64) == true); opal_atomic_rmb(); assert(vol64 == new64); assert(old64 == 42); - vol64 = 42, old64 = 420, new64 = 50; + vol64 = 42; + old64 = 420; + new64 = 50; assert(opal_atomic_compare_exchange_strong_rel_64(&vol64, &old64, new64) == false); opal_atomic_rmb(); assert(vol64 == 42); @@ -174,50 +198,114 @@ int main(int argc, char *argv[]) /* -- cmpset 128-bit tests -- */ #if OPAL_HAVE_ATOMIC_COMPARE_EXCHANGE_128 - vol128 = 42, old128 = 42, new128 = 50; + vol128 = 42; + old128 = 42; + new128 = 50; assert(opal_atomic_compare_exchange_strong_128(&vol128, &old128, new128) == true); opal_atomic_rmb(); assert(new128 == vol128); assert(old128 == 42); - vol128 = 42, old128 = 420, new128 = 50; + vol128 = 42; + old128 = 420; + new128 = 50; assert(opal_atomic_compare_exchange_strong_128(&vol128, &old128, new128) == false); opal_atomic_rmb(); assert(vol128 == 42); assert(old128 == 42); #endif + /* -- cmpset int tests -- */ + + volint = 42; + oldint = 42; + newint = 50; + assert(opal_atomic_compare_exchange_strong(&volint, &oldint, newint) == true); + opal_atomic_rmb(); + assert(volint == newint); + assert(oldint == 42); + + volint = 42; + oldint = 420; + newint = 50; + assert(opal_atomic_compare_exchange_strong(&volint, &oldint, newint) == false); + opal_atomic_rmb(); + assert(volint == 42); + assert(oldint == 42); + + volint = 42; + oldint = 42; + newint = 50; + assert(opal_atomic_compare_exchange_strong_acq(&volint, &oldint, newint) == true); + assert(volint == newint); + assert(oldint == 42); + + volint = 42; + oldint = 420; + newint = 50; + assert(opal_atomic_compare_exchange_strong_acq(&volint, &oldint, newint) == false); + assert(volint == 42); + assert(oldint == 42); + + volint = 42; + oldint = 42; + newint = 50; + assert(opal_atomic_compare_exchange_strong_rel(&volint, &oldint, newint) == true); + opal_atomic_rmb(); + assert(volint == newint); + assert(oldint == 42); + + volint = 42; + oldint = 420; + newint = 50; + assert(opal_atomic_compare_exchange_strong_rel(&volint, &oldint, newint) == false); + opal_atomic_rmb(); + assert(volint == 42); + assert(oldint == 42); + /* -- cmpset ptr tests -- */ - volptr = 42, oldptr = 42, newptr = 50; + volptr = 42; + oldptr = 42; + newptr = 50; assert(opal_atomic_compare_exchange_strong_ptr(&volptr, &oldptr, newptr) == true); opal_atomic_rmb(); assert(volptr == newptr); assert(oldptr == 42); - volptr = 42, oldptr = 420, newptr = 50; + volptr = 42; + oldptr = 420; + newptr = 50; assert(opal_atomic_compare_exchange_strong_ptr(&volptr, &oldptr, newptr) == false); opal_atomic_rmb(); assert(volptr == 42); assert(oldptr == 42); - volptr = 42, oldptr = 42, newptr = 50; + volptr = 42; + oldptr = 42; + newptr = 50; assert(opal_atomic_compare_exchange_strong_acq_ptr(&volptr, &oldptr, newptr) == true); assert(volptr == newptr); assert(oldptr == 42); - volptr = 42, oldptr = 420, newptr = 50; + volptr = 42; + oldptr = 420; + newptr = 50; assert(opal_atomic_compare_exchange_strong_acq_ptr(&volptr, &oldptr, newptr) == false); assert(volptr == 42); assert(oldptr == 42); - volptr = 42, oldptr = 42, newptr = 50; + volptr = 42; + oldptr = 42; + newptr = 50; assert(opal_atomic_compare_exchange_strong_rel_ptr(&volptr, &oldptr, newptr) == true); opal_atomic_rmb(); assert(volptr == newptr); assert(oldptr == 42); - volptr = 42, oldptr = 420, newptr = 50; + volptr = 42; + oldptr = 420; + newptr = 50; assert(opal_atomic_compare_exchange_strong_rel_ptr(&volptr, &oldptr, newptr) == false); opal_atomic_rmb(); assert(volptr == 42); diff --git a/test/class/ompi_rb_tree.c b/test/class/ompi_rb_tree.c index a09cdbacf55..218badb1299 100644 --- a/test/class/ompi_rb_tree.c +++ b/test/class/ompi_rb_tree.c @@ -34,7 +34,7 @@ #define NUM_KEYS 10000 #define SEED 1 -int keys[] = {0, 1, 2, 3, 4, 5, 6, 7}; +int global_keys[] = {0, 1, 2, 3, 4, 5, 6, 7}; int values[] = {10, 11, 12, 13, 14, 15, 16, 17}; @@ -137,11 +137,11 @@ void test1(void) test_failure("failed to properly initialize the tree"); } - rc = opal_rb_tree_insert(&tree, &keys[0], &values[0]); + rc = opal_rb_tree_insert(&tree, &global_keys[0], &values[0]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[0]); + result = opal_rb_tree_find(&tree, &global_keys[0]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -149,11 +149,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[1], &values[1]); + rc = opal_rb_tree_insert(&tree, &global_keys[1], &values[1]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[1]); + result = opal_rb_tree_find(&tree, &global_keys[1]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -161,11 +161,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[2], &values[2]); + rc = opal_rb_tree_insert(&tree, &global_keys[2], &values[2]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[2]); + result = opal_rb_tree_find(&tree, &global_keys[2]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -173,11 +173,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[3], &values[3]); + rc = opal_rb_tree_insert(&tree, &global_keys[3], &values[3]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[3]); + result = opal_rb_tree_find(&tree, &global_keys[3]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -185,11 +185,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[4], &values[4]); + rc = opal_rb_tree_insert(&tree, &global_keys[4], &values[4]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[4]); + result = opal_rb_tree_find(&tree, &global_keys[4]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -197,11 +197,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[5], &values[5]); + rc = opal_rb_tree_insert(&tree, &global_keys[5], &values[5]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[5]); + result = opal_rb_tree_find(&tree, &global_keys[5]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -209,11 +209,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[6], &values[6]); + rc = opal_rb_tree_insert(&tree, &global_keys[6], &values[6]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[6]); + result = opal_rb_tree_find(&tree, &global_keys[6]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -221,11 +221,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_insert(&tree, &keys[7], &values[7]); + rc = opal_rb_tree_insert(&tree, &global_keys[7], &values[7]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly insert a new node"); } - result = opal_rb_tree_find(&tree, &keys[7]); + result = opal_rb_tree_find(&tree, &global_keys[7]); if (NULL == result) { test_failure("lookup returned null!"); } @@ -238,11 +238,11 @@ void test1(void) test_failure("failed to properly insert a new node"); } - rc = opal_rb_tree_delete(&tree, &keys[0]); + rc = opal_rb_tree_delete(&tree, &global_keys[0]); if (!test_verify_int(OPAL_SUCCESS, rc)) { test_failure("failed to properly delete a node"); } - result = opal_rb_tree_find(&tree, &keys[0]); + result = opal_rb_tree_find(&tree, &global_keys[0]); if (NULL != result) { test_failure("lookup returned a value instead of null!"); } else { diff --git a/test/class/opal_proc_table.c b/test/class/opal_proc_table.c index c6ab08b75d8..93804a74d5d 100644 --- a/test/class/opal_proc_table.c +++ b/test/class/opal_proc_table.c @@ -164,10 +164,10 @@ static void test_ptable(opal_proc_table_t *table) opal_process_name_t key; fprintf(error_out, "\nTesting integer keys...\n"); for (j = 0; num_keys[j]; j += 3) { - opal_process_name_t key; - key.jobid = atoi(num_keys[j]); - key.vpid = atoi(num_keys[j + 1]); - opal_proc_table_set_value(table, key, num_keys[j + 2]); + opal_process_name_t key2; + key2.jobid = atoi(num_keys[j]); + key2.vpid = atoi(num_keys[j + 1]); + opal_proc_table_set_value(table, key2, num_keys[j + 2]); } validate_table(table, num_keys); rc = opal_proc_table_get_first_key(table, &key, (void **) &v, (void **) &n1, (void **) &n2); diff --git a/test/datatype/ddt_lib.c b/test/datatype/ddt_lib.c index 0a0e9dc7e01..15f491fa593 100644 --- a/test/datatype/ddt_lib.c +++ b/test/datatype/ddt_lib.c @@ -345,7 +345,7 @@ struct structure { ompi_datatype_t *create_struct_constant_gap_resized_ddt(ompi_datatype_t *type) { struct structure data[1]; - ompi_datatype_t *struct_type, *temp_type; + ompi_datatype_t *struct_type = NULL, *temp_type = NULL; ompi_datatype_t *types[2] = {type, type}; int blocklens[2] = {1, 1}; MPI_Aint disps[3]; @@ -390,7 +390,7 @@ ompi_datatype_t *create_strange_dt(void) ompi_datatype_t *types[3] = {&ompi_mpi_int.dt}; sstrange t[2]; int pBlock[3] = {1, 10, 1}, dispi[3]; - ompi_datatype_t *pdt, *pdt1, *pdt2, *pdtTemp; + ompi_datatype_t *pdt = NULL, *pdt1 = NULL, *pdt2 = NULL, *pdtTemp = NULL; dispi[0] = (int) ((char *) &(v[0].i1) - (char *) &(v[0])); /* 0 */ dispi[1] = (int) (((char *) (&(v[0].i2)) - (char *) &(v[0])) / sizeof(int)); /* 2 */ diff --git a/test/datatype/opal_ddt_lib.c b/test/datatype/opal_ddt_lib.c index f21690d40f9..845cf314c1f 100644 --- a/test/datatype/opal_ddt_lib.c +++ b/test/datatype/opal_ddt_lib.c @@ -29,18 +29,24 @@ uint32_t outputFlags = VALIDATE_DATA | CHECK_PACK_UNPACK | RESET_CONVERTORS | QU static int32_t opal_datatype_create_indexed(int count, const int *pBlockLength, const int *pDisp, const opal_datatype_t *oldType, opal_datatype_t **newType); +#if 0 +// This is not currently used. static int32_t opal_datatype_create_hindexed(int count, const int *pBlockLength, const ptrdiff_t *pDisp, const opal_datatype_t *oldType, opal_datatype_t **newType); +#endif static int32_t opal_datatype_create_struct(int count, const int *pBlockLength, const ptrdiff_t *pDisp, opal_datatype_t **pTypes, opal_datatype_t **newType); static int32_t opal_datatype_create_vector(int count, int bLength, int stride, const opal_datatype_t *oldType, opal_datatype_t **newType); +#if 0 +// This is not currently used. static int32_t opal_datatype_create_hvector(int count, int bLength, ptrdiff_t stride, const opal_datatype_t *oldType, opal_datatype_t **newType); +#endif /** * Cache cleanup. @@ -317,6 +323,8 @@ static int32_t opal_datatype_create_indexed(int count, const int *pBlockLength, return OPAL_SUCCESS; } +#if 0 +// This is not currently used. static int32_t opal_datatype_create_hindexed(int count, const int *pBlockLength, const ptrdiff_t *pDisp, const opal_datatype_t *oldType, opal_datatype_t **newType) @@ -359,6 +367,7 @@ static int32_t opal_datatype_create_hindexed(int count, const int *pBlockLength, *newType = pdt; return OPAL_SUCCESS; } +#endif static int32_t opal_datatype_create_struct(int count, const int *pBlockLength, const ptrdiff_t *pDisp, opal_datatype_t **pTypes, @@ -462,6 +471,8 @@ static int32_t opal_datatype_create_vector(int count, int bLength, int stride, return OPAL_SUCCESS; } +#if 0 +// This is not currently used. static int32_t opal_datatype_create_hvector(int count, int bLength, ptrdiff_t stride, const opal_datatype_t *oldType, opal_datatype_t **newType) @@ -493,6 +504,7 @@ static int32_t opal_datatype_create_hvector(int count, int bLength, ptrdiff_t st *newType = pData; return OPAL_SUCCESS; } +#endif /*****************************************************************************/ int init_random_upper_matrix(unsigned int N, double *mat) diff --git a/test/datatype/partial.c b/test/datatype/partial.c index 09e058a7765..d74f57ffb5a 100644 --- a/test/datatype/partial.c +++ b/test/datatype/partial.c @@ -53,7 +53,7 @@ static void show_neighborhood(double *ptr, int how_many, bool show_hex) for (i = -how_many; i < how_many; i++) { if (0 == i) printf(" <"); - for (int j = 0; j < sizeof(double); j++) { + for (size_t j = 0; j < sizeof(double); j++) { printf("%02x", cptr[i * sizeof(double) + j]); } if (0 == i) @@ -76,8 +76,7 @@ static void show_neighborhood(double *ptr, int how_many, bool show_hex) int main(int argc, char *argv[]) { - opal_datatype_t *vector; - ompi_datatype_t *base; + ompi_datatype_t *vector, *base; uint32_t iov_count; size_t max_data, size, length; struct iovec iov[2]; @@ -93,13 +92,13 @@ int main(int argc, char *argv[]) ompi_datatype_create_vector(TYPE_COUNT, TYPE_BLEN, TYPE_STRIDE, MPI_DOUBLE, &base); ompi_datatype_create_contiguous(CONT_COUNT, base, &vector); - opal_datatype_commit(vector); + opal_datatype_commit(&vector->super); ompi_datatype_dump(vector); - opal_datatype_type_size(vector, &size); - opal_datatype_type_extent(vector, &extent); - opal_datatype_type_extent(base, &base_extent); + opal_datatype_type_size(&vector->super, &size); + opal_datatype_type_extent(&vector->super, &extent); + opal_datatype_type_extent(&base->super, &base_extent); array = (double *) malloc(extent * COUNT); packed = (double *) malloc(size * COUNT); @@ -118,7 +117,7 @@ int main(int argc, char *argv[]) * of the buffered operation. */ convertor = opal_convertor_create(opal_local_arch, 0); - opal_convertor_prepare_for_recv(convertor, vector, COUNT, array); + opal_convertor_prepare_for_recv(convertor, &vector->super, COUNT, array); for (length = 0; length < (size * COUNT);) { iov[0].iov_base = bpacked + length; @@ -129,7 +128,8 @@ int main(int argc, char *argv[]) opal_convertor_unpack(convertor, iov, &iov_count, &max_data); length += max_data; - int idx = 0, checked = 0; + int idx = 0; + size_t checked = 0; for (int m = 0; m < COUNT; m++) { char *mptr = (char *) array + m * extent; for (int k = 0; k < CONT_COUNT; k++) { diff --git a/test/datatype/reduce_local.c b/test/datatype/reduce_local.c index 17259cd2b18..bce037dcc4d 100644 --- a/test/datatype/reduce_local.c +++ b/test/datatype/reduce_local.c @@ -24,6 +24,7 @@ #include "ompi/communicator/communicator.h" #include "ompi/datatype/ompi_datatype.h" #include "ompi/runtime/mpiruntime.h" +#include "opal/util/minmax.h" typedef struct op_name_s { char *name; @@ -44,26 +45,12 @@ static op_name_t array_of_ops[] = { {"replace", "MPI_REPLACE", MPI_REPLACE}, {NULL, "MPI_OP_NULL", MPI_OP_NULL}, }; -static int do_ops[12] = { +static int global_do_ops[12] = { -1, }; /* index of the ops to do. Size +1 larger than the array_of_ops */ static int verbose = 0; static int total_errors = 0; -#define max(a, b) \ - ({ \ - __typeof__(a) _a = (a); \ - __typeof__(b) _b = (b); \ - _a > _b ? _a : _b; \ - }) - -#define min(a, b) \ - ({ \ - __typeof__(a) _a = (a); \ - __typeof__(b) _b = (b); \ - _a < _b ? _a : _b; \ - }) - static void print_status(char *op, char *type, int type_size, int count, int max_shift, double *duration, int repeats, int correct) { @@ -85,7 +72,7 @@ static void print_status(char *op, char *type, int type_size, int count, int max } } -static int do_ops_built = 0; +static int global_do_ops_built = 0; static int build_do_ops(char *optarg, int *do_ops) { int i; @@ -118,7 +105,7 @@ static int build_do_ops(char *optarg, int *do_ops) } } } - do_ops_built = 1; + global_do_ops_built = 1; return 0; } @@ -128,7 +115,7 @@ do { \ const TYPE *_p1 = ((TYPE*)(INBUF)), *_p3 = ((TYPE*)(CHECK_BUF)); \ TYPE *_p2 = ((TYPE*)(INOUT_BUF)); \ skip_op_type = 0; \ - for(int _k = 0; _k < min((COUNT), max_shift); +_k++ ) { \ + for(int _k = 0; _k < opal_min((COUNT), max_shift); +_k++ ) { \ duration[_k] = 0.0; \ for(int _r = repeats; _r > 0; _r--) { \ memcpy(_p2, _p3, sizeof(TYPE) * (COUNT)); \ @@ -156,7 +143,7 @@ do { \ const TYPE *_p1 = ((TYPE*)(INBUF)), *_p3 = ((TYPE*)(CHECK_BUF)); \ TYPE *_p2 = ((TYPE*)(INOUT_BUF)); \ skip_op_type = 0; \ - for(int _k = 0; _k < min((COUNT), max_shift); +_k++ ) { \ + for(int _k = 0; _k < opal_min((COUNT), max_shift); +_k++ ) { \ duration[_k] = 0.0; \ for(int _r = repeats; _r > 0; _r--) { \ memcpy(_p2, _p3, sizeof(TYPE) * (COUNT)); \ @@ -242,7 +229,7 @@ int main(int argc, char **argv) strncpy(type, optarg, 4); break; case 'o': - build_do_ops(optarg, do_ops); + build_do_ops(optarg, global_do_ops); break; case 's': type_size = atoi(optarg); @@ -288,8 +275,8 @@ int main(int argc, char **argv) } } - if (!do_ops_built) { /* not yet done, take the default */ - build_do_ops("all", do_ops); + if (!global_do_ops_built) { /* not yet done, take the default */ + build_do_ops("all", global_do_ops); } posix_memalign(&in_buf, 64, (upper + op1_alignment) * sizeof(double)); posix_memalign(&inout_buf, 64, (upper + res_alignment) * sizeof(double)); @@ -304,9 +291,9 @@ int main(int argc, char **argv) (void) size; for (uint32_t type_idx = 0; type_idx < strlen(type); type_idx++) { - for (uint32_t op_idx = 0; do_ops[op_idx] >= 0; op_idx++) { - op = array_of_ops[do_ops[op_idx]].name; - mpi_op = array_of_ops[do_ops[op_idx]].op; + for (uint32_t op_idx = 0; global_do_ops[op_idx] >= 0; op_idx++) { + op = array_of_ops[global_do_ops[op_idx]].name; + mpi_op = array_of_ops[global_do_ops[op_idx]].op; skip_op_type = 1; for (count = lower; count <= upper; count += count) { @@ -346,11 +333,11 @@ int main(int argc, char **argv) inout_int8_for_check, count, PRId8); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_INT8_T, int8_t, in_int8, inout_int8, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_INT8_T, int8_t, in_int8, inout_int8, inout_int8_for_check, count, PRId8); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_INT8_T, int8_t, in_int8, inout_int8, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_INT8_T, int8_t, in_int8, inout_int8, inout_int8_for_check, count, PRId8); } } @@ -387,11 +374,11 @@ int main(int argc, char **argv) inout_int16_for_check, count, PRId16); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_INT16_T, int16_t, in_int16, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_INT16_T, int16_t, in_int16, inout_int16, inout_int16_for_check, count, PRId16); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_INT16_T, int16_t, in_int16, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_INT16_T, int16_t, in_int16, inout_int16, inout_int16_for_check, count, PRId16); } } @@ -428,11 +415,11 @@ int main(int argc, char **argv) inout_int32_for_check, count, PRId32); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_INT32_T, int32_t, in_int32, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_INT32_T, int32_t, in_int32, inout_int32, inout_int32_for_check, count, PRId32); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_INT32_T, int32_t, in_int32, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_INT32_T, int32_t, in_int32, inout_int32, inout_int32_for_check, count, PRId32); } } @@ -469,11 +456,11 @@ int main(int argc, char **argv) inout_int64_for_check, count, PRId64); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_INT64_T, int64_t, in_int64, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_INT64_T, int64_t, in_int64, inout_int64, inout_int64_for_check, count, PRId64); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_INT64_T, int64_t, in_int64, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_INT64_T, int64_t, in_int64, inout_int64, inout_int64_for_check, count, PRId64); } } @@ -513,11 +500,11 @@ int main(int argc, char **argv) inout_uint8_for_check, count, PRIu8); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_UINT8_T, uint8_t, in_uint8, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_UINT8_T, uint8_t, in_uint8, inout_uint8, inout_uint8_for_check, count, PRIu8); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_UINT8_T, uint8_t, in_uint8, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_UINT8_T, uint8_t, in_uint8, inout_uint8, inout_uint8_for_check, count, PRIu8); } } @@ -554,11 +541,11 @@ int main(int argc, char **argv) inout_uint16_for_check, count, PRIu16); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_UINT16_T, uint16_t, in_uint16, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_UINT16_T, uint16_t, in_uint16, inout_uint16, inout_uint16_for_check, count, PRIu16); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_UINT16_T, uint16_t, in_uint16, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_UINT16_T, uint16_t, in_uint16, inout_uint16, inout_uint16_for_check, count, PRIu16); } } @@ -595,11 +582,11 @@ int main(int argc, char **argv) inout_uint32_for_check, count, PRIu32); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_UINT32_T, uint32_t, in_uint32, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_UINT32_T, uint32_t, in_uint32, inout_uint32, inout_uint32_for_check, count, PRIu32); } - if (0 == strcmp(op, "min")) { // intentionally reversed in and out - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_UINT32_T, uint32_t, in_uint32, + if (0 == strcmp(op, "min")) { // intentionly reversed in and out + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_UINT32_T, uint32_t, in_uint32, inout_uint32, inout_uint32_for_check, count, PRIu32); } } @@ -636,11 +623,11 @@ int main(int argc, char **argv) inout_uint64_for_check, count, PRIu64); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_UINT64_T, uint64_t, in_uint64, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_UINT64_T, uint64_t, in_uint64, inout_uint64, inout_uint64_for_check, count, PRIu64); } if (0 == strcmp(op, "min")) { - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_UINT64_T, uint64_t, in_uint64, + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_UINT64_T, uint64_t, in_uint64, inout_uint64, inout_uint64_for_check, count, PRIu64); } } @@ -666,11 +653,11 @@ int main(int argc, char **argv) inout_float_for_check, count, "f"); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_FLOAT, float, in_float, inout_float, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_FLOAT, float, in_float, inout_float, inout_float_for_check, count, "f"); } if (0 == strcmp(op, "min")) { - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_FLOAT, float, in_float, inout_float, + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_FLOAT, float, in_float, inout_float, inout_float_for_check, count, "f"); } } @@ -696,17 +683,17 @@ int main(int argc, char **argv) inout_double_for_check, count, "f"); } if (0 == strcmp(op, "max")) { - MPI_OP_MINMAX_TEST(max, mpi_op, MPI_DOUBLE, double, in_double, inout_double, + MPI_OP_MINMAX_TEST(opal_max, mpi_op, MPI_DOUBLE, double, in_double, inout_double, inout_double_for_check, count, "f"); } if (0 == strcmp(op, "min")) { - MPI_OP_MINMAX_TEST(min, mpi_op, MPI_DOUBLE, double, in_double, inout_double, + MPI_OP_MINMAX_TEST(opal_min, mpi_op, MPI_DOUBLE, double, in_double, inout_double, inout_double_for_check, count, "f"); } } check_and_continue: if (!skip_op_type) - print_status(array_of_ops[do_ops[op_idx]].mpi_op_name, mpi_type, type_size, + print_status(array_of_ops[global_do_ops[op_idx]].mpi_op_name, mpi_type, type_size, count, max_shift, duration, repeats, correctness); } if (!skip_op_type) diff --git a/test/datatype/to_self.c b/test/datatype/to_self.c index e7158bb7561..30f80015a65 100644 --- a/test/datatype/to_self.c +++ b/test/datatype/to_self.c @@ -214,9 +214,9 @@ static MPI_Datatype create_indexed_gap_optimized_ddt(void) #define MIN_LENGTH 1024 #define MAX_LENGTH (1024 * 1024) -static int cycles = 100; -static int trials = 20; -static int warmups = 2; +static int global_cycles = 100; +static int global_trials = 20; +static int global_warmups = 2; static void print_result(int length, int trials, double *timers) { @@ -269,21 +269,21 @@ static void print_result(int length, int trials, double *timers) static int pack(int cycles, MPI_Datatype sdt, int scount, void *sbuf, void *packed_buf) { int position, myself, c, t, outsize; - double timers[trials]; + double timers[global_trials]; MPI_Type_size(sdt, &outsize); outsize *= scount; MPI_Comm_rank(MPI_COMM_WORLD, &myself); - for (t = 0; t < warmups; t++) { + for (t = 0; t < global_warmups; t++) { for (c = 0; c < cycles; c++) { position = 0; MPI_Pack(sbuf, scount, sdt, packed_buf, outsize, &position, MPI_COMM_WORLD); } } - - for (t = 0; t < trials; t++) { + + for (t = 0; t < global_trials; t++) { timers[t] = MPI_Wtime(); for (c = 0; c < cycles; c++) { position = 0; @@ -291,28 +291,28 @@ static int pack(int cycles, MPI_Datatype sdt, int scount, void *sbuf, void *pack } timers[t] = (MPI_Wtime() - timers[t]) / cycles; } - print_result(outsize, trials, timers); + print_result(outsize, global_trials, timers); return 0; } static int unpack(int cycles, void *packed_buf, MPI_Datatype rdt, int rcount, void *rbuf) { int position, myself, c, t, insize; - double timers[trials]; + double timers[global_trials]; MPI_Type_size(rdt, &insize); insize *= rcount; MPI_Comm_rank(MPI_COMM_WORLD, &myself); - for (t = 0; t < warmups; t++) { - for (c = 0; c < cycles; c++) { + for (t = 0; t < global_warmups; t++) { + for( c = 0; c < cycles; c++ ) { position = 0; MPI_Unpack(packed_buf, insize, &position, rbuf, rcount, rdt, MPI_COMM_WORLD); } } - for (t = 0; t < trials; t++) { + for (t = 0; t < global_trials; t++) { timers[t] = MPI_Wtime(); for (c = 0; c < cycles; c++) { position = 0; @@ -320,7 +320,7 @@ static int unpack(int cycles, void *packed_buf, MPI_Datatype rdt, int rcount, vo } timers[t] = (MPI_Wtime() - timers[t]) / cycles; } - print_result(insize, trials, timers); + print_result(insize, global_trials, timers); return 0; } @@ -330,7 +330,7 @@ static int isend_recv(int cycles, MPI_Datatype sdt, int scount, void *sbuf, MPI_ int myself, tag = 0, c, t, slength, rlength; MPI_Status status; MPI_Request req; - double timers[trials]; + double timers[global_trials]; MPI_Type_size(sdt, &slength); slength *= scount; @@ -339,7 +339,7 @@ static int isend_recv(int cycles, MPI_Datatype sdt, int scount, void *sbuf, MPI_ MPI_Comm_rank(MPI_COMM_WORLD, &myself); - for (t = 0; t < trials; t++) { + for (t = 0; t < global_trials; t++) { timers[t] = MPI_Wtime(); for (c = 0; c < cycles; c++) { MPI_Isend(sbuf, scount, sdt, myself, tag, MPI_COMM_WORLD, &req); @@ -348,7 +348,7 @@ static int isend_recv(int cycles, MPI_Datatype sdt, int scount, void *sbuf, MPI_ } timers[t] = (MPI_Wtime() - timers[t]) / cycles; } - print_result(rlength, trials, timers); + print_result(rlength, global_trials, timers); return 0; } @@ -358,7 +358,7 @@ static int irecv_send(int cycles, MPI_Datatype sdt, int scount, void *sbuf, MPI_ int myself, tag = 0, c, t, slength, rlength; MPI_Request req; MPI_Status status; - double timers[trials]; + double timers[global_trials]; MPI_Type_size(sdt, &slength); slength *= scount; @@ -367,7 +367,7 @@ static int irecv_send(int cycles, MPI_Datatype sdt, int scount, void *sbuf, MPI_ MPI_Comm_rank(MPI_COMM_WORLD, &myself); - for (t = 0; t < trials; t++) { + for (t = 0; t < global_trials; t++) { timers[t] = MPI_Wtime(); for (c = 0; c < cycles; c++) { MPI_Irecv(rbuf, rcount, rdt, myself, tag, MPI_COMM_WORLD, &req); @@ -376,7 +376,7 @@ static int irecv_send(int cycles, MPI_Datatype sdt, int scount, void *sbuf, MPI_ } timers[t] = (MPI_Wtime() - timers[t]) / cycles; } - print_result(rlength, trials, timers); + print_result(rlength, global_trials, timers); return 0; } @@ -386,7 +386,7 @@ static int isend_irecv_wait(int cycles, MPI_Datatype sdt, int scount, void *sbuf int myself, tag = 0, c, t, slength, rlength; MPI_Request requests[2]; MPI_Status statuses[2]; - double timers[trials]; + double timers[global_trials]; MPI_Type_size(sdt, &slength); slength *= scount; @@ -395,7 +395,7 @@ static int isend_irecv_wait(int cycles, MPI_Datatype sdt, int scount, void *sbuf MPI_Comm_rank(MPI_COMM_WORLD, &myself); - for (t = 0; t < trials; t++) { + for (t = 0; t < global_trials; t++) { timers[t] = MPI_Wtime(); for (c = 0; c < cycles; c++) { MPI_Isend(sbuf, scount, sdt, myself, tag, MPI_COMM_WORLD, &requests[0]); @@ -404,7 +404,7 @@ static int isend_irecv_wait(int cycles, MPI_Datatype sdt, int scount, void *sbuf } timers[t] = (MPI_Wtime() - timers[t]) / cycles; } - print_result(rlength, trials, timers); + print_result(rlength, global_trials, timers); return 0; } @@ -414,7 +414,7 @@ static int irecv_isend_wait(int cycles, MPI_Datatype sdt, int scount, void *sbuf int myself, tag = 0, c, t, slength, rlength; MPI_Request requests[2]; MPI_Status statuses[2]; - double timers[trials]; + double timers[global_trials]; MPI_Type_size(sdt, &slength); slength *= scount; @@ -423,7 +423,7 @@ static int irecv_isend_wait(int cycles, MPI_Datatype sdt, int scount, void *sbuf MPI_Comm_rank(MPI_COMM_WORLD, &myself); - for (t = 0; t < trials; t++) { + for (t = 0; t < global_trials; t++) { timers[t] = MPI_Wtime(); for (c = 0; c < cycles; c++) { MPI_Irecv(rbuf, rcount, rdt, myself, tag, MPI_COMM_WORLD, &requests[0]); @@ -432,7 +432,7 @@ static int irecv_isend_wait(int cycles, MPI_Datatype sdt, int scount, void *sbuf } timers[t] = (MPI_Wtime() - timers[t]) / cycles; } - print_result(rlength, trials, timers); + print_result(rlength, global_trials, timers); return 0; } @@ -447,43 +447,43 @@ static int do_test_for_ddt(int doop, MPI_Datatype sddt, MPI_Datatype rddt, int l rbuf = (char *) malloc(length); if (doop & DO_PACK) { printf("# Pack (max length %d)\n", length); - for (i = 1; i <= (length / extent); i *= 2) { - pack(cycles, sddt, i, sbuf, rbuf); + for (i = 1; i <= (length/extent); i *= 2) { + pack( global_cycles, sddt, i, sbuf, rbuf ); } } if (doop & DO_UNPACK) { printf("# Unpack (length %d)\n", length); - for (i = 1; i <= (length / extent); i *= 2) { - unpack(cycles, sbuf, rddt, i, rbuf); + for (i = 1; i <= (length/extent); i *= 2) { + unpack( global_cycles, sbuf, rddt, i, rbuf ); } } if (doop & DO_ISEND_RECV) { - printf("# Isend recv (length %d)\n", length); - for (i = 1; i <= (length / extent); i *= 2) { - isend_recv(cycles, sddt, i, sbuf, rddt, i, rbuf); + printf( "# Isend recv (length %d)\n", length ); + for (i = 1; i <= (length/extent); i *= 2) { + isend_recv(global_cycles, sddt, i, sbuf, rddt, i, rbuf); } } if (doop & DO_ISEND_IRECV) { - printf("# Isend Irecv Wait (length %d)\n", length); - for (i = 1; i <= (length / extent); i *= 2) { - isend_irecv_wait(cycles, sddt, i, sbuf, rddt, i, rbuf); + printf( "# Isend Irecv Wait (length %d)\n", length ); + for (i = 1; i <= (length/extent); i *= 2) { + isend_irecv_wait(global_cycles, sddt, i, sbuf, rddt, i, rbuf); } } if (doop & DO_IRECV_SEND) { - printf("# Irecv send (length %d)\n", length); - for (i = 1; i <= (length / extent); i *= 2) { - irecv_send(cycles, sddt, i, sbuf, rddt, i, rbuf); + printf( "# Irecv send (length %d)\n", length ); + for (i = 1; i <= (length/extent); i *= 2) { + irecv_send(global_cycles, sddt, i, sbuf, rddt, i, rbuf); } } if (doop & DO_IRECV_SEND) { - printf("# Irecv Isend Wait (length %d)\n", length); - for (i = 1; i <= (length / extent); i *= 2) { - irecv_isend_wait(cycles, sddt, i, sbuf, rddt, i, rbuf); + printf( "# Irecv Isend Wait (length %d)\n", length ); + for (i = 1; i <= (length/extent); i *= 2) { + irecv_isend_wait(global_cycles, sddt, i, sbuf, rddt, i, rbuf); } } free(sbuf); diff --git a/test/datatype/unpack_ooo.c b/test/datatype/unpack_ooo.c index 7fdfe790916..a96929d145d 100644 --- a/test/datatype/unpack_ooo.c +++ b/test/datatype/unpack_ooo.c @@ -150,7 +150,7 @@ static int testcase(ompi_datatype_t *newtype, size_t arr[][2]) displ = (char *) &bar[j] - (char *) &bar[0]; } for (i = 0; 0 != arr[i][0]; i++) { - if ((displ >= arr[i][1]) && (displ <= (arr[i][1] + arr[i][0]))) { + if ((displ >= (ptrdiff_t) arr[i][1]) && (displ <= (ptrdiff_t) (arr[i][1] + arr[i][0]))) { fprintf(stderr, "Problem encountered %li bytes into the %d unpack [%" PRIsize_t ":%" PRIsize_t "]\n", From e76ca9b193166a6d05c4ac0f88fbf6c9184fd79a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 28 Apr 2021 18:11:52 -0700 Subject: [PATCH 2/3] test/datatype/partial: make all output on stderr Trivial updates to make all the output appear on stderr (vs. just some of it on stderr and other parts of it on stdout). Signed-off-by: Jeff Squyres --- test/datatype/partial.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/datatype/partial.c b/test/datatype/partial.c index d74f57ffb5a..6d0be90acbe 100644 --- a/test/datatype/partial.c +++ b/test/datatype/partial.c @@ -39,30 +39,32 @@ static void show_neighborhood(double *ptr, int how_many, bool show_hex) { int i; - printf("%12p: ", (void *) ptr); + fprintf(stderr, "%12p: ", (void *) ptr); for (i = -how_many; i < how_many; i++) { if (0 == i) { - printf(" <%g> ", ptr[i]); + fprintf(stderr, " <%g> ", ptr[i]); } else { - printf(" %g ", ptr[i]); + fprintf(stderr, " %g ", ptr[i]); } } if (show_hex) { char *cptr = (char *) ptr; - printf("\n : "); + fprintf(stderr, "\n : "); for (i = -how_many; i < how_many; i++) { - if (0 == i) - printf(" <"); + if (0 == i) { + fprintf(stderr, " <"); + } for (size_t j = 0; j < sizeof(double); j++) { - printf("%02x", cptr[i * sizeof(double) + j]); + fprintf(stderr, "%02x", cptr[i * sizeof(double) + j]); + } + if (0 == i) { + fprintf(stderr, "> "); + } else { + fprintf(stderr, " "); } - if (0 == i) - printf("> "); - else - printf(" "); } } - printf("\n\n"); + fprintf(stderr, "\n\n"); } /** From f76b68a58bffbd67ceedd4bc67eb0c1839cdade8 Mon Sep 17 00:00:00 2001 From: Geoffrey Paulsen Date: Mon, 26 Sep 2022 14:45:23 -0500 Subject: [PATCH 3/3] fixing 6 atomic compare calls Fixing 6 calls that I may have incorrectly addressed in the previous commit when I rebased to latest main. Signed-off-by: Geoffrey Paulsen --- test/asm/atomic_cmpset.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/asm/atomic_cmpset.c b/test/asm/atomic_cmpset.c index d3c2d566a8e..2efa4b307c9 100644 --- a/test/asm/atomic_cmpset.c +++ b/test/asm/atomic_cmpset.c @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) volint = 42; oldint = 42; newint = 50; - assert(opal_atomic_compare_exchange_strong(&volint, &oldint, newint) == true); + assert(opal_atomic_compare_exchange_strong_32(&volint, &oldint, newint) == true); opal_atomic_rmb(); assert(volint == newint); assert(oldint == 42); @@ -228,7 +228,7 @@ int main(int argc, char *argv[]) volint = 42; oldint = 420; newint = 50; - assert(opal_atomic_compare_exchange_strong(&volint, &oldint, newint) == false); + assert(opal_atomic_compare_exchange_strong_32(&volint, &oldint, newint) == false); opal_atomic_rmb(); assert(volint == 42); assert(oldint == 42); @@ -236,21 +236,21 @@ int main(int argc, char *argv[]) volint = 42; oldint = 42; newint = 50; - assert(opal_atomic_compare_exchange_strong_acq(&volint, &oldint, newint) == true); + assert(opal_atomic_compare_exchange_strong_acq_32(&volint, &oldint, newint) == true); assert(volint == newint); assert(oldint == 42); volint = 42; oldint = 420; newint = 50; - assert(opal_atomic_compare_exchange_strong_acq(&volint, &oldint, newint) == false); + assert(opal_atomic_compare_exchange_strong_acq_32(&volint, &oldint, newint) == false); assert(volint == 42); assert(oldint == 42); volint = 42; oldint = 42; newint = 50; - assert(opal_atomic_compare_exchange_strong_rel(&volint, &oldint, newint) == true); + assert(opal_atomic_compare_exchange_strong_rel_32(&volint, &oldint, newint) == true); opal_atomic_rmb(); assert(volint == newint); assert(oldint == 42); @@ -258,7 +258,7 @@ int main(int argc, char *argv[]) volint = 42; oldint = 420; newint = 50; - assert(opal_atomic_compare_exchange_strong_rel(&volint, &oldint, newint) == false); + assert(opal_atomic_compare_exchange_strong_rel_32(&volint, &oldint, newint) == false); opal_atomic_rmb(); assert(volint == 42); assert(oldint == 42);