GlobalArrays / ga

Partitioned Global Address Space (PGAS) library for distributed arrays
http://hpc.pnl.gov/globalarrays/
Other
97 stars 38 forks source link

error in armci/examples/features/non-blocking/overlap/overlap.c #261

Closed jeffhammond closed 1 year ago

jeffhammond commented 2 years ago

https://github.com/GlobalArrays/ga/blob/master/armci/examples/features/non-blocking/overlap/overlap.c#L287 does a NbGetS where the input and output buffers are the same.

                case STRIDED_GET:
                    ARMCI_INIT_HANDLE(&handle);
                    time_start = armci_timer();
                    time_after_start = armci_timer();

                    ARMCI_ASSERT(ARMCI_NbGetS(array_ptrs[second], &stride_dist,
                                array_ptrs[second], &stride_dist,
                                block_sizes, 1, second, &handle));
                    time_after_call = armci_timer();

                    ARMCI_ASSERT(ARMCI_Wait(&handle));
                    time_after_wait = armci_timer();
                    break;

This does not seem legal, and is inconsistent with the other tests, including https://github.com/GlobalArrays/ga/blob/master/armci/examples/features/non-blocking/overlap/overlap.c#L259:

                case CONT_GET:
                    ARMCI_INIT_HANDLE(&handle);
                    time_start = armci_timer();
                    time_after_start = armci_timer();

                    ARMCI_ASSERT(ARMCI_NbGet(array_ptrs[second],
                                array_ptrs[rank], msg_size,
                                second, &handle));
                    time_after_call = armci_timer();

                    ARMCI_ASSERT(ARMCI_Wait(&handle));
                    time_after_wait = armci_timer();
                    break;

I propose to fix this by making the input and output of the former match the latter. Any objections?

edoapra commented 2 years ago

The proposed change looks good to me