Skip to content
Snippets Groups Projects
Commit deae0fed authored by Sergey Kosukhin's avatar Sergey Kosukhin Committed by Moritz Hanke
Browse files

adds a workaround for NVHPC 24.3+ in a test program

parent bed91cb3
No related branches found
No related tags found
No related merge requests found
......@@ -82,13 +82,26 @@ int main(void) {
xt_idxlist_delete(tgt_idxlist);
xt_idxlist_delete(src_idxlist);
struct yac_interpolation_exchange * exchanges[] = {exchange, exchange_copy};
enum {NUM_EXCH = sizeof(exchanges) / sizeof(exchanges[0])};
for (int optional_put_get = 0; optional_put_get < 2; ++optional_put_get) {
check_exchange(exchange, is_source, is_target, optional_put_get);
check_exchange(exchange_copy, is_source, is_target, optional_put_get);
// #define NVHPC_BUG
// Starting version 24.3, NVHPC generates invalid code here
#ifdef NVHPC_BUG
check_exchange(exchanges[0], is_source, is_target, optional_put_get);
check_exchange(exchanges[1], is_source, is_target, optional_put_get);
#else
for (size_t exch_idx = 0; exch_idx < NUM_EXCH; ++exch_idx)
check_exchange(
exchanges[exch_idx], is_source, is_target, optional_put_get);
#endif
}
yac_interpolation_exchange_delete(exchange, "main cleanup");
yac_interpolation_exchange_delete(exchange_copy, "main cleanup");
for (size_t exch_idx = 0; exch_idx < NUM_EXCH; ++exch_idx)
yac_interpolation_exchange_delete(exchanges[exch_idx], "main cleanup");
xt_finalize();
MPI_Finalize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment