Skip to content

issue#22: using one preallocated Moments instance per thread in interpP2...#23

Open
alecjohnson wants to merge 7 commits intoCmPA:masterfrom
alecjohnson:issue22
Open

issue#22: using one preallocated Moments instance per thread in interpP2...#23
alecjohnson wants to merge 7 commits intoCmPA:masterfrom
alecjohnson:issue22

Conversation

@alecjohnson
Copy link
Copy Markdown
Contributor

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).

murci3lag0 and others added 7 commits May 30, 2013 16:20
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants