1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 05:07:05 +01:00

Hadrons: Application is not storing the environment ref but calling getInstance() each time, solving a very nasty set fault on Linux/KNL

This commit is contained in:
2017-01-21 13:40:23 -08:00
parent 74ac2aa676
commit b7da264b0a
2 changed files with 29 additions and 22 deletions

View File

@ -98,11 +98,13 @@ public:
void printSchedule(void);
// loop on configurations
void configLoop(void);
private:
// environment shortcut
Environment & env(void) const;
private:
long unsigned int locVol_;
std::string parameterFileName_{""};
GlobalPar par_;
Environment &env_;
std::vector<unsigned int> program_;
Environment::Size memPeak_;
bool scheduled_{false};
@ -115,14 +117,14 @@ private:
template <typename M>
void Application::createModule(const std::string name)
{
env_.createModule<M>(name);
env().createModule<M>(name);
}
template <typename M>
void Application::createModule(const std::string name,
const typename M::Par &par)
{
env_.createModule<M>(name, par);
env().createModule<M>(name, par);
}
END_HADRONS_NAMESPACE