Skip to content

Commit 9eada39

Browse files
committed
Move m_glo/m_ghi init to .cpp
Try to address NVHPC 24.1 linker issue: ``` /usr/bin/ld: lib/libwarpx.3d.MPI.CUDA.DP.PDP.OPMD.PSATD.EB.QED.a(BTD_Plotfile_Header_Impl.cpp.o): in function `BTDPlotfileHeaderImpl::BTDPlotfileHeaderImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/runner/work/WarpX/WarpX/Source/Diagnostics/BTD_Plotfile_Header_Impl.cpp:26: undefined reference to `amrex::Vector<std::array<double, 3ul>, std::allocator<std::array<double, 3ul> > >::~Vector()' ```
1 parent 10a7f97 commit 9eada39

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Source/Diagnostics/BTD_Plotfile_Header_Impl.H

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ private:
144144
/** Number of Fabs in the plotfile. */
145145
int m_numFabs;
146146
/** Lower corner physical coordinates of each fab in the plotfile. */
147-
amrex::Vector<amrex::Array<amrex::Real, AMREX_SPACEDIM> > m_glo {{AMREX_D_DECL(0.,0.,0.)}};
147+
amrex::Vector<amrex::Array<amrex::Real, AMREX_SPACEDIM> > m_glo;
148148
/** Upper corner physical coordinates of each fab in the plotfile. */
149-
amrex::Vector<amrex::Array<amrex::Real, AMREX_SPACEDIM> > m_ghi {{AMREX_D_DECL(1.,1.,1.)}};
149+
amrex::Vector<amrex::Array<amrex::Real, AMREX_SPACEDIM> > m_ghi;
150150
std::string m_CellPath;
151151

152152
};

Source/Diagnostics/BTD_Plotfile_Header_Impl.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
using namespace amrex::literals;
2323

2424
BTDPlotfileHeaderImpl::BTDPlotfileHeaderImpl (std::string const & Headerfile_path)
25-
: m_Header_path{Headerfile_path}
25+
: m_Header_path{Headerfile_path},
26+
m_glo{{AMREX_D_DECL(0., 0., 0.)}},
27+
m_ghi{{AMREX_D_DECL(1., 1., 1.)}}
2628
{
2729

2830
}

0 commit comments

Comments
 (0)