Skip to content

Commit

Permalink
Avoid amrex::Initialized
Browse files Browse the repository at this point in the history
Too early
  • Loading branch information
ax3l authored Sep 18, 2023
1 parent bc23bc5 commit 12d93dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Base/AMReX_ParmParse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ read_file (const char* fname, std::list<ParmParse::PP_entry>& tab)
if ( fname != nullptr && fname[0] != 0 )
{
#ifdef AMREX_USE_MPI
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(amrex::Initialized(), "read_file: AMReX must be initialized");
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(ParallelDescriptor::Communicator() != MPI_COMM_NULL, "read_file: AMReX must be initialized");
#endif

Vector<char> fileCharPtr;
Expand Down Expand Up @@ -1073,7 +1073,7 @@ ParmParse::prefixedName (const std::string& str) const
void
ParmParse::addfile (std::string const& filename) {
#ifdef AMREX_USE_MPI
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(amrex::Initialized(), "ParmParse::addfile: AMReX must be initialized");
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(ParallelDescriptor::Communicator() != MPI_COMM_NULL, "ParmParse::addfile: AMReX must be initialized");
#endif

auto l = std::list<std::string>{filename};
Expand Down

0 comments on commit 12d93dc

Please sign in to comment.