From 0baf38434263d2df2588963a54d69d3aea91f48b Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 14 Nov 2024 11:02:47 -0700 Subject: [PATCH] Suppress warning instead. --- Source/PeleLMeX_Regrid.cpp | 6 ++++-- Source/PeleLMeX_Utils.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/PeleLMeX_Regrid.cpp b/Source/PeleLMeX_Regrid.cpp index d8849e04..dbe506d6 100644 --- a/Source/PeleLMeX_Regrid.cpp +++ b/Source/PeleLMeX_Regrid.cpp @@ -74,12 +74,13 @@ PeleLM::regrid(int lbase, amrex::Real time, bool initial) // Bcast the test dmap and remake level if (remakeLevel != 0) { - Vector pmap(1); + Vector pmap; if ( ParallelDescriptor::MyProc() == ParallelDescriptor::IOProcessorNumber()) { pmap = test_dmap.ProcessorMap(); } else { +#pragma GCC diagnostic ignored "-Wnull-dereference" pmap.resize(static_cast(grids[0].size())); } ParallelDescriptor::Bcast( @@ -239,12 +240,13 @@ PeleLM::regrid(int lbase, amrex::Real time, bool initial) // Bcast the test dmap if we plan on remaking the level if (remakeLevel != 0) { - Vector pmap(1); + Vector pmap; if ( ParallelDescriptor::MyProc() == ParallelDescriptor::IOProcessorNumber()) { pmap = test_dmap.ProcessorMap(); } else { +#pragma GCC diagnostic ignored "-Wnull-dereference" pmap.resize(static_cast(new_ba.size())); } ParallelDescriptor::Bcast( diff --git a/Source/PeleLMeX_Utils.cpp b/Source/PeleLMeX_Utils.cpp index 658a378d..75417e52 100644 --- a/Source/PeleLMeX_Utils.cpp +++ b/Source/PeleLMeX_Utils.cpp @@ -860,11 +860,12 @@ PeleLM::loadBalanceChemLev(int a_lev) // Bcast the test dmap if better if (updateDmap != 0) { - Vector pmap(1); + Vector pmap; if ( ParallelDescriptor::MyProc() == ParallelDescriptor::IOProcessorNumber()) { pmap = test_dmap.ProcessorMap(); } else { +#pragma GCC diagnostic ignored "-Wnull-dereference" pmap.resize(static_cast(m_baChem[a_lev]->size())); } ParallelDescriptor::Bcast(