[MOAB-dev] problem with pcomm
Lorenzo Alessio Botti
lorenzoalessiobotti at gmail.com
Thu Dec 3 08:34:29 CST 2015
Dear all,
thanks for help it seems that the problem is related to the -stdlib=libstdc++ flag.
Adding it to the compiler flags the code runs fine.
Recent moab builds rely on this flag while older didn’t.
The issue is that the flag will not allow me to use c++11, right?
Is there a way to build moab without such flag.
Bests.
Lorenzo
> On 02 Dec 2015, at 18:58, Grindeanu, Iulian R. <iulian at mcs.anl.gov> wrote:
>
> Hi Lorenzo,
> This seems to be a problem on your system.
> Maybe gdb is broken?
>
> http://stackoverflow.com/questions/33159172/unable-to-step-into-a-class-method-gdb <http://stackoverflow.com/questions/33159172/unable-to-step-into-a-class-method-gdb>
>
> Indeed, the message is not helpful in finding out what is the issue
>
> Maybe Vijay or Rajeev can help more, they do compile on macs.
>
> How did you configure hdf5? Did you use the same mpich version?
>
>
> Thanks,
> Iulian
> From: Lorenzo Alessio Botti [lorenzoalessiobotti at gmail.com]
> Sent: Wednesday, December 02, 2015 11:33 AM
> To: MOAB dev
> Cc: Grindeanu, Iulian R.
> Subject: Re: [MOAB-dev] problem with pcomm
>
> This is what I get with gdb
> Not very informative, is it?
>
> moab is compiled with —enable-debug
> Should I run with or compile with particular flags?
>
> Reading symbols for shared libraries ++++++++..............bfd_mach_o_scan_read_symtab_symbol: symbol "_bzero" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_memccpy" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_memchr" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_memcmp" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_memcpy" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_memmove" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_memset" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_strchr" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_strcmp" is unsupported 'indirect' reference: setting to undefined
> bfd_mach_o_scan_read_symtab_symbol: symbol "_strncmp" is unsupported 'indirect' reference: setting to undefined
> ...warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Objects/coretls.build/coretls.build/Objects-normal/x86_64/system_coretls_vers.o" - no debug information available for "system_coretls_vers.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_ciphersuites.a(tls_ciphersuites.o)" - no debug information available for "tls_ciphersuites.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslSession.o)" - no debug information available for "sslSession.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslCipherSpecs.o)" - no debug information available for "sslCipherSpecs.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslDigests.o)" - no debug information available for "sslDigests.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslCrypto.o)" - no debug information available for "sslCrypto.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslChangeCipher.o)" - no debug information available for "sslChangeCipher.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslCert.o)" - no debug information available for "sslCert.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslKeyExchange.o)" - no debug information available for "sslKeyExchange.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslAlertMessage.o)" - no debug information available for "sslAlertMessage.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslHandshake.o)" - no debug information available for "sslHandshake.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslHandshakeFinish.o)" - no debug information available for "sslHandshakeFinish.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(tls1Callouts.o)" - no debug information available for "tls1Callouts.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(sslHandshakeHello.o)" - no debug information available for "sslHandshakeHello.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(tls_handshake.o)" - no debug information available for "tls_handshake.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a(ssl3Callouts.o)" - no debug information available for "ssl3Callouts.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(tls1RecordCallouts.o)" - no debug information available for "tls1RecordCallouts.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(ssl3RecordCallouts.o)" - no debug information available for "ssl3RecordCallouts.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(tls_record.o)" - no debug information available for "tls_record.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(sslRc4Cipher.o)" - no debug information available for "sslRc4Cipher.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(sslMemory.o)" - no debug information available for "sslMemory.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(sslUtils.o)" - no debug information available for "sslUtils.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(symCipherParams.o)" - no debug information available for "symCipherParams.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(sslNullCipher.o)" - no debug information available for "sslNullCipher.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(symCipher.o)" - no debug information available for "symCipher.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(tls_digest.o)" - no debug information available for "tls_digest.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(tls_hashhmac.o)" - no debug information available for "tls_hashhmac.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a(tls_hmac.o)" - no debug information available for "tls_hmac.c".
>
> warning: Could not find object file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_stream_parser.a(tls_stream_parser.o)" - no debug information available for "tls_stream_parser.c".
>
> ...................... done
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000001030
> std::vector<char, std::allocator<char> >::begin (this=0x1030) at stl_vector.h:340
> 340 { return const_iterator(this->_M_impl._M_start); }
>
>
>> On 02 Dec 2015, at 18:29, Grindeanu, Iulian R. <iulian at mcs.anl.gov <mailto:iulian at mcs.anl.gov>> wrote:
>>
>> Dear Lorenzo,
>> you just configure moab with --enable-debug
>>
>> something like this:
>>
>> ./configure --disable-fortran --disable-imesh --with-mpi=/Users/ihabia/src2/mpich-3.2/mpich3/ --with-hdf5=/Users/ihabia/src2/hdf5-1.8.16/hdf5/ --prefix=/Users/ihabia/src2/moab-4.8.2/moab --enable-debug
>>
>> I see now that you use hdf5 1.8.16, the make check error you see could be related to this
>> (we test regularly with 1.8.12)
>>
>> Still, your crash with pcomm is unrelated to hdf5 version
>>
>> Iulian
>>
>> From: Lorenzo Alessio Botti [lorenzoalessiobotti at gmail.com <mailto:lorenzoalessiobotti at gmail.com>]
>> Sent: Wednesday, December 02, 2015 11:11 AM
>> To: MOAB dev
>> Cc: Grindeanu, Iulian R.
>> Subject: Re: [MOAB-dev] problem with pcomm
>>
>> Dear Iulian, how do I enable debug mode?
>> I want to be sure compile with the right flags…
>>
>> Thanks
>> Lorenzo
>>
>>
>>> On 02 Dec 2015, at 18:03, Grindeanu, Iulian R. <iulian at mcs.anl.gov <mailto:iulian at mcs.anl.gov>> wrote:
>>>
>>> Hi Lorenzo,
>>> Your code works on my linux machine.
>>> It could be something specific to OSX,
>>> Sometimes we find that OSX uncovers bugs
>>>
>>> You mentioned that there is a seg fault at pcomm_tag(mbImpl, true)
>>>
>>> It just creates there a sparse tag with name __PARALLEL_COMM, which will be used to store ParallelComm objects on the root (entity handle = 0)
>>>
>>> Can you compile in debug mode and give more trace info?
>>>
>>> Thanks,
>>> Iulian
>>>
>>> From: Lorenzo Alessio Botti [lorenzoalessiobotti at gmail.com <mailto:lorenzoalessiobotti at gmail.com>]
>>> Sent: Wednesday, December 02, 2015 10:20 AM
>>> To: MOAB dev
>>> Cc: Grindeanu, Iulian R.; Vijay S. Mahadevan
>>> Subject: Re: [MOAB-dev] problem with pcomm
>>>
>>>
>>>
>>> =====================================
>>> MOAB 4.8.2: test/test-suite.log
>>> =====================================
>>>
>>> # TOTAL: 35
>>> # PASS: 35
>>> # SKIP: 0
>>> # XFAIL: 0
>>> # FAIL: 0
>>> # XPASS: 0
>>> # ERROR: 0
>>>
>>> .. contents:: :depth: 2
>>>
>>> This is the sole failure.
>>>
>>> ==============================================
>>> MOAB 4.8.2: test/parallel/test-suite.log
>>> ==============================================
>>>
>>> # TOTAL: 11
>>> # PASS: 10
>>> # SKIP: 0
>>> # XFAIL: 0
>>> # FAIL: 1
>>> # XPASS: 0
>>> # ERROR: 0
>>>
>>> .. contents:: :depth: 2
>>>
>>> FAIL: parallel_hdf5_test
>>> ========================
>>>
>>> Running test_write_elements ...
>>> Running test_write_elements ...
>>> Warning: acis file has sequence numbers!
>>> Warning: acis file has sequence numbers!
>>> Warning: acis file has sequence numbers!
>>> Running test_write_shared_sets ...
>>> Running test_write_shared_sets ...
>>> Warning: acis file has sequence numbers!
>>> Warning: acis file has sequence numbers!
>>> Warning: acis file has sequence numbers!
>>> Running test_var_length_parallel ...
>>> Running test_var_length_parallel ...
>>> Running test_read_elements ...
>>> Running test_read_elements ...
>>> Running test_read_elements_by_rank ...
>>> Running test_read_elements_by_rank ...
>>> Running test_read_tags ...
>>> Running test_read_tags ...
>>> Running test_read_global_tags ...
>>> Running test_read_global_tags ...
>>> Running test_read_sets ...
>>> Running test_read_sets ...
>>> Running test_read_sets_bcast_dups ...
>>> Running test_read_sets_bcast_dups ...
>>> Running test_read_sets_read_dups ...
>>> Running test_read_sets_read_dups ...
>>> Running test_read_bc_sets ...
>>> Running test_read_bc_sets ...
>>> Fatal error in MPI_Reduce: Invalid datatype, error stack:
>>> MPI_Reduce(1258): MPI_Reduce(sbuf=0x7fff533896d4, rbuf=0x7fff533896c8, count=3, MPI_DATATYPE_NULL, MPI_SUM, root=0, MPI_COMM_WORLD) failed
>>> MPI_Reduce(1168): Datatype for argument datatype is a null datatype
>>> FAIL parallel_hdf5_test (exit status: 3)
>>>
>>>
>>> The whole code, without any MPI initialisation,
>>>
>>> #include "moab/ParallelComm.hpp"
>>> #include "MBParallelConventions.h"
>>> #include "MBTagConventions.hpp"
>>> #include "moab/Core.hpp"
>>> #include "moab_mpi.h"
>>>
>>> using namespace moab;
>>>
>>> int main(int argc, char **argv)
>>> {
>>> Core moab;
>>> Interface& imoab = moab;
>>>
>>> ParallelComm* pcomm = ParallelComm::get_pcomm(&moab, 0);
>>> if (0 == pcomm)
>>> {
>>> pcomm = new ParallelComm(&imoab, MPI_COMM_WORLD);
>>> }
>>> delete pcomm;
>>> return EXIT_SUCCESS;
>>> };
>>>
>>> ~
>>>
>>> This is the Makefile
>>> MOAB_LIB_DIR = /Users/ihabia/src2/moab-4.8.2/moab/
>>> include $(MOAB_LIB_DIR)/lib/moab.make
>>>
>>> %.o : %.cpp
>>> @echo "Compiling ("$(CXX)") "$<" "
>>> @$(CXX) ${MOAB_INCLUDES} -c $< -o $@
>>>
>>> CXX = mpicxx -O2 -DNDEBUG
>>>
>>> objects := $(patsubst %.cpp,%.o,$(wildcard ./*.cpp))
>>>
>>> mbtestrun : $(objects)
>>> @echo "Linking "$(CURDIR)"/"$@
>>> @$(CXX) $(objects) -o $@ $(MOAB_LIBS_LINK)
>>>
>>> .PHONY : clean
>>>
>>> clean :
>>> @rm $(objects)
>>>
>>>
>>> and this is mob.make
>>>
>>> # The values below are for an un-installed copy of MOAB used directly
>>> # from its build build directory. These values will be overridden below
>>> # for installed copies of MOAB.
>>> MOAB_LIBDIR = /Users/ihabia/src2/moab-4.8.2/src/.libs
>>> MOAB_INCLUDES = -I/Users/ihabia/src2/moab-4.8.2/src \
>>> -I/Users/ihabia/src2/moab-4.8.2/src \
>>> -I/Users/ihabia/src2/moab-4.8.2/src/oldinc \
>>> -I/Users/ihabia/src2/moab-4.8.2/src/parallel \
>>> -I/Users/ihabia/src2/moab-4.8.2/src/parallel
>>>
>>> MOAB_INCLUDES +=
>>>
>>> MOAB_CPPFLAGS = -I/Users/ihabia/src2/hdf5-1.8.16/hdf5//include -isystem /Users/ihabia/src2/hdf5-1.8.16/hdf5//include
>>> MOAB_CXXFLAGS = -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -stdlib=libstdc++ -O2 -DNDEBUG
>>> MOAB_CFLAGS = -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG
>>> MOAB_FFLAGS =
>>> MOAB_FCFLAGS =
>>> MOAB_LDFLAGS = -L/Users/ihabia/src2/hdf5-1.8.16/hdf5//lib -stdlib=libstdc++
>>>
>>>
>>> MOAB_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB -lhdf5 -lc++ -lz -ldl -lm -lc++ -lz -ldl -lm
>>> DAGMC_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB -lhdf5 -lc++ -lz -ldl -lm -lc++ -lz -ldl -lm
>>>
>>> MOAB_CXX = /Users/ihabia/src2/mpich-3.2/mpich3//bin/mpicxx
>>> MOAB_CC = /Users/ihabia/src2/mpich-3.2/mpich3//bin/mpicc
>>> MOAB_FC =
>>> MOAB_F77 =
>>>
>>> # Override MOAB_LIBDIR and MOAB_INCLUDES from above with the correct
>>> # values for the installed MOAB.
>>>
>>> MOAB_LIBDIR=/Users/ihabia/src2/moab-4.8.2/moab/lib
>>> MOAB_INCLUDES=-I/Users/ihabia/src2/moab-4.8.2/moab/include
>>>
>>>
>>>
>>>
>>>> On 02 Dec 2015, at 16:17, Grindeanu, Iulian R. <iulian at mcs.anl.gov <mailto:iulian at mcs.anl.gov>> wrote:
>>>>
>>>> Hi Lorenzo,
>>>>
>>>> Do you initialize MPI before using moab?
>>>>
>>>>
>>>> Iulian
>>>>
>>>> ________________________________________
>>>> From: moab-dev-bounces at mcs.anl.gov <mailto:moab-dev-bounces at mcs.anl.gov> [moab-dev-bounces at mcs.anl.gov <mailto:moab-dev-bounces at mcs.anl.gov>] on behalf of Vijay S. Mahadevan [vijay.m at gmail.com <mailto:vijay.m at gmail.com>]
>>>> Sent: Wednesday, December 02, 2015 9:08 AM
>>>> To: Lorenzo Alessio Botti
>>>> Cc: MOAB dev
>>>> Subject: Re: [MOAB-dev] problem with pcomm
>>>>
>>>> Lorenzo, we test your configuration very regularly (on buildbot and on
>>>> linux machines) and I haven't seen any issues with ParallelComm. Does
>>>> "make check" pass cleanly ?
>>>>
>>>> I'll see if I can replicate this on my Mac.
>>>>
>>>> Vijay
>>>>
>>>> On Wed, Dec 2, 2015 at 8:49 AM, Lorenzo Alessio Botti
>>>> <lorenzoalessiobotti at gmail.com <mailto:lorenzoalessiobotti at gmail.com>> wrote:
>>>>> Dear All,
>>>>> I have a problem with the latest moab builds (both 4.8.2 and 4.9)…
>>>>> I cannot run the following code in an application linked to moab
>>>>>
>>>>> Core moab;
>>>>>
>>>>> Interface& imoab = moab;
>>>>>
>>>>>
>>>>> ParallelComm* pcomm = ParallelComm::get_pcomm(&moab, 0);
>>>>>
>>>>> if (0 == pcomm)
>>>>>
>>>>> {
>>>>>
>>>>> pcomm = new ParallelComm(&imoab, MPI_COMM_WORLD);
>>>>>
>>>>> }
>>>>>
>>>>> delete pcomm;
>>>>>
>>>>>
>>>>> It seems that a segmentation fault is triggered during the initialization of
>>>>> the pcomm in particular in this function
>>>>>
>>>>> Tag ParallelComm::pcomm_tag(Interface *impl,
>>>>>
>>>>> bool create_if_missing)
>>>>>
>>>>>
>>>>> with create_if_missing = true.
>>>>>
>>>>> I’m building on OS X.
>>>>> Have you ever experienced this issue? What can I do?
>>>>>
>>>>> I attach the config.log below
>>>>>
>>>>>
>>>>>
>>>>> Bests
>>>>> Lorenzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20151203/c72c4154/attachment-0001.html>
More information about the moab-dev
mailing list