Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion AmpTools/IUAmpTools/NormIntInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class NormIntInterface

void invalidateTerms();

// needs different implementations in MPI so make virtual
virtual void loadMC() const;

#endif
Expand Down
2 changes: 2 additions & 0 deletions AmpTools/IUAmpToolsMPI/AmpToolsInterfaceMPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ AmpToolsInterfaceMPI::AmpToolsInterfaceMPI(ConfigurationInfo* configurationInfo)
NormIntInterface* normInt = NULL;
if (genMCRdr && accMCRdr && intenMan && !(reaction->normIntFileInput())){
normInt = new NormIntInterfaceMPI(genMCRdr, accMCRdr, *intenMan);
// no need to call loadMC() here because the constructor of
// NormIntInterfaceMPI calls it through setupMPI()
Comment on lines +126 to +127
m_normIntMap[reactionName] = normInt;
if (reaction->normIntFile() == "")
report( WARNING, kModule ) << "no name given to NormInt file for reaction "
Expand Down
9 changes: 6 additions & 3 deletions AmpTools/IUAmpToolsMPI/NormIntInterfaceMPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ NormIntInterfaceMPI::setupMPI()

// load the MC into CPU memory on the follower nodes -- this is effectively
// a copy from the DataReaderMPI cache to the AmpVecs structure
// and it is only run on the followers to avoid large memory
// usage on the lead node
loadMC();

long int thisEvents;
Expand Down Expand Up @@ -203,9 +205,10 @@ NormIntInterfaceMPI::sumIntegrals( IntType type ) const
}

void
NormIntInterfaceMPI::loadMC() const
{
// avoids large memory allocations on the lead node
NormIntInterfaceMPI::loadMC() const{

// do not load MC on the leader node
// only the followers need the MC
Comment on lines 207 to +211
if( !m_isLeader ) NormIntInterface::loadMC();
}

2 changes: 1 addition & 1 deletion AmpTools/IUAmpToolsMPI/NormIntInterfaceMPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class NormIntInterfaceMPI : public NormIntInterface
void forceCacheUpdate( bool normIntOnly = false ) const;

void loadMC() const;

private:

void setupMPI();
Expand Down
Loading