Nek5000 / gslib

sparse communication library
Other
26 stars 26 forks source link

Add a non-blocking version of gs #11

Closed thilinarmtb closed 6 years ago

thilinarmtb commented 6 years ago

Add a non-blocking version of gs for pairwise and all_reduce modes. Currently they pass the tests in gslib/gs_test.c and gslib/gs_unique_test.c;

Also, tests were added for both blocking and non-blocking versions.

TODO

thilinarmtb commented 6 years ago

@stgeke : I think this is good for merging as it is. Let me know if you have additional feedback. We should decide on how to expose the non-blocking API to the user.

stgeke commented 6 years ago

Let’s add the user API (C and Fortran) before merging. What do you suggest as API?

On 19 Jan 2018, at 14:23, Thilina Rathnayake <notifications@github.com mailto:notifications@github.com > wrote:

@stgeke : I think this is good for merge as it is. Let me know if you have additional feedback. We should decide on how to expose the non-blocking API to the user.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

thilinarmtb commented 6 years ago

@stgeke : How does a707a01 looks like? Any comments?

thilinarmtb commented 6 years ago

We can add one more level of indirection (using double pointers) so that we can free individual entries of the array nblkng_dict, which is also an option.

thilinarmtb commented 6 years ago

e4c138e is the solution using another level of indirection.

thilinarmtb commented 6 years ago

@stgeke : Added the interfaces for gs_vec and gs_many. Will add tests as well. Are you fine with the API for these two?

stgeke commented 6 years ago
thilinarmtb commented 6 years ago
stgeke commented 6 years ago

I guess the three separate wait() functions are ok.

stgeke commented 6 years ago

Now as I am thinking of it .. why can't we use the request handle to differentiate between the modes?

thilinarmtb commented 6 years ago

Ahha, Yes we can. I will update the API.

thilinarmtb commented 6 years ago

I made the change, now we can use a single gs_wait. There is another small issue. gs_many takes a void *const *u as the first argument while gs and gs_vec uses void *u. It might be a problem as we use the same structure to store arguments. I will add tests to confirm. Currently, it gives compiler warnings.

stgeke commented 6 years ago

You can use gs_setup_pick().

-----Original message-----

From:Thilina Rathnayake notifications@github.com Sent: Thursday 3rd May 2018 20:45 To: gslib/gslib gslib@noreply.github.com Cc: Stefan K. stgeke@gmail.com; Mention mention@noreply.github.com Subject: Re: [gslib/gslib] [WIP] Add a non-blocking version of gs (#11)

@thilinarmtb commented on this pull request.

In tests/fortran/f-igs.f https://github.com/gslib/gslib/pull/11#discussion_r185900860:

thilinarmtb commented 6 years ago

Thanks @stgeke ! I fixed it. I am okay with merging this PR now.

thilinarmtb commented 6 years ago

@stgeke Thanks for merging !!