Skip to content

Commit

Permalink
Increase BUFSIZE when gathering DFT field data (#1791)
Browse files Browse the repository at this point in the history
A 16MB allocation is negligible and reduces the number of all_to_all communication iterations required to perform the consolidation.
  • Loading branch information
ahoenselaar authored Oct 23, 2021
1 parent 849bf3d commit 577109d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ complex<double> fields::process_dft_component(dft_chunk **chunklists, int num_ch
/* repeatedly call sum_to_all to consolidate full field array */
/* on all cores */
/***************************************************************/
#define BUFSIZE 1 << 16 // use 64k buffer
#define BUFSIZE 1 << 20 // use 1M element (16 MB) buffer
complex<double> *buf = new complex<double>[BUFSIZE];
ptrdiff_t offset = 0;
size_t remaining = array_size;
Expand Down

0 comments on commit 577109d

Please sign in to comment.