<div dir="ltr">I did all the things, plus some more, I have attached the ncmpi_notyet, recompiled, re-checked, and got the same thing.<div><br></div><div><div>./nctst        ./<a href="http://testfile.nc">testfile.nc</a></div><div>ncmpi_inq_typeids not implemented</div><div>[n-62-12-2:21767] *** Process received signal ***</div><div>[n-62-12-2:21767] Signal: Segmentation fault (11)</div><div>[n-62-12-2:21767] Signal code: Address not mapped (1)</div><div>[n-62-12-2:21767] Failing at address: 0xffffffffffffffe8</div><div>[n-62-12-2:21767] [ 0] /lib64/libpthread.so.0(+0xf710)[0x2b3e93945710]</div><div>[n-62-12-2:21767] [ 1] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZNSo6sentryC2ERSo+0x19)[0x2b3e934ace79]</div><div>[n-62-12-2:21767] [ 2] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x29)[0x2b3e934ad589]</div><div>[n-62-12-2:21767] [ 3] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x2b3e934ad9e7]</div><div>[n-62-12-2:21767] [ 4] ./nctst[0x40ad62]</div><div>[n-62-12-2:21767] [ 5] ./nctst[0x40b93c]</div><div>[n-62-12-2:21767] [ 6] /lib64/libc.so.6(__libc_start_main+0xfd)[0x2b3e93d76d5d]</div><div>[n-62-12-2:21767] [ 7] ./nctst[0x405899]</div><div>[n-62-12-2:21767] *** End of error message ***</div><div>make: *** [check] Segmentation fault</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-02 2:35 GMT+02:00 Wei-keng Liao <span dir="ltr"><<a href="mailto:wkliao@eecs.northwestern.edu" target="_blank">wkliao@eecs.northwestern.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You are right. None of the locations that call ncmpi_inq_typeids() are supposed to reach at all,<br>
because that function is for compound data types (not supported by PnetCDF.)<br>
I added a printf statement to all places this function is called, but none shows.<br>
<br>
What you suggested may be a right solution, could you please give it a try?<br>
i.e. change line 112 of file ncmpi_notyet.cpp from<br>
<br>
ncmpi_inq_typeids(int ncid, int *ntypes, int *typeids){printf("%s not implemented\n",__func__); return NC_EINVAL;}<br>
to<br>
ncmpi_inq_typeids(int ncid, int *ntypes, int *typeids){*ntypes = 0; printf("%s not implemented\n",__func__); return NC_EINVAL;}<br>
<br>
<br>
Once you made the changes, you can run "make" command in directory src/libcxx<br>
and then go to test/CXX, run "make check".<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Wei-keng<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Jun 1, 2015, at 7:14 PM, Nick Papior Andersen wrote:<br>
<br>
><br>
><br>
> 2015-06-02 1:48 GMT+02:00 Nick Papior Andersen <<a href="mailto:nickpapior@gmail.com">nickpapior@gmail.com</a>>:<br>
> I did this (adding traceback to the debugging compilation)<br>
><br>
> ../configure CXXFLAGS='-g -O0 -traceback' CFLAGS='-g -O0 -traceback' CC=mpicc CXX=mpicxx F77=mpif77 F90=mpif90 FC=mpif90 --prefix=/zdata/groups/common/nicpa/2015-test/XeonX5550/pnetcdf/1.6.0/intel-15.0.1 --with-mpi=/zdata/groups/common/nicpa/2015-test/XeonX5550/openmpi/1.8.5/intel-15.0.1 --enable-debug --disable-fortran<br>
> make<br>
> cd test/CXX<br>
> make check<br>
><br>
> And got (well the same thing :( ):<br>
> ./nctst        ./<a href="http://testfile.nc" target="_blank">testfile.nc</a><br>
> ncmpi_inq_typeids not implemented<br>
> [n-62-12-2:31968] *** Process received signal ***<br>
> [n-62-12-2:31968] Signal: Segmentation fault (11)<br>
> [n-62-12-2:31968] Signal code: Address not mapped (1)<br>
> [n-62-12-2:31968] Failing at address: 0xffffffffffffffe8<br>
> [n-62-12-2:31968] [ 0] /lib64/libpthread.so.0(+0xf710)[0x2b13425f0710]<br>
> [n-62-12-2:31968] [ 1] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZNSo6sentryC2ERSo+0x19)[0x2b1342157e79]<br>
> [n-62-12-2:31968] [ 2] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x29)[0x2b1342158589]<br>
> [n-62-12-2:31968] [ 3] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x2b13421589e7]<br>
> [n-62-12-2:31968] [ 4] ./nctst[0x40ad62]<br>
> [n-62-12-2:31968] [ 5] ./nctst[0x40b93c]<br>
> [n-62-12-2:31968] [ 6] /lib64/libc.so.6(__libc_start_main+0xfd)[0x2b1342a21d5d]<br>
> [n-62-12-2:31968] [ 7] ./nctst[0x405899]<br>
> [n-62-12-2:31968] *** End of error message ***<br>
> make: *** [check] Segmentation fault<br>
><br>
><br>
> Note that I have "corrected" the return to an empty string and the above compilation.<br>
> However, it is clear from the code that the values that are to be updated (number of types) isn't set. Hence the error is in the logic behind calling the inq_typ, not the preceding code, which should function once the number of types code has been implemented, correctly setting the number of types.<br>
> I think I was a bit unclear here.<br>
> The integer size for the number of types hasn't been set properly, hence the segmentation fault (I think).<br>
> The error is before this call, it shouldn't be made at all as you state. Hence any debugging will probably not show anything useful as it is a path that shouldn't be taken.<br>
> So the problem is why inq_typ is called. (I think we agree on this no?)<br>
><br>
> (code snippet:<br>
> int ntypesp;<br>
>     ncmpiCheck(ncmpi_inq_typeids(getId(), &ntypesp,typeidsp),__FILE__,__LINE__);<br>
> )<br>
> with no initialization.<br>
> Maybe the "not implemented" routine should set the ntypesp to 0?<br>
><br>
><br>
> Note, that this may also be a compiler bug. :(<br>
><br>
> 2015-06-02 1:24 GMT+02:00 Wei-keng Liao <<a href="mailto:wkliao@eecs.northwestern.edu">wkliao@eecs.northwestern.edu</a>>:<br>
> Hi, Nick<br>
><br>
> I tried to see if any place that can indirectly invoke that message, but could not find one.<br>
><br>
> I wonder if you can kindly help me find more information about this error, by rebuilding your PnetCDF with the following configure command (with debug option enabled):<br>
><br>
> ./configure --enable-debug --disable-fortran --with-mpi=/zdata/groups/common/nicpa/2015-test/XeonX5550/openmpi/1.8.5/intel-15.0.1<br>
><br>
> Disabling Fortran gives you a shorter build time.<br>
><br>
> Once you build it, please cd directly to test/CXX and run "make check" there.<br>
> This can skip all other tests.<br>
><br>
> thanks<br>
><br>
> Wei-keng<br>
><br>
> On Jun 1, 2015, at 5:21 PM, Nick Papior Andersen wrote:<br>
><br>
> > Oh, yeah sorry. it is the latest 1.6.0 version.<br>
> > Here is a tar with the config.log and the tmp.test (it was 1 mb, so sorry for taring).<br>
> ><br>
> ><br>
> ><br>
> > 2015-06-02 0:16 GMT+02:00 Wei-keng Liao <<a href="mailto:wkliao@eecs.northwestern.edu">wkliao@eecs.northwestern.edu</a>>:<br>
> > That message "ncmpi_inq_typeids not implemented" should not appear.<br>
> > It is fishy.<br>
> ><br>
> > I forgot to ask the PnetCDF version you are using.<br>
> > Please let me know. Also, please send me the file config.log. Thanks.<br>
> ><br>
> > Wei-keng<br>
> ><br>
> > On Jun 1, 2015, at 5:02 PM, Nick Papior Andersen wrote:<br>
> ><br>
> > > Oh, and I do not have these problems using pure gcc 5.1.0 on my local machine.<br>
> > ><br>
> > > 2015-06-02 0:00 GMT+02:00 Nick Papior Andersen <<a href="mailto:nickpapior@gmail.com">nickpapior@gmail.com</a>>:<br>
> > > Dear Wei-keng and Rob,<br>
> > ><br>
> > > My default options did not include -g flag, so the coredump was quite un-useful ;(<br>
> > ><br>
> > > I did the catchsegv thing... Here is the output:<br>
> > ><br>
> > > $> catchsegv ./nctst ./<a href="http://testfile.nc" target="_blank">testfile.nc</a><br>
> > > ncmpi_inq_typeids not implemented<br>
> > > *** Segmentation fault<br>
> > > Register dump:<br>
> > ><br>
> > >  RAX: 00002b61bec50000   RBX: 00002b61bec50000   RCX: 000000000000000c<br>
> > >  RDX: 0000000000000000   RSI: 00002b61bec50000   RDI: 00007fff5e677fa0<br>
> > >  RBP: 00007fff5e677fa0   R8 : 0000000000e79b60   R9 : 00000000000000f0<br>
> > >  R10: 00007fff5e677d70   R11: 00002b61be9e1560   R12: 00007fff5e6780e0<br>
> > >  R13: 00007fff5e678920   R14: 000000000000004c   R15: 00007fff5e677fa0<br>
> > >  RSP: 00007fff5e677f60<br>
> > ><br>
> > >  RIP: 00002b61be9e0e79   EFLAGS: 00010206<br>
> > ><br>
> > >  CS: 0033   FS: 0000   GS: 0000<br>
> > ><br>
> > >  Trap: 0000000e   Error: 00000005   OldMask: 00000000   CR2: ffffffe8<br>
> > ><br>
> > >  FPUCW: 0000037f   FPUSW: 00000000   TAG: 00002b61<br>
> > >  RIP: bf8f7fff   RDP: 5e677ff0<br>
> > ><br>
> > >  ST(0) 0000 0000000000000033   ST(1) 0000 000000000000000d<br>
> > >  ST(2) 0000 0000000000c80000   ST(3) 0000 0000000000000640<br>
> > >  ST(4) 0000 0000000000000000   ST(5) 0000 0000000000000000<br>
> > >  ST(6) 0000 0000000000000000   ST(7) 8000 8000000000000000<br>
> > >  mxcsr: 9fe0<br>
> > >  XMM0:  00000000000000000000000000000000 XMM1:  00000000000000000000000000000000<br>
> > >  XMM2:  00000000000000000000000000000000 XMM3:  00000000000000000000000000000000<br>
> > >  XMM4:  00000000000000000000000000000000 XMM5:  00000000000000000000000000000000<br>
> > >  XMM6:  00000000000000000000000000000000 XMM7:  00000000000000000000000000000000<br>
> > >  XMM8:  00000000000000000000000000000000 XMM9:  00000000000000000000000000000000<br>
> > >  XMM10: 00000000000000000000000000000000 XMM11: 00000000000000000000000000000000<br>
> > >  XMM12: 00000000000000000000000000000000 XMM13: 00000000000000000000000000000000<br>
> > >  XMM14: 00000000000000000000000000000000 XMM15: 00000000000000000000000000000000<br>
> > ><br>
> > > Backtrace:<br>
> > > /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZNSo6sentryC2ERSo+0x19)[0x2b61be9e0e79]<br>
> > > /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x29)[0x2b61be9e1589]<br>
> > > /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x2b61be9e19e7]<br>
> > > ??:0(_Z3genRKP19ompi_communicator_tPKcN7PnetCDF9NcmpiFile10FileFormatE)[0x40d4a5]<br>
> > > ??:0(main)[0x409f60]<br>
> > > /lib64/libc.so.6(__libc_start_main+0xfd)[0x2b61bf0a5d5d]<br>
> > > ??:0(_start)[0x409cb9]<br>
> > ><br>
> > ><br>
> > > Where I think the top line is pretty self-explanatory ;)<br>
> > > And looking at the code, it makes sense, whether it should be called at all is another matter...<br>
> > ><br>
> > > 2015-06-01 18:25 GMT+02:00 Wei-keng Liao <<a href="mailto:wkliao@eecs.northwestern.edu">wkliao@eecs.northwestern.edu</a>>:<br>
> > > Hi, Nick,<br>
> > ><br>
> > > To print the trace of a segmentation fault is easy. You can run command<br>
> > > "gdb corefile" and when at the gdb prompt, type command "where".<br>
> > > If you can send me the printout, it will be helpful.<br>
> > ><br>
> > > Just to clarify, if gcc 5.1.0 is used, are you saying there is no problem of building PnetCDF?<br>
> > > Can you tell me the configure command line you used?<br>
> > ><br>
> > > Wei-keng<br>
> > ><br>
> > > On Jun 1, 2015, at 11:11 AM, Nick Papior Andersen wrote:<br>
> > ><br>
> > > ><br>
> > > ><br>
> > > > 2015-06-01 17:09 GMT+02:00 Wei-keng Liao <<a href="mailto:wkliao@eecs.northwestern.edu">wkliao@eecs.northwestern.edu</a>>:<br>
> > > > Hi, Nick<br>
> > > ><br>
> > > > Your fix for the first bug makes all sense. I will add that to PnetCDF. Thanks.<br>
> > > ><br>
> > > > As for the second error, can you use gdb to print the location of the segmentation fault?<br>
> > > > I haven't done that. I would rather not go that path? I ain't an avid user of gdb (yet).<br>
> > > > Also, do both errors happen to Intel C compiler?<br>
> > > > It is only the intel cxx compiler. I only show the gcc version as intel uses that for compatibility issues. (see -gcc-name)<br>
> > > > I thought that this could be problem... Maybe it isn't.<br>
> > > ><br>
> > > > The two C compilers you used are the latest ones. I have not tried them.<br>
> > > > Could you compile/run a simple C++ program to see if gcc works in your environment?<br>
> > > > Or, if you installed gcc from source, have you tried run "make -k check"?<br>
> > > > See <a href="https://gcc.gnu.org/install/test.html" target="_blank">https://gcc.gnu.org/install/test.html</a><br>
> > > ><br>
> > > > Gcc/g++ runs fine. I can compile 20 other different libraries with full support. If anything, it is related to the intel compiler. :(<br>
> > > > If you do not need C++ component, you can build a PnetCDF without it, by adding option<br>
> > > > "--disable-cxx" to the configure command.<br>
> > > > This is already my diverting methodology :) Thanks.<br>
> > > ><br>
> > > > By the way, I plan to release 1.6.1 today, but it will not fix the second error you are seeing.<br>
> > > > I will try if I can find those new versions of C compiler and fix the problem.<br>
> > > > The fix will have to wait for the next release, though.<br>
> > > > Ok. :)<br>
> > > ><br>
> > > > Thanks again for reporting the problem.<br>
> > > > You are welcome.<br>
> > > > Thanks for the software.<br>
> > > ><br>
> > > > Wei-keng<br>
> > > ><br>
> > > > On Jun 1, 2015, at 1:00 AM, Nick Papior Andersen wrote:<br>
> > > ><br>
> > > > > I am trying to compile and make check with these compilers:<br>
> > > > > intel 2015.1.13<br>
> > > > > and<br>
> > > > > gcc 5.1.0 in the path.<br>
> > > > ><br>
> > > > > Compiling goes fine and everything seems to link correctly.<br>
> > > > > However make check errors out in the CXX test.<br>
> > > > ><br>
> > > > > First I get this error message:<br>
> > > > > ./nctst        ./<a href="http://testfile.nc" target="_blank">testfile.nc</a><br>
> > > > > terminate called after throwing an instance of 'std::logic_error'<br>
> > > > >   what():  basic_string::_M_construct null not valid<br>
> > > > > [n-62-12-2:09803] *** Process received signal ***<br>
> > > > > [n-62-12-2:09803] Signal: Aborted (6)<br>
> > > > > [n-62-12-2:09803] Signal code:  (-6)<br>
> > > > > [n-62-12-2:09803] [ 0] /lib64/libpthread.so.0(+0xf710)[0x2aae4ac54710]<br>
> > > > > [n-62-12-2:09803] [ 1] /lib64/libc.so.6(gsignal+0x35)[0x2aae4ae94625]<br>
> > > > > [n-62-12-2:09803] [ 2] /lib64/libc.so.6(abort+0x175)[0x2aae4ae95e05]<br>
> > > > > [n-62-12-2:09803] [ 3] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d)[0x2aae4a7428cd]<br>
> > > > > [n-62-12-2:09803] [ 4] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(+0x8c936)[0x2aae4a740936]<br>
> > > > > [n-62-12-2:09803] [ 5] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(+0x8c981)[0x2aae4a740981]<br>
> > > > > [n-62-12-2:09803] [ 6] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(+0x8cb98)[0x2aae4a740b98]<br>
> > > > > [n-62-12-2:09803] [ 7] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZSt19__throw_logic_errorPKc+0x3f)[0x2aae4a767faf]<br>
> > > > > [n-62-12-2:09803] [ 8] ./nctst[0x461b42]<br>
> > > > > [n-62-12-2:09803] [ 9] ./nctst[0x4644b6]<br>
> > > > > [n-62-12-2:09803] [10] ./nctst[0x40c313]<br>
> > > > > [n-62-12-2:09803] [11] ./nctst[0x409f60]<br>
> > > > > [n-62-12-2:09803] [12] /lib64/libc.so.6(__libc_start_main+0xfd)[0x2aae4ae80d5d]<br>
> > > > > [n-62-12-2:09803] [13] ./nctst[0x409cb9]<br>
> > > > > [n-62-12-2:09803] *** End of error message ***<br>
> > > > ><br>
> > > > ><br>
> > > > > Secondly I change in file src/libcxx/ncmpiType.cpp:<br>
> > > > > function inq_type has 'return NULL' which cannot be done using returns of string (unless it is a pointer, which it isn't)<br>
> > > > > So I change it to an empty string:<br>
> > > > > 'return ""'<br>
> > > > > (I am not sure when this is reached, but the error message changes as can be seen below, hence my suspicion is at that code segment)<br>
> > > > ><br>
> > > > > Now I recompile and get this alternate error message:<br>
> > > > > ./nctst        ./<a href="http://testfile.nc" target="_blank">testfile.nc</a><br>
> > > > > [n-62-12-2:23419] *** Process received signal ***<br>
> > > > > [n-62-12-2:23419] Signal: Segmentation fault (11)<br>
> > > > > [n-62-12-2:23419] Signal code: Address not mapped (1)<br>
> > > > > [n-62-12-2:23419] Failing at address: 0xffffffffffffffe8<br>
> > > > > [n-62-12-2:23419] [ 0] /lib64/libpthread.so.0(+0xf710)[0x2ab6b02fa710]<br>
> > > > > [n-62-12-2:23419] [ 1] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZNSo6sentryC2ERSo+0x19)[0x2ab6afe61e79]<br>
> > > > > [n-62-12-2:23419] [ 2] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x29)[0x2ab6afe62589]<br>
> > > > > [n-62-12-2:23419] [ 3] /zdata/groups/common/nicpa/2015-test/generic/gcc/5.1.0/lib64/libstdc++.so.6(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x2ab6afe629e7]<br>
> > > > > [n-62-12-2:23419] [ 4] ./nctst[0x40d4a5]<br>
> > > > > [n-62-12-2:23419] [ 5] ./nctst[0x409f60]<br>
> > > > > [n-62-12-2:23419] [ 6] /lib64/libc.so.6(__libc_start_main+0xfd)[0x2ab6b0526d5d]<br>
> > > > > [n-62-12-2:23419] [ 7] ./nctst[0x409cb9]<br>
> > > > > [n-62-12-2:23419] *** End of error message ***<br>
> > > > > make[2]: *** [testing] Segmentation fault<br>
> > > > ><br>
> > > > > There seem to be something fishy with the cxx interface?<br>
> > > > > I am no expert in cxx... :( So had troubles debugging further...<br>
> > > > ><br>
> > > > > --<br>
> > > > > Kind regards Nick<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > > Kind regards Nick<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Kind regards Nick<br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Kind regards Nick<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Kind regards Nick<br>
> > <log-test.tar.gz><br>
><br>
><br>
><br>
><br>
> --<br>
> Kind regards Nick<br>
><br>
><br>
><br>
> --<br>
> Kind regards Nick<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Kind regards Nick</div></div></div>
</div>