issue#22: using one preallocated Moments instance per thread in interpP2...#23
Open
alecjohnson wants to merge 7 commits intoCmPA:masterfrom
Open
issue#22: using one preallocated Moments instance per thread in interpP2...#23alecjohnson wants to merge 7 commits intoCmPA:masterfrom
alecjohnson wants to merge 7 commits intoCmPA:masterfrom
Conversation
In file EMfields3D.h the indentation is changed in the indexes of some vectors to improve reading. This commit is mainly used to test the merging of modifications from multiple developers in the master branch of the GitHub repository.
…alecjohnson-issue12
…into alecjohnson-pulluptohere
1. In EMfields the assert function is changed to assert_eq. 2. In iPic3D the default initialization uses the GEM problem: be careful to comment or modify this part if you're not runing the GEM problem (for future versions this should be changed). 3. Contiguous memory allocation is now available using Jorge's version. WARNING: Alec's version seem to work better on MIC architectures. If you plan on using iPic3D on MIC, see commit @58f69e812bb6aa8ddf52fa33ed70a9b368d6c3f8 4. Adding memory assignment functions for contigously allocated matrices in Alloc.h (Jorge's version). 5. For compilation reasons the diagnostics.cpp is now diagnostics.h
Updating the GEM challenge input file to print diagnostics on every cycle.
Applying patch suggested on issue CmPA#22. Tests using the GEM.inp file suggest that performance is improved using this patch on different CPU architectures with gcc compiler.
alecjohnson
added a commit
to alecjohnson/iPic3D
that referenced
this pull request
Jul 16, 2013
alecjohnson
added a commit
to alecjohnson/iPic3D
that referenced
this pull request
Jul 16, 2013
alecjohnson
added a commit
to alecjohnson/iPic3D
that referenced
this pull request
Jul 16, 2013
alecjohnson
added a commit
to alecjohnson/iPic3D
that referenced
this pull request
Jul 16, 2013
…ces for OpenMP Using a grid-sized instance of Moments for every OpenMP thread will consume too much memory if a very large number of OpenMP threads are used and so is something of a stop-gap. But the current serial code would be unacceptably slow in that case, so this shouldn't really break anything. EMfields should be redesigned to contain a set of Moments instances to be passed from the particle solver to the field solver.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This should address the performance issue that Stefano was seeing.
I changed the code to preallocate one instance of the Moments class
for each OpenMP thread. In the case that OpenMP is not enabled,
only one instance of the Moments class is created. I do not see a
compelling reason to avoid use of the Moments class in the case
that OpenMP is not used. For the moment there is still a (very minor) benefit
from the fact that one fewer index is needed when summing moments.
In the end I think that the summed moments themselves should be
put in Moments class (that perhaps lives along with a Fields class in a
GridData class).