Skip to content

Commit

Permalink
Workaround bug so that pinned memory can be used with OpenACC
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Hahnfeld authored and Jonas Hahnfeld committed Apr 24, 2017
1 parent e2c108f commit 3fbe3a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,13 @@ int main(int argc, char *argv[]) {
std::exit(1);
}

#ifdef __PGI
// The PGI compiler doesn't like freeing this object together with pinned
// memoy. So leak the memory on purpose...
CG *cg = CG::getInstance();
#else
std::unique_ptr<CG> cg(CG::getInstance());
#endif
cg->parseEnvironment();
cg->init(argv[1]);

Expand Down

0 comments on commit 3fbe3a5

Please sign in to comment.