-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing: RMA AxpyInterface #34
Open
sg0
wants to merge
112
commits into
elemental:master
Choose a base branch
from
sg0:testing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 109 commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
969d18d
modified axpy:localtoglobal code to mimic nblocking consensus as show…
sg0 b8e2e8d
forgot to add mpi-3 macros around a variable
sg0 61071e7
preposting receives, alternative to iprobe
sg0 2d52d96
contains code to avoid probe overhead for short messages, Jeffs rma i…
sg0 28faf25
committing after a week, removed prepost related stuff because of poo…
sg0 a9c658c
merging with upstream
sg0 b3e2ec9
forgot a const
sg0 1f9eb06
populating/fixing rmainterface...
sg0 e636c1d
intermediate commits
sg0 aa88f1b
updated macro names - use-barrier to use-nbc, also added provisions t…
sg0 e4a5d6c
comments
sg0 d64331e
forgot to add a constructor
sg0 6c844d7
added a requestfree function to free spurious requests, also added a …
sg0 e12bd08
fixing put
sg0 f55685f
modifications to fix errors in p/g/a
sg0 18598b7
intermediate commit, cleaning up rma interface
sg0 5432b3f
removed spurious instantiations
sg0 8a36dd5
added some checks in p/g/a
sg0 26034bd
intermediate commit
sg0 46648f9
added a comment in Get
sg0 e160ce6
fixed dtype of mpi-get, updated comment
sg0 3fa7135
intermediate commit - introduce another variable to track attachments
sg0 54eba3e
bugs wrt get-put flags
sg0 cd00d7d
fixing detach
sg0 add6b7d
added another flag to track detach, as dtor will call detach again, p…
sg0 d03441f
temporarily reverting back to something that works...the idea is, whe…
sg0 2a914b2
added rmainterface test in line with axpyinterface, removed all heade…
sg0 a759aba
called flush local after p/g/a, modified put-getvector types and init…
sg0 7c169ed
added disp in mpi functions
sg0 15263ff
figured out the displacement, Acc contains correct displacement, modi…
sg0 194298e
addding interface with no local flush, IMO this is temporary, for som…
sg0 8cbc72f
fixed acc and flush...next is get
sg0 77918b2
trying to fix get, tracked some problem in acc, will fix it soon
sg0 51efcae
removed op from acc in rmainterface as well as mpi, mpi has overloade…
sg0 da57bb1
intermediate commit to fixing get
sg0 be45ddf
fixed get
sg0 dfe393e
trying to fix acc...
sg0 b0411ba
modified one-sided interface significantly, using typemap everywhere …
sg0 c18aab4
fixing rma interface - intmd commit
sg0 3a4ca35
removed const_cast and changed type of put-get vectors from byte to T
sg0 47862e0
turning off codepath not required for nb consensus
sg0 27c8da6
some modifications for nb consensus
sg0 ec43dd3
restructure detach for nb consensus
sg0 b70731e
add a progress routine
sg0 5fc36e9
added strided/vector api, untested...removed scale from put
sg0 f76e507
committing test codes, further updates upon testing would ensue
sg0 5de32c4
some more testing, better debug prints
sg0 9f29de0
added HF proxy using original AxpyInterface, got to test well
sg0 c6a067b
following AXPYinterface syntax
sg0 79cddb9
exploring an alternate design of nbc, where notification is sent imme…
sg0 cbd7ff5
made a modification in nb consensus, unless there is a strong reason …
sg0 e88c840
commented out some of the stuff I had for nbc, it will get completely…
sg0 c8ac446
intermediate commit, removed code paths that required request objects…
sg0 e24ae01
removed scale as a parameter from RmaInterface, added a macro to enab…
sg0 1eea9cd
compacted acc function, got to test this
sg0 85dde6a
remove const from Get params, in Get matrix always need to be updatable
sg0 bca226c
move winfree and winunlock in try block
sg0 e7b44c9
removing a barrier in detach, probably not required, we'll see
sg0 b5e1ddb
testing an implementation for nbc, this should be slightly fast, if n…
sg0 bc0441a
minor
sg0 8436525
fixing nbc
sg0 062565c
cp axpyinterface to axpyint2...optimized 2 sided implementation
sg0 793a1a9
intermediate commit for axpy 2.0, to fix rma and orig nbc soon
sg0 db50fa2
intermediate commits, got to fix nbc next, then start over with axpy2
sg0 941a054
non blocking consensus is possible only for local to global in the cu…
sg0 718ca7e
intermediate commit, fixing send/recv
sg0 5dc3697
fixing axpy 2.0...
sg0 78eb494
the coordinates are wrong (to-do next), but the structure is taking s…
sg0 c63fda3
intermediate commit
sg0 fa86f05
packed/unpacked send/receive for local to global...still bugfixing
sg0 c58be27
remove all packed send/recv stuff, falling back to send/recving coord…
sg0 3b055f3
updated the nbc version of axpy original, this is better than before
sg0 02d3b14
modify the ssends to isend for small messages
sg0 757eb3c
redesigned the nextindex logic completely, I got to do the same thing…
sg0 924b36c
flush modified, snipped some junk code...however, we should move away…
sg0 e34ad17
separate struct to handle data and coord...we send coord and data sep…
sg0 94f8f82
tweaking rma
sg0 f5dba36
removing functionality to store put/acc statuses...will use flush always
sg0 40de290
adding local flush after put-acc
sg0 67624b7
remove flush local from put/acc
sg0 e4e7218
add a barrier after nbc stuff in original axpyinterface; replace isse…
sg0 6b4a6e2
axpy2: adding put/get/acc functions which are blocking, the nb ones a…
sg0 55e4d4b
added axpy blocking interface, added waitall in mpi...blocking functi…
sg0 af9f3ca
added some new functions in mpi, still fixing blocking interfaces...g…
sg0 a8a70a8
three small test cases that tests axpy2 blocking and nb, and rma
sg0 63f2f22
adding a sample makefile for tests, will remove it in future though
sg0 1bfa059
modified most of axpy2.0, got to fix get tomorrow
sg0 8d28666
fixing handle_ functions
sg0 e93dbc6
fixed flush implementation...more testing required
sg0 9c22a83
modifying Get
sg0 628f6b0
fixed get
sg0 048875b
fixed Iget, Get and Flush (for Ig/p/a)
sg0 ce206e9
modified blocking interfaces
sg0 a9c85ea
updated get/acc/put...got to test them with larger PEs
sg0 d6eddd6
updated readinc to localflush instead of flush remote
sg0 a515315
introduced rma-blocking interface for put/get and ensured local compl…
sg0 2f802f1
forgot to add cflush in header
sg0 7ba1cce
forgot to add function signatures
sg0 ef56b30
test on data rather than coords
sg0 803305c
added local completion logic
sg0 57093d6
changed the data structure, now we have coords and matrices as struct…
sg0 01a44a2
modified locally blocking routines Acc/Put - memcpying input Z to an …
sg0 5e96051
added const interfaces, some new functions for rmainterface for reque…
sg0 95c9c4b
added some const interfaces, and fixed an error for request based rma…
sg0 2fb071c
delete test case
sg0 85ffff3
merge
sg0 6bb2242
merge
sg0 86f4a80
added a macro for rma axpy, so rma axpy gets enabled when mpi version…
sg0 b235bd2
moved axpy related macros from header file to cmake build files
sg0 ebb4fa6
applied astyle to fix indentation, would do some more commits
sg0 0bf9fc5
final round of indentation checks
sg0 361de46
minor indentation
sg0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
/* | ||
This file is part of Elemental and is under the BSD 2-Clause License, | ||
which can be found in the LICENSE file in the root directory, or at | ||
http://opensource.org/licenses/BSD-2-Clause | ||
*/ | ||
#pragma once | ||
#ifndef EL_AXPYINTERFACE2_HPP | ||
#define EL_AXPYINTERFACE2_HPP | ||
|
||
namespace El { | ||
template<typename T> | ||
class AxpyInterface2 | ||
{ | ||
public: | ||
AxpyInterface2(); | ||
~AxpyInterface2(); | ||
|
||
AxpyInterface2( DistMatrix<T,MC,MR>& Z ); | ||
AxpyInterface2( const DistMatrix<T,MC,MR>& Z ); | ||
|
||
// collective epoch initialization routines | ||
void Attach( DistMatrix<T,MC,MR>& Z ); | ||
void Attach( const DistMatrix<T,MC,MR>& Z ); | ||
void Detach(); | ||
|
||
// remote update routines | ||
|
||
// requires Flush for local+remote | ||
// completion | ||
void Iput( Matrix<T>& Z, Int i, Int j ); | ||
void Iput( const Matrix<T>& Z, Int i, Int j ); | ||
|
||
void Iget( Matrix<T>& Z, Int i, Int j ); | ||
|
||
void Iacc( Matrix<T>& Z, Int i, Int j ); | ||
void Iacc( const Matrix<T>& Z, Int i, Int j ); | ||
|
||
// locally blocking update routines | ||
// reuse input buffer when returns | ||
void Acc( Matrix<T>& Z, Int i, Int j ); | ||
void Acc( const Matrix<T>& Z, Int i, Int j ); | ||
|
||
void Put( Matrix<T>& Z, Int i, Int j ); | ||
void Put( const Matrix<T>& Z, Int i, Int j ); | ||
|
||
// End to End blocking | ||
// will be deprecated soon | ||
void Eacc( Matrix<T>& Z, Int i, Int j ); | ||
void Eacc( const Matrix<T>& Z, Int i, Int j ); | ||
|
||
void Eput( Matrix<T>& Z, Int i, Int j ); | ||
void Eput( const Matrix<T>& Z, Int i, Int j ); | ||
|
||
void Get( Matrix<T>& Z, Int i, Int j ); | ||
|
||
// synchronization routines | ||
void Flush( Matrix<T>& Z ); | ||
void Flush( const Matrix<T>& Z ); | ||
|
||
private: | ||
|
||
static const Int | ||
DATA_PUT_TAG =1, | ||
DATA_GET_TAG =2, | ||
DATA_ACC_TAG =3, | ||
REQUEST_GET_TAG =4, | ||
COORD_ACC_TAG =5, | ||
COORD_PUT_TAG =6; | ||
|
||
// struct for passing data | ||
struct matrix_params_ | ||
{ | ||
const void *base_; | ||
std::vector<std::deque<std::vector<T>>> | ||
data_; | ||
std::vector<std::deque<mpi::Request>> | ||
requests_; | ||
std::vector<std::deque<bool>> | ||
statuses_; | ||
}; | ||
|
||
std::vector<struct matrix_params_> matrices_; | ||
|
||
// struct for passing coordinates | ||
struct coord_params_ | ||
{ | ||
const void *base_; | ||
std::vector<std::deque<std::array<Int, 3>>> | ||
coord_; | ||
std::vector<std::deque<mpi::Request>> | ||
requests_; | ||
std::vector<std::deque<bool>> | ||
statuses_; | ||
}; | ||
|
||
std::vector<struct coord_params_> coords_; | ||
|
||
// for blocking interface | ||
// copying input buffer in this | ||
// intermediate buffer so that input | ||
// buffer could be reused | ||
std::vector<std::vector<std::vector< T >>> | ||
dataVectors_; | ||
|
||
DistMatrix<T,MC,MR>* GlobalArrayPut_; | ||
const DistMatrix<T,MC,MR>* GlobalArrayGet_; | ||
|
||
bool toBeAttachedForPut_, toBeAttachedForGet_, | ||
attached_, detached_; | ||
|
||
// next index for data and coord | ||
Int NextIndexData ( | ||
Int target, | ||
Int dataSize, | ||
const void* base_address, | ||
Int *mindex); | ||
|
||
Int NextIndexCoord ( | ||
Int i, Int j, | ||
Int target, | ||
const void* base_address, | ||
Int *cindex); | ||
|
||
bool Testall(); | ||
bool Test( Matrix<T>& Z ); | ||
bool Test( const Matrix<T>& Z ); | ||
bool TestAny( Matrix<T>& Z ); | ||
bool TestAny( const Matrix<T>& Z ); | ||
|
||
void Waitall(); | ||
void Wait( Matrix<T>& Z ); | ||
void Wait( const Matrix<T>& Z ); | ||
void WaitAny( Matrix<T>& Z ); | ||
void WaitAny( const Matrix<T>& Z ); | ||
|
||
// these are only used for nonblocking | ||
// update rountines | ||
void HandleGlobalToLocalData( Matrix<T>& Z ); | ||
|
||
void HandleLocalToGlobalData( Matrix<T>& Z, Int source ); | ||
void HandleLocalToGlobalAcc( Matrix<T>& Z, Int source ); | ||
|
||
void HandleLocalToGlobalData( const Matrix<T>& Z, Int source ); | ||
void HandleLocalToGlobalAcc( const Matrix<T>& Z, Int source ); | ||
}; | ||
} // namespace El | ||
#endif // ifndef EL_AXPYINTERFACE2_HPP |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector and std::deque were imported into the El namespace, and so it is now okay (and preferred) to use just "vector" and "deque" (the same holds for "cout", "cerr", and "endl").