Skip to content

Commit

Permalink
Add warning or abort for forcing with managed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsexton03 committed Aug 15, 2023
1 parent 7a8ba99 commit b51682d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Forcing/Forcing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ StochasticForcing::StochasticForcing()
modes_odd[dim] = NULL;
}
mask = NULL;
#ifdef AMREX_USE_GPU
auto* p = dynamic_cast<CArena*>(The_Arena());
if(p->isManaged())
amrex::Warning("Forcing setup uses managed memory which may be non-performant");
else
amrex::Abort("Forcing setup with The_Arena set to device memory is not implemented");
#endif
}

//
Expand Down

0 comments on commit b51682d

Please sign in to comment.