-
Notifications
You must be signed in to change notification settings - Fork 52
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
Parallelize over basis #626
base: develop
Are you sure you want to change the base?
Conversation
…rnel calls. Now passes pointers to fields in Hamiltonian and geometry in helper struct.
Now passes pointers to interaction data in helper structs.
…n/spirit into parallelize_over_basis
…change over spins
…ance and some comment changes
…cell_atoms<100 The reason is that this check scales quadratically in n_cell_atoms.
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.
Elegant solution! 👍
Only needs some small changes.
Could use a little refinement and transferral to the C++/OpenMP version, but not necessary for merging IMO
namespace Engine | ||
{ | ||
|
||
struct Pair_Order |
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.
The File should be named like the struct
// Compute the offsets at which each cell atom has to look into the sorted pairs vector | ||
for( int i = 1; i < n_pairs_per_cell_atom.size(); i++ ) | ||
{ | ||
offset_per_cell_atom[i] += offset_per_cell_atom[i - 1] + n_pairs_per_cell_atom[i - 1]; |
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.
Do I understand correctly that the resulting intervals of indices into the list of pairs do not overlap, because for the parallel Hamiltonian implementations the lists include the redundant pairs?
for( std::int64_t i = 0; i < n_cell_atoms; ++i ) | ||
|
||
// This scales quadratically in n_cell_atoms, so we check for co-incident positions only if n_cell_atoms is somewhat small! | ||
if( n_cell_atoms < 100 ) |
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.
this needs an else
with a warning log message telling the user that only the first N atoms were checked
63fbd74
to
2edff73
Compare
Started to implement parallelization over single spins instead of lattice basis cells.
Closes #420.