<div dir="ltr"><div><div>Thanks for your answer, to make sure I have added libraries to makenek ''USR_LFLAGS="-lmpi_cxx -lstdc++" which I'm getting same error,so you mean I need to add appropriate fortran library to USR_LFLAGS?<br>
</div><br></div>Thanks,<br>Ami<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 11, 2013 at 10:47 AM,  <span dir="ltr"><<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ami,<br>
  That's the C++ runtime.  You have two options:<br>
1. Link with the C++ compiler; in this case, you'll have to explicitly add the fortran runtime libraries to the link statement, which is most easily done by adding it to USR_LFLAGS in makenek.  Compiler documents often tell you which libraries implement the fortran runtime, usually in a section about inter-language linking.<br>

<br>
2. Add the C++ std libs to USR_LFLAGS.  The trunk/nek/makenek file has a few examples of this method for gnu/intel/pgi.  Sometimes, like on BG/x, it can be difficult to figure out what all comprises the C++ runtime, which is why I list 1. above.<br>

<br>
- tim<div><div class="h5"><br>
<br>
On 09/11/2013 09:31 AM, <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.<u></u>gov</a> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hello Neks,<br>
<br>
I am trying to run MOAB example with nek5000, but all the time which I am running, it gives me set of undefined<br>
reference error. I put an error with last part of my ./makenek pipe log below.<br>
What is wrong with my work?<br>
<br>
IODebugTrack.cpp:(.text+0xb74)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xb7f)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(unsigned long)'<br>
IODebugTrack.cpp:(.text+0xb8c)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xb97)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(unsigned long)'<br>
IODebugTrack.cpp:(.text+0xbd3)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xbde)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(unsigned long)'<br>
IODebugTrack.cpp:(.text+0xbeb)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xbf6)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(unsigned long)'<br>
IODebugTrack.cpp:(.text+0xc03)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xc0e)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(unsigned long)'<br>
IODebugTrack.cpp:(.text+0xc1b)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xc26)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(unsigned long)'<br>
IODebugTrack.cpp:(.text+0xc33)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
IODebugTrack.cpp:(.text+0xc38)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'<br>
IODebugTrack.cpp:(.text+0xc40)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(std::basic_<u></u>ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'<br>
IODebugTrack.cpp:(.text+0xc50)<u></u>: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::flush()'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function `moab::IODebugTrack::all_<u></u>reduce()':<br>
IODebugTrack.cpp:(.text+0xd08)<u></u>: undefined reference to `MPI_Comm_size'<br>
IODebugTrack.cpp:(.text+0xdfe)<u></u>: undefined reference to `MPI_Gather'<br>
IODebugTrack.cpp:(.text+<u></u>0x1080): undefined reference to `MPI_Gatherv'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function<br>
`__static_initialization_and_<u></u>destruction_0(int, int)':<br>
IODebugTrack.cpp:(.text+<u></u>0x1221): undefined reference to `std::ios_base::Init::Init()'<br>
IODebugTrack.cpp:(.text+<u></u>0x1226): undefined reference to `std::ios_base::Init::~Init()'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function `std::list<moab::IODebugTrack:<u></u>:DRange,<br>
std::allocator<moab::<u></u>IODebugTrack::DRange> >::_M_insert(std::_List_<u></u>iterator<moab::IODebugTrack::<u></u>DRange>,<br>
moab::IODebugTrack::DRange const&)':<br>
IODebugTrack.cpp:(.text._<u></u>ZNSt4listIN4moab12IODebugTrack<u></u>6DRangeESaIS2_EE9_M_<u></u>insertESt14_List_iteratorIS2_<u></u>ERKS2_[std::list<moab::<u></u>IODebugTrack::DRange,<br>
std::allocator<moab::<u></u>IODebugTrack::DRange> >::_M_insert(std::_List_<u></u>iterator<moab::IODebugTrack::<u></u>DRange>,<br>
moab::IODebugTrack::DRange const&)]+0x3a): undefined reference to<br>
`std::__detail::_List_node_<u></u>base::_M_hook(std::__detail::_<u></u>List_node_base*)'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function<br>
`__gnu_cxx::new_allocator<std:<u></u>:_List_node<moab::<u></u>IODebugTrack::DRange><br>
 >::deallocate(std::_List_node<<u></u>moab::IODebugTrack::DRange>*, unsigned long)':<br>
IODebugTrack.cpp:(.text._ZN9__<u></u>gnu_cxx13new_allocatorISt10_<u></u>List_<u></u>nodeIN4moab12IODebugTrack6DRan<u></u>geEEE10deallocateEPS5_m[__gnu_<u></u>cxx::new_allocator<std::_List_<u></u>node<moab::IODebugTrack::<u></u>DRange><br>

 >::deallocate(std::_List_node<<u></u>moab::IODebugTrack::DRange>*, unsigned long)]+0x1c): undefined reference to `operator<br>
delete(void*)'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function<br>
`__gnu_cxx::new_allocator<<u></u>moab::IODebugTrack::DRange>::<u></u>allocate(unsigned long, void const*)':<br>
IODebugTrack.cpp:(.text._ZN9__<u></u>gnu_cxx13new_<u></u>allocatorIN4moab12IODebugTrack<u></u>6DRangeEE8allocateEmPKv[__gnu_<u></u>cxx::new_allocator<moab::<u></u>IODebugTrack::DRange>::<u></u>allocate(unsigned<br>

long, void const*)]+0x2c): undefined reference to `std::__throw_bad_alloc()'<br>
IODebugTrack.cpp:(.text._ZN9__<u></u>gnu_cxx13new_<u></u>allocatorIN4moab12IODebugTrack<u></u>6DRangeEE8allocateEmPKv[__gnu_<u></u>cxx::new_allocator<moab::<u></u>IODebugTrack::DRange>::<u></u>allocate(unsigned<br>

long, void const*)]+0x45): undefined reference to `operator new(unsigned long)'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function<br>
`__gnu_cxx::new_allocator<<u></u>moab::IODebugTrack::DRange>::<u></u>deallocate(moab::IODebugTrack:<u></u>:DRange*, unsigned long)':<br>
IODebugTrack.cpp:(.text._ZN9__<u></u>gnu_cxx13new_<u></u>allocatorIN4moab12IODebugTrack<u></u>6DRangeEE10deallocateEPS3_m[__<u></u>gnu_cxx::new_allocator<moab::<u></u>IODebugTrack::DRange>::<u></u>deallocate(moab::IODebugTrack:<u></u>:DRange*,<br>

unsigned long)]+0x1c): undefined reference to `operator delete(void*)'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o): In function<br>
`__gnu_cxx::new_allocator<std:<u></u>:_List_node<moab::<u></u>IODebugTrack::DRange> >::allocate(unsigned long, void const*)':<br>
IODebugTrack.cpp:(.text._ZN9__<u></u>gnu_cxx13new_allocatorISt10_<u></u>List_<u></u>nodeIN4moab12IODebugTrack6DRan<u></u>geEEE8allocateEmPKv[__gnu_cxx:<u></u>:new_allocator<std::_List_<u></u>node<moab::IODebugTrack::<u></u>DRange><br>

 >::allocate(unsigned long, void const*)]+0x2c): undefined reference to `std::__throw_bad_alloc()'<br>
IODebugTrack.cpp:(.text._ZN9__<u></u>gnu_cxx13new_allocatorISt10_<u></u>List_<u></u>nodeIN4moab12IODebugTrack6DRan<u></u>geEEE8allocateEmPKv[__gnu_cxx:<u></u>:new_allocator<std::_List_<u></u>node<moab::IODebugTrack::<u></u>DRange><br>

 >::allocate(unsigned long, void const*)]+0x46): undefined reference to `operator new(unsigned long)'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>IODebugTrack.o):(.eh_frame+<u></u>0x24b): undefined reference to<br>
`__gxx_personality_v0'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>OrientedBox.o): In function<br>
`moab::operator<<(std::basic_<u></u>ostream<char, std::char_traits<char> >&, moab::OrientedBox const&)':<br>
OrientedBox.cpp:(.text+0x97): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<<<br>
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text+0xaf): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<<<br>
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text+0xbc): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(double)'<br>
OrientedBox.cpp:(.text+0xc9): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<<<br>
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text+0xe1): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<<<br>
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text+0xee): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(double)'<br>
OrientedBox.cpp:(.text+0xfb): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<<<br>
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text+0x113): undefined reference to `std::basic_ostream<char, std::char_traits<char> >&<br>
std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text+0x120): undefined reference to `std::basic_ostream<char, std::char_traits<char><br>
 >::operator<<(double)'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>OrientedBox.o): In function<br>
`__static_initialization_and_<u></u>destruction_0(int, int)':<br>
OrientedBox.cpp:(.text+0x3aaf)<u></u>: undefined reference to `std::ios_base::Init::Init()'<br>
OrientedBox.cpp:(.text+0x3ab4)<u></u>: undefined reference to `std::ios_base::Init::~Init()'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>OrientedBox.o): In function `moab::ErrorCode<br>
moab::EigenDecomp<moab::<u></u>Matrix3, moab::CartVect>(moab::Matrix3 const&, double*, moab::CartVect*)':<br>
OrientedBox.cpp:(.text._<u></u>ZN4moab11EigenDecompINS_<u></u>7Matrix3ENS_8CartVectEEENS_<u></u>9ErrorCodeERKT_PdPT0_[moab::<u></u>ErrorCode<br>
moab::EigenDecomp<moab::<u></u>Matrix3, moab::CartVect>(moab::Matrix3 const&, double*, moab::CartVect*)]+0xb7f): undefined<br>
reference to `std::cerr'<br>
OrientedBox.cpp:(.text._<u></u>ZN4moab11EigenDecompINS_<u></u>7Matrix3ENS_8CartVectEEENS_<u></u>9ErrorCodeERKT_PdPT0_[moab::<u></u>ErrorCode<br>
moab::EigenDecomp<moab::<u></u>Matrix3, moab::CartVect>(moab::Matrix3 const&, double*, moab::CartVect*)]+0xb84): undefined<br>
reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char><br>
 >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'<br>
OrientedBox.cpp:(.text._<u></u>ZN4moab11EigenDecompINS_<u></u>7Matrix3ENS_8CartVectEEENS_<u></u>9ErrorCodeERKT_PdPT0_[moab::<u></u>ErrorCode<br>
moab::EigenDecomp<moab::<u></u>Matrix3, moab::CartVect>(moab::Matrix3 const&, double*, moab::CartVect*)]+0xb89): undefined<br>
reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char><br>
 >(std::basic_ostream<char, std::char_traits<char> >&)'<br>
OrientedBox.cpp:(.text._<u></u>ZN4moab11EigenDecompINS_<u></u>7Matrix3ENS_8CartVectEEENS_<u></u>9ErrorCodeERKT_PdPT0_[moab::<u></u>ErrorCode<br>
moab::EigenDecomp<moab::<u></u>Matrix3, moab::CartVect>(moab::Matrix3 const&, double*, moab::CartVect*)]+0xb91): undefined<br>
reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_<u></u>ostream<char,<br>
std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'<br>
/home/amirreza/Amirreza/moab-<u></u>4.6.0/gcc/lib/libMOAB.a(<u></u>OrientedBox.o):(.eh_frame+<u></u>0x22f): undefined reference to<br>
`__gxx_personality_v0'<br>
collect2: ld returned 1 exit status<br>
make: *** [nek5000] Error 1<br>
<br>
Thanks,<br>
Ami<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.<u></u>gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" target="_blank">https://lists.mcs.anl.gov/<u></u>mailman/listinfo/nek5000-users</a><br>
<br>
</blockquote>
<br>
-- <br>
==============================<u></u>==============================<u></u>====<br>
"You will keep in perfect peace him whose mind is<br>
  steadfast, because he trusts in you."               Isaiah 26:3<br>
<br>
             Tim Tautges            Argonne National Laboratory<br>
         (<a href="mailto:tautges@mcs.anl.gov" target="_blank">tautges@mcs.anl.gov</a>)      (telecommuting from UW-Madison)<br>
 phone (gvoice): <a href="tel:%28608%29%20354-1459" value="+16083541459" target="_blank">(608) 354-1459</a>      1500 Engineering Dr.<br>
            fax: <a href="tel:%28608%29%20263-4499" value="+16082634499" target="_blank">(608) 263-4499</a>      Madison, WI 53706<br>
<br>
______________________________<u></u>_________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.<u></u>gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" target="_blank">https://lists.mcs.anl.gov/<u></u>mailman/listinfo/nek5000-users</a><br>
</blockquote></div><br></div>